Need help with SoFixer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

F8LEFT
247 Stars 117 Forks BSD 3-Clause "New" or "Revised" License 58 Commits 0 Opened issues

Services available

!
?

Need anything else?

Contributors list

# 104,073
C++
C
Shell
26 commits

SoFixer

用于修复从内存中 dump 下来的So文件。

Build

mkdir build
# 参数 -DSO_64=ON 用于修复64位so文件,不添加则为修复32位so文件
cmake -DSO_64=ON ..
make

使用方法

  • 從so中dump內存, ida腳本 ```$cpp import idaapi startaddress = 0x0000007DB078B000 endaddress = 0x0000007DB08DE000 datalength = endaddress - start_address fp = open('E:\path.so', 'wb')

cur = 0 towrite = 0x100000 while cur < datalength: if datalength - cur < 0x100000: towrite = datalength - cur data = idaapi.dbgreadmemory(startaddress + cur, towrite) fp.write(data) cur = cur + towrite

fp.close()

* 执行修复
$cpp sofixer -s soruce.so -o fix.so -m 0x0 -d -s 待修復的so路徑 -o 修復後的so路徑 -m 內存dump的基地址(16位) 0xABC -d 輸出debug信息 ```

原理

原理参考下面的文章
TK so修复参考[http://bbs.pediy.com/thread-191649.htm] * 修复shdr * 修复phdr * 修复重定位

已知问题

在解析重定位表的时候有几个地方写错了,暂时懒得改,估计够用了,等出现新的修复so的 理论的时候再一并更新吧

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.