当前位置:网站首页>逆向调试入门-PE结构-资源表07/07
逆向调试入门-PE结构-资源表07/07
2022-07-04 12:45:00 【51CTO】
资源表:
PE中的相关资源可以通过程序进行深度定位,所获取的二进制字节码与资源脚本语句之间是一一对应的。
这些数据可能是源代码内部需要用到的常景,比如 菜单选项、界面描述等;也可能是源代码外部的,比如程序的图标文件、背景音乐文件、配置 文件等,以上这些数据统称为资源。

常见的资源
程序中常用的六类资源包括:
1、位图资源
2、光标资源
3、图标资源
4、菜单资源
5、对话框资源
6、自定义资源

结构体:
资源目录结构
typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
union {
struct {
DWORD NameOffset : 31; //资源名偏移
DWORD NameIsString : 1; //资源名为字符串
};
DWORD Name; //资源/语言类型
WORD Id; //资源数字ID
};
union {
DWORD OffsetToData; //数据偏移地址
struct {
DWORD OffsetToDirectory : 31; //子目录偏移地址
DWORD DataIsDirectory : 1; //数据为目录
};
};
} IMAGE_RESOURCE_DIRECTORY_ENTRY, *PIMAGE_RESOURCE_DIRECTORY_ENTRY;
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
我们使用工具进行实验
工具有
1、360zip程序
2、resource hacker或者是exescope
3、stud_pe

首先我们查看PE资源表

有9个资源组

第一个资源表

我们进行观察下

我们对该程序的资源表有个大概的了解之后

使用resource 打开该程序

我们对菜单的功能进行修改

文件会模拟出菜单选项

将一级菜单改掉

将二级菜单中的打开文件操作,修改下名称

选择编译脚本

文件另存为

该文件,如果直接打开

我们将文件放到程序目录

一个是正版,一个是我们修改之后的程序(壳)

正常画面

修改之后的画面

修改成功。
由于PE结构中资源表一层套一层。难以手动分析,所以使用工具是最佳选择。
边栏推荐
- ASP.NET Core入门一
- AI painting minimalist tutorial
- CANN算子:利用迭代器高效实现Tensor数据切割分块处理
- eclipse链接数据库中测试SQL语句删除出现SQL语句语法错误
- 舔狗舔到最后一无所有(状态机)
- Comprehensive evaluation of modular note taking software: craft, notation, flowus
- Backgroundworker usage example
- The old-fashioned synchronized lock optimization will make it clear to you at once!
- CTF competition problem solution STM32 reverse introduction
- C語言宿舍管理查詢軟件
猜你喜欢

光环效应——谁说头上有光的就算英雄

Reptile exercises (I)

7 月数据库排行榜:MongoDB 和 Oracle 分数下降最多

n++也不靠谱

2022kdd pre lecture | 11 first-class scholars take you to unlock excellent papers in advance

上汽大通MAXUS正式发布全新品牌“MIFA”,旗舰产品MIFA 9正式亮相!

CTF competition problem solution STM32 reverse introduction

JVM series - stack and heap, method area day1-2

Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing

Samsung's mass production of 3nm products has attracted the attention of Taiwan media: whether it can improve the input-output rate in the short term is the key to compete with TSMC
随机推荐
WPF double slider control and forced capture of mouse event focus
Efficient! Build FTP working environment with virtual users
The old-fashioned synchronized lock optimization will make it clear to you at once!
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
C语言课程设计题
remount of the / superblock failed: Permission denied
8 expansion sub packages! Recbole launches 2.0!
老掉牙的 synchronized 锁优化,一次给你讲清楚!
Using nsproxy to forward messages
高效!用虚拟用户搭建FTP工作环境
ViewBinding和DataBinding的理解和区别
Alibaba cloud award winning experience: build a highly available system with polardb-x
.NET 使用 redis
"Pre training weekly" issue 52: shielding visual pre training and goal-oriented dialogue
DGraph: 大规模动态图数据集
数据库公共字段自动填充
Besides, rsync+inotify realizes real-time backup of data
Golang sets the small details of goproxy proxy proxy, which is applicable to go module download timeout and Alibaba cloud image go module download timeout
Deploy halo blog with pagoda
C#基础深入学习二