CatalogGTFOBins

GTFO · Tool

nmap

12 techniquesLinuxGTFOBinsGPL-3.0

file-read

File ReadPrivilege EscalationLinux

The file is actually parsed as a list of hosts/networks, lines are leaked through error messages.

nmap -iL /path/to/input-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
file-read
MITRE
T1005

file-read

File ReadPrivilege EscalationLinux

The file is actually parsed as a list of hosts/networks, lines are leaked through error messages.

nmap -iL /path/to/input-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
file-read
MITRE
T1005

file-read

File ReadLinux

The file is actually parsed as a list of hosts/networks, lines are leaked through error messages.

nmap -iL /path/to/input-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
file-read
MITRE
T1005

file-write

File WritePrivilege EscalationLinux

The payload appears inside the regular nmap output.

nmap -oG=/path/to/output-file DATA
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
file-write
MITRE
T1565

file-write

File WritePrivilege EscalationLinux

The payload appears inside the regular nmap output.

nmap -oG=/path/to/output-file DATA
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
file-write
MITRE
T1565

file-write

File WriteLinux

The payload appears inside the regular nmap output.

nmap -oG=/path/to/output-file DATA
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
file-write
MITRE
T1565

inherit ← lua

Reverse/Bind ShellFile DownloadFile ReadFile WriteExecutionFile UploadPrivilege EscalationLinux

This allows to run Lua code (`...`).

echo '...' >/path/to/temp-file
nmap --script=/path/to/temp-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
inherit, from:lua

inherit ← lua

Reverse/Bind ShellFile DownloadFile ReadFile WriteExecutionFile UploadPrivilege EscalationLinux

This allows to run Lua code (`...`).

echo '...' >/path/to/temp-file
nmap --script=/path/to/temp-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
inherit, from:lua

inherit ← lua

Reverse/Bind ShellFile DownloadFile ReadFile WriteExecutionFile UploadLinux

This allows to run Lua code (`...`).

echo '...' >/path/to/temp-file
nmap --script=/path/to/temp-file
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
inherit, from:lua

shell

ExecutionPrivilege EscalationLinux
nmap --interactive
!/bin/sh
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
shell
MITRE
T1059

shell

ExecutionPrivilege EscalationLinux
nmap --interactive
!/bin/sh
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
suid
Native
shell
MITRE
T1059

shell

ExecutionLinux
nmap --interactive
!/bin/sh
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
shell
MITRE
T1059