Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/support/acceptance/session/java.rb
19515 views
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
}
122
}
123
},
124
{
125
name: "post/test/get_env",
126
platforms: [:linux, :osx, :windows],
127
skipped: false,
128
lines: {
129
linux: {
130
known_failures: []
131
},
132
osx: {
133
known_failures: []
134
},
135
windows: {
136
known_failures: []
137
}
138
}
139
},
140
{
141
name: "post/test/meterpreter",
142
platforms: [:linux, :osx, :windows],
143
skipped: false,
144
lines: {
145
linux: {
146
known_failures: []
147
},
148
osx: {
149
known_failures: []
150
},
151
windows: {
152
known_failures: []
153
}
154
}
155
},
156
{
157
name: "post/test/railgun",
158
platforms: [:linux, :osx, :windows],
159
skipped: false,
160
lines: {
161
linux: {
162
known_failures: []
163
},
164
osx: {
165
known_failures: []
166
},
167
windows: {
168
known_failures: []
169
}
170
}
171
},
172
{
173
name: "post/test/railgun_reverse_lookups",
174
platforms: [:linux, :osx, :windows],
175
skipped: false,
176
lines: {
177
linux: {
178
known_failures: []
179
},
180
osx: {
181
known_failures: []
182
},
183
windows: {
184
known_failures: []
185
}
186
}
187
},
188
{
189
name: "post/test/registry",
190
platforms: [
191
[
192
:linux,
193
{
194
skip: true,
195
reason: "Windows only test"
196
}
197
],
198
[
199
:osx,
200
{
201
skip: true,
202
reason: "Windows only test"
203
}
204
],
205
:windows
206
],
207
skipped: false,
208
lines: {
209
linux: {
210
known_failures: []
211
},
212
osx: {
213
known_failures: []
214
},
215
windows: {
216
known_failures: [
217
"[-] FAILED: should write REG_EXPAND_SZ values",
218
"[-] FAILED: should write REG_SZ unicode values"
219
]
220
}
221
}
222
},
223
{
224
name: "post/test/search",
225
platforms: [:linux, :osx, :windows],
226
skipped: false,
227
lines: {
228
linux: {
229
known_failures: []
230
},
231
osx: {
232
known_failures: []
233
},
234
windows: {
235
known_failures: []
236
}
237
}
238
},
239
{
240
name: "post/test/unix",
241
platforms: [
242
:linux,
243
:osx,
244
[
245
:windows,
246
{
247
skip: true,
248
reason: "Unix only test"
249
}
250
]
251
],
252
skipped: false,
253
lines: {
254
linux: {
255
known_failures: []
256
},
257
osx: {
258
known_failures: []
259
},
260
windows: {
261
known_failures: []
262
}
263
}
264
}
265
]
266
}
267
end
268
269