

Companies urged to patch critical vulnerability in Fortinet FortiNAC
source link: https://www.csoonline.com/article/3689010/companies-urged-to-patch-critical-vulnerability-in-fortinet-fortinac.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Companies urged to patch critical vulnerability in Fortinet FortiNAC
The high-severity vulnerability allows unauthorized users to write arbitrary files to the system, and it is being exploited.
Proof-of-concept exploit code is now available for a critical vulnerability in Fortinet FortiNAC appliances and attackers have already started using it in the wild. Users are advised to patch their systems as soon as possible.
FortiNAC is a zero-trust network access solution that can be deployed both as a hardware device or as a virtual machine appliance. It is used for network segmentation, visibility, and control of devices and users connected to the network. As such, it can be deployed at the network perimeter, making it an easier target for internet-based attacks. According to Shodan scans, more than 700,000 Fortinet devices are connected to the internet around the world.
Unauthenticated remote code execution
The vulnerability, tracked as CVE-2022-39952, was disclosed and patched by Fortinet last week. It allows unauthenticated attackers to write arbitrary files on the system, which can result in code or command execution. The flaw was discovered internally by a member of the Fortinet product security team and is rated 9.8 out of 10 on the CVSS severity scale.
Researchers from security consultancy Horizon3.ai performed a comparison of the patched and vulnerable FortiNAC appliance versions and were able to locate and confirm the vulnerability. It is located in a file called keyUpload.jsp that allows the upload of files that are then saved locally in the location /bsc/campusMgr/config.applianceKey.
The operating system then executes a bash script that runs an unzip command against the stored file. Initially this hinted at a potential path traversal vulnerability, where attackers could create an archive that, when unpacked, writes files outside of the intended path. However, this is not the case for unzip, which strips relative paths and therefore protects against path traversal issues, the researchers said. The bash script that calls unzip in this case first changes the current working directory to “/” which on Linux systems is the root of the partition.
"Unzip will allow placing files in any paths as long as they do not traverse above the current working directory," the researchers said. "Because the working directory is ‘/,’ the call unzip inside the bash script allows any arbitrary file to be written."
In other words, the attackers can create a zip file that unpacks its contents in any file path under the whole partition. To demonstrate a weaponized exploit, the Horizon3 researchers exploited the vulnerability to write a malicious payload under /etc/cron.d/ which is the scheduled task mechanism in Linux. This task executes every minute and initiates a reverse shell to the attacker.
Abusing cron.d is only one way of exploiting this flaw and achieving remote code execution. Attackers could also choose to overwrite any binary file on the system that they know the OS will execute, or they could add their own SSH key to a user profile, enabling remote access to that user via SSH.
"Unfortunately, the FortiNAC appliance does not allow access to the GUI unless a license key has been added, so no native GUI logs were available to check for indicators," the researchers said. "However, exploitation of the issue was observable in filesystem logs located at /bsc/logs/output.master. Specifically, you could check for the line Running configApplianceXml as long as the attacker has not cleared out this log file."
Fortinet advises users to upgrade to FortiNAC version 9.2.6 or above, 9.1.8 or above and 7.2.0 or above, depending on which supported release they use.
Active attacks using the FortiNAC vulnerability
CronUp, a cybersecurity company based in Chile, reported seeing attacks that exploit the FortiNAC vulnerability. First, they saw attempts that created reverse shells like in Horizon3's proof-of-concept.
Then attackers switched to deploying webshells -- web-based backdoor scripts that allow remote execution of commands. Two webshells observed so far were deployed under bsc/campusMgr/ui/ROOT/fortii.jsp and bsc/campusMgr/ui/ROOT/shell.jsp on vulnerable installations. GreyNoise, a service that tracks malicious traffic on the internet, added the ability to detect attacks targeting this vulnerability and has started seeing exploitation attempts.
This is not the first time when attackers target Fortinet products and security appliances. In January, Fortinet warned users that attackers were exploiting a critical vulnerability in FortiOS SSL-VPN that was patched in December to deploy a sophisticated Linux implant.
Recommend
-
25
Video game digital distribution platform GOG Galaxy Games has patched two critical privilege escalation flaws that could allow arbitrary code execution. GOG Galaxy Games, a popular video game digital dis...
-
8
NOT DEAD YET — Microsoft’s emergency patch fails to fix critical “PrintNightmare” vulnerability Game-over code-execution attacks are still possible even after fix is installed....
-
7
Microsoft Keeps Failing to Patch the Critical ‘PrintNightmare’ BugFor the second time in a month, the company issued an update that doesn't fully address a severe security vulnerability in Windows.
-
3
Mozilla Firefox receives out of band update to patch two critical security exploits
-
9
News Analysis Why you should patch the latest critical Windows RPC vulnerability right now CVE-2022-26...
-
6
Fortinet Products Denial of Service Vulnerability Release Date: 6 Apr 2022 816 Views RISK: Medium Risk
-
8
GOT PATCHES? — Microsoft won’t say if it will patch critical Windows vulnerability under exploit Slow to act on the code execution bug from the start, company is still in n...
-
6
Java News Roundup: JDK 19 in RDP2, Oracle Critical Patch Update, TornadoVM on M1, Grails CVE Jul 25...
-
8
GOT DISCLOSURE? — Fortinet says hackers exploited critical vulnerability to infect VPN customers Remote code-execution bug was exploited to backdoor vulnerable servers.
-
6
Researchers warn unpatched Fortinet firewalls are exposed to critical vulnerability
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK