Volkswagen ID Forum banner
101 - 109 of 109 Posts
Ok, a little more then about the update process. Like I wrote above: " So in short, the swup itself doesn't seem to do the update, it just prepares everything, reboots the car into update mode and there some other binary takes over, checks the signatures and if correct processes the update ". This indeed was correct. So how it works is that the car reboots in update mode, which is the 'baremetal' mode in QNX. It loads the "ifs-exynosauto9_evt1-bare.bin" file. This is a so called QNX "IFS" file container. Its contents can be extracted with "dumpifs": GitHub - askac/dumpifs: Dirty hack dumpifs it's not packed or anything at all so you can just dump it. It will run the "proc/boot/.script" file, which in turns calls some things and then calls ".update_auto.sh" which will mount the USB and then runs "sysupdater" which does the actual signature checks, updates the firmware and then reboots into normal mode again.

Going to analyse that file now and see if there's some way in.

To be continued ...
You're my new Super Hero! Seriously. I have huge appreciation to people who can almost reverse engineer such cases.

Keep up the good work and I'm waiting for more exciting updates.
 
Ok, a little more then about the update process. Like I wrote above: " So in short, the swup itself doesn't seem to do the update, it just prepares everything, reboots the car into update mode and there some other binary takes over, checks the signatures and if correct processes the update ". This indeed was correct. So how it works is that the car reboots in update mode, which is the 'baremetal' mode in QNX. It loads the "ifs-exynosauto9_evt1-bare.bin" file. This is a so called QNX "IFS" file container. Its contents can be extracted with "dumpifs": GitHub - askac/dumpifs: Dirty hack dumpifs it's not packed or anything at all so you can just dump it. It will run the "proc/boot/.script" file, which in turns calls some things and then calls ".update_auto.sh" which will mount the USB and then runs "sysupdater" which does the actual signature checks, updates the firmware and then reboots into normal mode again.

Going to analyse that file now and see if there's some way in.

To be continued ...
Maybe you should turn in your resume to VW. We need software engineers.
 
I was looking into the "Green Engineering Menu" that the VAG group always likes to put in their cars. Hacking is definitely easy when you have more debug output, which you normally can configure via their Engineering menu. A quick websearch learns that so far no one seems to have found it yet in the Volkswagen ID4 series. In the blackhat document that I linked above, they show it, they call it the "IVI log management panel", but it's really the "GEM" ("Green Engineering Menu"). In the blackhat document they state it's at http://127.0.0.1:54323 but they dont explain how they reach it. The thing is of course that 127.0.0.1 is 'localhost' so it can not be accessed via another computer, only the ICAS3 itself can access it.

So in the IVI directory of the firmware we find all those "EXT4.sparse" files. I'm still not 100% sure what the file format is HOWEVER I found that they contain a normal EXT4 header. You just need to delete the first 0x28 header bytes, save it and then you can open it with for example "ext2explore.exe" in windows. I couldn't mount them in Linux though, it seems it's not 100% EXT4 compatible, they made some changes in the header but at least that windows app can open and extract the files.

So one of the files is the "agl-vw_hmi.ext4.sparse.vw_eu" file. If we extract it we get the Green Engineering Menu code. In the "gemweb.conf", which is used to configure the GEM webserver, they specify:

server.listen.0 = 127.0.0.1:54323
server.listen.1 = [::1]:54323

So it's indeed running the GEM server at this address. In the "HTML" directory you can see all the html files it uses (like "Debugging.html")
Image



Image


and the whole java code is there. However I haven't found out HOW this menu normally gets accessed. I assume those guys who wrote that blackhat document installed a tunnel and then just forwarded everything. But since we still don't have an entry ,we can't do that. I assume that the 'official' way to access the GEM webserver is via a hidden menu, but I couldn't find anything yet ....

BTW I DO think I have a possible hack into the system but I need my OBD eleven to test it. And I left it at my other house, won't have access to it for another month so can't test my hack yet ...
 
