当前位置:网站首页>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专业逆向代码分析的平台,实现联动。
边栏推荐
- Cron(Crontab)--使用/教程/实例
- 35岁的软件测试工程师,月薪不足2W,辞职又怕找不到工作,该何去何从?
- dedecms报错The each() function is deprecated
- No regrets, the appium automation environment is perfectly built
- 【学生毕业设计】基于web学生信息管理系统网站的设计与实现(13个页面)
- What is ASEMI photovoltaic diode, the role of photovoltaic diode
- [SWPU2019]Web1
- 一篇博客通关Redis技术栈
- App快速开发建设心得:小程序+自定义插件的重要性
- [SWPU2019]Web1
猜你喜欢

Paparazzi: Surface Editing by way of Multi-View Image Processing

Homework 8.4 Interprocess Communication Pipes and Signals

AUTOCAD——标注关联

【cesium】元素高亮显示

mutillidae下载及安装

服务器磁盘阵列

How to solve complex distribution and ledger problems?

Detailed explanation of Mysql's undo log

日志导致线程Block的这些坑,你不得不防

什么是ASEMI光伏二极管,光伏二极管的作用
随机推荐
将故事写成我们
[MRCTF2020] PYWebsite
[BJDCTF2020] EasySearch
多列属性column元素的可见性:display、visibility、opacity、垂直对齐方式:vertical-align、z-index 越大越显示在上层
dedecms报错The each() function is deprecated
creo怎么测量点到面的距离
8.04 Day35-----MVC三层架构
[8.1] Code Source - [The Second Largest Number Sum] [Stone Game III] [Balanced Binary Tree]
AUTOCAD - dimension association
Four-digit display header design
开发属于自己的node包
Error creating bean with name ‘configDataContextRefresher‘ defined in class path resource
炎炎夏日教你利用小米智能家居配件+树莓派4接入Apple HomeKit
Mini Program_Dynamic setting of tabBar theme skin
[BSidesCF 2019]Kookie
What is the function of industrial-grade remote wireless transmission device?
【转】什么是etcd
重载运算符
【背包九讲——01背包问题】
【informix】解决启动报错大全,以及解决办法