From 70eca64eb28d8be44a29a8443a54aeda6ebdfdc8 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 7 Jan 2020 21:01:38 +0100 Subject: [PATCH] Move the SUID clarification to the function descriptions --- _data/functions.yml | 10 ++++++++-- _layouts/bin.html | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/_data/functions.yml b/_data/functions.yml index d5fe8a7..e5561ec 100644 --- a/_data/functions.yml +++ b/_data/functions.yml @@ -47,7 +47,10 @@ library-load: suid: label: SUID - description: It runs with the SUID bit set and may be exploited to access the file system, escalate or maintain access with elevated privileges working as a SUID backdoor. If it is used to run `sh -p`, omit the `-p` argument on systems like Debian (<= Stretch) that allow the default `sh` shell to run with SUID privileges. + description: | + It runs with the SUID bit set and may be exploited to access the file system, escalate or maintain access with elevated privileges working as a SUID backdoor. If it is used to run `sh -p`, omit the `-p` argument on systems like Debian (<= Stretch) that allow the default `sh` shell to run with SUID privileges. + + This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To exploit an existing SUID binary skip the first command and run the program using its original path. sudo: label: Sudo @@ -59,4 +62,7 @@ capabilities: limited-suid: label: Limited SUID - description: It runs with the SUID bit set and may be exploited to access the file system, escalate or maintain access with elevated privileges working as a SUID backdoor. If it is used to run commands it only works on systems like Debian (<= Stretch) that allow the default `sh` shell to run with SUID privileges. + description: | + It runs with the SUID bit set and may be exploited to access the file system, escalate or maintain access with elevated privileges working as a SUID backdoor. If it is used to run commands it only works on systems like Debian (<= Stretch) that allow the default `sh` shell to run with SUID privileges. + + This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. To exploit an existing SUID binary skip the first command and run the program using its original path. diff --git a/_layouts/bin.html b/_layouts/bin.html index 2a44ce9..79d95c0 100644 --- a/_layouts/bin.html +++ b/_layouts/bin.html @@ -24,8 +24,6 @@ layout: common {% capture code %} {%- if function_id == 'suid' or function_id == 'limited-suid' %} -# This example creates a local SUID copy of the binary and runs it to maintain elevated privileges. -# To exploit an existing SUID binary instead, skip the following command and run it using its full path. sudo sh -c 'cp $(which {{ bin_name }}) .; chmod +s ./{{ bin_name }}' {% endif %} {%- if function_id == 'capabilities' %}