结营赛Wp
结营赛wp
最终排名第10,还可以吧
##misc
签到
hsnctf{welcome_to_hsnctf}
easyusb
打开压缩包发现,一个流量包和一个flag.zip加密
应该是通过流量包得到密码解得flag
流量包是键盘流量
1 | ─$ tshark -T json -r usb.pcapng > test.json |
手动提取键盘流量
1 | 00:00:16:00:00:00:00:00 |
之后利用脚本
1 | mappings = { 0x04:"A", 0x05:"B", 0x06:"C", 0x07:"D", 0x08:"E", 0x09:"F", 0x0A:"G", 0x0B:"H", 0x0C:"I", 0x0D:"J", 0x0E:"K", 0x0F:"L", 0x10:"M", 0x11:"N",0x12:"O", 0x13:"P", 0x14:"Q", 0x15:"R", 0x16:"S", 0x17:"T", 0x18:"U",0x19:"V", 0x1A:"W", 0x1B:"X", 0x1C:"Y", 0x1D:"Z", 0x1E:"1", 0x1F:"2", 0x20:"3", 0x21:"4", 0x22:"5", 0x23:"6", 0x24:"7", 0x25:"8", 0x26:"9", 0x27:"0", 0x28:"\n", 0x2a:"[DEL]", 0X2B:" ", 0x2C:" ", 0x2D:"-", 0x2E:"=", 0x2F:"[", 0x30:"]", 0x31:"\\", 0x32:"~", 0x33:";", 0x34:"'", 0x36:",", 0x37:"." } |
得到密码为SEC2ETK3Y(大写),解开压缩包得到flag
1 | hsnctf{y0u_can_g4t_easy_usb} |
##pwn
ret2syscall
1 | from LibcSearcher import* |
hsnctf{85ef9d72-c603-17df-59bc}
ret2libc
1 | from LibcSearcher import* |
hsnctf{04b4cfca-db86-486b-14b2}
web
###git
https://blog.csdn.net/m0_62879498/article/details/124586653借鉴原题
Git扫描后发现git泄露
1 | <?php |
利用条件:
if($_GET[‘flag’] === $x && $x !== ‘flag’){ //不能同时 flag的值等于某个键名,那个键名又是flag, 就是 flag=a && a!=flag啊,这样就能进了 ?flag=(不是flag)&(不是flag)=xxx
进入条件十分简单:?flag=a&a=flag 即可
函数判断到 a=flag 的时候, $_GET[‘flag’] === $x && $x !== ‘flag’ –> a === a && a !== ‘flag’ 这就进来了 true && true 就进来了, 然后 exit($handsome);
因为要 exit($handsome);
那么我们要做的就是 让$handsome = $flag get
条件的处理如下:
foreach($_GET as $x => $y){
$$x = $$y;// $handsome = flag的值 —> $handsome = $flag –> $x=handsome & $y=flag
}
$$x = $$y
而我们要的结果是$handsome = $flag
那么特简单 让 x=handsome 和 $y=flag
即可
playload:?handsome=flag&flag=b&b=flag