Package: rm-sec-toolkit
rm-sec-toolkitA toolkit and a framework for python security scripts.Featuresmodule based security frameworkconsole script rm-sec-toolkitproject handlingnotes handling in the projectcustom scripts locationctf flag function for projectseasy to create custom modelsInstallpippipinstallrm-sec-toolkitAt the first start, the rm-sec-toolkit script loads the modules from github, so the first start can take a bit longer.DockerYou can use rm-sec-toolkit with the provided docker image.
Don't forget to use port mapping, if you want to use server modules.dockerrun-t-irame22/rm-sec-toolkitExample with a port scandockerrun-t-irame22/rm-sec-toolkit-mremote/gathering/scanner/tcp_syn_scan--rhosts192.168.0.100--rports1-1000-rServer exampleExpose and map the wished port.
Than map the directory you want to the /app directory.dockerrun-t-i--expose12345\-p12345:12345\-v"$(pwd)":/apprame22/rm-sec-toolkit\-mlocal/server/http_file_server--lport12345-rUsageUsage
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
rm-sec-toolkit

RequiredOptions
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

OptionalOptions
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
--add-a:addaresource{multiplevaluespossible}--create-c:createaresource{multiplevaluespossible}--flag-f:addaflagforctf's{multiplevaluespossible}--help-h:showusage
--interactive-i:usetheinteractivemode(default)--module-m:chooseamodule{multiplevaluespossible}--note-n:addanote{multiplevaluespossible}--version-v:showthecurrentversion{multiplevaluespossible}ExamplesRun a module directlyUse TCP Scanner module and run it instantlyrm-sec-toolkit-mremote/gathering/scanner/tcp_syn_scan--rhosts192.168.0.100--rports22-100-r-muse directly a specified module. Every other options behind it, will passed to the module arguments-rrun the module instantly instead to print the module menu firstCreate a projectrm-sec-toolkit-cprojectAdd something to the project notesrm-sec-toolkit-n-r-ris only used to run it directly, because the add notes option is also a regular moduleAdd a flag for ctf'srm-sec-toolkit-aflag-nuser_flag-fe3b98a4da31a127d4bde6e43033f66ba274cab0eb7eb1c70ec41402bf6273dd8-rServe a directory in the local networkSometimes it's necessary for ctf's to serve some scripts
in the local network to download it on the target machine.
That can easily done with the http_file_server module.rm-sec-toolkit-mlocal/server/http_file_server--lport12345-rRun a script directly without the rm-sec-toolkit consolepython3/usr/local/share/rm-sec-toolkit/modules/remote/gathering/scanner/tcp_syn_scan/tcp_syn_scan.py--rhosts192.168.0.100-r/usr/local/share/rm-sec-toolkitis the default modules locationUpdateYou can update rm-sec-toolkit with the update function in the menu.Start rm-sec-toolkitrm-sec-toolkit

Contents
--------------------(1)-others(C)(2)-local(C)(3)-remote(C)--------------------(u)-checkfornewupdates(q)-quit

Pleasechooseoneelement:With theuoption you can check for updates, update the toolkit or only update the modules.Advanced PossibilitiesCustom script pathsAdd paths to your custom scripts to the~/.rmsectk_custom_pathsfile.echo"~/my_custom_scripts_folder">>~/.rmsectk_custom_pathsYou also can add custom script paths per project.cdyourProjectecho"/any/path/">>.rm_sec_proj/.rmsectk_custom_pathsAny project contains theproject_scriptsfolder. This folder is automatically added to the.rm_sec_proj/.rmsectk_custom_pathsfile. Every module which you put in here, you will find in the rm-sec-toolkit in the root tree underproject_scripts.Write your own scriptCreate a module with the create module commandYou can easily create a new module with the toolkit itself.rm-sec-toolkit-cmodule-aYourName-dAnyDescription-nfancy_module-snfmoduleYou have the following options.--author-a:module'sauthor{valueneeded}--class-name-c:nameoftheclass{valueneeded}{default:CustomModule}--description-d:moduledescription{valueneeded}--name-n:modulename{valueneeded}--short-name-sn:moduleshortname{valueneeded}--super-class-s:superclass{valueneeded}{default:BaseModule}--super-class-path-sp:superclasspath{valueneeded}{default:rmsectkf.core.modules.base_module}Create a module per handCreate a folder with the following contents.init.py (just to mark it as package)rm_module.jsonyour_module.pyrm_module.json{"name":"Your Module Name","description":"Description","version":1.0,"author":"Your Name","module":"your_module.py"}your_module.py#!/usr/bin/env python3fromrmsectkf.core.modules.remote.gathering.scanner.scanner_moduleimportScannerModule'''Your super cool scanner'''classYourScanner(ScannerModule):def__init__(self):ScannerModule.__init__(self)# do init stuff here like define the options you needdefinit_module(self):#define the options you need (rm-options package)self.option_your_option=self.option_handler.create_option("your-option","your super cool option",needs_value=True,required=True)pass# this is the part where you put your codedefrun_module(self):ifsuper().run_module()==False:returnFalse#do some cool stuff hereyour_option_value=self.option_your_option.value# just return your module heredefget_module():returnYourScanner()# start the module if it's executed directlyif__name__=="__main__":module=get_module()module.init_module()module.start_module()ExampleTCP-Syn-Scanner#!/usr/bin/env python3fromrmsectkf.core.modules.remote.gathering.scanner.scanner_moduleimportScannerModulefromrmsectkf.core.network.portimportPortfromscapy.allimport*'''TCP Syn Port Scanner'''classTCPSynScan(ScannerModule):def__init__(self):ScannerModule.__init__(self)definit_module(self):super().init_module()self.option_rhosts.required=Trueself.option_rports.default_value="1-1000"self.option_rports.required=Truedefrun_module(self):ifsuper().run_module()==False:returnFalse# do the scan for each hostforhostinself.option_rhosts.value:print("\nresults for{}:".format(host))forportinself.option_rports.value:ip=IP(dst=host)# host iptcp=TCP(dport=port,flags='S')# specify port and the SYN flag# do the request, and get the responseforrequest,responseinsr(ip/tcp,verbose=0,timeout=0.1)[0]:# check if the response has a tcp layer and check if the flag is a (SYN, ACK) flag.# in that case the port is openifresponse.haslayer(TCP)andresponse.getlayer(TCP).flags==0x12:print("\tport{}is open (possible service:{})".format(port,Port.get_service_with_number(port)))defget_module():returnTCPSynScan()# start the module if it's executed directlyif__name__=="__main__":module=get_module()module.init_module()module.start_module()