From b71dd1461aec62382a591b0a7a3e81ffa6d16932 Mon Sep 17 00:00:00 2001 From: s-h-3-l-l Date: Thu, 5 Sep 2019 16:10:07 +0200 Subject: [PATCH 01/68] katoolin -> katoolin3 --- .gitignore | 58 +- Changelog.txt | 7 - LICENCE => LICENSE | 0 README.md | 60 +- TODO | 3 + core/__init__.py | 0 core/categories.py | 91 ---- core/gear.py | 237 -------- katoolin.py | 1302 -------------------------------------------- katoolin3.py | 802 +++++++++++++++++++++++++++ 10 files changed, 826 insertions(+), 1734 deletions(-) delete mode 100644 Changelog.txt rename LICENCE => LICENSE (100%) create mode 100644 TODO delete mode 100644 core/__init__.py delete mode 100644 core/categories.py delete mode 100644 core/gear.py delete mode 100644 katoolin.py create mode 100755 katoolin3.py diff --git a/.gitignore b/.gitignore index ba74660..ba0430d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,57 +1 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ +__pycache__/ \ No newline at end of file diff --git a/Changelog.txt b/Changelog.txt deleted file mode 100644 index 12e249f..0000000 --- a/Changelog.txt +++ /dev/null @@ -1,7 +0,0 @@ ----------------------------------------------26 / 08 / 2015---------------------------------------------------- - -The problem of uppercases characters in the installation script has been solved . - ----------------------------------------------19 / 04 / 2016---------------------------------------------------- - -Removed Inguma from the menu to bypass issue with installation (By Jayson Grace : https://github.com/l50) diff --git a/LICENCE b/LICENSE similarity index 100% rename from LICENCE rename to LICENSE diff --git a/README.md b/README.md index 92e19cc..0bb2a22 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,27 @@ -![katoolin](https://cloud.githubusercontent.com/assets/8742190/9415562/83397aae-4840-11e5-8f72-28dfffcc70a9.png) -# katoolin -Automatically install all Kali linux tools +# katoolin3 +Katoolin3 brings all programs available in Kali Linux to Debian and Ubuntu. -# Features -- Add Kali linux repositories -- Remove kali linux repositories -- Install Kali linux tools +### Description +This program is a port of [katoolin](https://github.com/LionSec/katoolin) from [LionSec](https://github.com/LionSec) to python3. It has several improvements over katoolin such as +- __Improved handling of missing packages__ +The old katoolin breaks if a package isnt available in the repositories anymore. katoolin3 simply removes those packages from its package list. -# Requirements -- Python 2.7 -- An operating system (tested on Ubuntu) +- __Easier maintenance of Kalis packages__ +The old katoolin makes it difficult to add new packages to the package list due to the way katoolin was programmed. This has been fixed by katoolin3. -# Installation -- sudo su -- git clone https://github.com/LionSec/katoolin.git && cp katoolin/katoolin.py /usr/bin/katoolin -- chmod +x /usr/bin/katoolin -- sudo katoolin +- __Better utilization of the APT ecosystem__ +The old katoolin did potentially dangerous operations such as writing/modifying/*deleting* important configuration files. This has also been fixed. -# Video -https://www.youtube.com/watch?v=8VxCWVoZEEE +- __Cleaner code__ +Due to poor code quality katoolin was unmaintainable and had to be rewritten from scratch. katoolin3 aims to be more readable and easier to maintain. -# Usage -- Typing the number of a tool will install it -- Typing 0 will install all Kali Linux tools -- back : Go back -- gohome : Go to the main menu -- By installing armitage , you will install metasploit +### Requirements +- aptitude as a package manager +- python3 +- root privileges -# Warning -Before updating your system , please remove all Kali-linux repositories to avoid any kind of problem . +### Usage +Just start the program and follow the instructions ;) -# I have some questions! - -Please visit https://github.com/LionSec/katoolin/issues - -# Donations -- Paypal : https://www.paypal.me/lionsec -- skrill : informatica98es@gmail.com - - -# Contact -- Website : https://neodrix.com -- Youtube : https://youtube.com/inf98es -- Facebook : https://facebook.com/in98 -- Twitter: @LionSec1 -- Email : informatica98es@gmail.com +### Something doesnt work? +Hit me up on [Github](https://github.com/s-h-3-l-l/katoolin). \ No newline at end of file diff --git a/TODO b/TODO new file mode 100644 index 0000000..28bdf38 --- /dev/null +++ b/TODO @@ -0,0 +1,3 @@ +more colorful output +check into apt_preferences(5) +add installation \ No newline at end of file diff --git a/core/__init__.py b/core/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/core/categories.py b/core/categories.py deleted file mode 100644 index 219353c..0000000 --- a/core/categories.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -categories = { - 1:['information_gathering', - ['acccheck', 'ace-voip', 'amap', 'automater', 'braa', 'casefile', 'cdpsnarf', 'cisco-torch', - 'cookie-cadger', 'copy-router-config', 'dmitry', 'dnmap', 'dnsenum', 'dnsmap', 'dnsrecon', - 'dnstracer', 'dnswalk', 'dotdotpwn', 'enum4linux', 'enumiax', 'fierce', 'firewalk', 'fragroute', - 'fragrouter', 'ghost-phisher', 'golismero', 'goofile', 'xplico', 'hping3', 'intrace', 'ismtp', - 'lbd', 'maltego-teeth', 'masscan', 'metagoofil', 'miranda', 'nbtscan-unixwiz', 'nmap', 'p0f', - 'parsero', 'recon-ng', 'set', 'smtp-user-enum', 'snmpcheck', 'sslcaudit', 'sslsplit', 'sslstrip', - 'sslyze', 'thc-ipv6', 'theharvester', 'tlssled', 'twofi', 'urlcrazy','wireshark', 'wol-e'] - ], - - 2:['vulnerability_analysis', - ['bbqsql', 'bed', 'cisco-auditing-tool', 'cisco-global-exploiter', 'cisco-ocs', 'cisco-torch', - 'copy-router-config', 'doona', 'dotdotpwn', 'greenbone-security-assistant', 'hexorbase', 'jsql', - 'lynis', 'nmap', 'ohrwurm', 'openvas-administrator', 'openvas-cli', 'openvas-manager', 'openvas-scanner', - 'oscanner', 'powerfuzzer', 'sfuzz', 'sidguesser', 'siparmyknife', 'sqlmap', 'sqlninja', 'sqlsus', - 'thc-ipv6', 'tnscmd10g', 'unix-privesc-check', 'yersinia'] - ], - - 3:['wireless_attacks', - ['aircrack-ng', 'asleap', 'bluelog', 'blueranger', 'bluesnarfer', 'bully', 'cowpatty', 'crackle', - 'eapmd5pass', 'fern-wifi-cracker', 'ghost-phisher', 'giskismet', 'gqrx', 'hostapd-wpe', 'kalibrate-rtl', - 'killerbee', 'kismet', 'mdk3', 'mfcuk', 'mfoc', 'mfterm', 'multimon-ng', 'pixiewps', 'reaver', 'redfang', - 'rtlsdr-scanner', 'spooftooph', 'wifi-honey', 'wifiphisher', 'wifitap', 'wifite'] - ], - - 4:['web_applications', - ['apache-users', 'arachni', 'bbqsql', 'blindelephant', 'burpsuite', 'cutycapt', 'davtest', 'deblaze', - 'dirb', 'dirbuster', 'fimap', 'funkload', 'gobuster', 'grabber', 'jboss-autopwn', 'joomscan', 'jsql', - 'maltego-teeth', 'padbuster', 'paros', 'parsero', 'plecost', 'powerfuzzer', 'proxystrike', 'recon-ng', - 'skipfish', 'sqlmap', 'sqlninja', 'sqlsus', 'ua-tester', 'uniscan', 'vega', 'w3af', 'webscarab', - 'websploit', 'wfuzz', 'wpscan', 'xsser', 'zaproxy'] - ], - - 5:['sniffing_spoofing', - ['burpsuite', 'dnschef', 'fiked', 'hamster-sidejack', 'hexinject', 'iaxflood', 'inviteflood', 'ismtp', - 'isr-evilgrade', 'mitmproxy', 'ohrwurm', 'protos-sip', 'rebind', 'responder', 'rtpbreak', 'rtpinsertsound', - 'rtpmixsound', 'sctpscan', 'siparmyknife', 'sipp', 'sipvicious', 'sniffjoke', 'sslsplit', 'sslstrip', - 'thc-ipv6', 'voiphopper', 'webscarab', 'wifi-honey', 'wireshark', 'xspy', 'yersinia', 'zaproxy'] - ], - - 6:['maintaining_access', - ['cryptcat', 'cymothoa', 'dbd', 'dns2tcp', 'http-tunnel', 'httptunnel', 'intersect', 'nishang', 'polenum', - 'powersploit', 'pwnat', 'ridenum', 'sbd', 'u3-pwn', 'webshells', 'weevely', 'winexe'] - ], - - 7:['reporting_tools', - ['casefile', 'cutycapt', 'dos2unix', 'dradis', 'keepnote', 'magictree', 'metagoofil', 'nipper-ng', 'pipal'] - ], - - 8:['exploitation_tools', - ['armitage', 'backdoor-factory', 'beef-xss', 'cisco-auditing-tool', 'cisco-global-exploiter', 'cisco-ocs', - 'cisco-torch', 'crackle', 'exploitdb', 'jboss-autopwn', 'linux-exploit-suggester', 'maltego-teeth', 'set', - 'shellnoob', 'sqlmap', 'thc-ipv6', 'yersinia'] - ], - - 9:['forensics_tools', - ['binwalk', 'bulk-extractor', 'chntpw', 'cuckoo', 'dc3dd', 'ddrescue', 'python-distorm3', 'dumpzilla', - 'volatility', 'xplico', 'foremost', 'galleta', 'guymager', 'iphone-backup-analyzer', 'p0f', 'pdf-parser', - 'pdfid', 'pdgmail', 'peepdf', 'extundelete'] - ], - - 10:['stress_testing', - ['dhcpig', 'funkload', 'iaxflood', 'inviteflood', 'ipv6-toolkit', 'mdk3', 'reaver', 'rtpflood', - 'slowhttptest', 't50', 'termineter', 'thc-ipv6', 'thc-ssl-dos'] - ], - - 11:['password_attacks', - ['acccheck', 'burpsuite', 'cewl', 'chntpw', 'cisco-auditing-tool', 'cmospwd', 'creddump', 'crunch', - 'findmyhash', 'gpp-decrypt', 'hash-identifier', 'hexorbase', 'hydra', 'john', 'johnny', 'keimpx', - 'maltego-teeth', 'maskprocessor', 'multiforcer', 'ncrack', 'oclgausscrack', 'pack', 'patator', 'polenum', - 'rainbowcrack', 'rcracki-mt', 'rsmangler', 'statsprocessor', 'thc-pptp-bruter', 'truecrack', 'webscarab', - 'wordlists', 'zaproxy'] - ], - - 12:['reverse_engineering', - ['apktool', 'dex2jar', 'python-distorm3', 'edb-debugger', 'jad', 'javasnoop', 'smali', 'valgrind', 'yara'] - ], - - 13:['hardware_hacking', - [ 'android-sdk', 'apktool', 'arduino', 'dex2jar', 'sakis3g', 'smali'] - ], - - 14:['extra', - ['kali-linux', 'kali-linux-full', 'kali-linux-all', 'kali-linux-top10', 'kali-linux-forensic', - 'kali-linux-gpu', 'kali-linux-pwtools', 'kali-linux-rfid', 'kali-linux-sdr', 'kali-linux-voip', - 'kali-linux-web', 'kali-linux-wireless', 'squid3'] - ] -} diff --git a/core/gear.py b/core/gear.py deleted file mode 100644 index 0dc1e42..0000000 --- a/core/gear.py +++ /dev/null @@ -1,237 +0,0 @@ -#!/usr/bin/env python -from core.categories import * -import sys, os - -# colors -red = "\033[1;31m" -green = "\033[1;32m" -yellow = "\033[33m" -cyan = "\033[1;36m" -reset = "\033[0m" - -# option menu -menu_list = { - "1":"show_categories", - "2":"update", - "3":"help", - "4":"exit", - "show":"show_categories", - "clear":"clean_screen", - "update":"update", - "help":"help", - "exit":"exit", -} - -menu_list_set = { - "load":"load_category", - "search":"search_tool" -} - -def load(fuction, param=False): - """ - If the function exists, it is loaded - """ - if param == False: - globals()[fuction]() - else: - globals()[fuction](param) - -def show_categories(): - """ - Displays the categories available in the 'categories' dictionary of the core/categories.py file - """ - print "\n%s:: Categories:%s\n" %(green, reset) - for name in categories.items(): - category = name[1][0] - category = format(category) - if name[0]%2 != 0: - print " "+str(name[0]).rjust(2) + ")", category.ljust(23)[:23], - else: - print " "+str(name[0]).rjust(2) + ")", category - print " " - -def load_category(key): - """ - When loading a category you can install one or more tools of that category - """ - if int(key) in categories.keys(): - os.system('clear') - category = categories[int(key)][0] - category = format(category) - print green + ":: " + category + reset + "\n" - show_tools(categories[int(key)][1]) - tools = categories[int(key)][1] - site = categories[int(key)][0] - action = False - while action == False: - try: - option = raw_input(": katoolin (%s%s%s) > " %(yellow, site, reset)) - except KeyboardInterrupt: - delete_repository() - print "..."; break - try: - if option == 'back': - delete_repository() - break - elif option == 'clear': - os.system('clear') - elif option == 'show': - show_tools(categories[int(key)][1]) - elif option == 'help': - help(True) - elif option == '99': - add_repository() - for tool in tools: - install_tool = "apt install -y " + tool - os.system(install_tool) - elif int(option) in range(1,len(tools)+1): - add_repository() - install_tool = "apt install -y " + tools[int(option)-1] - os.system(install_tool) - except: - pass - else: - print red + "E: The command is invalid!" + reset - -def search_tool(tool): - """ - Shows in which category the tool you are looking for is available - """ - print ": Find " + yellow + tool + reset - print ": Available in:" - for lists in categories.items(): - tools = lists[1][1] - category = lists[1][0] - category = format(category) - if tool in tools: - print " [%s+%s] %s" %(green, reset, category) - -def show_tools(tools): - """ - Show all tools in the loaded category - """ - for tool in enumerate(tools): - if tool[0]%2 == 0: - print " "+str(tool[0]+1).rjust(2) + ")", tool[1].ljust(23)[:23], - else: - print " "+str(tool[0]+1).rjust(2) + ")", tool[1] - print "\n 99) ALL" - -def add_repository(): - """ - The Kali Linux repository is added in '/etc/apt/sources.list.d /' - """ - if os.path.exists("/etc/apt/sources.list.d/katoolin.list"): - add_key() - else: - try: - f = open("/etc/apt/sources.list.d/katoolin.list", "wb") - f.write("#Katoolin\ndeb http://http.kali.org/kali kali-rolling main contrib non-free\n# For source package access, uncomment the following line\n# deb-src http://http.kali.org/kali kali-rolling main contrib non-free\n") - f.close() - print green + "\n[+] Add repository\n" + reset - add_key() - except IOError: - print red+"E: Please run as root"+reset - sys.exit() - -def delete_repository(): - """ - The Kali Linux repository is removed from '/etc/apt/sources.list.d/' - """ - repository = "/etc/apt/sources.list.d/katoolin.list" - if os.path.exists(repository): - os.remove(repository) - print green + "\n[+] Repository deleted\n" + reset - -def add_key(): - """ - Repository keyserver is added - """ - tmp_key = "/tmp/key_katoolin.txt" - if os.path.exists(tmp_key): - pass - else: - os.system("apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6") - f = open(tmp_key, "wb") - f.write("katoolin\n") - f.close() - print green + "\n[+] Add keyserver\n" + reset - os.system('apt-get update -o Dir::Etc::sourcelist="sources.list.d/katoolin.list" -o Dir::Etc::sourceparts="-" -o apt::Get::List-Cleanup="0"') - print green + "\n[+] Update\n" + reset - -def banner(): - version = "v1.3b" - tools = num_tools() - options = """ - 1) View Categories - 2) Update Katoolin - 3) Help - - 4) Exit - """ - print """ - $$\ $$\ $$\ $$\ $$\ - $$ | $$ | $$ | $$ |\__| - $$ |$$ / $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$ |$$\ $$$$$$$\ - $$$$$ / \____$$\ \_$$ _| $$ __$$\ $$ __$$\ $$ |$$ |$$ __$$\ - $$ $$< $$$$$$$ | %sKali linux tools installer%s |$$ |$$ |$$ | $$ |%s - $$ |\$$\ $$ __$$ | $$ |$$\ $$ | $$ |$$ | $$ |$$ |$$ |$$ | $$ | - $$ | \$$\ \$$$$$$$ | \$$$$ |\$$$$$$ |\$$$$$$ |$$ |$$ |$$ | $$ | - \__| \__| \_______| \____/ \______/ \______/ \__|\__|\__| \__| %s%s - - %s+ -- -- +=[ Original project: https://github.com/LionSec/katoolin | LionSec - + -- -- +=[ %s Tools%s""" %(cyan,reset,cyan,version,reset,green,tools,reset) - print options - -def update(): - """ - Update 'katoolin' with: git pull - """ - try: - os.system('git pull') - print yellow + "W: Please restart katoolin" + reset - except: - print red + "E: can't start update please use "+reset - -def help(x=False): - """ - Displays tool help - """ - if x != True: - print """: load= Load category -: search= Find tool -: clear Clean screen -: 1, show Show categories -: 2, update Update katoolin (git pull) -: 3, help Show help -: 4, exit Exit katoolin""" - else: - print """: