Skip to content
This repository has been archived by the owner on Apr 19, 2020. It is now read-only.

Commit

Permalink
commit v6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mh4x0f committed Aug 31, 2015
1 parent 1e1abf1 commit 92f79d1
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 126 deletions.
25 changes: 13 additions & 12 deletions 3vilTwin-Attacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@
from Core.Privilege import frm_privelege
from Core.Main import Initialize
from Core.check import check_dependencies
from Modules.utils import Refactor

def ExecRootApp():
check_dependencies()
root = QApplication(argv)
app = Initialize()
app.setWindowIcon(QIcon('rsc/icon.ico'))
app.center(),app.show()
exit(root.exec_())

if __name__ == '__main__':
if not getuid() == 0:
app2 = QApplication(argv)
priv = frm_privelege()
priv.setWindowIcon(QIcon('rsc/icon.ico'))
priv.show()
exit(app2.exec_())
else:
check_dependencies()
root = QApplication(argv)
app = Initialize(None)
app.setWindowIcon(QIcon('rsc/icon.ico'))
app.center()
app.show()
exit(root.exec_())


priv.show(),app2.exec_()
exit(Refactor.threadRoot(priv.Editpassword.text()))
ExecRootApp()
12 changes: 8 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 0.6.4
-------------
- added support kali 2.0
- added iptables Settings
- change design main
- fixed some bug with AP internet share
- fixed dhcp install

Version 0.6.3
-----------
- Netcreds Plugin
Expand All @@ -7,12 +15,8 @@ Version 0.6.3
- export html report attack
- Advanced Settings
- sslstrip on default
- Fixed xterm window
- Credentials Monitor
- Credentials Phising
- added support kali 2.0
- added iptables Settings
- added function save all Logs

Version 0.5.9
-----------
Expand Down
86 changes: 54 additions & 32 deletions Core/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
from shutil import move
from sys import argv
import logging
from re import search,compile,VERBOSE,IGNORECASE
from re import search
from multiprocessing import Process
from time import asctime
from subprocess import Popen,PIPE,STDOUT,call,check_output
from subprocess import Popen,PIPE,STDOUT,call
from Modules.ModuleStarvation import frm_dhcp_main
from Modules.ModuleDeauth import frm_window,frm_deauth
from Modules.ModuleMacchanger import frm_mac_generator
Expand All @@ -44,7 +44,7 @@
author = ' @mh4x0f P0cl4bs Team'
emails = ['[email protected]','[email protected]']
license = 'MIT License (MIT)'
version = '0.6.3'
version = '0.6.4'
date_create = '18/01/2015'
update = '27/07/2015'
desc = ['Framework for EvilTwin Attacks']
Expand Down Expand Up @@ -126,7 +126,9 @@ def run(self):
reactor.run(installSignalHandlers=False)
def stop(self):
print 'Stop thread:' + self.objectName()
reactor.stop()
try:
reactor.stop()
except:pass


class SubMain(QWidget):
Expand Down Expand Up @@ -263,7 +265,7 @@ def intGUI(self):
self.EditChannel = QLineEdit(self)
self.selectCard = QComboBox(self)
self.ListLoggerDhcp = QListWidget(self)
self.ListLoggerDhcp.setFixedHeight(170)
self.ListLoggerDhcp.setFixedHeight(150)
try:
self.EditGateway.setText([Refactor.get_interfaces()[x] for x in Refactor.get_interfaces().keys() if x == 'gateway'][0])
except:pass
Expand All @@ -287,11 +289,11 @@ def intGUI(self):
dnsmasq = popen('which dnsmasq').read().split("\n")
lista = [ '/usr/sbin/airbase-ng', ettercap[0],driftnet[0],dhcpd[0],dnsmasq[0]]
self.m = []
for i in lista:
self.m.append(path.isfile(i))
for i in lista:self.m.append(path.isfile(i))

self.form = QFormLayout()
self.form2 = QFormLayout()
self.FormGroup1 = QFormLayout()
self.FormGroup2 = QFormLayout()
self.FormGroup3 = QFormLayout()
hLine = QFrame()
hLine.setFrameStyle(QFrame.HLine)
hLine.setSizePolicy(QSizePolicy.Minimum,QSizePolicy.Expanding)
Expand All @@ -301,40 +303,54 @@ def intGUI(self):
vbox = QVBoxLayout()
vbox.setMargin(5)
vbox.addStretch(20)
self.form.addRow(vbox)
self.FormGroup1.addRow(vbox)
self.logo = QPixmap(getcwd() + '/rsc/logo.png')
self.imagem = QLabel(self)
self.imagem = QLabel()
self.imagem.setPixmap(self.logo)
self.form.addRow(self.imagem)
self.FormGroup1.addRow(self.imagem)

self.form.addRow('Gateway:', self.EditGateway)
self.form.addRow('AP Name:', self.EditApName)
self.form.addRow('Channel:', self.EditChannel)

