-
Notifications
You must be signed in to change notification settings - Fork 788
Exploit templates
The Infection Monkey exploiters are all built in a similar fashion inheriting from the HostExploiter
. This class exposes two interface functions:
-
is_os_supported
- Returns a boolean value on whether the victim is supported by the exploiter (for example, returning False on Windows victims for theSSHExploiter
). This can be sub classed and check the victim more thoroughly, for example checking for open services matching specific versions. -
exploit_host
- Exploits the host, returning a boolean value on success.
A good example of an exploiter is the SSHExploiter
class.
Adding a new exploiter involves the following steps:
-
Adding exploiter's logic. Add a new class subclassing
HostExploiter
orWebRCE
(if it's a web RCE exploit) under the exploit directory. -
Adding exploiter's description for UI. Add your exploiters description to
Configuration schema
. -
Adding exploiter to the list in UI config. Add exploiter's class name to the list of exploiters in
Config
. -
Define exploiter's data processing. Define how exploiter's data should be processed for report and add this process to
report generation pipeline
. -
Define how security report will look like. Define the UI contents of your
report section
. -
(Optional) Add documentation about your exploiter. You can add documentation about what your exploiter does in
documentation framework
.