Exemple #1
0
 def brutespray(self):
     utils.print_good('Starting brutespray')
     cmd = 'python $PLUGINS_PATH/brutespray/brutespray.py --file $WORKSPACE/vulnscan/$TARGET-nmap.xml --threads 5 --hosts 5 -o $WORKSPACE/bruteforce/$OUTPUT/'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     utils.check_output(self.options, '$WORKSPACE/bruteforce/$OUTPUT/')
Exemple #2
0
 def subjack(self):
     utils.print_good('Starting subjack')
     cmd = '$GO_PATH/subjack -w $WORKSPACE/subdomain/final-$TARGET.txt -t 100 -timeout 30 -o $WORKSPACE/subdomain/takeover-$TARGET-subjack.txt -ssl'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     print()
Exemple #3
0
	def truffleHog(self):
		utils.print_good('Starting truffleHog')
		cmd = 'trufflehog --regex --entropy=True $TARGET | tee $WORKSPACE/gitscan/$TARGET-trufflehog.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/gitscan/$TARGET-trufflehog.txt')
Exemple #4
0
 def subover(self):
     utils.print_good('Starting SubOver')
     cmd = '$PLUGINS_PATH/SubOver/SubOver -l $WORKSPACE/subdomain/final-$TARGET.txt -v -t 100 | tee $WORKSPACE/subdomain/takeover-$TARGET-subover.txt'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     print()
Exemple #5
0
 def testssl(self):
     utils.print_good('Starting testssl')
     cmd = 'bash $PLUGINS_PATH/testssl.sh/testssl.sh --parallel --logfile $WORKSPACE/ssl/$TARGET-testssl.txt $TARGET'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     utils.check_output(self.options, '$WORKSPACE/ssl/$TARGET-testssl.txt')
Exemple #6
0
	def create_html(self):
		utils.print_good('Create beautify HTML report')
		cmd = 'xsltproc -o $WORKSPACE/vulnscan/$OUTPUT.html $PLUGINS_PATH/nmap-bootstrap.xsl $WORKSPACE/vulnscan/$OUTPUT-nmap.xml'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/vulnscan/$TARGET.html')
Exemple #7
0
 def create_ip_result(self):
     utils.print_good('Create IP for list of domain result')
     cmd = '$PLUGINS_PATH/massdns/scripts/ptr.py | $PLUGINS_PATH/massdns/bin/massdns -r $PLUGINS_PATH/massdns/lists/resolvers.txt -q -t PTR -w $WORKSPACE/subdomain/final-IP-$OUTPUT.txt'
     cmd = utils.replace_argument(self.options, cmd)
     execute.run(cmd)
     utils.check_output(self.options,
                        '$WORKSPACE/subdomain/final-IP-$OUTPUT.txt')
Exemple #8
0
	def nmap_vuln(self):
		utils.print_good('Starting nmap vulnerable scan')
		cmd = 'nmap -T4 -Pn -n -sSV -p- $STRIP_TARGET --script vulners --oA $WORKSPACE/vulnscan/$OUTPUT-nmap'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/vulnscan/$TARGET-nmap.xml')
Exemple #9
0
	def amass(self):
		utils.print_good('Starting amass')
		cmd = '$GO_PATH/amass -active -d $TARGET |tee $WORKSPACE/subdomain/$OUTPUT-amass.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/subdomain/$OUTPUT-amass.txt')
Exemple #10
0
 def masscan(self):
     utils.print_good('Starting masscan')
     cmd = 'sudo masscan --rate 10000 -p0-65535 -iL $WORKSPACE/subdomain/final-IP-$OUTPUT.txt -oG $WORKSPACE/portscan/$OUTPUT-masscan.gnmap -oX $WORKSPACE/portscan/$OUTPUT-masscan.xml --wait 0'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     print()
Exemple #11
0
 def eyewitness_common(self):
     utils.print_good('Starting EyeWitness for web')
     cmd = 'python $PLUGINS_PATH/EyeWitness/EyeWitness.py -f $WORKSPACE/subdomain/IP-$TARGET.txt --web --prepend-https --threads 20 -d $WORKSPACE/screenshot/'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     print()
Exemple #12
0
	def subfinder(self):
		utils.print_good('Starting subfinder')
		cmd = '$GO_PATH/subfinder -d $TARGET -b -t 100 -o $WORKSPACE/subdomain/$OUTPUT-subfinder.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/subdomain/$OUTPUT-subfinder.txt')
