diff --git a/etc/checksum/md5sum.md5 b/etc/checksum/md5sum.md5 index 179d024..2ffb334 100644 --- a/etc/checksum/md5sum.md5 +++ b/etc/checksum/md5sum.md5 @@ -3,6 +3,7 @@ 6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh 155c9482f690f1482f324a7ffd8b8098 ./etc/scripts/fix_pie.sh 0e435c641bc636ac0b3d54e032d9cf6a ./etc/scripts/install_nmap.sh +74d7bee13890a9dd279bb857591647ce ./etc/scripts/reinstall.sh 66b11aa388ea909de7b212341259a318 ./etc/auths/git_auth 8f686b05c5c5dfc02f0fcaa7ebc8677c ./etc/auths/whois_auth d3ad89703575a712a0aeead2b176d8c5 ./etc/html/clickjacking_test_page.html @@ -57,16 +58,16 @@ d41d8cd98f00b204e9800998ecf8427e ./lib/attacks/__init__.py aa7268a8f085734a6c577c86440f7a1b ./lib/attacks/sqlmap_scan/sqlmap_opts.py d41d8cd98f00b204e9800998ecf8427e ./lib/attacks/whois_lookup/__init__.py 9b2bd4904ec2385eb38a3b6cd59dbc99 ./lib/attacks/whois_lookup/whois.py -3917cdce61918f3992fc682105367ce8 ./lib/attacks/admin_panel_finder/__init__.py +6b9ba948ca5ba51ef3d8423e738c41ba ./lib/attacks/admin_panel_finder/__init__.py ceb1b278b0861c976dfecc91cb64e53d ./lib/attacks/xss_scan/__init__.py 27358f26bda30d7356143c3ea1fa99c5 ./lib/attacks/nmap_scan/__init__.py 21faf4679cdeaa731029a48f8963d6e7 ./lib/attacks/nmap_scan/nmap_opts.py 1faa2b5dfad6eb538bbfe42942d2a9da ./lib/core/errors.py d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py -f51a7a19c3c9c340f5adcaca7cfc2e09 ./lib/core/settings.py +4b620b0aa18bc65fa95ec648bc70e1fa ./lib/core/settings.py f8dca2fa45acb95f7081546bf6aec025 ./lib/header_check/__init__.py d41d8cd98f00b204e9800998ecf8427e ./var/google_search/__init__.py -5974e78ce4035d14005fd1a00a3655d2 ./var/google_search/search.py +1c21d355668d4f503a1c4bc41b9f5124 ./var/google_search/search.py d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py d41d8cd98f00b204e9800998ecf8427e ./var/auto_issue/__init__.py dadca85c232153021ba9ff253d8ee1d9 ./var/auto_issue/github.py diff --git a/etc/scripts/reinstall.sh b/etc/scripts/reinstall.sh new file mode 100644 index 0000000..9f994e5 --- /dev/null +++ b/etc/scripts/reinstall.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +for pid in $(ps -ef | grep "firefox" | awk '{print $2}'); do kill -9 ${pid}; done > /dev/null 2>&1 +mv ~/.mozilla ~/.mozilla.old > /dev/null 2>&1 +sudo apt-get update > /dev/null 2>&1 +sudo apt-get --purge --reinstall --assume-yes install firefox=56.0 > /dev/null 2>&1 +sudo pip2 install selenium -U diff --git a/lib/attacks/admin_panel_finder/__init__.py b/lib/attacks/admin_panel_finder/__init__.py index 7b95d60..62f5ef2 100644 --- a/lib/attacks/admin_panel_finder/__init__.py +++ b/lib/attacks/admin_panel_finder/__init__.py @@ -76,10 +76,11 @@ def check_for_externals(url, data_sep="-" * 30, **kwargs): lib.core.settings.logger.info(lib.core.settings.set_color( "found a sitemap, saving to file...", level=25 )) - return lib.core.settings.write_to_log_file(data, lib.core.settings.SITEMAP_FILE_LOG_PATH, - "{}-sitemap.xml".format( - lib.core.settings.replace_http(url)) - ) + return lib.core.settings.write_to_log_file( + data, lib.core.settings.SITEMAP_FILE_LOG_PATH, "{}-sitemap.xml".format( + lib.core.settings.replace_http(url) + ) + ) def check_for_admin_page(url, exts, protocol="http://", **kwargs): @@ -164,9 +165,10 @@ def check_for_admin_page(url, exts, protocol="http://", **kwargs): lib.core.settings.logger.warning(lib.core.settings.set_color( "only writing successful connections to log file...", level=30 )) - lib.core.settings.write_to_log_file(list(connections), lib.core.settings.ADMIN_PAGE_FILE_PATH, "{}-admin-page.log".format( - lib.core.settings.replace_http(url) - )) + if len(connections) > 0: + lib.core.settings.write_to_log_file(list(connections), lib.core.settings.ADMIN_PAGE_FILE_PATH, "{}-admin-page.log".format( + lib.core.settings.replace_http(url) + )) def __load_extensions(filename="{}/etc/text_files/link_ext.txt"): diff --git a/lib/core/settings.py b/lib/core/settings.py index f8c38d4..c6113ac 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -55,7 +55,7 @@ CLONE = "https://github.com/ekultek/zeus-scanner.git" ISSUE_LINK = "https://github.com/ekultek/zeus-scanner/issues" # current version -VERSION = "1.2.18.{}".format(PATCH_ID) +VERSION = "1.2.19.{}".format(PATCH_ID) # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} @@ -117,6 +117,9 @@ LAUNCH_SQLMAP_API_TOOL = "{}/etc/scripts/launch_sqlmap_api.sh".format(os.getcwd( # path to nmap installer NMAP_INSTALLER_TOOL = "{}/etc/scripts/install_nmap.sh".format(os.getcwd()) +# perform a reinstallation of some dependencies +REINSTALL_TOOL = "{}/etc/scripts/reinstall.sh".format(os.getcwd()) + # clickjacking HTML test page path CLICKJACKING_TEST_PAGE_PATH = "{}/etc/html/clickjacking_test_page.html".format(os.getcwd()) diff --git a/var/google_search/search.py b/var/google_search/search.py index a0f551c..ea30539 100644 --- a/var/google_search/search.py +++ b/var/google_search/search.py @@ -48,7 +48,8 @@ from lib.core.settings import ( NO_RESULTS_REGEX, parse_blacklist, BLACKLIST_FILE_PATH, - calculate_success + calculate_success, + REINSTALL_TOOL ) try: @@ -482,6 +483,24 @@ def parse_search_results(query, url_to_search, verbose=False, **kwargs): "you will need to remove the geckodriver from /usr/bin and reinstall it...", level=50 )) shutdown() + elif "Unable to find a matching set of capabilities" in str(e): + logger.fatal(set_color( + "it appears that firefox, selenium, and geckodriver are not playing nice with one another...", level=50 + )) + question = prompt( + "would you like to attempt to resolve this issue automatically", opts="yN" + ) + if question.lower().startswith("y"): + reinstall_command = shlex.split("sudo sh {}".format(REINSTALL_TOOL)) + subprocess.call(reinstall_command) + rewrite_all_paths() + shutdown() + else: + logger.fatal(set_color( + "you will need to reinstall firefox to a later version, update selenium, and reinstall the " + "geckodriver to continue using Zeus...", level=50 + )) + shutdown() else: logger.exception(set_color( "{} failed to gather the URL from search engine, caught exception '{}' "