之前弄了下抖音1.8.3版本,实在是加密太复杂,只得从内存中dump出关键的libcms.so,但弄出来后用IDA打开,提示first section must be SHT_NULL,查看了下dump下来的so发现没有section header table,只能自己来加上去了
1、从反编译出来的libcms.so中找到section header table和Section header string table位置及内容
2、将其copy到(我这里直接手动修改)dump下来的libcms.so文件末位,重命名为libcms_fix.so
3、修改ELF header 中的section偏移地址e_shoff,将其改为libcms_fix.so文件对应的section header table的偏移地址
4、并且将Section header table中的索引为22的section header(指向了Section header string table)的偏移地址修改为libcms_fix.so对应的Section header string table的偏移地址
这样用IDA就可以解析到完整的视图了,方便我们查看
ELF.H文件中ELF头的结构
这是反编译出来的libcms.so文件的ELF heade