edit:
here is "super" aka developer testmode. Be careful. You use at your own risk.
original post:
So I spent some time in IDA trying to understand how the unit reads testmode.key.
From another post, it seems that there are some variations of testmode.key.
One variation launches Testmode.exe in "service" mode. (which on latest software seems to have copy feature disabled.)
Looking inside of testmode.exe there appears to be a variation of testmode called "developer" mode.
Looking at the other TESTMODE.KEY that was on the condi hackmode thread, there is a version that triggers a "scripting" mode which is run through an encrypted? file called ScriptExec.ini.
A couple of goals:
1. understand how ScriptExec.ini is deobfuscated/decrypted.
2. understand TESTMODE.KEY and if we can launch TestMode.exe in "developer" mode?
So looking at TestMode.exe in IDA, I see reference to some basic scripting commands which I suspect are encrypted in ScriptExec.ini.
Some of the commands I see available look like:
EXIST
MKDIR
COPY
REMOVE
FORMAT
//
ECHO
CLS
SLEEP
TIMER
TIME
KEYWAIT
RESET
MOUNT
VERDISP
TYPE
COLOR
ERROR
LOGSAVE
LOGERASE
MENU
GOTO
COMP
IMGOPEN
IMGCLOSE
IMGFLG
IMGCOPY
IMGERASE
IMGSEEK
ACTIVATEDEVICE
DEACTIVATEDEVICE
GETVER
BACKREAD
BACKWRITE
BACKERASE
BACKDISP
ASTSTOP
MOVIUPDATE
CIDCHECK
SETEXEC
DBGOUT
I have stared at a sample of ScriptExec.ini that supposedly copies 7z.dll to flash?. I have tried rotate, shift, and xor the bytes but nothing stands out. It could be recursively xor'ed or maybe it really is encrypted? (Judging from the rest of pioneer code, i just find that to unbelievable.) I dont see any ascii patterns or anything like arm instructions in it.
Only thing that seems interesting is that it is exactly 1024 (0x400) bytes.
Anyhow - opening the discussion on this one.
-------
Now on to TESTMODE.KEY which i had a little bit? more success with experimentation.
I started playing with bytes in the TESTMODE.KEY that was provide by condi's hackmode (which just goes into regular? "service" testmode.
Couple of observations from poking on the file, in no particular order:
1. When I was playing around with bytes, only messing with the 3rd byte in the word would seem to invalidate.
2. I actually changed the first byte in each word to anything without breaking it. I have so far changed the first bytes in each word to FF.
3. Of the "important" 3rd byte in each word, 0x44 seems to be the lowest byte int he range (and has a frequent occurrance). 0x6c seems to be the highest.
4. i could truncate the file from 164 down to 78 bytes and the file still be valid. I could also add random words, like FF 00 60 00 to the end and it did not invalidate.
5. tried trimming some words off the front, but that made it stop working
Here is where I left off.
0000000: ff00 4400 ff00 4400 ff00 4a00 ff00 6200 ..D...D...J...b. 0000010: ff00 6300 ff00 6600 ff00 6100 ff00 5500 ..c...f...a...U. 0000020: ff00 6000 ff00 4400 ff00 4400 ff00 4900 ..`...D...D...I. 0000030: ff00 6200 ff00 6c00 ff00 4400 ff00 4400 ..b...l...D...D. 0000040: ff00 4b00 ff00 4400 ff00 4400 ff00 4400 ..K...D...D...D. 0000050: ff00 4400 ff00 4400 ff00 4b00 ff00 6700 ..D...D...K...g. 0000060: ff00 5900 ff00 6600 ff00 6a00 ff00 5d00 ..Y...f...j...]. 0000070: ff00 5700 ff00 5900 ff00 6000 ..W...Y...`.
So opening this up to a puzzle contest. ;0
