当前位置:网站首页>Dephi逆向工具Dede导出函数名MAP导入到IDA中
Dephi逆向工具Dede导出函数名MAP导入到IDA中
2022-08-05 04:49:00 【向往生】
1.背景
在逆向Dephi程序时,会出现Dede软件可以看到函数的函数名,但是IDA逆向的时候看不到,为了解决这个问题,可以通过以下的方法来实现:

2.基础知识
IDA因为没有PDB文件,无法还原函数的原始名称,通过逆向工程师的汇编代码识别,可以给函数手工重新命名,也可以使用IDC脚本语言来给特定的地址命名:
MakeName(0x006E624C, "TSingleForm.ComboBox1Change");基于这个原理,我们查找一下DEde如何生成这样的“地址:函数”的对应表。
3.实操
1.从Dede中导出地址函数表

找到文件夹里的events.txt,这就是包含函数地址和函数名的文件。

2.运行python脚本把events.txt转化为IDC脚本;
以下的脚本打开脚本相同目录下的events.txt,用.split()方法把地址和函数名装入list[0]和list[1]中,无函数名的过滤掉。
import os
try:
import chardet
except:
os.system('pip install chardet')
import chardet
def check_charset(file_path):
import chardet
with open(file_path, "rb") as f:
data = f.read(4)
charset = chardet.detect(data)['encoding']
return charset
def map2idc(in_file, out_file):
with open(out_file, 'w') as fout:
fout.write('#include <idc.idc>\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:]): #函数名==地址的,不要
fout.write('\tMakeName(0x%s, "%s");\n' % (list[1], list[0]))
fout.write('}\n')
def main():
return map2idc("./events.txt","./ida.idc")把上面的python复制到.py文件里,python脚本和events.txt放在同一个目录下,运行python脚本,就会生成ida.idc文件。一个简单的idc脚本如下:
#include <idc.idc>
static main()
{
MakeName(0x0040178C, "TObject.System.GetSpace(Integer):TBlock;");
}3.运行idc脚本,重命名函数
打开Ida,File-->Script file,选择刚才生成的ida.idc文件,即可批量重命名函数了。

这样,你的dehpi就有函数名了。
4.总结
通过这个脚本,我们就可以把专业dephi程序分析的结果,转移到IDA专业逆向代码分析的平台,实现联动。
边栏推荐
- 软件管理rpm
- 1007 Climb Stairs (greedy | C thinking)
- Shell(4) Conditional Control Statement
- MySql index learning and use; (I think it is detailed enough)
- 8.04 Day35-----MVC三层架构
- What is the function of industrial-grade remote wireless transmission device?
- 基于Web的商城后台管理系统的设计与实现
- [极客大挑战 2019]FinalSQL
- 【 8.4 】 source code - [math] [calendar] [delete library 】 【 is not a simple sequence (Bonus) 】
- ansible各个模块详解
猜你喜欢

开发属于自己的node包

UI自动化测试 App的WebView页面中,当搜索栏无搜索按钮时处理方法

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

概率论的学习和整理8: 几何分布和超几何分布
![[Surveying] Quick Summary - Excerpt from Gaoshu Gang](/img/35/e5c5349b8d4ccf9203c432a9aaee7b.png)
[Surveying] Quick Summary - Excerpt from Gaoshu Gang

使用IDEA连接TDengine服务器

Event parse tree Drain3 usage and explanation

Mysql's redo log detailed explanation

JeeSite新建报表

u-boot调试定位手段
随机推荐
[CISCN2019 South China Division]Web11
[Nine Lectures on Backpacks - 01 Backpack Problems]
1007 Climb Stairs (贪心 | C思维)
关于sklearn库的安装
Event parse tree Drain3 usage and explanation
dedecms后台生成提示读取频道信息失败的解决方法
[Geek Challenge 2019]FinalSQL
The first performance test practice, there are "100 million" a little nervous
【测量学】速成汇总——摘录高数帮
MySql index learning and use; (I think it is detailed enough)
4T硬盘剩余很多提示“No space left on device“磁盘空间不足
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
数字孪生技术在电力系统中的应用现状
Qixi Festival earn badges
[SWPU2019]Web1
[8.1] Code Source - [The Second Largest Number Sum] [Stone Game III] [Balanced Binary Tree]
creo怎么测量点到面的距离
【cesium】加载并定位 3D Tileset
1007 Climb Stairs (greedy | C thinking)
算法---一和零(Kotlin)