Exemple #13
0
	def unique_result(self):
		utils.print_good('Unique result')
		cmd = "cat $WORKSPACE/subdomain/$OUTPUT-*.txt | sort | awk '{print tolower($0)}' | uniq >> $WORKSPACE/subdomain/final-$OUTPUT.txt"
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/subdomain/final-$OUTPUT.txt')
Exemple #14
0
	def corstest(self):
		utils.print_good('Starting truffleHog')
		cmd = '$PLUGINS_PATH/CORStest/corstest.py -q $WORKSPACE/subdomain/final-$OUTPUT.txt | tee $WORKSPACE/cors/$TARGET-corstest.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/cors/$TARGET-corstest.txt')
Exemple #15
0
	def gobuster(self):
		utils.print_good('Starting gobuster')
		cmd = '$GO_PATH/gobuster -m dns -np -t 100 -w $PLUGINS_PATH/wordlists/all.txt -u $TARGET -o $WORKSPACE/directory/$OUTPUT-gobuster.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		utils.check_output(self.options, '$WORKSPACE/directory/$OUTPUT-gobuster.txt')
Exemple #16
0
 def massdns(self):
     utils.print_good('Starting massdns')
     cmd = '$PLUGINS_PATH/massdns/scripts/subbrute.py $PLUGINS_PATH/massdns/lists/names.txt $TARGET | $PLUGINS_PATH/massdns/bin/massdns -r $PLUGINS_PATH/massdns/lists/resolvers.txt -t A -o S -w $WORKSPACE/subdomain/$OUTPUT-massdns.txt'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     print()
Exemple #17
0
 def aquaton(self):
     utils.print_good('Starting aquatone')
     cmd = 'cat $WORKSPACE/subdomain/final-$TARGET.txt | $GO_PATH/aquatone -threads 20 -out $WORKSPACE/screenshot/$OUTPUT-aquatone.html'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     utils.check_output(self.options,
                        '$WORKSPACE/screenshot/$OUTPUT-aquatone.html')
Exemple #18
0
	def direct_masscan(self):
		utils.print_good('Starting masscan')
		ip = socket.gethostbyname(self.options['env']['STRIP_TARGET'])
		cmd = 'sudo nmap -sS -T4 -Pn -n -p- {0} -oG $WORKSPACE/portscan/$OUTPUT-nmap.gnmap -oX $WORKSPACE/portscan/$OUTPUT-nmap.xml '.format(ip)
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		print()
Exemple #19
0
 def ipOinst(self):
     utils.print_good('Starting IPOinst')
     cmd = '$PLUGINS_PATH/IPOsint/ip-osint.py -t $TARGET -o $WORKSPACE/ipspace/$OUTPUT-ipspace.txt'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
     utils.check_output(self.options,
                        '$WORKSPACE/ipspace/$OUTPUT-ipspace.txt')
Exemple #20
0
    def create_ip_result(self):
        utils.print_good('Create IP for list of domain result')
        cmd = '$PLUGINS_PATH/massdns/bin/massdns -r $PLUGINS_PATH/massdns/lists/resolvers.txt -t A -o S -w $WORKSPACE/subdomain/massdns-IP-$OUTPUT.txt $WORKSPACE/subdomain/final-$OUTPUT.txt'
        cmd = utils.replace_argument(self.options, cmd)
        execute.run(cmd)

        cmd = '''cat $WORKSPACE/subdomain/massdns-IP-$OUTPUT.txt | grep -e ' A ' |  cut -d 'A' -f 2 | tr -d ' ' > $WORKSPACE/subdomain/final-IP-$OUTPUT.txt'''
        cmd = utils.replace_argument(self.options, cmd)
        execute.run(cmd)
        utils.check_output(self.options,
                           '$WORKSPACE/subdomain/final-IP-$OUTPUT.txt')
Exemple #21
0
    def masscan(self):
        utils.print_good('Starting masscan')
        if self.options['speed'] == 'slow':
            cmd = 'sudo masscan --rate 10000 -p0-65535 -iL $WORKSPACE/subdomain/final-IP-$OUTPUT.txt -oG $WORKSPACE/portscan/$OUTPUT-masscan.gnmap -oX $WORKSPACE/portscan/$OUTPUT-masscan.xml --wait 0'
        elif self.options['speed'] == 'quick':
            utils.print_good("Only scan for single target in quick speed")
            cmd = 'sudo masscan --rate 10000 -p0-65535 $IP -oG $WORKSPACE/portscan/$OUTPUT-masscan.gnmap -oX $WORKSPACE/portscan/$OUTPUT-masscan.xml --wait 0'

        cmd = utils.replace_argument(self.options, cmd)
        utils.print_info("Execute: {0} ".format(cmd))
        execute.run(cmd)
        utils.check_output(self.options,
                           '$WORKSPACE/portscan/$OUTPUT-masscan.xml')