self.GroupAP = QGroupBox()
self.GroupAP.setTitle('Access Point::')
self.FormGroup3.addRow('Gateway:', self.EditGateway)
self.FormGroup3.addRow('AP Name:', self.EditApName)
self.FormGroup3.addRow('Channel:', self.EditChannel)
self.GroupAP.setLayout(self.FormGroup3)

# grid network adapter fix
self.btrn_refresh = QPushButton('Refresh')
self.btrn_refresh.setIcon(QIcon('rsc/refresh.png'))
self.btrn_refresh.clicked.connect(self.refrash_interface)
self.grid = QGridLayout()
self.grid.addWidget(QLabel('Network Adapter:'),0,0)
self.grid.addWidget(self.selectCard, 0,1)
self.grid.addWidget(self.btrn_refresh,0,2)

self.layout = QFormLayout()
self.GroupAdapter = QGroupBox()
self.GroupAdapter.setTitle('Network Adapter::')
self.layout.addRow(self.selectCard)
self.layout.addRow(self.btrn_refresh)
self.GroupAdapter.setLayout(self.layout)


self.btn_start_attack = QPushButton('Start Attack', self)
self.btn_start_attack.setIcon(QIcon('rsc/start.png'))
self.btn_start_attack.setFixedWidth(160)
self.btn_cancelar = QPushButton('Stop Attack', self)
self.btn_cancelar.setIcon(QIcon('rsc/Stop.png'))
self.btn_cancelar.setFixedWidth(165)
self.btn_cancelar.clicked.connect(self.kill)
self.btn_start_attack.clicked.connect(self.StartApFake)

self.form2.addRow(self.btn_start_attack, self.btn_cancelar)
self.form2.addRow(self.ListLoggerDhcp)
self.form2.addRow(self.StatusBar)
self.Main.addLayout(self.form)
self.Main.addLayout(self.grid)
self.Main.addLayout(self.form2)
hBox = QHBoxLayout()
hBox.addWidget(self.btn_start_attack)
hBox.addWidget(self.btn_cancelar)

self.slipt = QHBoxLayout()
self.slipt.addWidget(self.GroupAP)
self.slipt.addWidget(self.GroupAdapter)

self.FormGroup2.addRow(hBox)
self.FormGroup2.addRow(self.ListLoggerDhcp)
self.FormGroup2.addRow(self.StatusBar)
self.Main.addLayout(self.FormGroup1)
self.Main.addLayout(self.slipt)
self.Main.addLayout(self.FormGroup2)
self.setLayout(self.Main)

def show_arp_posion(self):
Expand Down Expand Up @@ -407,6 +423,7 @@ def refrash_interface(self):
self.selectCard.addItem(n[i])

def kill(self):
if self.Apthreads['RougeAP'] == []:return
for i in self.Apthreads['RougeAP']:i.stop()
terminate = [
'killall dhcpd',
Expand All @@ -415,8 +432,7 @@ def kill(self):
'iptables --flush',
'iptables --table nat --flush',
'iptables --delete-chain',
'iptables --table nat --delete-chain',
'ifconfig %s down'%(self.Ap_iface),]
'iptables --table nat --delete-chain']
for delete in terminate:popen(delete)
set_monitor_mode(self.interface).setDisable()
self.Started(False)
Expand Down Expand Up @@ -462,8 +478,12 @@ def CoreSettings(self):
],
'kill':
[
'iptables --flush',
'iptables --table nat --flush',
'iptables --delete-chain',
'iptables --table nat --delete-chain',
'killall dhpcd',
'killall dnsmasq',
'killall dnsmasq'
],
'dhcp-server':
[
Expand All @@ -474,6 +494,7 @@ def CoreSettings(self):
'option routers 10.0.0.1;\n',
'option subnet-mask 255.255.255.0;\n',
'option domain-name \"%s\";\n'%(str(self.EditApName.text())),
'option domain-name-servers 10.0.0.1;\n',
'range %s;\n'% range_dhcp,
'}',
],
Expand Down Expand Up @@ -509,7 +530,7 @@ def StartApFake(self):
QMessageBox.warning(self,'Error permission','Run as root ')
return
if len(self.selectCard.currentText()) == 0:
QMessageBox.warning(self,'Error','Network interface not supported :(')
QMessageBox.warning(self,'Error interface','Network interface not supported :(')
return
dhcp_select = self.config.xmlSettings('dhcp','dhcp_server',None,False)
if dhcp_select != 'dnsmasq':
Expand Down Expand Up @@ -595,5 +616,6 @@ def on_sys_tray_activated(self, reason):
elif reason == 2:self.showMinimized()

