当前位置:网站首页>Dephi reverse tool Dede exports function name MAP and imports it into IDA
Dephi reverse tool Dede exports function name MAP and imports it into IDA
2022-08-05 04:50:00 【yearning for life】
1. Background
When the Dephi program is reversed, the function name of the function can be seen by the Dede software, but it cannot be seen when IDA is reversed. In order to solve this problem, the following methods can be used to achieve:
2. Basic knowledge
IDA cannot restore the original name of the function because there is no PDB file. Through the reverse engineer's assembly code identification, the function can be manually renamed, or the IDC scripting language can be used to name a specific address:
MakeName(0x006E624C, "TSingleForm.ComboBox1Change");
Based on this principle, let's look up how DEde generates such a "address:function" correspondence table.
3. Practice
1. Export address function table from Dede
Find events.txt in the folder, this is the file containing the function address and function name.
2. Run the python script to convert events.txt into IDC script;
The following script opens events.txt in the same directory as the script, and uses the .split() method to load the address and function name into list[0] and list[1], and filter out those without function names.
import ostry:import chardetexcept:os.system('pip install chardet')import chardetdef check_charset(file_path):import chardetwith open(file_path, "rb") as f:data = f.read(4)charset = chardet.detect(data)['encoding']return charsetdef map2idc(in_file, out_file):with open(out_file, 'w') as fout:fout.write('#include \n')fout.write('static main()\n{\n')with open(in_file,encoding=check_charset(in_file)) as fin:for line in fin:list = line.split()if len(list) == 2 and len(str(list[1])) == 8 and str(list[1]).isalnum():if(list[1][-4:]!=list[0][-4:]): #function name==address, don'tfout.write('\tMakeName(0x%s, "%s");\n' % (list[1], list[0]))fout.write('}\n')def main():return map2idc("./events.txt","./ida.idc")
Copy the above python to the .py file, put the python script and events.txt in the same directory, run the python script, and the ida.idc file will be generated.A simple idc script is as follows:
#include static main(){MakeName(0x0040178C, "TObject.System.GetSpace(Integer):TBlock;");}
3. Run the idc script, rename the function
Open Ida, File-->Script file, select the ida.idc file just generated, and you can rename functions in batches.
This way, your dehpi has the function name.
4. Summary
Through this script, we can transfer the results of professional dephi program analysis to the IDA professional reverse code analysis platform to achieve linkage.
References: Import MAP files into IDA Pro's applet - sting feng - Blog Park
边栏推荐
- upload上传图片到腾讯云,如何上传图片
- Flutter学习2-dart学习
- software management rpm
- What is ASEMI photovoltaic diode, the role of photovoltaic diode
- Flutter学习-开篇
- [BJDCTF2020] EasySearch
- Is the NPDP certificate high in gold content?Compared to PMP?
- Bytebuffer put flip compact clear method demonstration
- 大学物理---质点运动学
- AUTOCAD——标注关联
猜你喜欢
随机推荐
JeeSite新建报表
Four-digit display header design
overloaded operator
Mysql's redo log detailed explanation
Mvi架构浅析
How to identify false evidence and evidence?
仪表板展示 | DataEase看中国:数据呈现中国资本市场
机器学习概述
特征预处理
1007 Climb Stairs (greedy | C thinking)
Cron(Crontab)--使用/教程/实例
dedecms后台生成提示读取频道信息失败的解决方法
In the hot summer, teach you to use Xiaomi smart home accessories + Raspberry Pi 4 to connect to Apple HomeKit
[SWPU2019]Web1
动力小帆船制作方法简单,电动小帆船制作方法
关于sklearn库的安装
什么是ASEMI光伏二极管,光伏二极管的作用
Visibility of multi-column attribute column elements: display, visibility, opacity, vertical alignment: vertical-align, z-index The larger it is, the more it will be displayed on the upper layer
【测量学】速成汇总——摘录高数帮
Redis - 13、开发规范