Overview of dnscat2 Architecture
masterdnscat2 is a tool designed to create an encrypted command-and-control (C&C) channel over the DNS protocol. It consists of two main components:
- Client: Written in C with minimal dependencies, intended to run on a compromised machine. It can use an authoritative DNS server for requests or connect directly to a server via UDP/53.
- Server: Written in Ruby, intended to run on an authoritative DNS server. It listens for specific domains or direct UDP connections and establishes logical connections for data tunneling (files, shells, etc.).
Unlike general-purpose tunnels, dnscat2 is optimized for C&C and encrypts all traffic by default.