Skip to content

kaiyuhou/nprint-wlan

Repository files navigation

Kaiyu's Notes

Example: mulit-device classifier for Wi-Fi devices

sample-1: wlan_2020_11_05_03.pcap, 3910 packets

  • normalized confusion matrix

sample-2: wlan_2021_03_04_04-2.4GTrain.pcap, 116114 packets

  • normalized confusion matrix

  • We directly apply classifier from training sample-2 to sample-3: wlan_2021_03_04_04-2.4Test.pcap, 20302 packets

  • Looks great!

  • Requirement packages
sudo apt install libpcap-dev
sudo apt install argp
sudo apt install automake autoconf
sudo apt install autotools-dev 
  • Install
    • You may not need sudo. But it doesn't work without sudo on my machine.
    • make install may not be necessary if you just want the nprint executable.
autoreconf -i
sudo ./configure
sudo make
sudo make install

After modification:

Repeat the following steps to make the change work

  • Add filename to Makefile.am
  • autoreconf -i
  • sudo ./configure
  • sudo make
  • sudo make install

Understand the Source Code of nPrint

When a pcap coming, it will be processed in the following pipeline:

  • New PCAPParser(FileParser)
  • set_filwriter = new FileWriter
  • FileParser.set_conf
    • format_and_write_header
    • fw->write_header
    • build_bitstring_header
      • mannually set the answer: header vector
  • process_file
    • pcap.pcap_loop
      • packet_handler
  • [pcap_parser] packet_handler
    • [file_parser] process_packet: return sp
      • in sp: set_raw
    • pcp->write_output(sp)
      • sp->get_bitstring
        • ipv4_header.get_bitstring

Related parsers for radiotap header and 802.11 header

Original Readme from nPrint:

https://nprint.github.io/nprint/

Details

Overview / Original nPrint paper can be found here: https://nprint.github.io/nprint/

Detailed usage and installation information can be found in the nPrint wiki: https://github.com/nprint/nprint/wiki

There is a very basic end-to-end tutorial on nPrint in a machine learning pipeline here: https://github.com/nprint/nprint/blob/master/example/nprint-ml-tutorial.ipynb

There will be bugs! Please report any you see.

About

Add Radiotap and Wlan headers support to nPrint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors