iagox86 / dnscat2

BSD 3-Clause "New" or "Revised" License
3.34k stars 590 forks source link

Bug: Core dumps when forwarding over DoH #175

Open Korving-F opened 2 years ago

Korving-F commented 2 years ago

When using dns-over-https to pass the tunnel over HTTPS, core is typically dumped immediately after tunnel establishment but not always. Pings die immediately while commands on occasion return data. Encryption was turned on/off, different record types were attempted but all had the same result.

root@tunnelclient:~# ./dnscat2/client/dnscat --dns server=127.0.0.1,domain=example.com --secret=1234
Creating DNS driver:
 domain = example.com
 host   = 0.0.0.0
 port   = 53
 type   = TXT,CNAME,MX
 server = 127.0.0.1
Unrecoverable error in libs/buffer.c(699): Program read off the end of the buffer.

Aborted (core dumped)
0x7D4 commented 1 month ago

How do I tunnel it over DoH? I've dnsdist and bind9 running on my client, and dnscat2 server is running on my VPS where my domain is hosted. How do I channel it through DoH?