ISCC 2018 Writeup

题解部分:Misc(除misc500)、Web(除Only Admin、Only admin can see flag、有种你来绕、试试看)、Reverse、Pwn、Mobile


Misc( Author: L1B0 ) What is that?(50)

题目是一张图片,手指指向下提示图片下面还有内容。

第一种方法:Windows环境下可以用010editor直接修改png的高而不会报错,因为windows的图片查看器会忽略错误的CRC校验码。所以我们可以直接修改png的高,如下图。改完保存后即可看到flag

1

第二种方法:Linux环境下直接修改可能会报错,是因为CRC校验错误。我们可以利用图片中的的CRC校验码爆破出其原本的高。

# -*- coding: utf-8 -*- import binascii import struct crc32key = 0x402E2D95 width = '\x00\x00\x02\x72' for i in range(256, 65535): height = struct.pack('>i', i) #CRC: 9A768270 data = '\x49\x48\x44\x52' + width + height + '\x08\x06\x00\x00\x00' crc32result = binascii.crc32(data) & 0xffffffff if crc32result == crc32key: print ''.join(map(lambda c: "%02X" % ord(c), height)) #height = '\x00\x00\x02\x72'

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzypzf.html