11.简单取证1
https://ctf.bugku.com/challenges/detail/id/330.html猕猴桃 mimikatz 获取用户名密码
https://github.com/gentilkiwi/mimikatzlsadump::sam /sam:SAM /system:SYSTEPS C:\Users\Mannix\Desktop\config\config> .\mimikatz.exe.#####. mimikatz 2.2.0 (x64) #19041 Sep 19 2022 17:44:08.## ^ ##. "A La Vie, A L'Amour" - (oe.eo)## / \ ## /*** Benjamin DELPY `gentilkiwi` ( [email protected] )## \ / ## > https://blog.gentilkiwi.com/mimikatz'## v ##' Vincent LE TOUX ( [email protected] )'#####' > https://pingcastle.com / https://mysmartlogon.com ***/mimikatz # lsadump::sam /sam:SAM /system:SYSTEMDomain : DESKTOP-VBBTMVSSysKey : 37f0b72b8ef4052d5a305281c2c8905cLocal SID : S-1-5-21-2468344919-3152572563-1510310172SAMKey : 6bbc5d51b8b9609e241bba9a2558048eRID : 000001f4 (500)User : AdministratorRID : 000001f5 (501)User : GuestRID : 000001f7 (503)User : DefaultAccountRID : 000001f8 (504)User : WDAGUtilityAccountHash NTLM: 8adf83b531e1cdadc8d16b206d87a4d5Supplemental Credentials:* Primary:NTLM-Strong-NTOWF *Random Value : 58d06fcf956eb58ebd0869ec521014e6* Primary:Kerberos-Newer-Keys *Default Salt : WDAGUtilityAccountDefault Iterations : 4096Credentialsaes256_hmac (4096) : 1faacace6af0e20c359b06724c78091e449bf47b89acc2038f04e4ba2d572831aes128_hmac (4096) : 709124a7e0fa42ff205ba8e78185c294des_cbc_md5 (4096) : c8c2263e86f426d0* Packages *NTLM-Strong-NTOWF* Primary:Kerberos *Default Salt : WDAGUtilityAccountCredentialsdes_cbc_md5 : c8c2263e86f426d0RID : 000003e8 (1000)User : administrator-QQAAzzHash NTLM: 5f9469a1db6c8f0dfd98af5c0768e0cdSupplemental Credentials:* Primary:NTLM-Strong-NTOWF *Random Value : ec93efdfb8a9278be59f7a1f4116a46e* Primary:Kerberos-Newer-Keys *Default Salt : DESKTOP-VBBTMVSadministrator-QQAAzzDefault Iterations : 4096Credentialsaes256_hmac (4096) : 08da13a926b2b211cb0f1ba75ab191f72ed77469734eaf1f201199e553565005aes128_hmac (4096) : 21f966b6130439e9675a028093241e31des_cbc_md5 (4096) : c8804662201043a2OldCredentialsaes256_hmac (4096) : cc294cf8db8838e1c973d8e868a4c32d7fd215162c9ae75a797493fd96cec3b7aes128_hmac (4096) : d7230e305d7f9ab31247e9ed06da3e9fdes_cbc_md5 (4096) : 62dfbf1c0dbc8685OlderCredentialsaes256_hmac (4096) : 11bc124de204c19f0f9305390aad0785f0bb5250eb0147a55d3ce95549bcc455aes128_hmac (4096) : ac7b1df27906f24c8b9228e9e573f48fdes_cbc_md5 (4096) : e6c7194a6eab4673* Packages *NTLM-Strong-NTOWF* Primary:Kerberos *Default Salt : DESKTOP-VBBTMVSadministrator-QQAAzzCredentialsdes_cbc_md5 : c8804662201043a2OldCredentialsdes_cbc_md5 : 62dfbf1c0dbc8685
使用大型取证工具
Magnet AXIOM Forensics v7.0.0.35443 Full Activated
12.这是一张单纯的图片
https://ctf.bugku.com/challenges/detail/id/2.htmlkey{you are right}13.隐写
https://ctf.bugku.com/challenges/detail/id/3.html根据png的格式进行查看,第一行是png的pe头,第二行是png的宽和高,将第二行宽和高修改为相同,就可以了。(固定)八个字节89 50 4E 47 0D 0A 1A 0A为png的文件头 (固定)四个字节00 00 00 0D 代表数据块的长度为13 (固定)四个字节49 48 44 52(即为ASCII码的IHDR)是文件头数据块的标示(IDCH) (可变)13位数据块(IHDR)
1. 开头的0~7八个字节为png的文件头:89 50 4E 47 0D 0A 1A 0A (固定格式)2. 8~11四个字节:00 00 00 0D 表示头部数据块的长度为13(固定格式)3. 12~15四个字节:49 48 44 52 表示文件头数据块的标示(固定格式)4. 16~19四个字节:00 00 01 F4表示图片的宽(不固定)5. 20~23四个字节:00 00 01 F4表示图片的高(不固定)6. 24~28五个字节:08 06 00 00 00表示Bit depth(图像深度)、ColorType(颜色类型)、 Compression method(压缩方法)、 Filter method(滤波器方法)、Interlace method(隔行扫描方法)这五个字节不固定,均为可变数据7. 29~32四个字节:CB D6 DF 8A为图片的crc校验值由从第12个字节到第28个字节的十七位字节进行crc计算得到
CRC(循环冗余校验)在线计算
http://www.ip33.com/crc.htmlhttp://www.libpng.org/pub/png/apps/pngcheck.htmlCRC error in chunk IHDR (computed c758d77d, expected cbd6df8a)import binasciiimport structimport threadingcrc32key = 0xcbd6df8anum_threads = 8 # 设置线程数class HeightFinder(threading.Thread):def __init__(self, start_height, end_height):super(HeightFinder, self).__init__()self.start_height = start_heightself.end_height = end_heightdef run(self):for i in range(self.start_height, self.end_height):try:height = struct.pack('>i', i)data = b'\x49\x48\x44\x52' + b'\x00\x00\x01\xF4' + height + b'\x08\x06\x00\x00\x00'# 29~32四个字节:CB D6 DF 8A为图片的crc校验值由从第12个字节到第28个字节的十七位字节进行crc计算得到crc32result = binascii.crc32(data) & 0xffffffffif crc32result == crc32key:print(''.join([format(c, '02x') for c in height]))returnexcept Exception as e:print(f"An error occurred: {e}")def find_height():threads = []height_range = 65535chunk_size = height_range // num_threadsfor i in range(num_threads):start_height = i * chunk_sizeend_height = (i + 1) * chunk_size if i < num_threads - 1 else height_rangethread = HeightFinder(start_height, end_height)threads.append(thread)thread.start()for thread in threads:thread.join()if __name__ == '__main__':find_height()
import binasciiimport structimport threadingcrcbp = open("2.png", "rb").read() # 打开图片crc32frombp = int(crcbp[29:33].hex(), 16) # 读取图片中的CRC校验值print(crc32frombp)class SizeFinder(threading.Thread):def __init__(self, start_width, end_width):super(SizeFinder, self).__init__()self.start_width = start_widthself.end_width = end_widthdef run(self):for i in range(self.start_width, self.end_width):try:for j in range(4000):data = crcbp[12:16] + \struct.pack('>i', i) + struct.pack('>i', j) + crcbp[24:29]crc32 = binascii.crc32(data) & 0xffffffffif crc32 == crc32frombp:print(i, j)print('hex:', hex(i), hex(j))returnexcept Exception as e:print(f"An error occurred: {e}")def find_size():threads = []num_threads = 8 # 设置线程数width_range = 4000chunk_size = width_range // num_threadsfor i in range(num_threads):start_width = i * chunk_sizeend_width = (i + 1) * chunk_size if i < num_threads - 1 else width_rangethread = SizeFinder(start_width, end_width)threads.append(thread)thread.start()for thread in threads:thread.join()if __name__ == '__main__':find_size()
14.telnet
https://ctf.bugku.com/challenges/detail/id/4.html15.眼见非实
https://ctf.bugku.com/challenges/detail/id/5.htmlbinwalk [选项] <文件名>binwalk firmware.binbinwalk -e firmware.binbinwalk -D firmware.binbinwalk -e -M firmware.binbinwalk -B firmware.binbinwalk -A "mov eax, ebx" firmware.binbinwalk -f custom.sig firmware.bin下载解压后打开docx,用010打开之后发现是50 4b 03 04,发现是zip,说明是zip文件,需要将docx后缀改为zip再次解压,然后把文件夹拖进vscode里面,搜索flag就可以得到,会得到两个文件,再选择第二个就得到flag。
压缩包全局搜索
在Visual Studio Code中,您可以按Ctrl + Shift + F打开搜索面板,然后输入要搜索的字符串,选择要搜索的文件夹,并点击搜索按钮。
foremost分离文件,检查xml文件,发现有flag
sudo apt-get install foremostforemost [选项] <输入文件或设备>foremost -t all -i -v -o /path/to/output image.dd