Frebniis malware abuses Microsoft IIS feature to create a backdoor

Pierluigi Paganini February 19, 2023

Experts spotted a malware dubbed Frebniis that abuses a Microsoft IIS feature to deploy a backdoor and monitor all HTTP traffic to the system.

Broadcom Symantec researchers have spotted a new malware, tracked as Frebniis, that abuses Microsoft Internet Information Services (IIS) to deploy a backdoor and monitor all HTTP traffic to the infected system, Symantec reports.

The malicious code was employed in attacks against targets in Taiwan by a currently unknown threat actor.

Frebniis operates by injecting code into the memory of the iisfreb.dll which is used by the IIS feature Failed Request Event Buffering (FREB) for troubleshooting failed requests.

“The technique used by Frebniis involves injecting malicious code into the memory of a DLL file (iisfreb.dll) related to an IIS feature used to troubleshoot and analyze failed web page requests. This allows the malware to stealthily monitor all HTTP requests and recognize specially formatted HTTP requests sent by the attacker, allowing for remote code execution.” reads the report published by Symantec. “In order to use this technique, an attacker needs to gain access to the Windows system running the IIS server by some other means. In this particular case, it is unclear how this access was achieved.”

The IIS feature Failed Request Event Buffering (FREB) collects data and details about requests, such as HTTP headers with cookies, the originating IP address and port, etc.

A feature called Failed Request Tracing can be used to troubleshoot IIS failed requests. The Frebniis ensures Failed Request Tracing is enabled as part of the attack, then accesses the w3wp.exe (IIS) process memory, obtaining the address of where the Failed Request Event Buffering code (iisfreb.dll) is loaded. 

Once obtained the code start address for the function, the Frebniis malware searches from there for a function pointer table to hijack code execution and achieve the execution of its malicious code.

“The authors of Frebniis have determined that a particular function pointer within iisfreb.dll is called by iiscore.dll whenever any HTTP request is made to IIS from a web client.” continues the report. “Frebniis hijacks this function by injecting its own malicious code into IIS process memory and then replacing this function pointer with the address of its own malicious code.”

Frebniis parses all requests for /logon.aspx or /default.aspx with a specific parameter password, which allows it to decrypt and execute .NET code when a password match is found.

The malicious code parses all received HTTP POST requests for /logon.aspx or /default.aspx along with a parameter password set to ‘7ux4398!’. Upon matching the password, the malware decrypts and executes the main backdoor included in a section of the injected code. The backdoor is a .NET executable code. Experts pointed out that the malware doesn’t save executables to disk, this makes it completely stealthy.

The backdoor implements proxying functionality and remote code execution.

The code provides proxying and remote code execution capabilities, which allows the malware operators to communicate with internal resources typically blocked from accessing the internet, as well as to execute code directly in memory using crafted HTTP requests.

“These requests allow remote code execution and proxying to internal systems in a stealthy manner. No files or suspicious processes will be running on the system, making Frebniis a relatively unique and rare type of HTTP backdoor seen in the wild,” Symantec concludes.

The cybersecurity company says that Frebniis has been used by an unknown threat actor in attacks targeting entities in Taiwan.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Frebniis)



you might also like

leave a comment