11.简单取证1
https://ctf.bugku.com/challenges/detail/id/330.html
猕猴桃 mimikatz 获取用户名密码
https://github.com/gentilkiwi/mimikatz
lsadump::sam /sam:SAM /system:SYSTE
PS 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:SYSTEM
Domain : DESKTOP-VBBTMVS
SysKey : 37f0b72b8ef4052d5a305281c2c8905c
Local SID : S-1-5-21-2468344919-3152572563-1510310172
SAMKey : 6bbc5d51b8b9609e241bba9a2558048e
RID : 000001f4 (500)
User : Administrator
RID : 000001f5 (501)
User : Guest
RID : 000001f7 (503)
User : DefaultAccount
RID : 000001f8 (504)
User : WDAGUtilityAccount
Hash NTLM: 8adf83b531e1cdadc8d16b206d87a4d5
Supplemental Credentials:
* Primary:NTLM-Strong-NTOWF *
Random Value : 58d06fcf956eb58ebd0869ec521014e6
* Primary:Kerberos-Newer-Keys *
Default Salt : WDAGUtilityAccount
Default Iterations : 4096
Credentials
aes256_hmac (4096) : 1faacace6af0e20c359b06724c78091e449bf47b89acc2038f04e4ba2d572831
aes128_hmac (4096) : 709124a7e0fa42ff205ba8e78185c294
des_cbc_md5 (4096) : c8c2263e86f426d0
* Packages *
NTLM-Strong-NTOWF
* Primary:Kerberos *
Default Salt : WDAGUtilityAccount
Credentials
des_cbc_md5 : c8c2263e86f426d0
RID : 000003e8 (1000)
User : administrator-QQAAzz
Hash NTLM: 5f9469a1db6c8f0dfd98af5c0768e0cd
Supplemental Credentials:
* Primary:NTLM-Strong-NTOWF *
Random Value : ec93efdfb8a9278be59f7a1f4116a46e
* Primary:Kerberos-Newer-Keys *
Default Salt : DESKTOP-VBBTMVSadministrator-QQAAzz
Default Iterations : 4096
Credentials
aes256_hmac (4096) : 08da13a926b2b211cb0f1ba75ab191f72ed77469734eaf1f201199e553565005
aes128_hmac (4096) : 21f966b6130439e9675a028093241e31
des_cbc_md5 (4096) : c8804662201043a2
OldCredentials
aes256_hmac (4096) : cc294cf8db8838e1c973d8e868a4c32d7fd215162c9ae75a797493fd96cec3b7
aes128_hmac (4096) : d7230e305d7f9ab31247e9ed06da3e9f
des_cbc_md5 (4096) : 62dfbf1c0dbc8685
OlderCredentials
aes256_hmac (4096) : 11bc124de204c19f0f9305390aad0785f0bb5250eb0147a55d3ce95549bcc455
aes128_hmac (4096) : ac7b1df27906f24c8b9228e9e573f48f
des_cbc_md5 (4096) : e6c7194a6eab4673
* Packages *
NTLM-Strong-NTOWF
* Primary:Kerberos *
Default Salt : DESKTOP-VBBTMVSadministrator-QQAAzz
Credentials
des_cbc_md5 : c8804662201043a2
OldCredentials
des_cbc_md5 : 62dfbf1c0dbc8685
使用大型取证工具
Magnet AXIOM Forensics v7.0.0.35443 Full Activated
12.这是一张单纯的图片
https://ctf.bugku.com/challenges/detail/id/2.html
key{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.html
http://www.libpng.org/pub/png/apps/pngcheck.html
CRC error in chunk IHDR (computed c758d77d, expected cbd6df8a)
import binascii
import struct
import threading
crc32key = 0xcbd6df8a
num_threads = 8 # 设置线程数
class HeightFinder(threading.Thread):
def __init__(self, start_height, end_height):
super(HeightFinder, self).__init__()
self.start_height = start_height
self.end_height = end_height
def 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) & 0xffffffff
if crc32result == crc32key:
print(''.join([format(c, '02x') for c in height]))
return
except Exception as e:
print(f"An error occurred: {e}")
def find_height():
threads = []
height_range = 65535
chunk_size = height_range // num_threads
for i in range(num_threads):
start_height = i * chunk_size
end_height = (i + 1) * chunk_size if i < num_threads - 1 else height_range
thread = HeightFinder(start_height, end_height)
threads.append(thread)
thread.start()
for thread in threads:
thread.join()
if __name__ == '__main__':
find_height()
import binascii
import struct
import threading
crcbp = 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_width
self.end_width = end_width
def 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) & 0xffffffff
if crc32 == crc32frombp:
print(i, j)
print('hex:', hex(i), hex(j))
return
except Exception as e:
print(f"An error occurred: {e}")
def find_size():
threads = []
num_threads = 8 # 设置线程数
width_range = 4000
chunk_size = width_range // num_threads
for i in range(num_threads):
start_width = i * chunk_size
end_width = (i + 1) * chunk_size if i < num_threads - 1 else width_range
thread = 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.html
15.眼见非实
https://ctf.bugku.com/challenges/detail/id/5.html
binwalk [选项] <文件名>
binwalk firmware.bin
binwalk -e firmware.bin
binwalk -D firmware.bin
binwalk -e -M firmware.bin
binwalk -B firmware.bin
binwalk -A "mov eax, ebx" firmware.bin
binwalk -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 foremost
foremost [选项] <输入文件或设备>
foremost -t all -i -v -o /path/to/output image.dd