Exploiting Log4j 2 Vulnerabilities

As far as exploiting unpatched Log4j systems to target Israeli entities are concerned, the Iranian state-sponsored threat actors leave no stone unturned to exploit these vulnerabilities, indicating that there is still a long tail for fixing this vulnerability.

It is believed that the group behind the latest set of activities has been identified as MuddyWater, an umbrella threat group. The organization has connections with Iran’s intelligence apparatus, MOIS.

As a distinctive aspect of the attacks, the SysAid Server instances used in the initial attack remained unsecured against the Log4Shell vulnerability. In this regard, the actors have departed from their traditional pattern of compromising target environments by leveraging VMware applications.

Mercury uses both custom and well-known hacking tools, as well as integrated operating system tools, to set up a hands-on keyboard attack, once it has gained access to the target organization. 

Once the malware begins to establish persistence, it dumps credentials and moves throughout the organization using both custom and well-known hacking tools.

MERCURY Techniques & Tooling

These are some of the most common techniques used by Mercury:-

  • Adversary-in-the-mailbox phishing
  • Use of cloud file-sharing services
  • Use of commercial remote access applications
  • Tooling
  • Targeting

During the period from July 23 to July 25, 2022, Microsoft’s threat intelligence team observed a number of attacks conducted by foreign entities.

Reconnaissance is the primary function of most commands. This is done by downloading the actor’s tool for lateral movement and persistence through one encoded PowerShell script.

In the aftermath of the successful compromise, it is said that web shells were deployed to allow commands to be executed through the web. A lateral movement would then be possible, which would assist the actor in the process of reconnaissance, persistence, credential theft, etc.

A remote monitoring and management tool called eHorus is also used for C2 communications during intrusions, along with a reverse-tunneling tool called Ligolo, which is the tool of choice for adversaries for reverse tunneling communications.

Commands Executed

Here below we have mentioned the commands that are executed:-

  • cmd.exe /C whoami
  • cmd.exe /C powershell -exec bypass -w 1 -enc UwB….
  • cmd.exe /C hostname
  • cmd.exe /C ipconfig /all
  • cmd.exe /C net user
  • cmd.exe /C net localgroup administrators
  • cmd.exe /C net user admin * /add
  • cmd.exe /C net localgroup Administrators admin /add
  • cmd.exe /C quser

Recommendation

Here below we have mentioned all the mitigations provided by the security experts:-

  • It would be a good idea to check if your network uses SysAid.
  • For guidance on how to prevent, detect, and hunt for the exploitation of the Log4j 2 vulnerability, please refer to the detailed Guidance.
  • Assess your environment for possible intrusions using the included indicators of compromise.
  • Inbound traffic from IP addresses listed in the indicator of the compromise table should be blocked. 
  • Verify authenticity and investigate any anomalous behavior for remote access infrastructure, including single-factor authentication accounts. 
  • MFA mitigates potential credential compromise and ensures all remote connections are MFA enabled.

Secure Azure AD Conditional Access – Download Free White Paper

Leave a Reply