Awesome
<p align="center"><img src="https://github.com/dhondta/python-sploitkit/raw/main/docs/pages/img/logo.png"></p> <h1 align="center">SploitKit <a href="https://twitter.com/intent/tweet?text=SploitKit%20-%20Devkit%20for%20building%20Metasploit-like%20consoles.%0D%0APython%20library%20for%20easilly%20building%20framework%20consoles%20in%20a%20Metasploit-like%20style%20with%20a%20comprehensive%20API.%0D%0Ahttps%3a%2f%2fgithub%2ecom%2fdhondta%2fpython-sploitkit%0D%0A&hashtags=python,programming,devkit,framework,console,ctftools"><img src="https://img.shields.io/badge/Tweet--lightgrey?logo=twitter&style=social" alt="Tweet" height="20"/></a></h1> <h3 align="center">Make a Metasploit-like console.</h3>This toolkit is aimed to easilly build framework consoles in a Metasploit-like style. It provides a comprehensive interface to define CLI commands, modules and models for its storage database.
pip install sploitkit
:sunglasses: Usage
From this point, main.py
has the following code:
#!/usr/bin/python3
from sploitkit import FrameworkConsole
class MySploitConsole(FrameworkConsole):
#TODO: set your console attributes
pass
if __name__ == '__main__':
MySploitConsole(
"MySploit",
#TODO: configure your console settings
).start()
And you can run it from the terminal:
:ballot_box_with_check: Features
Sploitkit provides a base set of entities (consoles, commands, modules, models).
Multiple base console levels already exist (for detailed descriptions, see the console section):
FrameworkConsole
: the root console, started throughmain.py
ProjectConsole
: the project console, for limiting the workspace to a single project, invoked through theselect [project]
commandModuleConsole
: the module console, started when a module is invoked through theuse [module]
command
This framework provides more than 20 base commands, distributed in sets of functionalities (for detailed descriptions, see the command section):
- general: commands for every level (e.g.
help
,show
,set
) - module: base module-level commands (e.g.
use
,run
,show
) - project: base project-level commands (e.g.
select
,load
,archive
) - recording: recording commands, for managing
.rc
files (record
,replay
) - root: base root-level commands (
help
) - utils: utility commands (
shell
,pydbg
,memory
)
It also holds some base models for its storage:
- users: for user-related data (
User
,Email
,Password
) - systems: for system-related data (
Host
,Port
,Service
) - organization: for organization-related data (
Organization
,Unit
,Employee
) - notes: for linking notes to users, hosts or organizations
No module is provided with the framework as it is case-specific.
:pencil2: Customization
Sploitkit defines multiple types of entities for various purposes. The following entities can be subclassed:
Console
: a new console for a new level of interaction (e.g.ProjectConsole
) ; the "root
" level is owned by theFrameworkConsole
,Console
shall be used to create new subconsoles, to be called by commands from the root console (see an example here for the module-level commands withModuleConsole(Console)
andUse(Command)
)Command
: a new command associated with any or defined consoles using thelevel
attributeModule
: a new module associated to a consoleModel
,BaseModel
,StoreExtension
: respectively for new models, their association tables and store additional methods (e.g.User(Model)
,Email(Model)
,UserEmail(BaseModel)
,UsersStorage(StoreExtension)
)