Huntress Capture The Flag: HumanTwo
HumanTwo
Author: @JohnHammond
During the MOVEit Transfer exploitation, there were tons of “indicators of compromise” hashes available for the human2.aspx webshell! We collected a lot of them, but they all look very similar… except for very minor differences. Can you find an oddity?
NOTE, this challenge is based off of a real malware sample. We have done our best to “defang” the code, but out of abudance of caution it is strongly encouraged you only analyze this inside of a virtual environment separate from any production devices.
Download the file(s) below. Attachments: human2.aspx_iocs.zip
unzip ออกมาดู
$ unzip human2.aspx_iocs.zip -d human2
$ cd human2
$ ls
00016e6f4c0dbf5c88f630f53821f086363606c274832568b50c11d04ad044f9 589268f848f2bbc7994ec71e42e88f2876fe4c0014701d8087d4afe1c7aefc43 b0dabf565fea079a26580bd6f98542e2144e451af160e734c6091150695ccc67
000ce897ff8a17528a3116dcf74380a8c67be7d11e9bff038397df4fdf5fc5f4 58bcba2c76b90b703c311ae64b826afd262e3b85c046eab0f719b3bad9dccc11 b0dd6a76f9681f198cebc2c12a68f952be46f1c46649a5a08163ac4388081bd3
0019de2359fe758b0c7cd04c361dfbb798a1d897f3e67de3756645b423dbfe3f 5940ef536015f6f76a157d48aea3817b870dec8af27411058bf57b2688896d06 b1481bb6a4cab8a7129ae9ee072a02f12818879c7eb2b22fe4197384e7da8fcf
003982c6b07d0a6c86b20b50d715e6e16b1a7140d93e12cd00b3f577f3f587a0 59b31545ed44dae95b676a0e7a8e62c51e24a02234cb7e60b794c25a7eec02e4 b1b933f0c69d83bf21044951a3f363566284eb62af994c26dd68208c75dba729
00591dc80582df4dd55a08d6cb475a197b2029be5c0a6752bcc1c1d3fd63262c 59d6c1b9aa542d432666d90bcec1dc415a4a7f30ae8400326e81746f65b40e4f b2c501929bdc02d527e776b2b82191fcf2d4ef0105e1842e9ec85368beb13ef6
...
...
ได้ไฟล์ออกมาเยอะแยะเลย งั้นดูซิว่าไฟล์มันต่างกันยังไง
$ diff 00016e6f4c0dbf5c88f630f53821f086363606c274832568b50c11d04ad044f9 000ce897ff8a17528a3116dcf74380a8c67be7d11e9bff038397df4fdf5fc5f436c36
< if (!String.Equals(pass, "8919aabc-9b40-40a9-b568-0e256e496a51")) {
---
> if (!String.Equals(pass, "e11320cf-f34b-4cc8-b4e3-46b4ad6e50ab")) {
ลองดูไปสักพักสรุปว่ามันจะมีความต่างๆกันคล้ายๆแบบข้างบนนี่แหละ งั้นเช็คทั้งหมดดูซิ
$ for f in $(pwd)/* ; do cat $f | grep 'String.Equals(pass, ".*"+".*'; done
if (!String.Equals(pass, "666c6167-7b36-6365-3666-366131356464"+"64623065-6262-3333-3262-666166326230"+"62383564-317d-0000-0000-000000000000")) {
จะได้บรรทัดนี้แหละที่ต่างจากจุดอื่นๆมากที่สุดเมื่อวิเคราะห์ดูตัวเลข เอ๊ะมันน่าจะเป็น Ascii Code นะ ASCII Table เลข 66 ในฐาน 16 ก็คือตัวอักษร f จัดการใช้ CyberChef แปลงออกมา
"666c6167-7b36-6365-3666-366131356464"+"64623065-6262-3333-3262-666166326230"+"62383564-317d-0000-0000-000000000000"
flag{6ce6f6a15dddb0ebb332bfaf2b0b85d1}
หรือจะใช้ python ก็ได้
f_str = ("666c6167-7b36-6365-3666-366131356464"+"64623065-6262-3333-3262-666166326230"+"62383564-317d-0000-0000-000000000000").replace("-","")
flag=""
for i in range(0,len(f_str),2):
flag = flag + chr(int(f_str[i]+f_str[i+1],16))
print(flag)
'flag{6ce6f6a15dddb0ebb332bfaf2b0b85d1}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'