# Packet Capture

## Tcpdump

**Save a packet capture:**&#x20;

`tcpdump -i  -s0 -w pcapfile.pcap`

Ctrl-C to stop after about 5 minutes.&#x20;

Replay capture and look for interesting protocols:

`tcpdump -r pcapfile.pcap not  and not arp`

Tcpdump filter for DHCPv6:

`tcpdump -i eth0 -n -vv '(udp port 546 or 547) or icmp6`

Tcpdump filter based on a range:

`tcpdump -i eth0 -s0 -w nix01.pcap net 172.16.1.0/24`

## Wireshark

**Router solicitation filter**

When analyzing IPv6 traffic in Wireshark, you can simply use the filter `icmpv6.type==133` to show only "Router Solicitation" messages.

## BruteShark

BruteShark is a Network Forensic Analysis Tool (NFAT) that performs deep processing and inspection of network traffic (mainly PCAP files). It includes: password extracting, building a network map, reconstruct TCP sessions, extract hashes of encrypted passwords and even convert them to a Hashcat format in order to perform an offline Brute Force attack.

<https://github.com/odedshimon/BruteShark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/enumeration/packet-capture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
