iagox86 / dnscat2

BSD 3-Clause "New" or "Revised" License
3.4k stars 599 forks source link

RCODE_NAME_ERROR #184

Open sujitawake opened 1 year ago

sujitawake commented 1 year ago

After I start the listener, now when I am attempting to establish the communication from the client, I am getting this constant error in the SERVER and CLIENT respectively:

Server console

To talk directly to the server without a domain name, run:

  ./dnscat --dns server=x.x.x.x,port=53 --secret=8ae177f2180a2f3d9ca58a7da7264baa

Of course, you have to figure out <server> yourself! Clients
will connect directly on UDP port 53.

dnscat2> Error caught (for more information, check window 'dns1'):
#<NoMethodError: undefined method `length' for nil:NilClass>
Error caught (for more information, check window 'dns1'):
#<NoMethodError: undefined method `length' for nil:NilClass>
Error caught (for more information, check window 'dns1'):
#<NoMethodError: undefined method `length' for nil:NilClass>
Error caught (for more information, check window 'dns1'):
#<NoMethodError: undefined method `length' for nil:NilClass>

Client Console

./dnscat --dns server=domain.com,port=53 --secret=8ae177f2180a2f3d9ca58a7da7264baa
Creating DNS driver:
 domain = (null)
 host   = 0.0.0.0
 port   = 53
 type   = TXT,CNAME,MX
 server = domain.com
[[ ERROR ]] :: DNS: RCODE_NAME_ERROR
...
...
[[ ERROR ]] :: DNS: RCODE_NAME_ERROR
[[ ERROR ]] :: The server hasn't returned a valid response in the last 20 attempts.. closing session.
[[ ERROR ]] :: DNS: RCODE_NAME_ERROR
[[ FATAL ]] :: There are no active sessions left! Goodbye!
[[ WARNING ]] :: Terminating

Any idea how shall I fix this?

nguyenl95 commented 1 year ago

Use docker version of server, it solved the problem.