Search This Blog

Powered by Blogger.

Blog Archive

Labels

About Me

Showing posts with label KeePass. Show all posts

ESXi Environment Infiltrated Through Malicious KeePass Installer


Research by cybersecurity researchers has revealed that threat actors have been using tampered versions of KeePass password manager software to break into enterprise networks for several months. Researchers have discovered that this campaign has been sophisticated and ongoing for several months. For more than eight months, attackers have been using trojanized applications to stealthily infiltrate organisations and present themselves as legitimate KeePass installers while encoding malicious code into them. 

A deceptive installer serves as an entry point by which adversaries may gain access to internal systems, deploy Cobalt Strike beacons and harvest credentials, setting up large-scale ransomware attacks by using these deceptive installers as entry points. In this campaign, attackers have shown a particular interest in environments running VMware ESXi-one of the most widely used enterprise virtualisation platforms-indicating their strategic intention of targeting critical infrastructure environments. 

After the attackers are able to gain access, they escalate their privileges, move across networks, and plant ransomware payloads to disrupt operations as well as compromise data to the maximum extent possible. In addition to ensuring persistent access, malware is also able to exfiltrate sensitive information, which severely undermines the security postures of organisations targeted for attacks. 

KeePass was a rogue installer that was disguised in the appearance of a trustworthy software application, however, it underscored the increasing sophistication of cyber threats in the 21st century and the urgency of maintaining heightened security across enterprise systems. A comprehensive investigation by WithSecure's Threat Intelligence team, which had been engaged to analyse a ransomware attack that affected a corporate environment, led to the discovery of the campaign. 

Upon closer examination, the team traced the intrusion back to a malicious version of KeePass that had been deceptively distributed via sponsored advertisements on Bing. These ads led unsuspecting users to fraudulent websites designed to mirror legitimate software download pages, thereby tricking them into downloading the compromised installer. 

As the team investigated further, they found that the intrusion was linked to a malicious version of KeePass that had been misrepresenting itself as available through sponsored advertisements on Bing, leading unsuspecting users to fraudulent websites that mirrored legitimate software download pages, which tricked them into downloading the compromised installer by deceptively distributing it. Researchers have since discovered that the threat actors exploited KeePass's open-source nature by altering its original source code to craft a fully functional yet malicious version of the program, known as KeeLoader. 

In spite of the fact that this trojanized version maintains all of the standard features of a real password manager, it is capable of operating without immediately raising suspicions about its legitimacy. There are, however, covert enhancements embedded within the application designed to serve the attackers' objectives, namely the deployment of a Cobalt Strike beacon that will serve as a means for delivering the attacker's objectives. 

The tool enables remote control and data exfiltration, which can be done, for example, by exchanging the user's entire KeePass password database in cleartext with the use of remote command-and-control capabilities. As a result of the beacon, the attackers were able to extract this information, which provided a basis for the further infiltration of the network as well as, in the end, ransomware deployment. This tactic exemplifies the growing trend of leveraging trusted open-source software to deliver advanced persistent threats. According to industry experts, this incident emphasises the importance of many critical, multifaceted cybersecurity challenges.

It has been pointed out by Boris Cipot, Senior Security Engineer at Black Duck, that the campaign raises concerns on a number of fronts, ranging from the inherent risks that arise from open source software development to the growing problem of deceptive online advertising. Using a combination of open-source tools and legitimate ad platforms, Cipot explained that the attackers were able to execute a highly efficient and damaging ransomware campaign that exploited the public's trust in both of these tools. In their breach, the attackers the impact of their attack by targeting VMware ESXi servers, which are at the heart of many enterprise virtual environments. 

Having stolen the credentials for KeePass, including administrative access to both hosts and service accounts, threat actors could compromise entire ESXi infrastructures without having to attack each virtual machine individually. As a result of this approach, a high level of technical sophistication and planning was demonstrated in order to cause widespread disruption across potentially hundreds of different systems in a single campaign. 

