.. / Contributing
Sponsor Fork Star

File format

Feel free to use any file in the _gtfobins/ folder as an example.

Each entry is defined in a YAML file placed in the _gtfobins/ folder and named like the executable (binary or script) it refers, without any extension. The file contains a single YAML document enclosed in delimiters: --- and .... The general structure is the following:

---
comment: 
functions:
  <function>:
    - comment: 
      version: 
      code: 
      contexts:
        <context>:
          comment: 
          code: 
          # …
        # …
    # …
  # …
...

Where <function> and <context> are defined in the _data/functions.yml and _data/contexts.yml files respectively.

The optional version field must outline any particular OS or executable requirements that enable the corresponding function.

When a context specifies a specialized code field, it is used in place of the global value, which can be omitted if all the context specifies a specialization. comment instances can always be omitted, while ultimately there must be one code example for each context, either specialized or inherited.

Functions

Some functions support additional fields:

Function Fields
shell blind
command blind
reverse-shell blind tty listener
bind-shell blind tty connector
file-write binary
file-read binary
upload binary receiver
download binary sender
library-load n/a
inherit from

Where:

Contexts

Some contexts support additional fields:

Context Fields
unprivileged n/a
sudo n/a
suid system
capabilities list

Where:

Aliases

Additionally, it is possible to add aliases with:

---
alias: <gtfobin>
...

In this case, this entry is an alias of an existing <gtfobin>.

Conventions

Placeholders

Use the following placeholder values where appropriate:

Type Value
Shell executable /bin/sh
Command executable /path/to/command
Network port 12345
Data to be written DATA
Whatever value x...x
Input file /path/to/input-file
Output file /path/to/output-file
Temporary file /path/to/temp-file
Shared library file /path/to/lib.so
Victim host domain victim.com
Attacker host domain attacker.com

Some flexibility is expected.

If needed, link to other entries using relative URLs, e.g, [gtfobin](../gtfobin).

Local development

To test local changes, start a local instance with:

make serve

This will spin a Docker container that builds the website, and serves it from http://0.0.0.0:4000. Changes to local files are automatically applied.

Before submitting any pull request, make sure the linter completes successfully:

make vet

This checks both the schema and the format of YAML files, in case of issues in the latter make format can be used to enforce the proper style.

Finally, use make clean to clean everything up.