Mentions légales du service

Skip to content

Refactoring, new features

FARHI RIVASSEAU Guillaume requested to merge gfarhiri/mitik-sens-mod:main into main

Copied from CHANGELOG.md

Additions

  • Added permissions and paramters checks before trying to bind interface:
    • If no root permission is found, alert "Please run this script as root : sudo [current command ran]" and exit
    • Check validity and exit if invalid for :
      • hash-function: Invalid hash function : {args.hash_function}
      • hash-pattern: Invalid value for hash pattern : {args.hash_pattern}. Stopping.
      • subtype_filter: Interpreted subtype filter is empty. We would capture nothing. Stopping.
      • count-packets: Counting negative packets. Stopping.
      • timeout: Timeout is negative. Stopping.
  • Added support for setting the channel on start (packet_sniffer/utils.py)
    Use the -c X parameter to switch to channel X before capture.
    If unspecified, do not change current channel
  • Added support for channel hopping (packet_sniffer/utils.py)
    Use -j X (as in jump) to hop between channels every X seconds.
    Order is 1 -> 6 -> 11 -> loop.
    Staring channel is respected.
    Disabled by default.
  • Added support for stopping capture after given timeout
    Use -t X (as in stotimeout) to stop capture after X seconds.
    No additionnal packets will be captured after timeout.
    The program will stop running when it recieves a packet after the timeout.
  • Added support for stopping capture after given number of accepted frames
    Frames whose subtype does not match filter do not count Use -C X to stop after X captured frames
  • Added support for filtering subtypes
    Valid subtypes are 4 (probe-req), 5 (probe-resp) and 8 (beacons)
    Other subtypes will be ignored
  • Added ssid shortening
    All ssids, if anonymized (see program help, option is -p), will be cut to 6 bytes (12 characters)
  • Set default save name to capture-?post.
    ?post gets replaced with "YYYYMMDD_HHmmss-encryption-chan(value of channel)[-hop(value of hopping interval)]-sf(value of sf param)-p(value of hash pattern)[-t(value of timeout)][-C(value of packet counter)].pcap"
    an example resulting file name, with params sudo python sniffer.py -i wlp0s20f0u4 -t 10 -s 4 -c 9 -j 4 -w mitik_exp-?post (notice the -w mitik_exp-?post ), would give back mitik_exp-20240930_160135-sha256-chan9-hop4-sf4-wlp0s20f0u4-p15-t10.pcap (72 chars) On linux, file names are usually limited to 255 chars. On windows, the WHOLE FILE ACCESS PATH has to be <= 260 in length

Modifications and bugfixes

  • Changed mask to properly keep anonymisation bit when hashing
  • Support anonymizing probe-resp and beacons, which didn't work before because the packet structure is different.
    This fixes malformed frames.
  • Add error output when errors happen
  • Set default anonymisation algorythm to sha256
  • Re-wrote descriptions for options

Removals

  • Removed unused imports
  • Removed unused parameters in AnonymizeBehaviour._init_
  • Removed parameters and options related to truncating address values

Some more information

Readability and usability have been improved.

Stop filters are independant from each other.
If you don't set any, the program will run until you stop it.
If you add both, first to reach condition wins.

Merge request reports

Loading