Cipot emphasises one key lesson in his presentation: the organisation and users should not blindly trust any software promoted through online advertisements, nor should they assume that open-source software tools are necessarily safe, as it is advertised. A person who knows the importance of verifying the authenticity and integrity of software before deploying it to any development environment or on a personal computer has said that the importance of this cannot be overstated. Moreover, Rom Carmel, Co-Founder and CEO of Apono, also noted that the attack highlighted the fact that identity compromise is becoming a growing part of ransomware operations. 

In addition to the KeePass compromise, there was a large repository of sensitive credentials, including admin credentials and API access keys, that were exposed to attackers. With this data at hand, attackers were able to rapidly advance from network to network, escalating privileges as quickly as possible, turning credential theft into the most powerful enabler of enterprise-wide compromise. According to Carmel, the example provided by this case proves the importance of securing identity and access management as the front-line defence against cyberattacks that exist today. 

It was discovered by researchers that, as they investigated malicious websites distributing trojanized versions of KeePass password managers, there was a wider network of deceptive domains advertising other legitimate software products. In addition to the software impersonated, trusted applications such as WinSCP, a secure file transfer tool, and several popular cryptocurrency applications were also posed as legitimate software. 

It was noteworthy that these applications were modified less aggressively than KeePass, however, they still posed an important threat. Instead of incorporating complex attack chains, the attackers delivered a well-known malware strain called Nitrogen Loader, which acts as a gateway for further malicious payloads to be distributed on compromised systems by using Nitrogen Loader as a malicious payload. In light of the recent discovery, it appears that the trojanized KeePass variant was likely to have been created and distributed by initial access brokers, a group of cybercriminals who specialise in penetrating corporate networks. 

They are known to steal login credentials, harvest data, and identify exploitable entry points in enterprise networks, which are all ways of stealing sensitive information. It is then that they use the intrusion to monetise their intrusion by selling this access to other threat groups, primarily ransomware operators, on underground forums. One particular reason that this threat model is so dangerous is that it is indiscriminate in nature. 

Malware distributors target a wide variety of victims, from individuals to large corporations, without applying any specific selection criteria in the way they select their victims. There is a meticulous sorting and selling process for all of the stolen data, which is varied from passwords and financial records, to personal information and social media credentials. Ransomware gangs, on the other hand, are typically interested in corporate network credentials, while scammers are interested in financial data and banking information. 

Spammers may also attempt to exploit email, social networking, or gaming accounts by acquiring login credentials. A stealer malware distributor who employs an opportunistic business model is more likely to cast a wide net and embed their payload in virtually any type of software, so that they can distribute the malware to a wider audience. In addition to consumer-oriented applications, like games and file managers, it also offers professional tools for architects, accountants and information technology administrators. 

The importance of implementing strict software verification practices, both for organisations and individuals, cannot be overstated. Every download tool, no matter how trustworthy it may seem, must be obtained from a trustworthy and verifiable source, regardless of the appearance of a given tool. As a result of the campaign with the help of WithSecure, the victim organisation's VMware ESXi servers – a critical component of the organisation's virtual infrastructure – were encrypted.

There was a significant impact of this malware distribution operation far beyond a single compromised installer, as reflected by the severity of the consequences resulting from this sophisticated and well-orchestrated operation. According to further analysis, a sprawling malicious infrastructure masquerading as a trusted financial service and software platform was revealed. It seems that the attackers used the domain aenys[.]com, which hosted a number of subdomains impersonating reputable organisations such as WinSCP, Phantom Wallet, PumpFun, Sallie Mae, Woodforest Bank, and DEX Screener. 

Every subdomain was designed to deliver malware payloads or act as phishing portals designed to harvest sensitive user credentials from the targeted users. A careful, multi-pronged approach to compromise a wide range of targets is demonstrated by this level of detail and breadth. As a result of the analysis conducted by WithSecure, UNC4696, a threat group associated with operations previously involving Nitrogen Loader malware, has been identified as responsible for this activity.

