2023LaCTF
前言:
累了,没有话,下次一定
回来了,还是国际赛有意思
几个题目都是osint题目,剩下两道一个取证一个流量包,还有一个流量包和一个docker不会,先放着吧
比赛地址(https://platform.lac.tf/challs)
EBE
I was trying to send a flag to my friend over UDP, one character at a time, but it got corrupted! I think someone else was messing around with me and sent extra bytes, though it seems like they actually abided by RFC 3514 for once. Can you get the flag?
纵览整个流量包,追踪udp流发现可以直接得到明文
在观察每一个流的细节部分,只有两个地方被改变了
且,这两个的变化是一致的
ip.flags == 0x0 ip.checksum == 0x64c1
因此我们筛选任意一部分都是可以的
lactf{j03_4nd_j0S3phIn3_bRU1n_sAY_hi}
对于题目描述中的RFC 3514我其实是没有理解什么意思2333
那先这样吧
暂时over
a hacker’s notes
We managed to get ahold of a flash drive which we think contains the decryption keys for the ransomware that a hacker group tried to deploy on our computer network! However, it seems like the hacker encrypted the flash drive. We know that the organization uses passwords in the format hacker### (hacker + 3 digits) for their disks, but a much stronger encryption password once you login. Can you try to get access to their notes?
暂时放着,明天来写
回来了
题目复现到一办卡住了,
参考文章:la-ctf-2023/LA-CTF-2023.md at master · dreeSec/la-ctf-2023 · GitHub
拿到一个dd文件,010看一下发现文件头LUKS字样,
Ubuntu上 LUKS的使用以及开启自动加密_Icoding_F2014的博客-CSDN博客_luks如何工作
cryptsetup – 分区加密工具_driverSir的博客-CSDN博客_cryptsetup
当然也可以使用file 命令查看文件类型
如下
┌──(t㉿t)-[~/桌面]
└─$ file hackers-drive.dd
hackers-drive.dd: LUKS encrypted file, ver 1 [twofish, cbc-plain, sha1] UUID: 456aa573-ab59-4146-a2f3-874a808b9c08
根据题目描述,密码为hacker+3位数字
for i in range(0, 10):
for j in range(0, 10):
for x in range(0, 10):
print('hacker%d%d%d' % (i, j, x), end='\n')
先写个脚本生成一下字典,使用hashcat可以爆破
hashcat.exe -m 14600 -a 0 -w 3 hackers-drive.dd hacker9.txt
hashcat下载地址https://hashcat.net/hashcat/
从图中可以看到密码位hacker765
接着我们可以在linux使用cryptsetup解密
┌──(t㉿t)-[~/桌面]
└─$ sudo cryptsetup open --type luks hackers-drive.dd hackers-drive
输入 hackers-drive.dd 的口令:
设备 hackers-drive 已存在。
接着我们可以看到挂载的文件
注意,此时有隐藏文件
我们可以使用ls -al显示全部文件
┌──(t㉿t)-[/media/t/ed1c79a8-8148-4ce2-b482-91334a211dc9]
└─$ ls -al
总用量 24
drwxr-xr-x 7 t 1001 1024 2月 15 15:37 .
drwxr-x---+ 3 root root 4096 2月 15 15:10 ..
-rw------- 1 t 1001 190 1月 16 10:38 .bash_history
drwxr-xr-x 3 t 1001 1024 1月 16 09:06 config
drwx------ 2 t 1001 1024 1月 16 09:09 .emacs.d
drwxr-xr-x 7 t 1001 1024 1月 16 09:12 encrypted-notes
drwxr-xr-x 3 t 1001 1024 1月 16 08:50 .local
drwx------ 2 root root 12288 1月 16 10:37 lost+found
-rw-r--r-- 1 t 1001 150 1月 16 09:35 note_to_self.txt
-rw------- 1 t 1001 705 1月 16 09:33 .sqlite_history
可以看到里面有一个.bash_history
的文件,很明显这是一个历史命令记录的文件
┌──(t㉿t)-[/media/t/ed1c79a8-8148-4ce2-b482-91334a211dc9]
└─$ cat .bash_history
joplin
cd .config/joplin
ls -lah
sqlite3 database.sqlite
ls
ls -lah
cat database.sqlite | grep lactf
cd ..
cd ..
ls
ls -lah
nano note_to_self.txt
ls -lah
ls
zerofree /dev/mapper/notes
exit
可以看到打开了一个database.sqlite的文件
这个文件的路径在ed1c79a8-8148-4ce2-b482-91334a211dc9/.config/joplin
emmmm然后就找到了password
然后就不会了
开摆,等冰峰爷爷捞我了
下次一定,找不到其他wp又看不懂英文真的哭死
看起来在一周之后还会有wp,先等等吧