Exemple #22
0
def proxy_parsing(options):
    # return if proxy config file found
    if options['PROXY_FILE'] != "None":
        proxy_file = options['PROXY_FILE']
        utils.print_info("Detected proxychains file: {0}".format(proxy_file))
        return
    elif options['PROXY'] != "None":
        proxy_file = options['CWD'] + '/core/proxychains.conf'
        utils.print_info("Detected proxychains file: {0}".format(proxy_file))

    if options['PROXY'] != "None":
        proxy_parsed = urllib.parse.urlsplit(options['PROXY'])

        scheme = proxy_parsed.scheme
        host = proxy_parsed.netloc.split(':')[0]
        port = proxy_parsed.netloc.split(':')[1]

        proxy_element = "\n" + scheme + " " + host + " " + port

        raw_data = utils.just_read(proxy_file).splitlines()
        for i in range(len(raw_data)):
            if '[ProxyList]' in raw_data[i]:
                init_part = raw_data[:i]
                proxy_part = raw_data[i:]

        # check if this proxy is exist or not
        check_duplicate = False
        for item in proxy_part:
            if proxy_element.strip() in item.strip():
                check_duplicate = True

        if not check_duplicate:
            proxy_part.append(proxy_element)

        real_proxy_data = "\n".join(init_part + proxy_part)
        utils.just_write(proxy_file, real_proxy_data)

    if options['PROXY'] != "None" or options['PROXY_FILE'] != "None":
        if not shutil.which(options['PROXY_CMD'].split(' ')[0]):
            utils.print_bad("Look like proxy mode doesn't support your OS")
            sys.exit(0)
        else:
            #simple check for proxy is good
            utils.print_info("Testing proxy with simple curl command")
            if execute.run(options['PROXY_CMD'] +
                           " curl -s ipinfo.io/ip") == execute.run(
                               "curl -s ipinfo.io/ip"):
                utils.print_bad("Look like your proxy not work properly")
                sys.exit(0)
Exemple #23
0
    def gobuster(self):
        utils.print_good('Starting gobuster')

        if self.options['speed'] == 'slow':
            cmd = '$GO_PATH/gobuster -m dns -np -t 100 -w $PLUGINS_PATH/wordlists/all.txt -u $TARGET -o $WORKSPACE/subdomain/$OUTPUT-gobuster.txt'

        elif self.options['speed'] == 'quick':

            cmd = '$GO_PATH/gobuster -m dns -np -t 100 -w $PLUGINS_PATH/wordlists/shorts.txt -u $TARGET -o $WORKSPACE/subdomain/$OUTPUT-gobuster.txt'

        cmd = utils.replace_argument(self.options, cmd)
        utils.print_info("Execute: {0} ".format(cmd))
        execute.run(cmd)
        utils.check_output(self.options,
                           '$WORKSPACE/subdomain/$OUTPUT-gobuster.txt')
Exemple #24
0
def proxy_parsing(options):
    # return if proxy config file found
    if options['PROXY_FILE'] != "None":
        proxy_file = options['PROXY_FILE']
        utils.print_info("Detected proxychains file: {0}".format(proxy_file))
        return 
    elif options['PROXY'] != "None":
        proxy_file = options['CWD'] + '/core/proxychains.conf'
        utils.print_info("Detected proxychains file: {0}".format(proxy_file))


    if options['PROXY'] != "None":
        proxy_parsed = urllib.parse.urlsplit(options['PROXY'])

        scheme = proxy_parsed.scheme
        host = proxy_parsed.netloc.split(':')[0]
        port = proxy_parsed.netloc.split(':')[1]

        proxy_element = "\n" + scheme + " " + host + " " + port

        raw_data = utils.just_read(proxy_file).splitlines()
        for i in range(len(raw_data)):
            if '[ProxyList]' in raw_data[i]:
                init_part = raw_data[:i]
                proxy_part = raw_data[i:]

        # check if this proxy is exist or not
        check_duplicate = False 
        for item in proxy_part:
            if proxy_element.strip() in item.strip():
                check_duplicate = True
        
        if not check_duplicate: 
            proxy_part.append(proxy_element)
        
        real_proxy_data = "\n".join(init_part + proxy_part)
        utils.just_write(proxy_file, real_proxy_data)
    
    if options['PROXY'] != "None" or options['PROXY_FILE'] != "None":
        if not shutil.which(options['PROXY_CMD'].split(' ')[0]):
            utils.print_bad("Look like proxy mode doesn't support your OS")
            sys.exit(0)
        else:
            #simple check for proxy is good
            utils.print_info("Testing proxy with simple curl command")
            if execute.run(options['PROXY_CMD'] + " curl -s ipinfo.io/ip") == execute.run("curl -s ipinfo.io/ip"):
                utils.print_bad("Look like your proxy not work properly")
                sys.exit(0)
