247CTF - Commutative Payload
We have a honey pot running on one of our internal networks. We received an alert today that the machine was compromised, but we can’t figure out what the attacker did. Can you find the flag hidden in the attacker's payload?
我们在内部网络中运行了一个蜜罐。今天我们收到警报,显示该机器已被入侵,但我们无法确定攻击者做了什么。你能找到隐藏在攻击者有效载荷中的 flag 吗?
Network Traffic
The provided logs show SMB (Server Message Block) traffic on port 445
(microsoft_ds). The sequence of
SMBNegotiate_Request and
SMB2_Negotiate_Protocol_Request suggests an attempt to
exploit an SMB vulnerability.
1 | 0001 Ether / IP / TCP 192.168.10.168:microsoft_ds > 10.0.5.15:42799 SA / Padding |
Payload Extraction
Following the TCP stream and exporting the raw data with Wireshark, we get the following hex dump:
1 | ❯ xxd a.raw |
The challenge name "Commutative Payload" hints at a commutative operation like XOR used for obfuscation.
Solution
- Extract Data: Save the raw payload from the Wireshark TCP stream.
- CyberChef Analysis:
- Use the XOR Brute Force operation.
- Sample length: 10000.
- Crib:
247CTF(knowing the flag format).
- Identification: When testing a key length of 2, the
key
14 14(effectively a 1-byte XOR with0x14) decrypts the payload to reveal the flag.