-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mirrored DNS traffic appear as "failed" #106
Comments
Trying with a pcap captured with mirrores traffic it does not show any DNS request (and they are there...) root@srv-cash:/opt/passivedns# tcpdump -i enp4s0 port 53 -w p53.pcap root@srv-cash:/opt/passivedns# ./src/passivedns -r p53.pcap [] PassiveDNS 1.2.1 -- Total DNS records allocated : 0 [*] passivedns ended. tcpdump shows the DNS traffic: root@srv-cash:/opt/passivedns# tcpdump -qns 0 -A -r p53.pcap Any idea? |
I attach the pcap file with the 3/4 DNS requests showed in my previous post. Please let me know if there's a solution for this. Thank you! |
The p53.pcap does not contain any valid Query+Answers. Make sure you see the client query AND the server answer to that query... 202.144.91.179.21098 > 185.179.104.4.53: (Query) E |
OK, I finally fixed (temporarily) the problem by commenting out the "Check the DNS TID" section in dns.c:
Now it seems to be parsing the DNS queries... Te problem was that pi->cxt->plid was always 0, what is that value? Yep, the p53.dns pcap I included is too short (I realized later), however with a longer pcap the problem persisted. Thank you for your help! |
pi->cxt->plid should be the transaction identifier (TXID) recorded from the "Query" packet. |
I can see (with wireshark) that both DNS request and reply packets include their Transaction ID. However the pi->cxt->plid value seem to be always 0. I can send you another (longer) PCAP if you want. Rgds |
I dont need a longer pcap. I do would like to just have a pcap with One query, and its answer :) carve one out, something like: tcpdump -r long.pcap -w one.pcap 'udp and host x.y.z.n and port nnnn and host a.b.c.d and port 53' All I would need is two packets... the query, and the answer.... (they should have the same TID) E |
How is this going? |
Same issue as lmarl.
I'd say commenting out that check is dirty, it suits the purpose. |
Hello,
When sending mirrored traffic to passiveDNS it is not able to decode it. All DNS UDP requests appear as "failed". However if I try with normal (non mirrored) traffic in the same machine and the same compilation, it works fine. You can find next an example (traffic in enp4s0 is mirrored traffic and traffic enp3s0 is my usual network interface):
root@srv-cash:/opt/passivedns/src# cat /dev/null > /var/log/passivedns.log
root@srv-cash:/opt/passivedns/src# ./passivedns -i enp4s0 # MIRRORED TRAFFIC
[] PassiveDNS 1.2.1
[] By Edward Bjarte Fjellskål [email protected]
[] Using libpcap version 1.7.4
[] Using ldns version 1.6.17
[] Device: enp4s0
[] Sniffing...
^C
-- Total DNS records allocated : 0
-- Total DNS assets allocated : 0
-- Total DNS packets over IPv4/TCP : 1
-- Total DNS packets over IPv6/TCP : 0
-- Total DNS packets over TCP decoded : 0
-- Total DNS packets over TCP failed : 1
-- Total DNS packets over IPv4/UDP : 317
-- Total DNS packets over IPv6/UDP : 0
-- Total DNS packets over UDP decoded : 0
-- Total DNS packets over UDP failed : 317
-- Total packets received from libpcap : 373
-- Total Ethernet packets received : 373
-- Total VLAN packets received : 373
[*] passivedns ended.
root@srv-cash:/opt/passivedns/src# cat /var/log/passivedns.log
####EMPTY#####
root@srv-cash:/opt/passivedns/src# ./passivedns -i enp3s0 # NORMAL TRAFFIC
[] PassiveDNS 1.2.1
[] By Edward Bjarte Fjellskål [email protected]
[] Using libpcap version 1.7.4
[] Using ldns version 1.6.17
[] Device: enp3s0
[] Sniffing...
^C
-- Total DNS records allocated : 8
-- Total DNS assets allocated : 9
-- Total DNS packets over IPv4/TCP : 0
-- Total DNS packets over IPv6/TCP : 0
-- Total DNS packets over TCP decoded : 0
-- Total DNS packets over TCP failed : 0
-- Total DNS packets over IPv4/UDP : 10
-- Total DNS packets over IPv6/UDP : 0
-- Total DNS packets over UDP decoded : 7
-- Total DNS packets over UDP failed : 3
-- Total packets received from libpcap : 20
-- Total Ethernet packets received : 20
-- Total VLAN packets received : 20
[*] passivedns ended.
root@srv-cash:/opt/passivedns/src# cat /var/log/passivedns.log
1530541289.416854||10.5.2.43||10.5.4.4||IN||www.github.com.||CNAME||github.com.||3600||1
1530541289.416854||10.5.2.43||10.5.4.4||IN||github.com.||A||192.30.253.112||60||1
1530541289.416854||10.5.2.43||10.5.4.4||IN||github.com.||A||192.30.253.113||60||1
1530541289.585482||10.5.2.43||10.5.4.4||IN||112.253.30.192.in-addr.arpa.||PTR||lb-192-30-253-112-iad.github.com.||3600||1
1530541300.649830||10.5.2.43||10.5.4.4||IN||www.amazon.co.uk.||CNAME||www.cdn.amazon.co.uk.||1800||1
1530541300.649830||10.5.2.43||10.5.4.4||IN||www.cdn.amazon.co.uk.||CNAME||www.amazon.co.uk.edgekey.net.||60||1
1530541300.649830||10.5.2.43||10.5.4.4||IN||www.amazon.co.uk.edgekey.net.||CNAME||e15314.ci.akamaiedge.net.||300||1
1530541300.649830||10.5.2.43||10.5.4.4||IN||e15314.ci.akamaiedge.net.||A||23.60.210.226||20||1
1530541301.310547||10.5.2.43||10.5.4.4||IN||226.210.60.23.in-addr.arpa.||PTR||a23-60-210-226.deploy.static.akamaitechnologies.com.||43200||1
Do you know what could be happening?
The text was updated successfully, but these errors were encountered: