├── README.txt └── carbon (1).png /README.txt: -------------------------------------------------------------------------------- 1 | Scan Apple ASN for vulnerabilities and leave no port:- 2 | 3 | We will use multiple programs to scan all ports and sort them and finally Nuclei will find CVES and high vulnerabilities for us:- 4 | 5 | Install the following programs and add alias on your .bashrc file or .zshrc file:- 6 | 7 | https://github.com/projectdiscovery/mapcidr 8 | https://github.com/projectdiscovery/nuclei 9 | https://github.com/projectdiscovery/nuclei-templates 10 | https://github.com/emadshanab/Nuclei-Templates-Collection 11 | https://github.com/projectdiscovery/httpx 12 | https://github.com/projectdiscovery/naabu 13 | https://github.com/tomnomnom/httprobe 14 | https://github.com/tomnomnom/anew 15 | https://github.com/j3ssie/metabigor 16 | https://github.com/nmap/nmap 17 | https://github.com/robertdavidgraham/masscan 18 | -------------------------------------------------------------------------------------------------------------------- 19 | 20 | To install them use this commands on your terminal:- 21 | 22 | GO111MODULE=on go get -v github.com/projectdiscovery/mapcidr/cmd/mapcidr 23 | GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei 24 | GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx 25 | GO111MODULE=on go get -v github.com/projectdiscovery/naabu/v2/cmd/naabu 26 | GO111MODULE=on go get github.com/j3ssie/metabigor 27 | go get -u github.com/tomnomnom/httprobe 28 | go get -u github.com/tomnomnom/anew 29 | apt-get install nmap 30 | apt-get install masscan 31 | 32 | Now will make an alias to all programs to avoid any errors ( i prefer the manual way) add these lines on .bashrc file or .zshrc file and save it. 33 | 34 | alias mapcidr='/root/go/bin/mapcidr' 35 | alias nuclei='/root/go/bin/nuclei' 36 | alias httpx='/root/go/bin/httpx' 37 | alias naabu='/root/go/bin/naabu' 38 | alias anew='/root/go/bin/anew' 39 | alias metabigor='/root/go/bin/metabigor' 40 | -------------------------------------------------------------------------------------------------------------------- 41 | Now you are ready to go:- 42 | 43 | You can use metabigor to find the ASN for you and save the result:- 44 | 45 | The command is:- 46 | 47 | echo "apple" | metabigor net --org -o /root/apple_asn.txt 48 | 49 | You can replace the company name like facebook,twitter,microsoft,netflix,yahoo 50 | -------------------------------------------------------------------------------------------------------------------- 51 | 1:- I have uploaded the ASN to my github repo you can download it and save it as apple_asn.txt 52 | 53 | https://github.com/emadshanab/apple-ASN 54 | 55 | First will slice the ASN to ips via mapcidr 56 | 57 | mapcidr -l apple_asn.txt -o apple_asn_output.txt 58 | 59 | Now will scan the apple_asn_output.txt file via multiple programs and please use your VPS to avoid any losing of your internet traffic on your home network. 60 | -------------------------------------------------------------------------------------------------------------------- 61 | 62 | 1:- via httprobe will use the xlarg option and it will scan for these ports,check the source code of httprobe 63 | 64 | https://github.com/tomnomnom/httprobe/blob/master/main.go 65 | 66 | xlarge := []string{"81", "300", "591", "593", "832", "981", "1010", "1311", "2082", "2087", "2095", "2096", "2480", "3000", "3128", "3333", "4243", "4567", "4711", "4712", "4993", "5000", "5104", "5108", "5800", "6543", "7000", "7396", "7474", "8000", "8001", "8008", "8014", "8042", "8069", "8080", "8081", "8088", "8090", "8091", "8118", "8123", "8172", "8222", "8243", "8280", "8281", "8333", "8443", "8500", "8834", "8880", "8888", "8983", "9000", "9043", "9060", "9080", "9090", "9091", "9200", "9443", "9800", "9981", "12443", "16080", "18091", "18092", "20720", "28017"} 67 | 68 | The command is:- 69 | 70 | cat apple_asn_output.txt | httprobe -c 100 -t 20000 -p xlarge >apple_asn_httprobexlarg.txt 71 | -------------------------------------------------------------------------------------------------------------------- 72 | 73 | 2:- via httprobe with specific ports of our choice:- 74 | 75 | The command is:- 76 | 77 | cat apple_asn_output.txt | httprobe -p http:81 -p http:300- p http:591 -p http:593 -p http:832 -p http:981 -p http:1010 -p http:1311 -p http:2082 -p http:2087 -p http:2095 -p http:2096 -p http:2480 -p http:3000 -p http:3128 -p http:3333 -p http:4243 -p http:4567 -p http:4711 -p http:4712 -p http:4993 -p http:5000 -p http:5104 -p http:5108 -p http:5800 -p http:6543 -p http:7000 -p http:7396 -p http:7474 -p http:8000 -p http:8001 -p http:8008 -p http:8014 -p http:8042 -p http:8069 -p http:8080 -p http:8081 -p http:8088 -p http:8090 -p http:8091 -p http:8118 -p http:8123 -p http:8172 -p http:8222 -p http:8243 -p http:8280 -p http:8281 -p http:8333 -p http:8443 -p http:8500 -p http:8834 -p http:8880 -p http:8888 -p http:8983 -p http:9000 -p http:9043 -p http:9060 -p http:9080 -p http:9090 -p http:9091 -p http:9200 -p http:9443 -p http:9800 -p http:9981 -p http:12443 -p http:16080 -p http:18091 -p http:18092 -p http:20720 -p http:28017 -p http:8009 -p http:8180 -p https:81 -p https:300- p https:591 -p https:593 -p https:832 -p https:981 -p https:1010 -p https:1311 -p https:2082 -p https:2087 -p https:2095 -p https:2096 -p https:2480 -p https:3000 -p https:3128 -p https:3333 -p https:4243 -p https:4567 -p https:4711 -p https:4712 -p https:4993 -p https:5000 -p https:5104 -p https:5108 -p https:5800 -p https:6543 -p https:7000 -p https:7396 -p https:7474 -p https:8000 -p https:8001 -p https:8008 -p https:8014 -p https:8042 -p https:8069 -p https:8080 -p https:8081 -p https:8088 -p https:8090 -p https:8091 -p https:8118 -p https:8123 -p https:8172 -p https:8222 -p https:8243 -p https:8280 -p https:8281 -p https:8333 -p https:8443 -p https:8500 -p https:8834 -p https:8880 -p https:8888 -p https:8983 -p https:9000 -p https:9043 -p https:9060 -p https:9080 -p https:9090 -p https:9091 -p https:9200 -p https:9443 -p https:9800 -p https:9981 -p https:12443 -p https:16080 -p https:18091 -p https:18092 -p https:20720 -p https:28017 -p https:8009 -p https:8180 -c 50 | tee apple_asn_httprobe_specific.txt 78 | -------------------------------------------------------------------------------------------------------------------- 79 | 3:- Via httpx :- 80 | 81 | The command is:- 82 | 83 | httpx -l apple_asn_output.txt -ports 81,300,591,593,832,981,1010,1311,2082,2087,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5800,6543,7000,7396,7474,8000,8001,8008,8014,8042,8069,8080,8081,8088,8090,8091,8118,8123,8172,8222,8243,8280,8281,8333,8443,8500,8834,8880,8888,8983,9000,9043,9060,9080,9090,9091,9200,9443,9800,9981,12443,16080,18091,18092,20720,28017,8009,8180 -threads 200 | anew apple_asn_httpx.txt 84 | 85 | 4:- Via httpx and will scan for all ports:- 86 | 87 | The command is:- 88 | httpx -l apple_asn_output.txt -t 100 -ports 1-65535 -o apple_asn_httpx_allports.txt 89 | 90 | -------------------------------------------------------------------------------------------------------------------- 91 | 5:- Via naabu:- 92 | 93 | The command is:- 94 | 95 | naabu -hL apple_asn_output.txt -t 100 -ports 1-65535 -verify -o apple_asn_naabu.txt 96 | 97 | -------------------------------------------------------------------------------------------------------------------- 98 | 6:- Via nmap and masscan:- 99 | 100 | The command is:- 101 | 102 | nmap -sn -Pn -n -iL apple_asn_output.txt -oG out.txt | awk -F" " '{print $2}' out.txt > outnew.txt | masscan -iL outnew.txt --ports 0-65535 -oG apple_nmap_scan.txt 103 | -------------------------------------------------------------------------------------------------------------------- 104 | 6:-After all the tools finished we will collect our scan and sort it to avoid any duplicates:- 105 | 106 | cat apple_asn_httprobexlarg.txt apple_asn_httprobe_specific.txt apple_asn_httpx.txt apple_asn_httpx_allports.txt apple_asn_naabu.txt apple_nmap_scan.txt | sort -u | anew apple_final.txt 107 | -------------------------------------------------------------------------------------------------------------------- 108 | 7:- Finally will scan the outfile apple_final.txt via nuclei:- 109 | 110 | The command is:- 111 | 112 | nuclei -c 500 -l apple_final.txt -t /root/nuclei-templates/ -severity critical,high,medium -o apple_nuclei_results.txt 113 | 114 | 115 | Good luck! 116 | 117 | Emad Shanab - أبو عبد الله 118 | 119 | @Alra3ees 120 | -------------------------------------------------------------------------------- /carbon (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emadshanab/Scan-Apple-ASN-for-vulnerabilities-and-leave-no-port/6d546506e4c00294f9b97a1f399aed645d11ffa9/carbon (1).png --------------------------------------------------------------------------------