From c70dc986f95c43cd163cf5f925d4dd85d7383dc1 Mon Sep 17 00:00:00 2001 From: s0lst1c3 Date: Mon, 17 Aug 2020 09:39:02 -0400 Subject: [PATCH] Adding support for Parot OS (Security) --- Changelog | 3 ++ README.md | 25 +++++++++-- __version__.py | 2 +- parot-dependencies.txt | 10 +++++ parot-setup | 99 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 parot-dependencies.txt create mode 100755 parot-setup diff --git a/Changelog b/Changelog index 7c15563..72df5e1 100644 --- a/Changelog +++ b/Changelog @@ -159,3 +159,6 @@ Hostapd ctrl_interface name randomly generated to support multiple concurrent ea 1.12.2 - Gabriel Ryan Fixed kali-setup file, updated kali-dependencies.txt file + +1.12.3 - Gabriel Ryan +Added official support for Parot OS (Security) diff --git a/README.md b/README.md index 90c47d6..206b59d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ ![logo](https://rawcdn.githack.com/s0lst1c3/eaphammer/ab8202de4a298957a2bc5662f986cdfb195490e4/docs/img/logo.png) -by Gabriel Ryan ([s0lst1c3](https://twitter.com/s0lst1c3))(gabriel[at]specterops.io) +by Gabriel Ryan ([s0lst1c3](https://twitter.com/s0lst1c3))(gabriel[at]solstice|d0t|sh) [![Foo](https://rawcdn.githack.com/toolswatch/badges/8bd9be6dac2a1d445367001f2371176cc50a5707/arsenal/usa/2017.svg)](https://www.blackhat.com/us-17/arsenal.html#eaphammer) -Current release: [v1.12.2](https://github.com/s0lst1c3/eaphammer/releases/tag/v1.12.0) +Current release: [v1.12.3](https://github.com/s0lst1c3/eaphammer/releases/tag/v1.12.0) Supports _Python 3.5+_. @@ -18,7 +18,7 @@ To illustrate just how fast this tool is, our Quick Start section provides an ex EAPHammer (the "Software") and associated documentation is provided “AS IS”. The Developer makes no other warranties, express or implied, and hereby disclaims all implied warranties, including any warranty of merchantability and warranty of fitness for a particular purpose. Any actions or activities related to the use of the Software are the sole responsibility of the end user. The Developer will not be held responsible in the event that any criminal charges are brought against any individuals using or misusing the Software. It is up to the end user to use the Software in an authorized manner and to ensure that their use complies with all applicable laws and regulations. -## Quick Start Guide (Kali) +## Quick Start Guide - Kali Begin by cloning the __eaphammer__ repo using the following command: @@ -36,6 +36,25 @@ To setup and execute a credential stealing evil twin attack against a WPA/2-EAP # launch attack ./eaphammer -i wlan0 --channel 4 --auth wpa-eap --essid CorpWifi --creds +## Quick Start Guide - Parot OS (Security) + +Begin by cloning the __eaphammer__ repo using the following command: + + git clone https://github.com/s0lst1c3/eaphammer.git + +Next run the parot-setup file as shown below to complete the eaphammer setup process. This will install dependencies and compile the project: + + ./parot-setup + +To setup and execute a credential stealing evil twin attack against a WPA/2-EAP network: + + # generate certificates + ./eaphammer --cert-wizard + + # launch attack + ./eaphammer -i wlan0 --channel 4 --auth wpa-eap --essid CorpWifi --creds + + ## Usage and Setup Instructions For complete usage and setup instructions, please refer to the project's wiki page: diff --git a/__version__.py b/__version__.py index 27e8e69..c0ddf87 100644 --- a/__version__.py +++ b/__version__.py @@ -1,4 +1,4 @@ -__version__ = '1.12.2' +__version__ = '1.12.3' __codename__ = 'Power Overwhelming' __author__ = '@s0lst1c3' __contact__ = 'gabriel@specterops.io' diff --git a/parot-dependencies.txt b/parot-dependencies.txt new file mode 100644 index 0000000..d050295 --- /dev/null +++ b/parot-dependencies.txt @@ -0,0 +1,10 @@ +apache2 +dnsmasq +libssl-dev +libnfnetlink-dev +libnl-3-dev +libnl-genl-3-dev +libcurl4-openssl-dev +zlib1g-dev +libpcap-dev +python3-pip diff --git a/parot-setup b/parot-setup new file mode 100755 index 0000000..d171032 --- /dev/null +++ b/parot-setup @@ -0,0 +1,99 @@ +#!/usr/bin/env python3 +import os +import sys + +from settings import settings + +def exit_if_not_root(): + + if os.getuid() != 0: + sys.exit("[!} Error: this script must be run as root.") + +def read_deps_file(deps_file): + with open(deps_file) as fd: + return ' '.join([ line.strip() for line in fd ]) + +if __name__ == '__main__': + + exit_if_not_root() + + + default_wordlist = os.path.join(settings.dict['paths']['directories']['wordlists'], settings.dict['core']['eaphammer']['general']['default_wordlist']) + + wordlist_source = settings.dict['core']['eaphammer']['general']['wordlist_source'] + + root_dir = settings.dict['paths']['directories']['root'] + local_dir = settings.dict['paths']['directories']['local'] + + openssl_source = settings.dict['core']['eaphammer']['general']['openssl_source'] + openssl_version = settings.dict['core']['eaphammer']['general']['openssl_version'] + openssl_build_options = settings.dict['core']['eaphammer']['general']['openssl_build_options'] + openssl_build_prefix = os.path.join(local_dir, 'openssl/local') + + openssl_bin = settings.dict['paths']['openssl']['bin'] + dh_file = settings.dict['paths']['certs']['dh'] + + if input('Important: it is highly recommended that you run "apt -y update" and "apt -y upgrade" prior to running this setup script. Do you wish to proceed? Enter [y/N]: ').lower() != 'y': + sys.exit('Aborting.') + print() + + + print('\n[*] Removing stub files...\n') + os.system('find {} -type f -name \'stub\' -exec rm -f {{}} +'.format(root_dir)) + print('\ncomplete!\n') + + + print('\n[*] Installing Parot dependencies...\n') + os.system('apt -y install %s' % read_deps_file('parot-dependencies.txt')) + print('\n[*] complete!\n') + + print('\n[*] Installing Python dependencies...\n') + os.system('python3 -m pip install -r pip.req') + print('\n[*] complete!\n') + + + print('\n[*] Downloading OpenSSL_{}...\n'.format(openssl_version.replace('.', '_'))) + os.system('wget {} -O {}/openssl.tar.gz'.format(openssl_source, local_dir)) + print('\n[*] complete!\n') + + print('\n[*] Extracting OpenSSL_{}...\n'.format(openssl_version.replace('.', '_'))) + os.system('cd {} && tar xzf openssl.tar.gz'.format(local_dir)) + os.system('mv {}/openssl-OpenSSL_{} {}/openssl'.format(local_dir, openssl_version.replace('.', '_'), local_dir)) + os.system('cd {} && rm -f openssl.tar.gz'.format(local_dir)) + print('\n[*] complete!\n') + + print('\n[*] Compiling OpenSSL locally to avoid interfering with system install...\n') + os.system('cd {}/openssl && ./config --prefix={} enable-ssl2 enable-ssl3 enable-ssl3-method enable-des enable-rc4 enable-weak-ssl-ciphers no-shared'.format(local_dir, openssl_build_prefix)) + os.system('cd {}/openssl && make'.format(local_dir)) + os.system('cd {}/openssl && make install_sw'.format(local_dir)) + print('\n[*] complete!\n') + + print('\n[*] Create DH parameters file with default length of 2048...\n') + os.system('{} dhparam -out {} 2048'.format(openssl_bin, dh_file)) + print('\ncomplete!\n') + + print('\n[*] Compiling hostapd...\n') + os.system("cd %s && cp defconfig .config" % settings.dict['paths']['directories']['hostapd']) + os.system("cd %s && make hostapd-eaphammer_lib" % settings.dict['paths']['directories']['hostapd']) + print('\n[*] complete!\n') + + print('\n[*] Compiling hcxtools...\n') + os.system("cd %s && make" % settings.dict['paths']['directories']['hcxtools']) + print('\n[*] complete!\n') + + print('\n[*] Compiling hcxdumptool...\n') + os.system("cd %s && make" % settings.dict['paths']['directories']['hcxdumptool']) + print('\n[*] complete!\n') + + print('\n[*] Downloading default wordlist...\n') + os.system("wget %s -O %s.tar.gz" % (wordlist_source, default_wordlist)) + print('\n[*] complete!\n') + + print('\n[*] Extracting default wordlist...\n') + os.system("cd %s && tar xzf %s.tar.gz" % (settings.dict['paths']['directories']['wordlists'], default_wordlist)) + print('\n[*] complete!\n') + + print('\n[*] Retrieving Responder from teh interwebz...\n') + os.system("cd %s && git clone https://github.com/lgandx/Responder.git" % (settings.dict['paths']['directories']['local'])) + print('\n[*] complete!\n') +