Skip to main content
Challenges APT campaign
Xonalar Expert A custom C2 protocol, weak Diffie-Hellman and exfil fragments Solves: 4

APT campaign

Author: CyberSamSU
Points
220

Room: APT campaign. A perimeter sensor recorded repeated, strange TCP connections from the FIN-WS-14 (10.20.5.14) workstation in the finance department to the 203.0.113.77:4433 address. The IR team extracted strings with strings from the implant process and saved a full copy of the connections to that address. You are the analyst on duty: what exactly was taken out of the finance host?

You are given apt_case.zip: IR_NOTES.txt, mem_strings.txt (strings from the implant's memory), c2.pcap. The protocol is not public; analyst notes:

  • Transport: TCP/4433. Each frame = uzunlik (u32, big-endian; the length of tur + tana) | tur (u8) | tana.
  • 0x01 HELLO (client): versiya(u8) | bot_id (8 ASCII characters) | A (u64 BE) — the client's public DH value. 0x02 WELCOME (server): B (u64 BE) | 4-byte tag.
  • 0x10 CMD (server → client), 0x11 RESP and 0x20 DATA (client → server): body = seq (u32 BE) | ciphertext. Plaintext: CMD/RESP — ASCII text; DATA — the chunk format described in the implant strings.
  • All the remaining parameters (the prime number, key derivation, the counter block...) are in the implant itself — in mem_strings.txt.

Task 1. From the memory strings, extract the infected host's current bot_id and the parameters of the active protocol (DHX1). Do not be fooled by old/removed settings.

Task 2. There are 3 hosts in c2.pcap. Which stream belongs to FIN-WS-14? Take TCP retransmissions into account and assemble its frames.

Task 3. The exchange took place over a small modulus: recover the shared secret from the public A/B and derive the stream key (a discrete logarithm — the modulus is so small that it is solved in seconds on an ordinary computer).

Task 4. Decrypt and read the command stream: what archives did the operator create, which one is the Q3 accounting ledger, and what is its password?

Task 5. Assemble the Q3 archive from the fragments sent via exfil (the order is mixed, and some fragments are repeated or corrupted in transit), open the archive — the audit token in it is the room's flag.

Flag format: BAYROQ{APT_KAMPANIYA_xxxxxxxxxxxxxxxx} (the last 16 characters are lowercase hex). "Tokens" in other archives may have this format too — but only the one in the Q3 archive is correct.

Attached files
apt_case.zip Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −22 pts Log in
Hint 2 −44 pts Log in
Hint 3 −66 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 25.11.2026
2. Odam 25.11.2026
3. Asmaa Mottery 25.11.2026
4. 𝖛𝖊𝖑𝖐𝖆𝖓 28.11.2026