├── Functions ├── cdpdetails.sh ├── controls │ ├── active.sh │ ├── pentest.sh │ └── stealth.sh ├── desktop │ ├── RUN-ACTIVE │ ├── RUN-PEN-TEST │ └── RUN-STEALTH ├── gnet-if.sh ├── gnet-ping.sh ├── gnet-port.sh ├── gnet-trace.sh ├── interfaces.sh ├── lldpdetails.sh ├── netmode.sh ├── netwake.sh ├── notepad.sh ├── speedtest.sh ├── web │ └── int.sh ├── wireshark.sh ├── wiscan.sh └── zenmap.sh └── README.md /Functions/cdpdetails.sh: -------------------------------------------------------------------------------- 1 | ## 2 | ## NetPi Internet Speed Test Visual Script 3 | ## Runs on cdpd - developed by MonkeyMental.com 4 | ## 5 | 6 | ####################################### 7 | # Define the Output as a var# 8 | ####################################### 9 | echo Waiting for CDP Packet on ETH0 10 | dtstamp=$(date +"%m-%d-%Y--%H%M%S") 11 | sudo cdpr -d eth0 -v | tee /share/logs/cdp/report-$dtstamp.txt 12 | CONTENT=$(sudo cat /share/logs/cdp/report-$dtstamp.txt) 13 | 14 | 15 | ####################################### 16 | 17 | # HTML Content // Edit to your needs # 18 | 19 | ####################################### 20 | 21 | open="CDP Output 22 | 25 |

NetPi CDP Details

"
26 | 
27 | close="

You may now close this window. The log was saved to the logs directory." 28 | 29 | 30 | ###################################### 31 | 32 | # Write content to HTML file # 33 | 34 | ###################################### 35 | 36 | _file="/share/logs/cdp" 37 | 38 | echo "$open" > "$_file/cdpreport.html" 39 | 40 | echo "$CONTENT" >> "$_file/cdpreport.html" 41 | 42 | #echo "$close" >> "$_file/cdpreport.html" 43 | 44 | 45 | ##################################### 46 | 47 | #Open output in Dillo. Fastest load # 48 | 49 | ##################################### 50 | chromium-browser --app=file://$_file/cdpreport.html 51 | #dillo -f "$_file/cdpreport.html" 52 | 53 | ##################################### 54 | -------------------------------------------------------------------------------- /Functions/controls/active.sh: -------------------------------------------------------------------------------- 1 | chromium-browser --app=http://127.0.0.2/netpi/active/index.php 2 | -------------------------------------------------------------------------------- /Functions/controls/pentest.sh: -------------------------------------------------------------------------------- 1 | chromium-browser --app=http://127.0.0.2/netpi/pentest/index.php 2 | -------------------------------------------------------------------------------- /Functions/controls/stealth.sh: -------------------------------------------------------------------------------- 1 | chromium-browser --app=http://127.0.0.2/netpi/stealth/index.php 2 | -------------------------------------------------------------------------------- /Functions/desktop/RUN-ACTIVE: -------------------------------------------------------------------------------- 1 | /share/scripts/netmode.sh active & 2 | /share/scripts/controls/active.sh & 3 | exit 4 | -------------------------------------------------------------------------------- /Functions/desktop/RUN-PEN-TEST: -------------------------------------------------------------------------------- 1 | /share/scripts/netmode.sh pentest & 2 | /share/scripts/controls/pentest.sh & 3 | exit 4 | -------------------------------------------------------------------------------- /Functions/desktop/RUN-STEALTH: -------------------------------------------------------------------------------- 1 | /share/scripts/netmode.sh stealth & 2 | /share/scripts/controls/stealth.sh & 3 | exit 4 | -------------------------------------------------------------------------------- /Functions/gnet-if.sh: -------------------------------------------------------------------------------- 1 | # Interface Details Function 2 | # Starts Gnome-Nettool in default mode to view interfaces. 3 | gnome-nettool & 4 | exit 5 | -------------------------------------------------------------------------------- /Functions/gnet-ping.sh: -------------------------------------------------------------------------------- 1 | # NetPi Ping Function 2 | # Starts Gnome-Nettool, followed by on screen keyboard. 3 | gnome-nettool -p 127.0.0.1 & 4 | matchbox-keyboard extended & 5 | exit 6 | -------------------------------------------------------------------------------- /Functions/gnet-port.sh: -------------------------------------------------------------------------------- 1 | # Port Scan Function 2 | # Starts Gnome-Nettool, followed by on screen keyboard. 3 | gnome-nettool -s 127.0.0.1 & 4 | matchbox-keyboard extended & 5 | exit 6 | -------------------------------------------------------------------------------- /Functions/gnet-trace.sh: -------------------------------------------------------------------------------- 1 | # NetPi Trace Function 2 | # Starts Gnome-Nettool, followed by on screen keyboard. 3 | gnome-nettool -t 127.0.0.1 & 4 | matchbox-keyboard extended & 5 | exit 6 | -------------------------------------------------------------------------------- /Functions/interfaces.sh: -------------------------------------------------------------------------------- 1 | ### 2 | ### NetPi Interface IP Information Visual Script 3 | ### Ifconfig tossed to a log and html file 4 | ### 5 | 6 | ####################################### 7 | # Define the ifconfig results as a var# 8 | ####################################### 9 | dtstamp=$(date +"%m-%d-%Y--%H%M") 10 | intdata=$(ifconfig) 11 | 12 | ####################################### 13 | # HTML Content // Edit to your needs # 14 | ####################################### 15 | open="Interface Details

