diff --git a/.travis.yml b/.travis.yml index b2947cb..2d94d0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,10 @@ python: sudo: required before_install: - sudo apt-get update -qq + - sudo apt-get install libsqlite3-dev sudo: required install: - - sudo pip install -r requirements.txt + - sudo python setup.py install script: exit 0 \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..307e70a --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,4 @@ +Version 1.3.1 +============= +- added setup.py +- added changelog diff --git a/lincese.txt b/LINCESE similarity index 94% rename from lincese.txt rename to LINCESE index 84ae58d..618a5a4 100644 --- a/lincese.txt +++ b/LINCESE @@ -1,6 +1,6 @@ #The MIT License (MIT) -#Version 1.1 -#Copyright (c) 2014 Marcos Nesster (mh4x0f) +#Version 1.3 +#Copyright (c) 2014-2016 Marcos Nesster (mh4x0f) #Permission is hereby granted, free of charge, to any person obtaining a copy of #this software and associated documentation files (the "Software"), to deal in #the Software without restriction, including without limitation the rights to diff --git a/README.md b/README.md index c89c9b9..2b66815 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,45 @@ The Botdr4g0n is a security tool for DDOS attack on SSH BOT management for distr ```bash git clone https://github.com/mh4x0f/botdr4g0n.git cd botdr4g0n -pip install -r requirements.txt +python setup.py install +``` + + + +``` +root@local:~# botdr4g0n + _ _ _ _ _ ___ + | |__ ___ | |_ __| |_ __| || | __ _ / _ \ _ __ + | '_ \ / _ \| __/ _` | '__| || |_ / _` | | | | '_ | + | |_) | (_) | || (_| | | |__ _| (_| | |_| | | | | + |_.__/ \___/ \__\__,_|_| |_| \__, |\___/|_| |_| + |___/ + Version: 0.1.3 + Author: Marcos Nesster (@mh4x0f) + +:: help + +[*] Available Commands: +======================= + + Commands Description + -------- ----------- + check test all agents login ssh + clear clean up the line + del delete bot using /all + execute execute command on agents + exit exit the program. + help show this help + interact interact with one/all agents + jobs list/kill jobs running on agents + list list/check/filter list agents on database + register add bot on database + sysinfo print information session on agents + update find newer versions + + +:: + ``` ### Demo diff --git a/botdr4g0n.py b/botdr4g0n.py deleted file mode 100755 index e6f870c..0000000 --- a/botdr4g0n.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python2.7 -from core.consoleUI import Console -from core.utils.color import banner -version = '0.1.3' -author = 'Marcos Nesster (@mh4x0f)' -if __name__ == '__main__': - shell = Console() - shell.cmdloop(banner(version,author)) diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..0e3baa9 --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +from setuptools import setup, find_packages + +setup(name='botdr4g0n', + version='1.3.1', + description='SSH BOT management for distributed attacks', + classifiers=[ + 'License :: MIT License', + 'Programming Language :: Python :: 2.7', + ], + keywords='ssh botssh botnet management', + url='http://github.com/mh4x0f/botdr4g0n', + author='Marcos Nesster @mh4x0f', + author_email='mh4root@gmail.com', + license='MIT', + packages=find_packages(include=[ + 'shell', 'shell.*' + ]), + install_requires=[ + 'tabulate', + 'pexpect', + 'pysqlite', + ], + entry_points = { + 'console_scripts': ['botdr4g0n=shell.botdr4g0n:main',], + }, + include_package_data=True, + zip_safe=False) \ No newline at end of file diff --git a/core/__init__.py b/shell/__init__.py similarity index 100% rename from core/__init__.py rename to shell/__init__.py diff --git a/shell/botdr4g0n.py b/shell/botdr4g0n.py new file mode 100755 index 0000000..b6db85a --- /dev/null +++ b/shell/botdr4g0n.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python2.7 +from os import path,mkdir +from shell.core.consoleUI import Console +from shell.core.utils.color import banner +version = '0.1.3.1' +author = 'Marcos Nesster (@mh4x0f)' +def main(): + folderDB = path.expanduser('~/.botdr4g0n-db') + db_path = path.join(folderDB, 'cme.db') + if not path.exists(folderDB): + mkdir(folderDB) + shell = Console(db_path) + shell.cmdloop(banner(version,author)) diff --git a/core/libs/__init__.py b/shell/core/__init__.py similarity index 100% rename from core/libs/__init__.py rename to shell/core/__init__.py diff --git a/core/consoleUI.py b/shell/core/consoleUI.py similarity index 98% rename from core/consoleUI.py rename to shell/core/consoleUI.py index ec42ba3..11286db 100644 --- a/core/consoleUI.py +++ b/shell/core/consoleUI.py @@ -1,6 +1,5 @@ #The MIT License (MIT) -#Version 1.1 -#Copyright (c) 2014 Marcos Nesster (mh4x0f) +#Copyright (c) 2014-2016 Marcos Nesster (mh4x0f) #Permission is hereby granted, free of charge, to any person obtaining a copy of #this software and associated documentation files (the "Software"), to deal in #the Software without restriction, including without limitation the rights to @@ -23,13 +22,13 @@ from subprocess import check_output from re import search from tabulate import tabulate -import core.libs.secureSSH as SSHConnection -from core.utils import color,funcSQL +import shell.core.libs.secureSSH as SSHConnection +from shell.core.utils import color,funcSQL class Console(cmd.Cmd): - def __init__(self): + def __init__(self,db_path): cmd.Cmd.__init__(self) self.prompt = color.setcolor(':: ', color='Blue') - self.con = sqlite3.connect('data/botdr4g0n.db') + self.con = sqlite3.connect(db_path) self.db = self.con.cursor() self.db.execute(funcSQL.sqlite.createTables) self.settings = {'all' :{},'check' :[],'agents':{}} diff --git a/core/utils/__init__.py b/shell/core/libs/__init__.py similarity index 100% rename from core/utils/__init__.py rename to shell/core/libs/__init__.py diff --git a/core/libs/secureSSH.py b/shell/core/libs/secureSSH.py similarity index 96% rename from core/libs/secureSSH.py rename to shell/core/libs/secureSSH.py index 4a5bfab..f4a3bbf 100644 --- a/core/libs/secureSSH.py +++ b/shell/core/libs/secureSSH.py @@ -1,6 +1,5 @@ #The MIT License (MIT) -#Version 1.1 -#Copyright (c) 2014 Marcos Nesster (mh4x0f) +#Copyright (c) 2014-2016 Marcos Nesster (mh4x0f) #Permission is hereby granted, free of charge, to any person obtaining a copy of #this software and associated documentation files (the "Software"), to deal in #the Software without restriction, including without limitation the rights to @@ -20,8 +19,8 @@ import time from datetime import datetime from pexpect import pxssh -from core.utils.threads import Thread_Jobs -from core.utils.color import setcolor,display_messages +from shell.core.utils.threads import Thread_Jobs +from shell.core.utils.color import setcolor,display_messages class ssh(object): def __init__(self, host,port, user, password,checkconnect=True): self.settings = {'Host': host,'User': user,'Port': port,'Password': password} diff --git a/data/__init__.py b/shell/core/utils/__init__.py similarity index 100% rename from data/__init__.py rename to shell/core/utils/__init__.py diff --git a/core/utils/color.py b/shell/core/utils/color.py similarity index 100% rename from core/utils/color.py rename to shell/core/utils/color.py diff --git a/core/utils/funcSQL.py b/shell/core/utils/funcSQL.py similarity index 100% rename from core/utils/funcSQL.py rename to shell/core/utils/funcSQL.py diff --git a/core/utils/threads.py b/shell/core/utils/threads.py similarity index 89% rename from core/utils/threads.py rename to shell/core/utils/threads.py index a23f258..e5f1c6f 100644 --- a/core/utils/threads.py +++ b/shell/core/utils/threads.py @@ -1,5 +1,5 @@ import threading -from core.utils.color import display_messages +from shell.core.utils.color import display_messages class Thread_Jobs(threading.Thread): def __init__(self,cmd,session): threading.Thread.__init__(self) diff --git a/requirements.txt b/shell/docs/requirements.txt similarity index 100% rename from requirements.txt rename to shell/docs/requirements.txt diff --git a/shell/docs/screenshot_Kali.png b/shell/docs/screenshot_Kali.png new file mode 100644 index 0000000..014818c Binary files /dev/null and b/shell/docs/screenshot_Kali.png differ diff --git a/docs/screenshots.png b/shell/docs/screenshots.png similarity index 100% rename from docs/screenshots.png rename to shell/docs/screenshots.png