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/spec/support/acceptance/session/java.rb
Views: 11623
1
module Acceptance::Session
2
JAVA_METERPRETER = {
3
payloads: [
4
{
5
name: "java/meterpreter/reverse_tcp",
6
extension: ".jar",
7
platforms: [:osx, :linux, :windows],
8
execute_cmd: ["java", "-jar", "${payload_path}"],
9
generate_options: {
10
'-f': "jar"
11
},
12
datastore: {
13
global: {},
14
module: {
15
spawn: 0
16
}
17
}
18
}
19
],
20
module_tests: [
21
{
22
name: "post/test/services",
23
platforms: [
24
[
25
:linux,
26
{
27
skip: true,
28
reason: "Windows only test"
29
}
30
],
31
[
32
:osx,
33
{
34
skip: true,
35
reason: "Windows only test"
36
}
37
],
38
:windows
39
],
40
skipped: false,
41
lines: {
42
linux: {
43
known_failures: []
44
},
45
osx: {
46
known_failures: []
47
},
48
windows: {
49
known_failures: [
50
"[-] [should start W32Time] FAILED: should start W32Time",
51
"[-] [should start W32Time] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
52
"[-] [should stop W32Time] FAILED: should stop W32Time",
53
"[-] [should stop W32Time] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
54
"[-] [should create a service testes] FAILED: should create a service testes",
55
"[-] [should create a service testes] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
56
"[-] [should return info on the newly-created service testes] Could not retrieve the start type of the testes service!",
57
"[-] FAILED: should return info on the newly-created service testes",
58
"[-] [should delete the new service testes] FAILED: should delete the new service testes",
59
"[-] [should delete the new service testes] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
60
"[-] [should return status on a given service winmgmt] FAILED: should return status on a given service winmgmt",
61
"[-] [should return status on a given service winmgmt] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
62
"[-] [should modify config on a given service] FAILED: should modify config on a given service",
63
"[-] [should modify config on a given service] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
64
"[-] [should start a disabled service] FAILED: should start a disabled service",
65
"[-] [should start a disabled service] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
66
"[-] [should restart a started service W32Time] FAILED: should restart a started service W32Time",
67
"[-] [should restart a started service W32Time] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
68
"[-] [should raise a runtime exception if no access to service] FAILED: should raise a runtime exception if no access to service",
69
"[-] [should raise a runtime exception if no access to service] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)",
70
"[-] [should raise a runtime exception if services doesnt exist] FAILED: should raise a runtime exception if services doesnt exist",
71
"[-] [should raise a runtime exception if services doesnt exist] Exception: Rex::Post::Meterpreter::RequestError: stdapi_railgun_api: Operation failed: The command is not supported by this Meterpreter type (java/windows)"
72
]
73
}
74
}
75
},
76
{
77
name: "post/test/cmd_exec",
78
platforms: [:linux, :osx, :windows],
79
skipped: false,
80
lines: {
81
linux: {
82
known_failures: []
83
},
84
osx: {
85
known_failures: []
86
},
87
windows: {
88
known_failures: []
89
}
90
}
91
},
92
{
93
name: "post/test/extapi",
94
platforms: [:linux, :osx, :windows],
95
skipped: false,
96
lines: {
97
linux: {
98
known_failures: []
99
},
100
osx: {
101
known_failures: []
102
},
103
windows: {
104
known_failures: []
105
}
106
}
107
},
108
{
109
name: "post/test/file",
110
platforms: [:linux, :osx, :windows],
111
skipped: false,
112
lines: {
113
linux: {
114
known_failures: []
115
},
116
osx: {
117
known_failures: []
118
},
119
windows: {
120
known_failures: [
121
"[-] [should delete a symbolic link target] failed to create the symbolic link"
122
]
123
}
124
}
125
},
126
{
127
name: "post/test/get_env",
128
platforms: [:linux, :osx, :windows],
129
skipped: false,
130
lines: {
131
linux: {
132
known_failures: []
133
},
134
osx: {
135
known_failures: []
136
},
137
windows: {
138
known_failures: []
139
}
140
}
141
},
142
{
143
name: "post/test/meterpreter",
144
platforms: [:linux, :osx, :windows],
145
skipped: false,
146
lines: {
147
linux: {
148
known_failures: []
149
},
150
osx: {
151
known_failures: []
152
},
153
windows: {
154
known_failures: []
155
}
156
}
157
},
158
{
159
name: "post/test/railgun",
160
platforms: [:linux, :osx, :windows],
161
skipped: false,
162
lines: {
163
linux: {
164
known_failures: []
165
},
166
osx: {
167
known_failures: []
168
},
169
windows: {
170
known_failures: []
171
}
172
}
173
},
174
{
175
name: "post/test/railgun_reverse_lookups",
176
platforms: [:linux, :osx, :windows],
177
skipped: false,
178
lines: {
179
linux: {
180
known_failures: []
181
},
182
osx: {
183
known_failures: []
184
},
185
windows: {
186
known_failures: []
187
}
188
}
189
},
190
{
191
name: "post/test/registry",
192
platforms: [
193
[
194
:linux,
195
{
196
skip: true,
197
reason: "Windows only test"
198
}
199
],
200
[
201
:osx,
202
{
203
skip: true,
204
reason: "Windows only test"
205
}
206
],
207
:windows
208
],
209
skipped: false,
210
lines: {
211
linux: {
212
known_failures: []
213
},
214
osx: {
215
known_failures: []
216
},
217
windows: {
218
known_failures: [
219
"[-] FAILED: should write REG_EXPAND_SZ values",
220
"[-] FAILED: should write REG_SZ unicode values"
221
]
222
}
223
}
224
},
225
{
226
name: "post/test/search",
227
platforms: [:linux, :osx, :windows],
228
skipped: false,
229
lines: {
230
linux: {
231
known_failures: []
232
},
233
osx: {
234
known_failures: []
235
},
236
windows: {
237
known_failures: []
238
}
239
}
240
},
241
{
242
name: "post/test/unix",
243
platforms: [
244
:linux,
245
:osx,
246
[
247
:windows,
248
{
249
skip: true,
250
reason: "Unix only test"
251
}
252
]
253
],
254
skipped: false,
255
lines: {
256
linux: {
257
known_failures: []
258
},
259
osx: {
260
known_failures: []
261
},
262
windows: {
263
known_failures: []
264
}
265
}
266
}
267
]
268
}
269
end
270
271