mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-08-23 17:44:49 +02:00
Simplify sg
This commit is contained in:
@@ -3,17 +3,8 @@ functions:
|
|||||||
shell:
|
shell:
|
||||||
- description: Commands can be run if the current user's group is specified, therefore no additional permissions are needed.
|
- description: Commands can be run if the current user's group is specified, therefore no additional permissions are needed.
|
||||||
code: |
|
code: |
|
||||||
GROUPNAME=users
|
sg $(id -ng)
|
||||||
sg $GROUPNAME -c "/bin/sh"
|
|
||||||
command:
|
|
||||||
- description: Commands can be run if the current user's group is specified, therefore no additional permissions are needed.
|
|
||||||
code: |
|
|
||||||
COMMAND=whoami
|
|
||||||
GROUPNAME=users
|
|
||||||
sg $GROUPNAME -c $COMMAND
|
|
||||||
sudo:
|
sudo:
|
||||||
- description: Any group can be specified as the user will have root permissions.
|
- code: |
|
||||||
code: |
|
sudo sg root
|
||||||
GROUPNAME=users
|
|
||||||
sudo sg $GROUPNAME -c "/bin/sh"
|
|
||||||
---
|
---
|
||||||
|
Reference in New Issue
Block a user