参考:
http://fadec0d3.blogspot.com/2017/04/plaidctf-2017-zipper-50.html
https://www.slideshare.net/sehanlee7/plaid-ctf-2017-writeup-zipper-misc-50pts-75393639
Writeup:
https://github.com/bl4de/ctf/tree/master/2017/PlaidCTF_2017/zipper
修改之前
➜ ~/Downloads zipinfo zipper_50d3dc76dcdfa047178f5a1c19a52118.zip [14:27:23]
Archive: zipper_50d3dc76dcdfa047178f5a1c19a52118.zip
Zip file size: 236 bytes, number of entries: 1
warning: filename too long--truncating.
[ ]
-rw-rw-r-- 3.0 unx 246 tx defX 17-Apr-18 19:15
➜ ~/Downloads zipdetails zipper_50d3dc76dcdfa047178f5a1c19a52118.zip [14:28:04]
0000 LOCAL HEADER #1 04034B50
0004 Extract Zip Spec 14 '2.0'
0005 Extract OS 00 'MS-DOS'
0006 General Purpose Flag 0002
[Bits 1-2] 2 'Fast Compression'
0008 Compression Method 0008 'Deflated'
000A Last Mod Time 4A9299FC 'Tue Apr 18 19:15:56 2017'
000E CRC 532EA93E
0012 Compressed Length 00000046
0016 Uncompressed Length 000000F6
001A Filename Length 2329
001C Extra Length 001C
Truncated file (got 206, wanted 9001):
在Mac上使用010 Editor修改文件长度,和文件名即可。
修改之后,
部分输出
➜ ~/Downloads zipdetails zipper_50d3dc76dcdfa047178f5a1c19a52118.zip [14:29:10]
00B6 Filename 'PlaidCTF'
00BE Extra ID #0001 5455 'UT: Extended Timestamp'
00C0 Length 0005
00C2 Flags '03 mod access'
00C3 Mod Time 58F6C85B 'Wed Apr 19 10:15:55 2017'
00C7 Extra ID #0002 7875 'ux: Unix Extra Type 3'
00C9 Length 000B
➜ ~/Downloads cat /Users/caiqiqi/Downloads/PlaidCTF [14:30:40]
Huzzah, you have captured the flag:
PCTF{f0rens1cs_yay}