ida

What is large dword?

自闭症网瘾萝莉.ら 提交于 2019-12-07 09:57:07
问题 What function have short and large in this code portion? large is same as long dword ? mov eax, ebx cmp [ebp+var_1], 0 jz short loc_413123 call sub_40341C pop large dword ptr fs:0 add esp, 0Ch 回答1: short jz short loc_413123 merely means that the offset (i.e. distance) for this jump is so small that it fits in a single byte, so this jump has been compiled to two simple bytes: 0x74 [1-byte-offset] Had the distance been larger, the compiler would have had to encode the jump differently, which

记docker安装和ida远程调试问题

淺唱寂寞╮ 提交于 2019-12-06 08:41:45
docker安装 1、卸载可能存在的旧版本: sudo apt-get remove docker docker-engine docker-ce docker.io   如果想要彻底卸载docker: sudo apt-get remove docker-ce docker-ce-cli 2、更新apt包索引 sudo apt-get update 3、安装以下包以使apt可以通过HTTPS使用存储库(repository) sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common 4、添加Docker官方的GPG密钥 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 5、使用下面的命令来设置stable存储库 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 6、再更新一下apt包索引 sudo apt-get update 7、安装Docker CE sudo apt-get

PE - Distinguish data from function export

瘦欲@ 提交于 2019-12-06 03:04:22
问题 I'm trying to find a way to figure out in IDA which exports are data exports and which are real functions export. For example, let's have a look at Microsoft's msftedit.dll's export entries: While CreateTextServices is a real exported function: IID_IRichEditOle is a data export and IDA fails to realize that, interpeting data as code: Do someone know a reliable way to distinguish the two? Help will be much appreciated. Thanks in advance. 回答1: There is no perfectly reliable way to do this for

What is large dword?

白昼怎懂夜的黑 提交于 2019-12-05 18:43:57
What function have short and large in this code portion? large is same as long dword ? mov eax, ebx cmp [ebp+var_1], 0 jz short loc_413123 call sub_40341C pop large dword ptr fs:0 add esp, 0Ch short jz short loc_413123 merely means that the offset (i.e. distance) for this jump is so small that it fits in a single byte, so this jump has been compiled to two simple bytes: 0x74 [1-byte-offset] Had the distance been larger, the compiler would have had to encode the jump differently, which would take up more memory: 0x0f 0x84 [4-byte-offset] With short , IDA Pro is simply telling you what kind of

How can I find the data structure that represents mine layout of Minesweeper in memory?

和自甴很熟 提交于 2019-12-04 07:19:46
问题 I'm trying to learn about reverse engineering, using Minesweeper as a sample application. I've found this MSDN article on a simple WinDbg command that reveals all the mines but it is old, is not explained in any detail and really isn't what I'm looking for. I have IDA Pro disassembler and the WinDbg debugger and I've loaded winmine.exe into both of them. Can someone provide some practical tips for either of these programs in terms of finding the location of the data structure that represents

PE - Distinguish data from function export

狂风中的少年 提交于 2019-12-04 06:51:15
I'm trying to find a way to figure out in IDA which exports are data exports and which are real functions export. For example, let's have a look at Microsoft's msftedit.dll's export entries: While CreateTextServices is a real exported function: IID_IRichEditOle is a data export and IDA fails to realize that, interpeting data as code: Do someone know a reliable way to distinguish the two? Help will be much appreciated. Thanks in advance. There is no perfectly reliable way to do this for every export. Each export only specifies an offset within the executable file -- logically, it could be

逆向某宝x-sign算法

旧巷老猫 提交于 2019-12-03 05:14:43
上篇博文中浅析了从手机淘宝中提炼出商品搜索接口,很多人有个疑惑,x-sign怎么来的?目前很多网友表示是通过xposed hook用模拟器作服务器中转的方式。下面我们通过逆向so文件的方式取得这个x-sign的算法。 找到x-sign的计算点 经过一系列跳转后,我们看到了 com.taobao.wireless.security.adapter.a 接口的a方法。 private String a(String[] arg4, String arg5, int arg6, String arg7) { return this.a.getRouter().doCommand(10401, new Object[]{arg4, arg5, Integer.valueOf(arg6), arg7}); } 在接下来的跳转链之后,我们又找到了实现RouterComponent接口以及doCommand方法的一个类: package com.alibaba.wireless.security.mainplugin; import com.alibaba.wireless.security.framework.IRouterComponent; import com.taobao.wireless.security.adapter.JNICLibrary; public class a

ctf pwn ida 分析技巧

早过忘川 提交于 2019-12-03 02:57:18
几年前的笔记,搬运过来 --- 1 先根据运行程序得到的信息命名外围函数,主要函数大写开头 2 /添加注释 3 直接vim程序,修改alarm为isnan可以patch掉alarm函数 4 y 可以修改变量类型,函数返回类型 5 对于重要的全局变量,x查看每个引用的地方 6 subview打开local type窗口,插入后双击导入到structures窗口, 在f5窗口中可y修改变量类型 1 插入时可先插入连续int,abcd这样命名,确定对应字母含义后在structures窗口修改 2 使用d修改字段类型 7 修改变量类型或者结构体后,在f5窗口按f5重新反编译 8 如果要修改结构体,可在local type中操作,会自动同步到structures窗口中 9 在观察数据时,可以修改全局变量的类型比如 Flower *ptr[100];然后可以转换数组,可使用r修改全局变量的名字 10 在f5窗口中,可以双击本地变量的类型进入stack of raise窗口,可以d修改变量类型 11 \是否显示强制类型转换 12 在结构体中对于起标志作用的字段,可以先命名为flag,确定作用后再修改 13 注意修改当前函数的类型,有时候可以让整个函数的结构改变,更易读 14 可以右键printf这种函数,删除可变参数 15 可如下画图画出对堆操作的步骤 16 对于堆exploit

IDA 对 so 的动态调试

匿名 (未验证) 提交于 2019-12-03 00:41:02
将IDAPro根目录下dbgsrv 目录下的android_server(模拟器用android_x86_server,这里还是用真机好点)文件push 到安卓设备(比如/data/local/tmp/目录)下,权限改为777,并运行 端口转发adb forward tcp:23946 tcp:23946 安卓设备安装并运行程序 IDA打开对应设备的so文件(arm, armv7, x86什么的)的Debugger -> Selecte Debugger -> Remote ARM Linux/Android Debugger -> OK, Debugger -> Process options -> HostName改成127.0.0.1,端口改成上面对应的 -> OK,Debugger -> Attach to process,从列表中选出对应的进程(没有root权限的机器好像显示不出来) 在对应代码行下断点,F9运行即可进行动态调试,右边的寄存器面板可以直接修改寄存器的值 其他一些需要注意的: init_array先于JNI_OnLoad会在so加载的时候就开始执行 导出表没有的函数有可能是在通过JNI_OnLoad动态注册的, 查找动态注册的方法是打开segment视图, .data.rel.ro.local段中放置的即为动态注册的函数(从上往下分别是函数名, 函数签名,