mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Use id as non-interactive command in php
This commit is contained in:
parent
bb001f1b8a
commit
d937f2ba52
@ -2,22 +2,22 @@
|
||||
functions:
|
||||
execute-non-interactive:
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r 'system(getenv("CMD"));'
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r 'passthru(getenv("CMD"));'
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r 'print(shell_exec(getenv("CMD")));'
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r '$r=array(); exec(getenv("CMD"), $r); print(join(\"\\n\",$r));'
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r '$h=@popen(getenv("CMD"),"r"); if($h){ while(!feof($h)) echo(fread($h,4096)); pclose($h); }'
|
||||
- code: |
|
||||
export CMD="ls /"
|
||||
export CMD="id"
|
||||
php -r '$p = array(array("pipe","r"),array("pipe","w"),array("pipe", "w"));$h = @proc_open(getenv("CMD"), $p, $pipes);if($h&&$pipes){while(!feof($pipes[1])) echo(fread($pipes[1],4096));while(!feof($pipes[2])) echo(fread($pipes[2],4096));fclose($pipes[0]);fclose($pipes[1]);fclose($pipes[2]);proc_close($h);}'
|
||||
sudo-enabled:
|
||||
- code: |
|
||||
|
Loading…
Reference in New Issue
Block a user