基本使用

runwu2204 Lv6

参考IDAPro Plugin - Qiling Framework Documentation

在进行qiling框架搭建的过程中需要先进行setup

image-20240115162436570

主要需要处理的就下面两处 其他可以直接为空

image-20240115170252163

Rootfs path 在qilingframework/qiling: A True Instrumentable Binary Emulation Framework (github.com)这个仓库内

需要进行git clone —recursive https://github.com/qilingframework/qiling —recursive的原因是因为有子模块需要导出

clone的仓库位置\examples\rootfs 存有很多的运行库此处以linux_8664为例

image-20240115172208425

脚本需要自己编写,现在最简单的例子如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from qiling import *

class QILING_IDA():
def __init__(self):
pass

def custom_prepare(self, ql):
pass

def custom_continue(self, ql:Qiling):
hook = []
return hook

def custom_step(self, ql:Qiling):
hook = []
return hook

然后将这个脚本的位置写入Custom script path内即可

start后出现下列字符串代表加载成功

image-20240115173124263

然后在左下角(下面的都是在这个地方输入)

image-20240115173347292

输入下面的字符串,获取当前的ida qiling插件的对象

1
2
3
4
import ida_ida
ql_plugin = ida_ida.ql_plugin
qlemu = ql_plugin.qlemu
ql = qlemu.ql

获取内存映射表

ql.mem.mapinfo

image-20240115174012240

此处我的elf是qilinglab-x86_64(首地址是0x555555554000)

读取对应位置的内存信息

ql.mem.read(0x555555554000,10)

image-20240115174208225

是正常的elf文件 且映射对的上文件头

因为ida插件的setpc存在问题(pc跟汇编中的eip作用一样)对自己要运行的指令进行setpc操作时地址不是对应的内存映射表的地址 也就是ra无法对应va所以需要手动更改基址

image-20240115174512766

输入刚刚内存映射表得到的elf首地址即可

image-20240115174555798

在要运行的地方右键选择setpc即可

image-20240115174630104

然后步入操作(step)直接输入ctrl+shift+f9即可

  • 标题: 基本使用
  • 作者: runwu2204
  • 创建于 : 2024-01-15 16:23:03
  • 更新于 : 2024-01-16 00:17:31
  • 链接: https://runwu2204.github.io/2024/01/15/Re/分析工具/qiling框架/qilingida/基本使用/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论
目录
基本使用