table of contents
pktanon(1) | pktanon(1) |
NAME¶
pktanon - profile-based traffic anonymizer
SYNOPSIS¶
pktanon [-c profile_file] input_file output_file
pktanon [options] [input_file] [output_file]
DESCRIPTION¶
Pktanon is a generic framework for network traffic anonymization. It aims at enabling wide-spread use of realistic network traces by providing fine-grained, profile-based anonymization. It can easily be configured by anonymization profiles, which are used to define how the network traffic should be made anonymous. Such profiles ensure an easy adaptation of the information actually being made anonymous to different environments or local legislation.
OPTIONS¶
Configuration:
- -c, --config <config_file>
- anonymization profile
Input Parameters:
- -s, --snaplen <number>
- read first snaplen bytes from each packet (for both captures and files) [default:256]
- -i, --interface <interface>
- capture packets from this interface
- -p, --no-promiscuous-mode
- do not set interface in promiscuous mode
- -e, --pcap-filter <filter>
- filter specification for libpcap
- -r, --use-raw-sockets
- use linux raw sockets instead of libpcap (-e option is not available)
Output Parameters:
- -U, --packet-buffered
- output (to file) is flushed every N packets
- -n, --network <interface>
- send packets to <interface> using libpcap-inject (EXPERIMENTAL)
- -o, --socket <Addr:Port>
- send packets to Addr:Port using sockets
(if '--socket' option is set:)
- -6, --use-ipv6
- Use IPv6
- -u, --use-udp
- Use UDP
Miscellaneous:
- -l, --use-libpcap
- use libpcap for file i/o
- -h, --help, --usage
- print this message and exit
- -q, --quiet
- Reduce output
- -v, --verbose
- Increase output
RUNNING PKTANON¶
PktAnon needs a configuration file. Sample configuration files can be found in the profiles directory in the distribution. This directory also includes a sample network trace. Two included configuration files are ’profile-identity.xml' and 'profile.xml'. The first configuration copies all the fields from original packets into anonymized packets except that packets content is cropped. The second configuration anonymizes mac addresses, ip addresses, and ports in the packets.
To anonymize sample trace using sample configuration files run:
or
pktanon -c /usr/share/doc/pktanon/examples/profiles/profile-identity.xml profiles/sample.pcap out.pcap
The output should look like this:
pktanon -c /usr/share/doc/pktanon/examples/profiles/identity.xml profiles/sample.pcap out.pcap
-----------------------------------------------
pktanon --- profile-based traffic anonymization
-----------------------------------------------
initializing PktAnon, configuration = /usr/share/doc/pktanon/examples/profiles/profile-identity.xml
istream: opened file profiles/sample.pcap
ostream: opened output file out.pcap
initialized
complete
statistics for input file 'profiles/sample.pcap'
processed packets: 9
errors in packets: 0
elapsed time: 22us
Mpps: 0.409
The anonymized trace out.pcap will be created in the root directory of the distribution. If the output file already exists it will be trimmed and rewritten without any warning.
11 March 2024 | pktanon 2~git20160407.0.2bde4f2+dfsg |