To get green menu, you need root. After that, it's easy to install proxy to get connected to local 127.0.0.1 ip
Interesting, did you manage to get root? I think I've found a hack but it will only work for versions with a HUD (head up display). My ID4 doesnt have one ... So here's the very first public exploit for an ID4 car (hopefully LOL), only for versions with a HUD unfortunately.

So the vulnerability is in "ar_run.sh" file. BTW, "AR" probably stands for "Augmented Reality", which of course is what a HUD does, it shows stuff on your drivers window, so augmenting 'reality'. So this script actually contains a part that copies and extracts a tar file, to update the current AR driver !!

# Update AR
update_AR()
{
BACKUP_DIR="$AR_CONTROL_DIR/AR_backup";
if [ -f $AR_CONTROL_DIR/ARCtrl_Update_SW ] ; then
echo "Updating AR_Creator ....";
if [ -d $BACKUP_DIR ] ; then
rm -rf $BACKUP_DIR;
fi

mkdir $BACKUP_DIR;
mv AR_Creator $BACKUP_DIR;
mv ar_run.sh $BACKUP_DIR;
mv $ARCREATOR_DATA/caar_data $BACKUP_DIR;

cp -R $AR_CONTROL_DIR/AR_SW/ARC_Update.tar.gz ./;
tar -xzf ./ARC_Update.tar.gz;

rm ./ARC_Update.tar.gz;

# copy files to proper location
cp -R ./lge/app_ro/ar_creator/* ./; # valid only for updating by USB
cp -R ./data/lge/ar_creator/* ./data/; # valid only for updating by USB
cp -R ./data/lge/ar_creator/* $ARCREATOR_DATA; # valid only for updating by USB
chmod 755 AR_Creator;
chmod 755 ar_run.sh;

# To indicater updating AR_Creator is done
./AR_Creator -a;

elif [ -f $AR_CONTROL_DIR/ARCtrl_Update_ASSET ] ; then
echo "Updating Asset ....";
mv $ARCREATOR_DATA/caar_data/assets.zip $BACKUP_DIR/b_assets.zip;
cp $AR_CONTROL_DIR/ASSET/assets.zip $ARCREATOR_DATA/caar_data/assets.zip;

fi
}

As you can see, it copies and extracts an ARC_Update.tar.gz file from USB if certain conditions are met. Obviously if this executes we could copy any file/script and have it executed! And then we'll own the car :)

If anyone with a HUD, who is on version 1516 (might also work on later version), you can try with this file: Filebin | 20dfreq7vrznt78j
It's just a directory with the contents of the original AR directory in the 1516 firmware in the included tar file, together with the directories and files that the script checks for, so it won't change anything in your system just yet LOL.
Extract the contents to the root of an USB stick (so that you'll see the "ARCreatorCtrl" directory in the root of your USB stick) and insert it into the car and let it process.
If it worked, it will just have copied the original files to the ARCreatorCtrl/AR_backup on the USB. So check if that directory has any files after you've inserted the USB for a while. If it does contain files, then script indeed executed which means we then have our way in:)

Not 100% sure when this script executes though, might need to hard reboot the media unit (remove that yellow jumper below the steering wheel for a few seconds), while having the USB inserted.

Also don't remove the USB too quickly, if you remove it while it's extracting the update file, this might mess up your files and you might have to do a whole new firmware installation of the 1516 files to get your HUD working again. So don't remove the drive too quickly. I'd suggest to let the USB stick connected for at least a minute (so starting to count when the whole media system in the car has booted, just to be on the safe side)

Hoping someone with a HUD is brave enough to try :) If it actually worked (and indeed copied files to the USB drive) then the next step is of course to create our own scripts and put them into the tar file.

BTW for reference the whole original script: Filebin | f0lo3t9b8vomui48 so people can verify if I did everything right.
 
hi,

I bought ID.4 Chinese versions recently, but I live in Dubai. I am facing a problem with Online activation which can not be done. is there any way to activate it or change the software to a European one?

most of the functions are not available due to the above-mentioned hurdle!
hi did you find any way to active
i have id7 and same problem with activation
 
101 - 109 of 109 Posts