当前位置:网站首页>Angr (IX) -- angr_ ctf
Angr (IX) -- angr_ ctf
2022-07-25 10:20:00 【c1rcl3】
adopt angr_ctf be familiar with angr How to use
Reference link :
bilibili - angr Symbol execution
14
1. Direct download angr_ctf Provided ELF Executable file 14_angr_shared_library
2. use IDA Static analysis

The function logic is relatively simple , The difference from the previous examples is validate Function in dynamic link library (.so file ) in . The final loading address of shared objects in the dynamic link library is uncertain at the time of compilation , The loader needs to be free according to the current address space , Dynamically allocate a virtual address of sufficient size to be idle . All addresses in the shared library are base+offset.
3. Write a script to solve the program output Good Job Input corresponding to
import angr
import claripy
base = 0x4000000
p = angr.Project('./lib14_angr_shared_library.so', load_options={
'main_opts': {
# backend —— Which background , It can be an object , It can also be a name ( character string )
# custom_base_addr —— Base address used
# custom_entry_point —— The entry point used
# custom_arch —— The name of the processor architecture used
'custom_base_addr': base
}
})
pass_addr = claripy.BVV(0x3000000, 32)
validate_addr = base + 0x6D7
init_state = p.factory.call_state(validate_addr, pass_addr, claripy.BVV(8, 32))
password = claripy.BVS('password',8*8)
init_state.memory.store(pass_addr, password)
sm = p.factory.simulation_manager(init_state)
sm.explore(find=base+0x783)
for i in range(0, len(sm.found)):
found_state = sm.found[i]
found_state.add_constraints(found_state.regs.eax != 0)
print(found_state.solver.eval(password,cast_to=bytes).decode())4. Run the script to see the results

5. Verify the correctness of the results
![]()
Error reporting about operation error while loading shared libraries: lib14_angr_shared_library.so: cannot open shared object file: No such file or directory Solutions for :
1. edit /etc/ld.so.conf file , stay include /etc/ld.so.conf.d/*.conf Add a line below , add to xxx.so Directory of files

2. Run command line /sbin/ldconfig -v
![]()
边栏推荐
猜你喜欢

message from server: “Host ‘xxx.xxx.xxx.xxx‘ is not allowed to connect to this MySQL server“

mysql 解决不支持中文的问题

UE4 LoadingScreen动态加载启动动画

Virtual private line network deployment

MySQL solves the problem of not supporting Chinese

DHCP的配置(以华为eNSP为例)

Angr(三)——angr_ctf

Detailed explanation of MySQL database

Angr(九)——angr_ctf

修改mysql的分组报错Expression #1 of SELECT list is not in GROUP
随机推荐
线程池的死锁事件
PyTorch 代码模板 (CNN)
FRP reverse proxy deployment
Number theory -- Research on divisor
数组静态初始化,遍历,最值
IDEA整体字体大小修改
Erlang (offline deployment)
Angr (II) -- angr_ ctf
Angr(九)——angr_ctf
VSCode Latex Workshop 设置 XeLatex 编译
多线程——静态代理模式
软件测试笔记,测试用例设计
JSONObject解析json格式的终极总结
shortest-unsorted-continuous-subarray
Swing组件之单选与多选按钮
简易加法计算器
二、unittest框架主要做什么
VoxCeleb1 数据集下载
测试基本概念
C3D模型pytorch源码逐句详析(一)