Analyzer for PCAP files
Go to file
2023-09-04 22:16:11 +02:00
analyze Reformat code 2023-09-03 00:07:04 +02:00
common Reformat code 2023-09-03 00:07:04 +02:00
output Reformat code 2023-09-03 00:07:04 +02:00
protocol Reformat code 2023-09-03 00:07:04 +02:00
.drone.yml indentation 2019-12-01 17:07:36 +01:00
.gitignore Add .gitignore 2019-11-28 16:37:53 +01:00
CONTRIBUTORS.md added myself (emile) to the users list 2019-12-01 16:12:29 +01:00
file.go Reformat code 2023-09-03 00:07:04 +02:00
go.mod Move from git.darknebu.la to github.com 2023-09-03 00:07:04 +02:00
go.sum go mod init 2019-12-01 16:07:30 +01:00
LICENSE Add License 2019-11-27 20:32:44 +01:00
main.go Reformat code 2023-09-03 00:07:04 +02:00
pancap.png Add logo 2023-09-03 00:06:56 +02:00
README.md Update README 2023-09-04 22:16:11 +02:00

pancap logo

pancap

Idea

If you get access to a PCAP file, for example during a CTF or captured on your own, you usually have the problem of overlooking all the relevant information to get a basic idea of the capture file. This gets worse if the capture file includes lots of white noise or irrelevant traffic - often included in the capture file to cloak interesting packets in a bunch of packets to YouTube, Reddit, Twitter and others.

pancap addresses this problem. With multiple submodules, it analyzes the given PCAP file and extracts useful information out of it. In many cases, this saves you a lot of time and can point you into the right direction.

Features

  • Support for different network protocols
    • ARP: collect communication, identify switches and routers, detect ARP spoofing.
    • DHCP: analyze requests and responses, get an idea of the network setup
    • DNS: collect hints of user actions and their OS
    • HTTP: dump cleartext communication and embedded files
  • Create GraphViz graphs out of network communication flow

Usage

Simply run

go install github.com/maride/pancap@latest

This will build pancap and place it into your GOBIN directory - means you can directly execute it! It might be required to install the pcap header files, e.g. for Ubuntu with apt install libpcap-dev.

In any use case, you need to specify the file you want to analyze, simply handed over to pancap with the -file flag.

pancap -file ~/Schreibtisch/mitschnitt.pcapng

Benchmarks

Parsing an nGB big pcap takes y seconds:

nGB y seconds
2 30

Contributions

... yes please! There are still a lot of modules missing. If you are brave enough, you can even implement another Link Type. Pancap currently only supports Ethernet (which, to be honest, fits most cases well), but USB might be interesting, too. Especially sniffed keyboard and mouse packets are hard to analyze by hand...