铁三测试赛

你是管理员吗?

1.下载password.txt

2.使用intruder爆破登录密码为’Nsf0cuS’

3.登录并使用burp抓包

4.在’Set-Cookie’中可以看到newpage参数值

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 08 Mar 2018 07:24:40 GMT
Content-Type: text/html
Connection: close
Vary: Accept-Encoding
X-Powered-By: PHP/5.5.36
Set-Cookie: newpage=MjkwYmNhNzBjN2RhZTkzZGI2NjQ0ZmEwMGI5ZDgzYjkucGhw; expires=Thu, 08-Mar-2018 07:25:40 GMT; Max-Age=60
Content-Length: 1756

base64解码后得到新页面’290bca70c7dae93db6644fa00b9d83b9.php’
新页面是留言板,随便输入内容并提交抓包

POST /web/root/290bca70c7dae93db6644fa00b9d83b9.php?act=add HTTP/1.1
Host: ctf4.shiyanbar.com
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13C75 Safari/601.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://ctf4.shiyanbar.com/web/root/290bca70c7dae93db6644fa00b9d83b9.php
Cookie: IsLogin=0
DNT: 1
X-Forwarded-For: 8.8.8.8
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 57

content=fdsfdsf&userlevel=guest&Submit=%E7%95%99%E8%A8%80

IsLogin=0 修改为’1’
userlevel=guest 修改为’root’(因为URL中的目录名为’root’)即可

flag{C0ngratulati0n}

照猫画虎

使用burp抓包,可以看到cookie中的值是base64+urlencode编码,对其进行解码

GET /web/copy/index.php HTTP/1.1
Host: ctf4.shiyanbar.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: Visitor=MjY5OTowNDE1NzQwZWFhNGQ5ZGVjYmM4ZGEwMDFkM2ZkODA1Zg%3D%3D
DNT: 1
X-Forwarded-For: 8.8.8.8
Connection: close
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0

解码后的到当前是第几位visitor和一个md5值

2699:0415740eaa4d9decbc8da001d3fd805f

md5解密后的值为2699
将这个值改为1234567890即可
构造payload:

MTIzNDU2Nzg5MDplODA3ZjFmY2Y4MmQxMzJmOWJiMDE4Y2E2NzM4YTE5Zg%3D%3D

注意md5对‘1234567890’加密的结果要用小写,不然无法获取到

shellcode

使用工具将shellcode转换为字符串

jXRfh-ch/shh/binR4echoZmxhZ3tTSEVsbGNvZGVfSVNfc29fQ29vbH0K|base64-dWS

将’echo ZmxhZ3tTSEVsbGNvZGVfSVNfc29fQ29vbH0K|base64 -d’在bash中运行得到flag{SHEllcode_IS_so_Cool}

IOS

根据题目需要更改user-Agent 头为 os 99 即可

Mozilla/5.0 (iPhone; CPU iPhone OS 99 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13C75 Safari/601.1

问题就在这

题目描述

找答案 GPG key: GhairfAvvewvukDetolicDer-OcNayd#

使用linux下的gpg对文件进行解密,得到一个pcap文件
使用wireshark的导出对象,选择http ,可以看到有几张png图片,经过分析,发现在logo.png有flag

使用stegsolve获取flag

你最美

winhex打开,是经过base64编码的png图片,使用在线工具,将图片恢复后是一张二维码,扫描即可得到flag

你可能感兴趣的:(CTF)