anoncap: Headers Stay, Content Leaves. A New Default for Sharing Captures

When you send a capture to a vendor or a colleague, they need to see what the protocols did. They rarely need the file that was downloaded, the web page that was served, or the voice on the call. Until today anoncap kept that content whenever it was not encrypted, and rewrote only the identities it recognised in it. A customer document inside an HTTP response stayed a customer document.
anoncap 4.7.3 (20261119.1) and PacketSafari Anonymizer 0.3.0 change the default: protocol headers stay, content leaves.
What stays, what leaves
A packet has headers and, behind them, a body. The headers say what happened. The body is what was carried. anoncap now sorts bodies into three kinds and removes all three unless you say otherwise:
- Content: HTTP and HTTP/2 bodies, FTP, TFTP, SMB and NFS file data, mail and telnet text, WebSocket payload, and bytes that no dissector decoded.
- Voice and video: RTP media samples.
- Encrypted payload: TLS and DTLS application data, QUIC, SSH, ESP, WireGuard, IKE and SRTP ciphertext.
Everything in front of a body stays and is rewritten field by field as before: HTTP request lines, status codes and headers, SIP and SDP, DNS, DHCP, FTP and SMTP commands, SMB and NFS calls, RTP headers with their sequence numbers and timestamps, TLS handshakes and record headers. You can still follow every request and response, see every error code, measure jitter and loss, and read sizes and timing.
Four choices, three switches
The apps and the PacketSafari upload dialog offer four choices:
- Keep headers, remove content, the default: headers and signalling stay, all three kinds of body leave.
- Keep headers and content: content and media stay, encrypted payload leaves. Kept content is rewritten only where a value is already known, so free text can still identify people. Review before sharing.
- Keep everything: every byte stays, for a receiver who decrypts with a key you hand over separately.
- Keep network layers only: everything above the transport header is removed.
Below the choice sit three switches, one for each kind of body. Keep the content but drop the calls, or keep the RTP packets and replace the audio with silence so the stream is still measurable. A combination that matches none of the four choices is shown as Custom, so you always see what will happen.
On the command line the same switches are --content, --media and --encrypted:
anoncap in.pcapng out.pcapng # protocol evidence
anoncap --content keep in.pcapng out.pcapng # keep bodies, still drop media and ciphertext
anoncap --media silence in.pcapng out.pcapng # keep RTP packets, silence G.711 audio
How a body is removed
A body is named by the dissector, never guessed from how the bytes look. One that runs to the end of a frame shortens the frame there, and the original length stays in the record, so sizes and throughput stay correct. One with more data after it is overwritten with zeros. A body spread over several TCP segments or IP fragments is removed from every frame that carried it, chunked and compressed HTTP bodies included, and a download that the capture ends in the middle of is cut after the TCP header. Lengths and checksums stay valid.
FTP control channels
With the headers now the main thing a capture carries, we looked at what they still showed. FTP was the worst case: user name and password travel as command arguments. The PacketSafari profile now rewrites the argument of USER and PASS, every path component of the file commands, and the address inside PORT, EPRT and passive-mode replies, so the data connection still lines up with the control channel. Protocol arguments such as the transfer type stay as they are.
What you give up
With the default you can no longer read an HTTP error page, a JSON error body or the text of an instant message. If the diagnosis needs a body, choose Keep headers and content for that one capture and review it before it leaves your organisation.
Get it
- the Anonymizer app 0.3.0 for macOS (Apple silicon, macOS 14 or later, notarized) and Windows (installer or portable zip, x64), on request from the anoncap page;
- the anoncap CLI 4.7.3 (20261119.1) for Linux, macOS (Apple silicon), and Windows from downloads.packetsafari.com, with checksums, the source patch, and the Wireshark license.
If you relied on the previous default, --unsupported-payload-policy keep-cleartext on the command line and Keep headers and content in the apps give you the same output as before.
