Decode the Beacon Label: Unmasking a DNS Exfil Hostname

Digital Forensics & IR Level 2/4 ~3 min August 5, 2026

The challenge

While reviewing a packet capture you spot a suspicious DNS subdomain label that looks like base64. Decode it to reveal where the malware is sending data, then submit the exfil hostname.

What you'll learn

  • Recognise base64 inside a DNS label by its mixed case and trailing = padding
  • Decode a base64 label in one click to reveal a hidden hostname
  • Understand why attackers encode DNS labels to blend into normal traffic
  • See that base64 obfuscation is reversible and provides no confidentiality
  • Identify an exfiltration destination during packet-capture review

Skills tested

Base64 recognition in network artifactsBase64 decodingDNS exfiltration awareness

Prerequisites

  • Knowing that DNS names are made of dot-separated labels
  • The idea that malware can hide data inside ordinary-looking traffic

How it works

Some malware sends stolen data out over DNS because DNS queries are allowed out of almost every network. To move arbitrary data through DNS, an implant often packs it into the subdomain labels of a query. Those labels would look strange as raw bytes, so the malware encodes them with base64 first. The result is a label that is valid for DNS and blends in with the constant background of name lookups a host makes.

base64 inside a label is easy to spot once you know the look. A normal domain word is lower case and pronounceable; a base64 label mixes upper and lower case letters and digits and frequently ends with one or two = signs of padding. The captured label here has exactly that shape, which is your cue that it is encoded rather than a real name.

The crucial point is that this encoding is not secrecy. base64 has no key, so a defender can reverse it with a single click and read the original string. Attackers use it only to make the traffic look ordinary, not to keep the contents private. That asymmetry favours the analyst: once you recognise the encoding, decoding it immediately exposes the real destination the implant is talking to. The ROT13, hex, URL, and reverse buttons expect different input shapes and are decoys here.

Common mistakes

  • Treating the label as a real hostname. The mixed case and = padding mean it is encoded, not a literal name. Decode it before drawing conclusions.
  • Assuming the encoding hides the destination. base64 has no key, so it is one click from plain text. It only disguises the traffic, it does not protect it.
  • Choosing the wrong decoder. hex would use only 0-9a-f and ROT13 would keep the same length and shape. The mixed case plus padding point to base64.
  • Submitting the encoded label. The answer is the decoded hostname, not the base64 string.

How to defend against it

Defensively, the goal is to catch encoded data leaving over DNS and to remember that the encoding itself buys the attacker nothing once it is observed. Treat unusually long or high-entropy DNS labels as a signal, and decode any base64 you find during analysis to confirm what is being moved.

  • Monitor for abnormally long, high-entropy, or fast-repeating DNS subdomain labels that suggest tunneling.
  • Route DNS through controlled resolvers that log queries so labels like this are captured for review.
  • Decode any base64, hex, or URL layer you see in captured traffic during analysis - encoding is reversible and reveals the real content.
  • Block or alert on traffic to newly seen or suspicious domains once a destination like this is decoded.

Full solution

Pro and Max members unlock the complete step-by-step walkthrough.

Go Pro

Community stats

131 completions
82% success rate
LuisFelipe First blood

Related Daily Hacks

22,000+ Hackers 100+ Labs & Courses Free
Start Hacking Free