Network Scan# my preferencenmap -sV -sC -v -oA output <targetip>nmap -p- -v <targetip>#full tcp scannmap -sC -sV -p- -vv -oA full ipnmap -sT -p- --min-rate 10000 -oA nmap/alltcp ipnmap -sV -sC -O -T4 -n -Pn -oA fastscan <IP>nmap -sV -sC -O -T4 -n -Pn -p- -oA fullfastscan <IP>nmap -p- --min-rate 10000 -oA scans/nmap-alltcp ipnmap -vvv -A --reason --script="+(safe or default) and not broadcast" -p <port> <hostnmap -p80 $ip –script http-put –script-args http-put.url=’/test/sicpwn.php’,httpput.le=’/var/www/html/sicpwn.php#AutoReconar -ct 4 -cs 10 -t examip.txt -o /root/oscp/exam/ar -ct 4 -cs 10 ipar -ct 4 -cs 10 -t file.txtpython3 autorecon.py -ct 4 -cs 10#Nmap Automatorna ip All./nmapAutomator.sh ip All#onetwopunch/onetwopunch.sh -t targets -p all -n "-sV -O --version-intensity=9"#reconnoitrereconnoitre -t ip -o ~/oscp/practice/oscp1/tools-techniques/Reconnoitre/ --servicesreconnoitre -t ip --services --quick -o /rootreconnoitre -t ip -o /root/oscp/exam/#niktonikto -host ipnikto -h ipFor port knockingfor x in 7000 8000 9000; do nmap -Pn --host_timeout 201 --max-retries 0 -p $x ip; done#SNMP#SNMP-Checksnmp-check ipsnmp-check $IPsnmpcheck -t $IP -c publicsnmpcheck -t ip.X -c public#onesixtyoneonesixtyone -c names -i hosts#SNMPWALKsnmpwalk -c public -v1 $IP#SNMPENUMperl snmpenum.pl $IP public windows.txt#NMAP SCRIPTSnmap -p 88 --script krb5-enum-users --script-args krb5-enum-users.realm='domain.local',userdb=/usr/share/wordlists/SecLists/Usernames/top_shortlist.txt x.x.x.xnmap -vv -sV -sU -Pn -p 161,162 --script=snmp-netstat,snmp-processes $IPnmap -sU -p 161 --script /usr/share/nmap/scripts/snmp-win32-users.nse $IP#port knockfor x in 7000 8000 9000; do nmap -Pn –host_timeout 201 –max-retries 0 -p $x server_ip_address; done
Knock
apt-get install knockd
Then you simply type: knock [ip] [port]
. For example: knock ip 4000 5000 6000
After that you have to scan the network to see if any new port is open.
If you know what port is open you can connect to the port using netcat. The following command would work nc 192.168.1.102 8888
. This would then connect to the port.
Nmap/bash
for x in 4000 5000 6000; do nmap -Pn --host_timeout 201 --max-retries 0 -p $x server_ip_address; done