当前位置:网站首页>Reverse analysis from x86 to x64tips
Reverse analysis from x86 to x64tips
2022-06-12 13:56:00 【HyperCall】
Tips1
An article written before 3 The process under the ring is hidden —-64 position windows 10 A question raised in :
Originally thought x64 The address below is 8 byte , therefore jmp Of address need -9 Of , As a result, the debugging found that it was still the same as x86 equally -5 That's it …..
Here is the x86—->x64 One thing to pay special attention to in the process of reverse analysis ,jmp Instructions and call Changes in instructions
Although in OD There are many jump instructions jmp xxxxx, But a closer look at his binary code reveals a big difference
There are several binary codes that can be interpreted as jmp, But they have different meanings
1>
x86 Next :
EB Short jump , He will put EB Later on 1 Bytes are interpreted as the relative address of the jump .
The formula for calculating the relative jump address is : EB XX= The address to jump to -EB Where the command is located -2
x64 Next :
identical , It is also after parsing 1 Bytes are relative addresses , The calculation formula is the same
2>
x86 Next :
E9 It means relative jump , He will put E9 Later on 4 Bytes are interpreted as the relative address of the jump .
The formula for calculating the relative jump address is : E9 XXXXXXXX= The address to jump to -E9 Where the command is located -5
x64 Next :
identical , It is also after parsing 4 Bytes are relative addresses , The calculation formula is the same
3>
x86 Next :
FF25 xxxxxxxx among xxxxxxxx It's an absolute address (FF25 Will solve the current absolute address * Number , That is, the absolute address [ Destination address ])
x64 Next :
FF25 xxxxxxxx among xxxxxxxx It's the relative address (FF25 The current relative address will be solved * Number , That is, the relative address [ Destination address ])
So x64 The biggest difference is his FF25 It is not absolute address resolution , It also becomes a relative address ,x64 There is no absolute address for the jump .
because x64 The address pointer of should be greater than x86 It's doubled , But to prevent the jump instruction length from increasing , So it's all done as absolute address jump
Tips2
The function calling convention is in 32 For CNOOC in the system cdecl,stdcall,fastcall several , To 64 The system is unified as fastcall, The parameter transfer method is
Parameters ————— Integer type ————— real
1st——————RCX—————–XMM0
2nd—————–RDX—————–XMM1
3rd——————R8——————-XMM2
4th——————R9——————-XMM3
From 5 The parameters are passed by stack , The stack cleaning after parameter transfer is cleared by the caller . But although the function's front 4 Parameters are stored in registers but space is still reserved in the stack space , That is to say, No 5 The storage location of the parameters is not in rsp, It is rsp+sizeof(1+2+3+4)
Tips3
x64 Hardly used RBP register , Even if he still has a stack , So the stack depends on RSP Register implementation
边栏推荐
- Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())
- 动态搜索广告智能查找匹配关键字
- one × Convolution kernel of 1
- Codeforces 1629 F1. Game on sum (easy version) - DP, game, thinking
- What is the default gateway
- Tree reconstruction (pre order + middle order or post order + middle order)
- Lua common built-in functions
- Shell notes
- 【视频课】android studio物联网APP设计制作全套教程--国庆期间全掌握
- NotePad 常用设置
猜你喜欢

Is MySQL query limit 1000,10 as fast as limit 10? How to crack deep paging

简述CGI与FASTCGI区别

上海解封背后,这群开发者“云聚会”造了个AI抗疫机器人

当字节跳动在美国输出中国式 996

Possible solutions to problems after CodeBlocks installation

阿里云开发板HaaS510连接物联网平台--HaaS征文
![[WUSTCTF2020]颜值成绩查询-1](/img/dc/47626011333a0e853be87e492d8528.png)
[WUSTCTF2020]颜值成绩查询-1

Transmission and response of events and use cases

Single bus temperature sensor 18B20 data on cloud (Alibaba cloud)

Qt5 plug-in production
随机推荐
浅谈中国程序员为什么要跳槽?
简述CGI与FASTCGI区别
[semidrive source code analysis] [x9 chip startup process] 26 - LK of R5 safetyos_ INIT_ LEVEL_ Target phase code flow analysis (TP drvier, audio server initialization)
工具笔记 —— 常用自定义工具类(正则,随机数等)
Tree reconstruction (pre order + middle order or post order + middle order)
List of common ACM knowledge points (to be continued)
Codeforces 1638 A. reverse - simple thinking
公司运营中更注重转化的出价策略,如何实现? —Google sem
MySQL 查询 limit 1000,10 和 limit 10 速度一样快吗? 深度分页如何破解
Debug code to quickly locate the error location
Codeforces 1637 F. Towers - thinking, DFS
将字符串转为16进制字符串并显示出来
Encryptor and client authenticate with each other
Return value of WaitForSingleObject
one × Convolution kernel of 1
正点原子STM32F429核心板的插座型号
Codeforces 1629 D. pecuriar movie preferences - simple thinking, palindrome strings
My resume.
Formal analysis of Woo Lam protocol with scyther tool
Scyther工具形式化分析Woo-Lam协议