Skip to main content
Back to challenges

Malware Development · Programming

DNS C2 Protocol Implementation

Advanced · 4/5
Paid planSpecialist rank required100 points on first solo solve

Challenge brief

Implement a DNS-based C2 protocol encoder/decoder.

Protocol Specification

Commands are encoded in DNS TXT queries:

  1. XOR with rolling key (starting 0x41, increment by 1)
  2. Base32 encode result
  3. Split into 63-char labels
  4. Append .c2domain.com

Input

Line 1: "ENCODE" or "DECODE" Line 2: The data

Output

Encoded query or decoded command

Solo practice

Sign in to submit an answer and save your progress.

Sign in to practice