Android reinforcement identification list: from so naming to dex features, judge first and then decide on the shelling route
Identify ZiZi/AiCrypto/360/LeGu/Yidun and other reinforcements based on observable characteristics, and then select the unpacking route based on encryption type, VM type, and extraction type, including the point of repairing dex after dumping.
After getting an APK, first determine which company is used for reinforcement, and then decide on the unshelling route. The following is organized according to "observable characteristics".
1. First look at the directory structure
Read after unpacking lib/arm64-v8a/ and assets/, most manufacturers’ so naming has strong characteristics:
| Manufacturer | typical so/resources |
|---|---|
| bang bang | libsecexe.so、libsecmain.so、libDexHelper.so |
| love encryption | libexec.so、libexecmain.so、ijiami.dat |
| 360 reinforcement | libjiagu.so、libjiagu_art.so、libprotectClass.so |
| Tencent Legu | libshell.so、libshella.so、libtosprotection*.so |
| NetEase Yidun | libnesec.so、libdk*.so |
| top elephant | libx3g.so、libDingXiang*.so |
| Alibaba Security | libmobisec*.so、aliprotect.dat |
| Baidu | libbaiduprotect.so、libbdprotect.so |
assets/ appear in *.dat、*.bin、*.enc And the volume is close to the total amount of dex. It can basically be confirmed that dex is encrypted as a whole and external.
2. Look at dex and manifest again
unzip -l app.apk | grep -E "\.dex|lib/|assets/"
aapt dump xmltree app.apk AndroidManifest.xml | grep -A2 application
feature:
classes.dexThe size is unusually small (tens of KB), and Application points to the shell entrance (e.g.com.stub.StubApp)- The number of dex does not match the amount of code, or there is only a shell loader
extractNativeLibs、useEmbeddedDexWait for the field to be changed
3. Runtime characteristics
adb shell "cat /proc/<pid>/maps | grep -E 'rwx|anon'"
adb shell "cat /proc/<pid>/maps | grep '\.so' | awk '{print \$6}' | sort -u"
- Big chunks appear
rwxAnonymous map, usually a VM shell's interpreter libart.soRelevant symbols are replaced, explained in hookDefineClass/OpenMemory- Thread names for shells are common
JDWP、shell、protectprefix
4. Select the shelling route according to type
1. Overall encryption type (DEX external + so decryption)
Preferred memory dump: in InMemoryDexClassLoader or DefineClass Next, dump the decrypted dex starting address and length. Scan the disk to find .dat Reliable, many shells are only kept in memory.
2. VM type (instruction extraction)
The extracted method is in dex nop Or exception instructions, the real logic is explained and executed in so. This type can only be traced dynamically: break at the dispatch point of the interpreter, record the handler sequence and then restore the semantics.
3. Function extraction + anti-debugging combination
Go through anti-debugging first, and then JNI_OnLoad After grabbing the method registry, you can usually get a batch of restored function pointers.
5. Repair after dump
Bad checksum: Recalculate adler32 and write back header offset 8map_listOffsets are messed up: Reorder by section, or use dex repair tool- Multi-dex merge: Note
classes2.dexReference relationship, do not decompile alone
Identifying the hardening type is only the first step. What is really time-consuming is anti-debugging and command restoration. The above only involves the structural judgment of the protection mechanism.
please Log in or Register an account Participate in discussions, download exclusive add-ons or unlock level posts.