Research suggests that campaigns involving Nitrogen Loader may have been linked to the deployment of BlackCat/AlphaPhy ransomware, a highly destructive and well-known threat actor known for attacking enterprise networks. The importance of cautious and deliberate software acquisition practices has been emphasised for many years by security experts, especially for security-critical applications such as password managers that require careful attention to detail. 

Downloading software from official, verified sources is strongly recommended, and links provided through online advertisements should not be relied upon. It is important to note that a website may appear to be referencing the right URL or brand of a legitimate provider, but it might still be redirecting users to fake websites that are created by malicious actors. Having been shown repeatedly that advertising platforms are being exploited to circumvent content policies, it is vital that vigilance and source verification be maintained in order to avoid compromise. 

In the cybersecurity landscape, there is still a persistent and evolving threat to be addressed because legitimate credentials are increasingly used in cyberattacks. It is widely known that Infostealers, which are specifically designed to harvest sensitive data and login information, serve as a gateway for more widespread breaches, including ransomware attacks. 

Organisations must adopt a comprehensive security strategy that goes beyond the basics to reduce this risk. When it comes to preventing trojanized software, such as the malicious KeePass variant, strict controls must be enforced on the execution of applications that aren't trusted. Users can achieve this by implementing application allow lists to restrict software installations and make sure that trusted vendors or applications signed with verified digital certificates are allowed to install the software. 

In the case of the KeePass attack, such a certificate-based policy could have effectively prevented the tampered version from getting into the system, since it had been signed with an unauthorised certificate. It is equally crucial to implement centralised monitoring and incident response mechanisms on all endpoints, whether they are desktops or servers, to detect and respond to incidents. Every endpoint in an organisation should be equipped with Endpoint Detection and Response (EDR) sensors. 

By combining these tools with Security Information and Event Management (SIEM) or Extended Detection and Response (XDR) platforms, security teams can get a real-time view of network activity and detect, analyse, and respond to threats before they get too far. Furthermore, an organisation must cultivate a well-informed and security-conscious workforce. 

Beyond learning about phishing scams, employees should be trained on how to recognise fake software, misleading advertisements, and other forms of social engineering that cybercriminals commonly employ. With Kaspersky's Automated Security Awareness Platform, organisations can support ongoing education efforts, helping them foster a culture of security that is proactive and resilient. With the proliferation of cyber attacks and the continual refining of attackers' methods, a proactive, layered defence approach, rooted in intelligent technology, policy, and education, is essential for enterprises to protect their systems against increasingly deceptive and damaging threats.

Fraudulent KeePass Site Uses Google Ads and Punycode to Transfer Malware


A Google Ads campaign was discovered promoting a phoney KeePass download site that transferred malware by posing as the real KeePass domain using Punycode. 

