Skip to content

Command line reference

The Exploitmatic command: what it takes, what the flags mean, and how to read the result.

The program runs from a command line:

exploitmatic <solution.txt> <target> [flags]

The two required arguments are the solution file and the target. Flags are optional and can appear before or after the arguments.

The arguments

argumentwhat it is
solution.txtthe path to a solution file, the attack to replay
targetthe target address, shaped by the solution’s protocols

The target shape depends on the protocol in the solution. A tcp or tls solution takes a host:port. An http or websocket solution takes a base URL. Host-scope solutions (process, file) ignore the target.

The flags

flagdefaultwhat it does
-flag-pathflag.txtwhere {flag_path} points
-paramemptyoverride the input parameter name
-oob-hostemptyoverride the out-of-band listener host; use a routable address when the target is in a container
-oob-port0override the out-of-band listener port (0 picks a free one)
-timeout10sper-request timeout

The result

The runtime prints one line per step and a result:

probe  PASS  contains "49"
rce    PASS  contains "REPL_RCE_MARKER"
read   PASS  flag
3/3 verified

Then it exits with one of three codes:

exit codewhat it means
0verified: every step’s test passed
1error: bad arguments, invalid solution, or replay failure
2not verified: at least one step failed its test

The result comes from the step tests. It is never stored anywhere, so it always comes from the run itself.

Examples

Heartbleed against a target:

exploitmatic solutions/openssl-heartbleed-mem-leak.txt example.com:8443

An HTTP solution against a target:

exploitmatic solutions/tpl-jinja2-ssti-rce.txt http://example.com/render \
    --param template --flag-path flag.txt

Host-scope steps:

exploitmatic examples/host-exec.txt example.com

Override the input parameter without editing the solution:

exploitmatic solutions/tpl-jinja2-ssti-rce.txt http://example.com/render \
    --param payload

Write attacks down. Verify them.

Download the binary, point it at a target you own, and get a verified result. The corpus is open and the format is plain text.