Exemple #25
0
	def massdns(self):
		utils.print_good('Starting massdns')
		cmd = '$PLUGINS_PATH/massdns/scripts/subbrute.py $DOMAIN_FULL $TARGET | $PLUGINS_PATH/massdns/bin/massdns -r $PLUGINS_PATH/massdns/lists/resolvers.txt -t A -o S -w $WORKSPACE/subdomain/raw-massdns.txt'
		# cmd = '$PLUGINS_PATH/massdns/scripts/subbrute.py $PLUGINS_PATH/massdns/lists/names.txt $TARGET | $PLUGINS_PATH/massdns/bin/massdns -r $PLUGINS_PATH/massdns/lists/resolvers.txt -t A -o S -w $WORKSPACE/subdomain/$OUTPUT-massdns.txt'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
		massdns_raw = utils.replace_argument(self.options, '$WORKSPACE/subdomain/raw-massdns.txt')
		massdns_output = utils.replace_argument(self.options, '$WORKSPACE/subdomain/$OUTPUT-massdns.txt')
		
		with open(massdns_raw, 'r+') as d:
			ds = d.read().splitlines()
		for line in ds:
			newline = line.split(' ')[0][:-1]
			with open(massdns_output, 'a+') as m:
				m.write(newline + "\n")

		utils.check_output(self.options, '$WORKSPACE/subdomain/$OUTPUT-massdns.txt')
Exemple #26
0
 def create_ip_result(self):
     utils.print_good('Create IP for list of domain result')
     domains = utils.replace_argument(
         self.options, '$WORKSPACE/subdomain/final-$OUTPUT.txt')
     with open(domains, 'r+') as d:
         ds = d.read().splitlines()
     for domain in ds:
         try:
             ip = socket.gethostbyname(domain.strip())
             cmd = 'echo {0} >> $WORKSPACE/subdomain/IP-$OUTPUT.txt'.format(
                 ip)
             cmd = utils.replace_argument(self.options, cmd)
             execute.run(cmd)
         except:
             pass
     cmd = 'cat $WORKSPACE/subdomain/IP-$OUTPUT.txt | sort | uniq > $WORKSPACE/subdomain/final-IP-$OUTPUT.txt'
     cmd = utils.replace_argument(self.options, cmd)
     execute.run(cmd)
Exemple #27
0
	def linkfinder(self):
		utils.print_good('Starting linkfinder')
		cmd = '$PLUGINS_PATH/linkfinder.py -i $BURPSTATE -b -o cli | tee $WORKSPACE/burp-$TARGET-linkfinder.txt'
		cmd = utils.replace_argument(self.options, cmd)
		execute.run(cmd)
		utils.print_info("Execute: {0} ".format(cmd))
Exemple #28
0
	def direct_brutespray(self):
		cmd = 'python $PLUGINS_PATH/brutespray/brutespray.py --file $WORKSPACE/portscan/$OUTPUT-masscan.xml --threads 5 --hosts 5 -o $WORKSPACE/bruteforce/$OUTPUT/'
		cmd = utils.replace_argument(self.options, cmd)
		utils.print_info("Execute: {0} ".format(cmd))
		execute.run(cmd)
Exemple #29
0
 def dirhunt(self):
     utils.print_good('Starting dirhunt')
     cmd = 'dirhunt $TARGET $MORE --progress-disabled --threads 20 | tee $WORKSPACE/directory/$STRIP_TARGET-dirhunt.txt'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)
Exemple #30
0
	def sleuthql(self):
		utils.print_good('Starting sleuthql')
		cmd = 'python3 $PLUGINS_PATH/sleuthql/sleuthql.py -d $TARGET -f $BURPSTATE'
		cmd = utils.replace_argument(self.options, cmd)
		execute.run(cmd)
		utils.print_info("Execute: {0} ".format(cmd))
Exemple #31
0
	def sqlmap(self):
		utils.print_good('Starting sqlmap')
		cmd = '$PLUGINS_PATH/sqlmap/sqlmap.py -l $BURPSTATE --batch $MORE'
		cmd = utils.replace_argument(self.options, cmd)
		execute.run(cmd)
		utils.print_info("Execute: {0} ".format(cmd))
Exemple #32
0
 def dirhunt(self):
     utils.print_good('Starting dirhunt')
     cmd = 'dirhunt $TARGET $MORE --progress-disabled --threads 20 | tee $WORKSPACE/directory/$STRIP_TARGET-dirhunt.txt'
     cmd = utils.replace_argument(self.options, cmd)
     utils.print_info("Execute: {0} ".format(cmd))
     execute.run(cmd)