Hello everybody,
while playing with some encrypted swf files I stumbled upon this thread: http://www.woodmann.com/forum/showthread.php?t=9572&highlight=flash+swf.
I know it's from a while back but people might still be interested. I am using the excellent JSwiff Java SWF manipulation library to toy with the 'encrypted' files and I've been able to at least extract the unencrypted actionscript code (although some variable names are mangled).
SWF Encrypt 1.0 places the missing actionscript behind an <end> instruction. Flasm doesn't disassemble beyond <end> so that's why it's 'hidden'.
I've also found a more interesting mangled SWF in the wild that actually places code in unknown tags (id=253). These tags contain some unknown data and a series of instructions. It looks like this:
[unknown data][action block][<end>][branch]
the branch instruction at the end is the entrypoint for the tag, and it holds the (local) adress of the start of the actionblock, counted from the end of the tag.
There was also mention about overlapping bytecode. As far as my efforts show, this is always a jump to the second label found (the one flasm reports as being halfway an opcode), and offset by one byte. The resulting opcodes are always 0x03 0x00 (0x00 = end). Afaik 0x03 is not a known instruction, so I'm not sure what it does.
I'm still looking for the easiest technique to de-obfuscate these files, and insights are appreciated.




Reply With Quote
Keep it up! 
parameters:

Bookmarks