NetPi Interface Details

"
18 | close="

" 20 | 21 | ###################################### 22 | # Write content to HTML file # 23 | ###################################### 24 | _file="/share/logs/interfaces" 25 | echo "$intdata" > "$_file/intlog-$dtstamp.txt" 26 | echo "$open" > "$_file/intreport.html" 27 | echo "$intdata" >> "$_file/intreport.html" 28 | echo "$close" >> "$_file/intreport.html" 29 | echo "$intdata" 30 | 31 | ##################################### 32 | #Open output in Dillo. Fastest load # 33 | ##################################### 34 | dillo -f "$_file/intpreport.html" 35 | ##################################### 36 | -------------------------------------------------------------------------------- /Functions/lldpdetails.sh: -------------------------------------------------------------------------------- 1 | ## 2 | ## NetPi Internet Speed Test Visual Script 3 | ## Runs on LLDPCTL 4 | ## 5 | 6 | ####################################### 7 | # Define the Output as a var# 8 | ####################################### 9 | echo Working 10 | dtstamp=$(date +"%m-%d-%Y--%H%M%S") 11 | nic="eth0" 12 | sudo service lldpd restart 13 | sleep 4 14 | sudo lldpctl eth0 | tee /share/logs/lldp/report-$dtstamp.txt 15 | CONTENT=$(cat /share/logs/lldp/report-$dtstamp.txt) 16 | sudo service lldpd stop 17 | 18 | ####################################### 19 | 20 | # HTML Content // Edit to your needs # 21 | 22 | ####################################### 23 | 24 | open="LLDP Output 25 | 28 |

NetPi LLDP Details

"
29 | 
30 | close="

