Overview
Unlike conventional botnets, Proone instances can be controlled through DNS TXT records containing serialized Heartbeat protocol sessions. This mechanism is called TXT REC CNC (TXT Record Command and Control).How It Works
Proone instances periodically query DNS TXT records to parse and serve request messages as if they came from a real authoritative host on a TLS connection. Any response data is discarded.Key Characteristics
- No direct connection: Commands delivered via DNS infrastructure
- Periodic polling: Instances query records at intervals
- Base64 encoding: Binary frames encoded for DNS compatibility
- One-way: Responses are processed but not returned
- DNS over TLS: Queries use public DoT servers for privacy
CNCP Worker
The CNC Probe Worker (CNCP) is a subthread of the heartbeat worker that executes CNC instructions.Timing
- Query interval: 1800 ± 1800 seconds (random jitter)
- Hardcoded: Cannot be changed without recompiling
- Resource efficient: Minimizes DNS queries and processing overhead
Record Format
Header Record
The header record specifies the number of data records and their naming pattern:| Component | Description |
|---|---|
| Group 1 | Number of data records (hex with leading zeros) |
| Group 2 | Suffix for data record names |
PRNE_CNC_TXT_REC
Example Header
00000000.data.example.com00000001.data.example.com00000002.data.example.com
Data Records
Data records are queried sequentially (00000000, 00000001, …) and contain base64-encoded binary protocol data.Record Construction
nb_rec: Number of data records (from header)suffix: Suffix from header (e.g.,.data.example.com)
Important Notes
The suffix doesn’t need to start with a dot. Records can even span different domains:
- Header:
cnc.domain-a.exampleTXT"0000000F.domain-b.example"
Example Configuration
Simple Command
Header record:Multi-record Session
Header record:Security Features
DNS over TLS
Proone uses only public DNS servers with DNS over TLS support:- Encrypted queries: Prevents ISP/lawful interception
- No system resolver: Direct queries bypass local DNS servers
- Public infrastructure: Harder to block than domain takedown
- ISP evasion: Plain DNS would allow simple string filtering
Rationale
- Encryption: DNS protocol is unencrypted by default - ISPs could filter TXT CNC traffic
- Independence: System DNS functions could be hijacked to return false results
- Resilience: Law enforcement must take down domains rather than filter queries
- Convenience: No server infrastructure needed for simple tasks
Recommended Applications
1. Hand-over Command
UsePRNE_HTBT_OP_HOVER to redirect instances to authoritative servers:
2. Shell Script Execution
UsePRNE_HTBT_OP_RUN_CMD or PRNE_HTBT_OP_RUN_BIN for simple commands:
Performance Considerations
Costly Operations
For Proone instances, TXT REC CNC involves:- Querying TXT records (DNS overhead)
- Decoding base64 data (CPU)
- Running slave heartbeat context (memory + CPU)
Best Practices
For complex operations, use TXT REC CNC to issue HOVER commands, then handle operations on dedicated authoritative servers.
Load Balancing
Multiple header record values enable load balancing:Processing Flow
Error Handling
Protocol Errors
- Multiple values: Data record has more than one TXT value
- Invalid base64: Cannot decode data record contents
- Malformed frames: Binary data doesn’t parse correctly
Recovery
On error, the CNCP worker:- Logs the error (if logging enabled)
- Abandons the current CNC session
- Waits for next scheduled query interval
Implementation Notes
Base64 Encoding
Standard base64 encoding is used because:- Most DNS management tools don’t accept binary TXT data
- RFC 1035 allows binary, but implementations restrict it
- Base64 ensures compatibility across DNS providers
Frame Serialization
Serialize Heartbeat frames normally, then base64-encode:Related Topics
Protocol Overview
Understanding the Heartbeat protocol
Frame Format
Frame structures and encoding
Source Reference
doc/htbt.md: TXT REC CNC specification- Query interval: Hardcoded in source (1800±1800 seconds)
- Record format:
PRNE_CNC_TXT_RECmacro
