Updated Home (markdown)

ttttupup 2023-02-14 16:33:16 +08:00
parent 97a933a654
commit a4609a37ab

18
Home.md

@ -28,3 +28,21 @@ case 3 :发送文件
![Z%9$~~~SE TDQWRHK1CHULV](https://user-images.githubusercontent.com/31303661/218051959-0da60b1c-f814-4844-ac16-d1f99f3317bb.png)
多练习实践就孰能生巧了。
# sqlite3偏移定位
sqlite3的定位相当简单一分钟搞定。
因为sqlite3为了保持兼容性api是向下兼容的在sqlite3.c文件里有个sqlite3_api_routines把api固定了。
![image](https://user-images.githubusercontent.com/31303661/218678499-807dd134-7aaf-4e29-85f0-58840b5c2317.png)
所以随便定位一个函数根据他的引用就可以定位到sqlite3_api_routines然后直接按偏移计算其他函数即可。
sqlite3_close函数特征最明显直接搜索字符串 "unable to close due to unfinalized statements or unfinished backups"即可定位。
![image](https://user-images.githubusercontent.com/31303661/218679597-8b0c776f-5b68-4113-b1b9-04d6b6e0bc76.png)
定位了该函数以后其他函数根据sqlite3_api_routines的偏移也就全部定位到了。
微信里的引用如下:
![image](https://user-images.githubusercontent.com/31303661/218680044-bdb959ce-63c5-437f-933c-04c53087aaf0.png)
和sqlite3.c里api保持一致。
微信使用的是SQLCipher加密sqlite3推而广之也开源采用此方法定位key相关的函数。
再推而广之,开源项目的逆向基本上都可以采用这种套路。