Sample captures, DNS
DNS tunnel over TXT queries
Six TXT queries with long base32 labels under t.badexample.net.
- Packets
- 12
- Duration
- 12.521 s
- Size
- 2.3 KB
- Protocols
- UDP, DNS
- License
- CC0
What it shows
A client sends data out through DNS: each query's first label is 52 characters of base32 under t.badexample.net, and each TXT answer carries a short base64 reply.
For rules on label length and character set. Suricata can run pcre on dns.query; in Snort 3, byte_test on the first label's length byte does the same job.
Rules for this capture
Suricata 8 and 7
Try these rulesalert dns any any -> any any (msg:"Long base32 label under t.badexample.net"; dns.query; content:".t.badexample.net"; endswith; pcre:"/^[a-z2-7]{40,}\./"; sid:1000001; rev:1;)Snort 3
Try these rulesalert udp any any -> any 53 (msg:"Long label under t.badexample.net"; byte_test:1,>,39,12; content:"|01|t|0a|badexample|03|net|00 00 10|"; sid:1000001; rev:1;)
Packets
| No. | Time | Source | Destination | Protocol | Info |
|---|---|---|---|---|---|
| 1 | 0.000 | 192.0.2.10:50100 | 198.51.100.53:53 | UDP | DNS query TXT mnxxe4c4njzw22luna5voskofu3vcmsmjm2dwmjqfyyc4mbogi2d.t.badexample.net |
| 2 | 0.021 | 198.51.100.53:53 | 192.0.2.10:50100 | UDP | DNS answer TXT mnxxe4c4njzw22luna5voskofu3vcmsmjm2dwmjqfyyc4mbogi2d.t.badexample.net |
| 3 | 2.500 | 192.0.2.10:50101 | 198.51.100.53:53 | UDP | DNS query TXT wv3jnzsg653teaytaicqojxsamrsjazdwylenvuw4pjrhnqxmplo.t.badexample.net |
| 4 | 2.521 | 198.51.100.53:53 | 192.0.2.10:50101 | UDP | DNS answer TXT wv3jnzsg653teaytaicqojxsamrsjazdwylenvuw4pjrhnqxmplo.t.badexample.net |
| 5 | 5.000 | 192.0.2.10:50102 | 198.51.100.53:53 | UDP | DNS query TXT n5xgko3dn5zhaxdkonwws5dihnlustrng5itetclgq5tcmbogaxd.t.badexample.net |
| 6 | 5.021 | 198.51.100.53:53 | 192.0.2.10:50102 | UDP | DNS answer TXT n5xgko3dn5zhaxdkonwws5dihnlustrng5itetclgq5tcmbogaxd.t.badexample.net |
| 7 | 7.500 | 192.0.2.10:50103 | 198.51.100.53:53 | UDP | DNS query TXT alrsgq5vo2lomrxxo4zageycaudsn4qdemsigi5wczdnnfxd2mj3.t.badexample.net |
| 8 | 7.521 | 198.51.100.53:53 | 192.0.2.10:50103 | UDP | DNS answer TXT alrsgq5vo2lomrxxo4zageycaudsn4qdemsigi5wczdnnfxd2mj3.t.badexample.net |
| 9 | 10.000 | 192.0.2.10:50104 | 198.51.100.53:53 | UDP | DNS query TXT mf3d23tpnzstwy3pojyfy2ttnvuxi2b3k5eu4ljxkezeyszuhmyt.t.badexample.net |
| 10 | 10.021 | 198.51.100.53:53 | 192.0.2.10:50104 | UDP | DNS answer TXT mf3d23tpnzstwy3pojyfy2ttnvuxi2b3k5eu4ljxkezeyszuhmyt.t.badexample.net |
| 11 | 12.500 | 192.0.2.10:50105 | 198.51.100.53:53 | UDP | DNS query TXT alrqfyyc4mruhnlws3ten53xgibrgaqfa4tpeazdesbshnqwi3lj.t.badexample.net |
| 12 | 12.521 | 198.51.100.53:53 | 192.0.2.10:50105 | UDP | DNS answer TXT alrqfyyc4mruhnlws3ten53xgibrgaqfa4tpeazdesbshnqwi3lj.t.badexample.net |
More DNS samples
- DNS lookup: An A query for c2.badexample.net and its answer.