iPhone Rootkit? There's an App for that! - Reverse Engineering Mac ...

iPhone Rootkit? There's an App for that! - Reverse Engineering Mac ... iPhone Rootkit? There's an App for that! - Reverse Engineering Mac ...

reverse.put.as
from reverse.put.as More from this publisher
12.07.2015 Views

Binary Reversing Prep (continued…)6. Dump the decrypted section to a file based on “cryptsize” from step #2 (4096)(gdb) dump memory decrypted.bin 0x2000 (0x2000 + 4096)7. Merge decrypted.bin back into SomeApp using your favorite hex editor.• Relative file offset for the encrypted data will be 0x1000 away from the machheader (aka cryptoff) .8. Don’t forget to disable “cryptid” so that class-dump and other tools will work onour fixed up binary. Change Cryptid to 0.Copyright Trustwave 2010

No More SecretsHint: find the LC_ENCRYPTION_INFO(0x21) load command by converAng “otool –l” output back to 32-­‐bit li

Binary Reversing Prep (continued…)6. Dump the decrypted section to a file based on “cryptsize” from step #2 (4096)(gdb) dump memory decrypted.bin 0x2000 (0x2000 + 4096)7. Merge decrypted.bin back into Some<strong>App</strong> using your favorite hex editor.• Relative file offset <strong>for</strong> the encrypted data will be 0x1000 away from the machheader (aka cryptoff) .8. Don’t <strong>for</strong>get to disable “cryptid” so <strong>that</strong> class-dump <strong>an</strong>d other tools will work onour fixed up binary. Ch<strong>an</strong>ge Cryptid to 0.Copyright Trustwave 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!