Skip to content

Commit

Permalink
Added port 4786 to nmap scan and corresponding MSF aux module.
Browse files Browse the repository at this point in the history
  • Loading branch information
leebaird committed Jun 11, 2021
1 parent f5a5496 commit 52b6798
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 2 additions & 3 deletions discover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ $discover/report.sh && exit
###############################################################################################################################

f_scan(){
custom='1-1040,1050,1080,1099,1158,1344,1352,1414,1433,1521,1720,1723,1883,1911,1962,2049,2202,2375,2628,2947,3000,3031,3050,3260,3306,3310,3389,3500,3632,4369,5000,5019,5040,5060,5432,5560,5631,5632,5666,5672,5850,5900,5920,5984,5985,6000,6001,6002,6003,6004,6005,6379,6666,7210,7634,7777,8000,8009,8080,8081,8091,8140,8222,8332,8333,8400,8443,8834,9000,9084,9100,9160,9600,9999,10000,10809,11211,12000,12345,13364,19150,20256,27017,28784,30718,35871,37777,46824,49152,50000,50030,50060,50070,50075,50090,60010,60030'
custom='1-1040,1050,1080,1099,1158,1344,1352,1414,1433,1521,1720,1723,1883,1911,1962,2049,2202,2375,2628,2947,3000,3031,3050,3260,3306,3310,3389,3500,3632,4369,4786,5000,5019,5040,5060,5432,5560,5631,5632,5666,5672,5850,5900,5920,5984,5985,6000,6001,6002,6003,6004,6005,6379,6666,7210,7634,7777,8000,8009,8080,8081,8091,8140,8222,8332,8333,8400,8443,8834,9000,9084,9100,9160,9600,9999,10000,10809,11211,12000,12345,13364,19150,20256,27017,28784,30718,35871,37777,46824,49152,50000,50030,50060,50070,50075,50090,60010,60030'
full='1-65535'
udp='53,67,123,137,161,407,500,523,623,1434,1604,1900,2302,2362,3478,3671,4800,5353,5683,6481,17185,31337,44818,47808'

Expand Down Expand Up @@ -502,7 +502,7 @@ echo $medium
echo
echo -e "${BLUE}Locating high value ports.${NC}"
echo " TCP"
TCP_PORTS="13 19 21 22 23 25 37 69 70 79 80 102 110 111 119 135 139 143 389 433 443 445 465 502 512 513 514 523 524 548 554 563 587 623 631 636 771 831 873 902 993 995 998 1050 1080 1099 1158 1344 1352 1414 1433 1521 1720 1723 1883 1911 1962 2049 2202 2375 2628 2947 3000 3031 3050 3260 3306 3310 3389 3500 3632 4369 5000 5019 5040 5060 5432 5560 5631 5632 5666 5672 5850 5900 5920 5984 5985 6000 6001 6002 6003 6004 6005 6379 6666 7210 7634 7777 8000 8009 8080 8081 8091 8140 8222 8332 8333 8400 8443 8834 9000 9084 9100 9160 9600 9999 10000 10809 11211 12000 12345 13364 19150 20256 27017 28784 30718 35871 37777 46824 49152 50000 50030 50060 50070 50075 50090 60010 60030"
TCP_PORTS="13 19 21 22 23 25 37 69 70 79 80 102 110 111 119 135 139 143 389 433 443 445 465 502 512 513 514 523 524 548 554 563 587 623 631 636 771 831 873 902 993 995 998 1050 1080 1099 1158 1344 1352 1414 1433 1521 1720 1723 1883 1911 1962 2049 2202 2375 2628 2947 3000 3031 3050 3260 3306 3310 3389 3500 3632 4369 4786 5000 5019 5040 5060 5432 5560 5631 5632 5666 5672 5850 5900 5920 5984 5985 6000 6001 6002 6003 6004 6005 6379 6666 7210 7634 7777 8000 8009 8080 8081 8091 8140 8222 8332 8333 8400 8443 8834 9000 9084 9100 9160 9600 9999 10000 10809 11211 12000 12345 13364 19150 20256 27017 28784 30718 35871 37777 46824 49152 50000 50030 50060 50070 50075 50090 60010 60030"

for i in $TCP_PORTS; do
cat $name/nmap.gnmap | grep "\<$i/open/tcp\>" | cut -d ' ' -f2 > $name/$i.txt
Expand Down Expand Up @@ -705,4 +705,3 @@ export -f f_main
###############################################################################################################################

while true; do f_main; done

6 changes: 6 additions & 0 deletions msf-aux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ if [[ -e $name/3500.txt ]]; then
cat /tmp/resource/3500-emc.rc >> /tmp/master
fi

if [[ -e $name/4786.txt ]]; then
echo " Cisco Smart Install"
sed -i "s|setg RHOSTS.*|setg RHOSTS file:$name\/4786.txt|g" /tmp/resource/4786-cisco-smart-install.rc
cat /tmp/resource/4786-cisco-smart-install.rc >> /tmp/master
fi

if [[ -e $name/4800.txt ]]; then
echo " Moxa"
sed -i "s|setg RHOSTS.*|setg RHOSTS file:$name\/4800.txt|g" /tmp/resource/4800-udp-moxa.rc
Expand Down
7 changes: 7 additions & 0 deletions resource/4786-cisco-smart-install.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
setg RHOSTS file:
setg THREADS 255
setg RPORT 4786

use auxiliary/scanner/misc/cisco_smart_install
run

0 comments on commit 52b6798

Please sign in to comment.