-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
DNS C2 on v1.6.8 and v1.6.9 appears to be broken. Generating beacons with the correct steps listed in the official documentation (respecting FQDNs with trailing '.') succeeds, however they are never able to complete a connection. Building the beacon with debug enabled will show that it fails out with a "Too much data to encode" error.
Is it possible that there's a maximum length of domain name that works with DNS C2? If so this isn't reflected in docs.
To Reproduce
Steps to reproduce the behavior:
- Start DNS Listener
- Generate beacon for DNS listener with debug enabled
- Execute beacon
- Observe the beacon begin communication with the DNS server, but ultimately fail with "Too much data to encode" before the session is registered.
Expected behavior
The beacon should correctly portion data into the DNS queries without trigging the "Too much data" error. If there is a maximum permitted domain length, it should be reflected in doco (or ideally not permitted by the software).
Screenshots
2026/01/30 17:01:16 dnsclient.go:320: [dns] init msg send failure Too much data to encode
2026/01/30 17:01:16 beacon.go:177: [beacon] dns connection error Too much data to encode
2026/01/30 17:01:16 runner.go:141: Beacon init error: Too much data to encode
2026/01/30 17:01:16 runner.go:127: Reconnect sleep: 1m0s
Desktop (please complete the following information):
- Beacon OS: Kali Linux (amd64)
- Server OS: Debian (arm)
- Client and server both on v1.6.9
- Same behaviour observed on v1.6.8