You may now close this window. The log was saved to the logs directory." 31 | 32 | 33 | ###################################### 34 | 35 | # Write content to HTML file # 36 | 37 | ###################################### 38 | 39 | _file="/share/logs/lldp" 40 | 41 | echo "$open" > "$_file/lldpreport.html" 42 | 43 | echo "$CONTENT" >> "$_file/lldpreport.html" 44 | 45 | #echo "$close" >> "$_file/lldpreport.html" 46 | 47 | 48 | ##################################### 49 | 50 | #Open output in Dillo. Fastest load # 51 | 52 | ##################################### 53 | chromium-browser --app=file://$_file/lldpreport.html 54 | #dillo -f "$_file/lldpreport.html" 55 | 56 | ##################################### 57 | -------------------------------------------------------------------------------- /Functions/netmode.sh: -------------------------------------------------------------------------------- 1 | ### 2 | ### Call process to Switch Network interface On / Off 3 | ### Stealth mode being ideal for CDP info without sending a MAC 4 | ### as to not trip any layer 2 security. Call with ./netmode [stealth|active] 5 | ### BlameTheNetwork.com/NetPi 6 | ### 7 | # 8 | ### Define Interface to manage. Change if you do your testing over wireless. 9 | nic="eth0" 10 | ### 11 | ### Switch output based on argument - all wallpaper commands intended for lxde env. 12 | ### 13 | if [ $1 = "stealth" ]; then 14 | ## Block all outgoing traffic on eth0 15 | echo "Killing traffic, going stealth..." 16 | sudo iptables -A OUTPUT -o eth0 -j DROP 17 | sudo service lldpd stop 18 | sudo pkill dhcli 19 | pcmanfm --set-wallpaper=/netpi/analyzestealthwallpaper.jpg --wallpaper-mode=fit 20 | elif [ $1 = "active" ]; then 21 | ## Allow all outgoing traffic on eth0 22 | echo "Going hot! talking on the net..." 23 | sudo iptables -D OUTPUT -o eth0 -j DROP 24 | sudo service lldpd restart & 25 | sudo dhclient eth0 & 26 | pcmanfm --set-wallpaper=/netpi/analyzeactivewallpaper.jpg --wallpaper-mode=fit 27 | #ToDo Here - load pen test toolset application. Update this... 28 | elif [ $1 = "pentest" ]; then 29 | ## Oh boy... heading to the dark side... 30 | echo "Switching to Pen Test software load..." 31 | sudo service lldpd start 32 | pcmanfm --set-wallpaper=/netpi/pentestwallpaper.jpg --wallpaper-mode=fit 33 | else 34 | echo "Unknown or Undefined Action. Blocking Traffic out to be safe..." 35 | sudo iptables -A OUTPUT -o eth0 -j DROP 36 | 37 | echo "Network rules successfully modified." 38 | fi 39 | ### 40 | ### Make life rue the day it thought it could give Cave Johnson Lemons! 41 | ### We're done here. 42 | ### 43 | -------------------------------------------------------------------------------- /Functions/netwake.sh: -------------------------------------------------------------------------------- 1 | # Script improved 3/18/15 as submitted by akhepcat. 2 | # Improvement uses default interface, and loops if no interfaces are available. 3 | echo ***************************** 4 | echo MINIMIZE THIS ACTIVE PING 5 | echo NetPi KEEPALIVE RUNNING! 6 | echo ***************************** 7 | iface=$(awk 'BEGIN { IGNORECASE=1 } /^[a-z0-9]+[ \t]+00000000/ { print $1 }' /proc/net/route) 8 | if [ -z "$iface" ] 9 | then 10 | echo "no active IPv4 interface" 11 | sleep 4 12 | exit 1 13 | fi 14 | gw="$(ip -4 route show route default dev $iface | cut -d\ -f3)" 15 | ping $gw 16 | -------------------------------------------------------------------------------- /Functions/notepad.sh: -------------------------------------------------------------------------------- 1 | # Notepad Function 2 | # Starts Text Editor, followed by on screen keyboard. 3 | leafpad & 4 | matchbox-keyboard extended & 5 | exit 6 | -------------------------------------------------------------------------------- /Functions/speedtest.sh: -------------------------------------------------------------------------------- 1 | ### 2 | ### NetPi Internet Speed Test Visual Script 3 | ## 4 | # Runs on speedtest-cli | developed by Matt Martz 5 | ## 6 | # github.com/sivel/speedtest-cli 7 | # 8 | ## 9 | 10 | ####################################### 11 | # Define the SpeedTest Output as a var# 12 | ####################################### 13 | echo Working 14 | dtstamp=$(date +"%m-%d-%Y--%H%M%S") 15 | speedtest-cli | tee /share/logs/speedtest/report-$dtstamp.txt 16 | CONTENT=$(cat /share/logs/speedtest/report-$dtstamp.txt) 17 | 18 | 19 | ####################################### 20 | 21 | # HTML Content // Edit to your needs # 22 | 23 | ####################################### 24 | 25 | open="Speed Test Output 26 | 29 |

NetPi Speed Test

"
30 | 
31 | close="

You may now close this window. The log was saved to the logs directory." 32 | 33 | 34 | ###################################### 35 | 36 | # Write content to HTML file # 37 | 38 | ###################################### 39 | 40 | _file="/share/logs/speedtest" 41 | 42 | echo "$open" > "$_file/speedtestreport.html" 43 | 44 | echo "$CONTENT" >> "$_file/speedtestreport.html" 45 | 46 | #echo "$close" >> "$_file/speedtestreport.html" 47 | 48 | 49 | ##################################### 50 | 51 | #Open output in Dillo. Fastest load # 52 | 53 | ##################################### 54 | chromium-browser --app=file://$_file/speedtestreport.html 55 | #dillo -f "$_file/speedtestreport.html" 56 | 57 | ###################################### 58 | -------------------------------------------------------------------------------- /Functions/web/int.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /sbin/ifconfig 3 | -------------------------------------------------------------------------------- /Functions/wireshark.sh: -------------------------------------------------------------------------------- 1 | wireshark 2 | exit 3 | -------------------------------------------------------------------------------- /Functions/wiscan.sh: -------------------------------------------------------------------------------- 1 | wpa_gui 2 | exit 3 | -------------------------------------------------------------------------------- /Functions/zenmap.sh: -------------------------------------------------------------------------------- 1 | matchbox-keyboard extended & 2 | zenmap 3 | exit 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2 | # NetPi Network Analyzer - A RaspberryPi Project 3 | NetPi Network Analyzer based on Raspberry Pi b+/2 hardware 4 | ######### 5 | Visit the project website at http://www.blamethenetwork.com/netpi 6 | ######### 7 | Contribute code to any of the scripts available, and request a pull. I will audit to ensure pull removes bugs or increases functionality. Report bugs on the website and I will work to resolve them. 8 | ######### 9 | Software is being released GNU GPLv3. I only ask the work is attributed accordingly. All content contributors will be listed on the site and here for their work. A donation for the overall project will be accepted and appreciated to help support working hours put into development. Look forward to future open projects from BlameTheNetwork.com ! 10 | ######### 11 | ######### 12 | Thank you for reading, enjoy the project and share! 13 | --------------------------------------------------------------------------------