def about(self):
self.Fabout = frmAbout()
self.Fabout = frmAbout(author,emails,
version,date_create,update,license,desc)
self.Fabout.show()
43 changes: 11 additions & 32 deletions Core/Privilege.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
from PyQt4.QtGui import *
from subprocess import Popen, PIPE
from Core.Settings import frm_Settings
from os import popen,getpid
from os import popen
from re import search
import threading
import getpass
from time import sleep
global sudo_prompt
sudo_prompt = None

class waiter(threading.Thread):
def run(self):
for i in range(2):
sleep(5)
if sudo_prompt == None:
#popen("kill -9 %i"%(getpid()))
pass

class frm_privelege(QDialog):
def __init__(self, parent = None):
Expand Down Expand Up @@ -62,28 +50,19 @@ def Qui(self):
self.setLayout(self.Main)

def function_ok(self):
out = self.password_check(self.Editpassword.text())
self.hide()
out = self.thread(str(self.Editpassword.text()))
if search("1 incorrect password attemp",out):
QMessageBox.information(self, "Sudo Password check", "[sudo] password for %s: Sorry, try again."%(getpass.getuser()))
QMessageBox.information(self, "Sudo Password check",
"[sudo] password for %s: Sorry, try again."%(getpass.getuser()))
self.show()
self.Editpassword.clear()
else:
self.close()

def password_check(self,sudo_password):
self.hide()
self.th = threading.Thread(target=self.thread, args=(sudo_password,))
self.th.daemon = True
self.th.start()
waiter().start()
self.th.join()
return sudo_prompt
return
self.close()

def thread(self,sudo_password):
popen("sudo -k")
sudo_password = self.Editpassword.text()
command = 'python functions.py'.split()
p = Popen(['sudo', '-S'] + command, stdin=PIPE, stderr=PIPE,
universal_newlines=True)
global sudo_prompt
sudo_prompt = p.communicate(str(sudo_password) + '\n')[1]
p = Popen(['sudo', '-S','|','ls'], stdin=PIPE, stderr=PIPE,
universal_newlines=True)
output = p.communicate(str(sudo_password) + '\n')[1]
return output
38 changes: 20 additions & 18 deletions Core/about.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from PyQt4.QtGui import *
from Core.Settings import frm_Settings
author = ' @mh4x0f P0cl4bs Team'
emails = ['[email protected]','[email protected]']
version = '0.6.3'
date_create = '18/01/2015'
update ='27/07/2015'
license = 'MIT License (MIT)'
desc = ['Framework for EvilTwin Attacks']
class frmAbout(QDialog):
def __init__(self, parent = None):
def __init__(self,author,emails,version,
date_create,update,license,desc, parent = None):
super(frmAbout, self).__init__(parent)
self.author = author
self.emails = emails
self.version = version
self.date_create = date_create
self.update = update
self.license = license
self.desc = desc
self.setWindowTitle("About 3vilTwinAttacker")
self.Main = QVBoxLayout()
self.frm = QFormLayout()
Expand All @@ -33,8 +34,9 @@ def center(self):
def Qui_update(self):
self.form = QFormLayout(self)
self.btn_exit = QPushButton("Close")
self.license = QTextEdit(self)
self.license.setText(
self.licenseEdit = QTextEdit(self)
self.licenseEdit.setFixedHeight(150)
self.licenseEdit.setText(
'''The MIT License (MIT)
Copyright (c) 2015-2016 mh4x0f P0cL4bs Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand All @@ -52,21 +54,21 @@ def Qui_update(self):
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.'''
)
ltool = QLabel('<center>3vilTwin-Attacker v%s</center>'%(version))
ldesc = QLabel('<center>'+desc[0]+'</center>')
lversion = QLabel('Version:'+version)
lupdate = QLabel('Last Update:'+update)
lautor = QLabel('author:'+author)
lemail = QLabel('Emails:'+emails[0] +" | "+emails[1])
licese = QLabel('License:'+license)
ltool = QLabel('<center>3vilTwin-Attacker v%s</center>'%(self.version))
ldesc = QLabel('<center>'+self.desc[0]+'</center>')
lversion = QLabel('Version:'+self.version)
lupdate = QLabel('Last Update:'+self.update)
lautor = QLabel('author:'+self.author)
lemail = QLabel('Emails:'+self.emails[0] +" | "+self.emails[1])
licese = QLabel('License:'+self.license)
self.form.addRow(ltool)
self.form.addRow(ldesc)
self.form.addRow(lversion)
self.form.addRow(lupdate)
self.form.addRow(lautor)
self.form.addRow(lemail)
self.form.addRow(licese)
self.form.addRow(self.license)
self.form.addRow(self.licenseEdit)
self.btn_exit.clicked.connect(self.deleteLater)
self.form.addRow(self.btn_exit)
self.Main.addLayout(self.form)
Expand Down
1 change: 0 additions & 1 deletion Core/theme2.qss
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ QGroupBox {

QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top center;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
Expand Down
Loading

0 comments on commit 92f79d1

Please sign in to comment.