{"id":13609688,"url":"https://github.com/andrewhilts/snifflab","last_synced_at":"2025-04-12T20:32:15.286Z","repository":{"id":36415224,"uuid":"40720183","full_name":"andrewhilts/snifflab","owner":"andrewhilts","description":"Scripts to create your own MITM'ing, packet sniffing WiFi access point","archived":false,"fork":false,"pushed_at":"2015-08-21T15:32:34.000Z","size":146,"stargazers_count":143,"open_issues_count":0,"forks_count":39,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-07T15:46:14.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewhilts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-14T14:49:38.000Z","updated_at":"2024-10-12T08:05:00.000Z","dependencies_parsed_at":"2022-07-29T00:38:53.631Z","dependency_job_id":null,"html_url":"https://github.com/andrewhilts/snifflab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewhilts%2Fsnifflab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewhilts%2Fsnifflab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewhilts%2Fsnifflab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewhilts%2Fsnifflab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewhilts","download_url":"https://codeload.github.com/andrewhilts/snifflab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248629923,"owners_count":21136343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:37.125Z","updated_at":"2025-04-12T20:32:14.632Z","avatar_url":"https://github.com/andrewhilts.png","language":"Python","funding_links":[],"categories":["Python","\u003ca id=\"42f9e068b6511bcbb47d6b2b273097da\"\u003e\u003c/a\u003e未分类"],"sub_categories":["\u003ca id=\"3bd67ee9f322e2c85854991c85ed6da0\"\u003e\u003c/a\u003e投毒\u0026\u0026Poisoning"],"readme":"# Setting up a SNIFFLAB\n\n## Detailed Guide\nPlease consult the detailed guide on setting up your own Snifflab network here: https://openeffect.ca/snifflab-an-environment-for-testing-mobile-devices/\n\n## sniffer.py command line arguments\n\t-i (specify the network interface)\n\t-s (specify the file size limit)\n\t-t (specify the time interval, in seconds, between new PCAP files)\n\t-f (specify a filename suffix to append to each PCAP.\n\t-u (specify a ssh username for a remote backup)\n\t-h (specify a ssh host for remote backup)\n\t-p (specify the path on the remote host for backup)\n\n## Firewall rules on DD-WRT router to send traffic to MITM proxy box\nMake sure the network interface (vlan1 here) is correct.\n\n\tPROXYIP=your.proxy.ip\n\tiptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s $PROXYIP\n\tiptables -t mangle -A PREROUTING -j MARK --set-mark 3 -p tcp -m multiport --dports 80,443\n\tip rule add fwmark 3 table 2\n\tip route add default via $PROXYIP dev vlan1 table 2\n\n## PCAP machine scripts\n/etc/network/interfaces\n\n\tauto lo\n\n\tiface lo inet loopback\n\n\tiface eth0 inet manual\n\n\tiface eth1 inet manual\n\n\tallow-hotplug wlan0\n\tiface wlan0 inet dhcp\n\twpa-conf /etc/wpa_supplicant/wpa_supplicant.conf\n\tiface default inet dhcp\n\n\tauto bond0\n\tiface bond0 inet dhcp\n\tbond-mode 3\n\tbond-miimon 100\n\tslaves eth0 eth1\n\n/etc/wpa_supplicant/wpa_supplicant.conf\n\n\tctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\n\tupdate_config=1\n\n\tnetwork={\n\t        ssid=\"\"\n\t        psk=hashofyourpassword\n\t        proto=RSN\n\t        key_mgmt=WPA-PSK\n\t        pairwise=TKIP\n\t        auth_alg=OPEN\n\t}\n\n### Getting the network running correctly on boot\n/etc/init.d/network.sh\n\n\t#!/bin/sh\n\t### BEGIN INIT INFO\n\t# Provides:\t\tnetwork.sh\n\t# Short-Description:\tEnsure WiFi as well as Ethernet interfaces are up\n\t# Description:\n\t# Default-Start:\t2 3 4 5\n\t# Default-Stop:\t\t0 1 6\n\t# Required-Start:\t$remote_fs $syslog\n\t# Required-Stop:\t$remote_fs $syslog\n\t### END INIT INFO\n\tsudo ifplugd eth0 --kill\n\tsudo ifup wlan0\n\tsudo ifup eth0\n\tsudo ifup eth1\n\tsudo ifconfig eth1 promisc\n\tsudo ifconfig eth0 promisc\n\texit 0\n\n### Start capturing packets on startup -- create a sniffer service\n/etc/init/sniffer.conf\n\n\t#sniffer.conf\n\tstart on runlevel [2345]\n\tstop on runlevel [016]\n\n\tscript\n\t\tcd /home/pi/snifflab\n\t\texec python sniffer.py -i bond0 -s 100 -t 1200\n\tend script\n\n## MITM proxy service\nmitm.conf\n\n\tstart on filesystem\n\n\tscript\n\t\tsudo iptables -A PREROUTING -t nat -i em1 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-port 4567\n\t\tSSLKEYLOGFILE=/var/log/mitmkeys.log\n\t\texport SSLKEYLOGFILE\n\t\techo \"MITM Keys being logged here: $SSLKEYLOGFILE\"\n\t\texec mitmdump -T --host --conf=/etc/mitmproxy/common.conf\n\tend script\n\n## Script to backup pcaps to local machine\n\n\t#!/bin/bash\n\tremote_server=yourservername\n\tpcap_dir=/pcaps\n\tkeylogfile=/var/log/mitmkeys.log\n\tlocal_dir=~/Documents/snifflab\n\n\trsync -a \"$remote_server\":$pcap_dir $local_dir\n\tscp \"$remote_server\":$keylogfile $local_dir","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewhilts%2Fsnifflab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewhilts%2Fsnifflab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewhilts%2Fsnifflab/lists"}