nyu-mlab / pcap-parser

MIT License
1 stars 1 forks source link

label more IPs with hostnames #2

Open crazyideas21 opened 7 months ago

crazyideas21 commented 7 months ago

The current version labels IPs with hostnames obtained from DNS and SNI (assuming TLS 1.2). However, there are still cases where the src_hostname or dst_hostname fields are empty, because the parser didn't see any corresponding IP-hostname mappings from DNS and SNI.

Here's one thing the user (say @Rameen-Mahmood) can do to mitigate this issue: Instead of parsing one pcap at a time, you can capture a bunch of pcaps (e.g., repeated experiments from the same app, or running tcpdump on multiple apps) and run this parser on the pcaps at the same time (e.g., python parser.py output.csv *.pcap). In this way, the parser can use DNS/SNI information extracted from one pcap and apply this IP-hostname mapping to other pcaps.

Still, I'd expect a number of IPs with no hostname labels. What I can do to mitigate this situation would be:

Rameen-Mahmood commented 3 months ago

Update: pcap-parser now supports handling multiple pcap files at once, including entire directories of pcaps. Users can now parse a batch of pcap files in a single command: python parse.py <output_csv_file> <directory_containing_pcap_files>