OFPPT-CTF-2022-writeup
Forensics
pcap analysis1
考点:流量分析
第一题,因为英语太菜了,这里翻译一下,大致的意思就是被入侵了,然后分析一下,这个人在搜索引擎上查找了什么
我们这里直接筛选http流量,随便点一个,看到使用的是百度,随便搜索一个名字,就可以看到,wd对应的值就是我们搜索的内容,
这里我们直接用简单方法,文件导出首选项,下面有全部的url,这里直接抄就行了。
OFPPT-CTF{charles_geschickter}
pcap analysis2
wireshark提取ftp流量包
这里我们可以看到许多ftp的协议,我们直接帅选ftp的流量,往下翻一番,随便找个request包,右键追踪流就可以看到了,
因为题目的要求是相同文件名,后缀不同,所以就是这两个文件,接下来提取这两包
这里直接搜索lytton-crypt.bin下面ftpdata就是数据,直接追踪
调成原始数据,save
lytton-crypt.bin
MD5: 4da8e81ee5b08777871e347a6b296953
SHA1: 5f88cfb5e469154782aa84a6b649007423c8b196
SHA256: 22190203d1789b181eb7230ceeafffe440b33883e185470b7cf64ab22fb3ba9f
CRC32: 2859590343
lytton-crypt.exe 同理
MD5: 9cb9b11484369b95ce35904c691a5b28
SHA1: 4463adb39c4381b87c76180543c401c2bfa89962
SHA256: b7da7228ac44bd90aedf34660a04d15bf1ddf84c1a4823234c3abf506a254b8b
CRC32: 3745826804
OFPPT-CTF{9cb9b11484369b95ce35904c691a5b28|4da8e81ee5b08777871e347a6b296953}
pcap analysis3
The attacker cracked a password belonging to the victim. Submit the flag as: OFPPT-CTF{password}.
这题就比较简单了,说攻破了密码,我们刚刚在ftp服务器上看到了登陆的痕迹,去找一下密码,直接搜索tcp和200就行,或者utf8也可以,追踪一下,就可以看到登录成功了
USER cgeschickter
331 Password required
PASS darkangel
230 User logged in.
OFPPT-CTF{darkangel}
pcap analysis4
4这里说执行了一个文件
The attacker made a fatal mistake, and in doing so, gave control of his computer to… someone. he shouldn’t have run that malicious program.
我们在搜索http流量时,找到一个secret_decoder.bin,搜索这个关键字时,发现
.106的机器在105上执行了命令
使用wget -O下载并以不同的文件名保存
这里我们可以看到wget了一个文件且重命名了,之后改了权限,然后增加了定时任务,说明执行的就是这个secret_decoder.bin文件
这里因为他在最后http请求了这个文件,我们直接导出就行,和ftp导出一样.
导出之后取一下文件md5就行了
MD5: 42e419a6391ca79dc44d7dcef1efc83b
SHA1: e96c5e687d827f5a250fc643d1e9ff46e2c531bc
SHA256: 358489fcab70c3f10c4628e09c1ccbd001915f6adfa7fa97a1be0fb5fbab8198
CRC32: 2929409365
OFPPT-CTF{42e419a6391ca79dc44d7dcef1efc83b}
pcapanalysis5
The attacker started by performing a port scan of the victim computer.
Identify the open TCP ports discovered on the victim’s machine? Enter the flag as the open ports, separated by commas, no spaces, in numerical order. Disregard port numbers > 10000. Example: OFPPT-CTF{80,110,111,143,443,2049} Use the PCAP file from ‘pcap analysis’ challenge.
这里我们先推断一下,因为在数据包中106的ip对103的ip进行了ftp密码爆破,所以106为攻击者,103为受害者且假设的为ftp服务。
筛选一下目的ipip.dst == 192.168.100.103
可以看到在扫描端口,往下拉一拉会看到请求成功的端口,一共有五个。这里我的方法不推荐,下面这个是一个大师傅的方法,链接https://hhyleung.github.io/writeups/ofppt-ctf-2022/#pcap-analysis-6
A port scan is usually done with the TCP handshake, which ends with
SYN, ACK
if the port is opened. >The filtertcp.flags.ack == 1 and tcp.flags.syn == 1
was used to filter out the completed >handshakes and it was found that ports21
,135
,139
,445
, and3389
were opened.
加上ip就更清晰了tcp.flags.ack == 1 and tcp.flags.syn == 1 and ip.addr == 192.168.100.103
OFPPT-CTF{21,135,139,445,3389}
pcap analysis6
The attacker might have just bit off more than he can chew! he encountered a competitor that is counter-attacking his system!
The competitor executed a command to attain persistence on the attacker’s computer. This command will allow the adversary to regain a connection to the computer even after reboot. What is the packet number where this command was executed? For example: OFPPT-CTF{93721}. Use the PCAP file from ‘pcap analysis’ challenge.
前面我们知道加了计划任务,也就是直接搜sudo 就可以了,该包的号为160468
OFPPT-CTF{160468}
Windows memory dump
A Windows computer has been infected. The attacker managed to exploit a portion of a database backup that contains sensitive employee and customer private information. All memory dump challenges use the same file.
Inspect the memory dump and tell us the Windows Major Operating System Version, bit version, and the image date/time (UTC, no spaces or special characters). Submit the flag as OFPPT-CTF{OS_BIT_YYYYMMDDhhmmss}. Example: OFPPT-CTF{WindowsXP_32_20220120095959} File: 1.5 GB Decompressed: 5 GB
这里取证题,第一次遇到win10的镜像,记录一下
先看一下镜像信息┌──(root💀bohemian)-[/tools/volatility] └─# python2 vol.py -f ../ctf/ofppt/physmemraw imageinfo
由于这个文件很大 5G,扫描扫了很久,查不多五分钟,我一度以为是我操作不对。后来发现不是,单纯的是因为文件大
1 | ┌──(root💀bohemian)-[/tools/volatility] |
我们可以看到是64位的win10,所以flag
OFPPT-CTF{Windows10_64_20210907145744}
Windows memory dump2
envars | 显示进程的环境变量 |
---|---|
1 | ┌──(root💀bohemian)-[/tools/volatility] |
OFPPT-CTF{DESKTOP-IT8QNRI}
Windows memory dump3
Using the memory dump file from Window memory dump challenge, find out the name of the malicious process.
Submit the flag as OFPPT-CTF{process-name_pid} (include the file extension). Example: OFPPT-CTF{svchost.exe_1234}
1 | ┌──(root💀bohemian)-[/tools/volatility] |
OFPPT-CTF{userinit.exe_8180}
Windows memory dump4
1 |
|
ImageSectionObject 0xffff9a07857d4280 8180 \Device\HarddiskVolume2\Windows\Temp\userinit.exe
未出,借一下大师傅的writeup
1 | └─$ vol -f physmemraw windows.dumpfiles --pid 8180 |
Flag: OFPPT-CTF{962d96f30c8f126cbcdee6eecc5e50c3a408402b}
web
php
1 |
|
参考https://hhyleung.github.io/writeups/ofppt-ctf-2022/
一直在路上