Google has confirmed to be suffering from an ongoing malvertising campaign which has enabled hackers to take out sponsored ads that appear above search results. In the campaign, Google Ads can also be exploited to display the official KeePass domain in the advertisements (https://www.keepass.info), making it difficult for even the most vigilant and security-conscious consumers to identify the problem. 

Online victims who end up clicking on the malicious links navigate through a series of system-profiling redirections that block bot traffic and sandboxes, as illustrated below. 

Malwarebytes, which identified this campaign points out that using Punycode for cybercrime is nothing new. However, when combined with Google Ads misuse, it may indicate a new, risky pattern in the industry. 

Punycode Trick 

 Punycode is an encoding tactic to represent Unicode characters, that helps translate hostnames in any non-Latin script to ASCII so that the DNS (Domain Name System) can interpret them.

For instance, "München" will be converted to "Mnchen-3ya," "α" becomes "mxa," "правда" will be "80aafi6cg," and "도메인" will become "hq1bm8jm9l."

Actors who threaten to abuse Punycode uses Unicode to add one character to domain names that are identical to those of legitimate websites in order to make them appear slightly different.

These types of attacks are labelled as “homograph attacks.” Malwarebytes discovered that the threat actors were using the Punycode "xn—eepass-vbb.info" to transform to "eepass.info," the project's actual domain, but with a little intonation beneath the character "."

Although it is unlikely that most users who visit the decoy site will notice this little visual flaw, it serves as a clear indication of the approach taken in this situation.

The digitally-signed MSI installation 'KeePass-2.55-Setup.msix' that is downloaded by those who click on any download links featured on the false website includes a PowerShell script related to the FakeBat malware loader.

While Google has taken down the original Punycode advertisement, several other ongoing KeePass ads have also been found in the same malware campaign.

This advertisement leads to a domain named ‘keeqass[.]info,’ which executes the same MSIX file that contains the identical FakeBat PowerShell script to download and install malware on the Windows device, just like the Punycode domain.

Apparently, when executed, the FakeBat PowerShell script downloads a GPG-encrypted RAR archive, decrypts it, and extracts it to the %AppData% folder.

Moreover, in the file analyzed by BleepingComputer, the script launches a file called 'mergecap.exe' from the archive.

According to an Intel471 report from early 2023, FakeBat is a malware loader/dropper connected to malvertising activities from at least November 2022.

While Malwarebytes was unable to identify the final malware payload delivered in the campaign, a Sophos report from July 2023 links FakeBat with infostealers like Redline, Ursniff, and Rhadamathys.  

KeePass Vulnerability: Hackers May Have Stolen the Master Passwords


One would expect an ideal password manager to at least keep their users’ passwords safe and secure. On the contrary, a new major vulnerability turned out to be putting the KeePass password manager users at serious risk of their passwords being breached.

Apparently, the vulnerability enables an attacker to extract the master password from the target computer's memory and take it away in plain text, or in other words, in an unencrypted form. Although it is a fairly easy hack, there are expected to be some unsettling repercussions.

Password managers, like in this case KeePass, lock up a user’s login info encrypted and secure behind a master password in order to keep it safe. The vault is a valuable target for hackers since the user is required to input the master password to access everything within.

How is KeePass Vulnerability a Problem? 

Security researcher 'vdohney,' according to a report by Bleeping Computer, found the KeePass vulnerability and posted a proof-of-concept (PoC) program on GitHub.

With the exception of the initial one or two characters, this tool can almost entirely extract the master password in readable, unencrypted form. Even if KeePass is locked and, possibly, if the app is completely closed, it is still capable of doing this.

All this is because the vulnerability extracts the master password from KeePass’s memory. This can be acquired, as the researcher says, in a number of ways: “It doesn’t matter where the memory comes from — can be the process dump, swap file (pagefile.sys), hibernation file (hiberfil.sys) or RAM dump of the entire system.”

The exploit is only possible due to some custom code KeePass uses. Your master password is entered in a unique box named SecureTextBoxEx. Despite its name, it turns out that this box is actually not all that secure since each character that is entered essentially creates a duplicate of itself in the system memory. The PoC tool locates and extracts these remaining characters.

‘A Fix is Incoming’ 

Having physical access to the computer from which the master password is to be taken is the only drawback to this security breach. However, that is not always a problem; as the LastPass vulnerability case demonstrated, hackers can access a target's computer by utilizing weak remote access software installed on the device.

In case a device was infected by a malware, it may as well be set up to dump KeePass's memory and send it and the app's database back to the hacker's server, giving the threat actor time to get the master password.

Fortunately, the developer of KeePass promises that a fix is incoming; one of the potential fixes is to add random dummy text that would obscure the password into the app's memory. It may be agonizing to wait until June or July 2023 for the update to be made available for anyone concerned about their master password being compromised. The fix, however, is also available in beta form and may be downloaded from the KeePass website.