iagox86 / dnscat2

BSD 3-Clause "New" or "Revised" License
3.43k stars 601 forks source link

It's possible for an exception to kill the dnscat2 server #125

Open iagox86 opened 6 years ago

iagox86 commented 6 years ago

Prevent that from happening. I believe it was an over-long DNS request?

iagox86 commented 6 years ago
/root/tools/dnscat2/server/libs/dnser.rb:179:in `unpack': DNS packet was truncated (or we messed up parsing it)! (DNSer::Packet::FormatException)
        from /root/tools/dnscat2/server/libs/dnser.rb:209:in `block in unpack_name'
        from /root/tools/dnscat2/server/libs/dnser.rb:207:in `loop'
        from /root/tools/dnscat2/server/libs/dnser.rb:207:in `unpack_name'
        from /root/tools/dnscat2/server/libs/dnser.rb:484:in `parse'
        from /root/tools/dnscat2/server/libs/dnser.rb:644:in `block in parse'
        from /root/tools/dnscat2/server/libs/dnser.rb:643:in `upto'
        from /root/tools/dnscat2/server/libs/dnser.rb:643:in `parse'
        from /root/tools/dnscat2/server/libs/dnser.rb:847:in `block (2 levels) in on_request'
        from /root/tools/dnscat2/server/libs/dnser.rb:843:in `loop'
        from /root/tools/dnscat2/server/libs/dnser.rb:843:in `block in on_request'