-
Notifications
You must be signed in to change notification settings - Fork 479
Writing Plugins
IMPORTANT NOTE: The documentation below is obsolete now but will help you get an idea Config files are now under
/profiles
Plugins have an additional "Plugin Group" directory before: i.e. "plugins/web/active" instead of "plugins/active" Documentation contributions welcome!
- Think about the plugin category first: Is it active (sends "attack" traffic to target, i.e. SQL injection test), semi_passive (sends "normal" traffic to target, i.e. http://target.com/) or passive (does not send any traffic to target, i.e. Google search--> site:target.com)?
- Create the plugin on the correct plugin category directory inside plugins/ (i.e. plugins/active/ directory)
- Copy a short plugin from the same category and use it as a template
- Name your plugin following the convention of the other plugins: [email protected]
- Write the plugin (see Basic plugin guide and Framework API instructions below)
- Register the plugin in plugin_order.cfg, this configuration file defines the order in which plugins will be run, if your plugin is fast it's ok to have it at the front but if it is slow please consider puting it at the end
You are not limited to python: You can write code in any language the Linux shell can run (python, perl, bash, php, C, java, whatever)
- Define the command on resources.cfg
Example:
ActiveHTTPMethods_____curl TRACE Check_____curl -i -A '@@@USER_AGENT@@@' -H 'Host: @@@host_name@@@' -X 'TRACE' -k @@@target_url@@@
- Call it via DrawCommandDump:
create plugin file: active/[email protected] Simplest plugin code to call your code example:
def run(PluginInfo):
return Core.mPluginHelper.DrawCommandDump('Test Command', 'Output', Core.mConfig.GetResources('ActiveHTTPMethods'), PluginInfo, "Previous plugin content or whatever you would like to have displayed before your command is run in the report")
Notes:
- The framework will replace the @@@WHATEVER@@@ placeholders with the relevant information
- If your tool/command crashes the framework will not crash and the error will be displayed both in the console and the report
- By default, only the first 25 lines will be displayed on the report, with a link to the full text dump of information your tool/command produced on a separate file. You can alter this setting by passing i.e. 30 as an additional parameter to DrawCommandDump IF YOU REALLY NEED TO
- If the user does Control + C while your command is running, the partial output until that point will be saved by the framework
- By default (i.e. unless you cd to somewhere else) the framework will run the command from the plugin output directory, if your tool/command requires to be run from a different directory you can "cd wherever ; call_my_tool ###PLUGIN_OUTPUT_DIR###". ###PLUGIN_OUTPUT_DIR### is a special place holder that is modified on the fly whenever a new plugin runs, you can pass that as an argument to your tool so that you can still save your output (html or whatever) on the right directory. These files can be browsed from the DrawCommandDump output at the top of execution in the report "Browse Plugin output files"
- resources.cfg This configuration file is at the core of the framework and defines how to build links or run commands.
Example:
ActiveHTTPMethods_____curl TRACE Check_____curl -i -A '@@@USER_AGENT@@@' -H 'Host: @@@host_name@@@' -X 'TRACE' -k @@@target_url@@@
From the example above the format breakdown is as follows:
Resource Group: ActiveHTTPMethods
Resource Name: curl TRACE Check
Command or Link: curl -i -A '@@@USER_AGENT@@@' -H 'Host: @@@host_name@@@' -X 'TRACE' -k @@@target_url@@@
+ Core.mPluginHelper.DrawCommandDump
Example:
PreviousContent = "This is a test"
Content += Core.mPluginHelper.DrawCommandDump('Test Command', 'Output', Core.mConfig.GetResources('ActiveHTTPMethods'), PluginInfo, PreviousContent)
Description:
The best way to call DrawCommandDump is by defining a number of resources with the same resource group on resources.cfg first
This wiki and the OWTF README document contains a lot of information, please take your time and read these instructions carefully.
We provide a CHANGELOG that provides details about almost every OWTF release.
Be sure to read the CONTRIBUTING guidelines before reporting a new OWTF issue or opening a pull request.
If you have any questions about the OWTF usage or want to share some information with the community, please go to one of the following places:
- IRC channel
#owtf(irc.freenode.net)
Google Summer of Code 2018 Guide
Installation
Getting Started
- Define where your tools are
- Run OWASP OWTF
- HTTP Auth Configurations
- Simulation mode
- AUX plugins usage
- FAQ
SET usage
Cookbooks (GSoC 2014 Projects UPDATE)
-
Zest Integration:
- Quick Guide to get started with Zest,ZAP and Replay
- Zest and ZAP API Installation
- Zest and ZAP integration Introduction
- Zest Runner module
- Forward HTTP request to ZAP
- Zest script creation from single HTTP transaction
- Zest script creation from multiple HTTP transactions
- Zest Script Creator module
- HTTP Request Editing Window (Replay Function)
- Zest Script Recording Functionality
- Zest scripting console
Development
-
Plugins:
-
Tests:
Contact