IT NEWS

Latest iPhone exploit, FORCEDENTRY, used to launch Pegasus attack against Bahraini activists

Researchers from Citizen Lab, an academic research and development lab based in the University of Toronto in Canada, has recently discovered that an exploit affecting iMessage is being used to target Bahraini activists with the Pegasus spyware. The Bahrain government and groups linked to them—such as LULU, a known operator of Pegasus, and others like them who are associated with a separate government—were tagged as culprits of the surveillance activity.

Dubbed by Citizen Lab as FORCEDENTRY, this iMessage exploit is said to have been in use since February 2021. For an entity to get inside someone’s iPhone using FORCEENTRY to exploit an iMessage vulnerability, there is no need to come up with social engineering tactics to get their target to do an action, which is, usually, to click something. The attackers just deploy the exploit. No need for the target to click something. This is what we mean when we refer to some attacks as “zero-click”.

FORCEDENTRY is Megalodon

FORCEDENTRY and Megalodon—the name given to iMessage exploit activity witnessed by Amnesty International’s research arm Amnesty Tech in July 2021—are one and the same.

When FORCEENTRY is fired at a device, it crashes IMTranscoderAgent, a service the device uses to transcode and preview images in iMessage. According to The Hacker News, this is FORCEDENTRY’s way of getting around Apple’s BlastDoor security feature, which was designed to protect against attacks, including those from the KISMET exploit. Once this agent crashes, the exploit can then download and render items, likely images, from the Pegasus server.

“We saw the FORCEDENTRY exploit successfully deployed against iOS versions 14.4 and 14.6 as a zero-day,” the researchers claim in the Citizen Lab report.

FORCEDENTRY has been observed targeting and deploying Pegasus against Bahraini activists, members, and writers belonging to Waad (a political society), Bahrain Center for Human Rights (a Bahraini NGO), and Al Wefaq (cited as “Bahrain’s largest opposition political society”).

KISMET: the other exploit

FORCEENTRY is actually the second known exploit to be used to target journalists using an iMessage vulnerability. In 2020, Citizen Lab named KISMET, a then 0-day exploit against iPhone iOS version 13.5.1 and above. It could also hack the iPhone 11, the latest model of that time. This made iPhone devices that were available before the release of iOS 14 vulnerable and exploitable.

No real protection in sight?

As of this writing, researchers at Citizen Lab believed that the KISMET and FORCEDENTRY exploits might have been prevented by users disabling iMessage and FaceTime. However, disabling these two cannot fully protect users from any spyware or zero-click attacks, the researchers said. Disabling iMessage also means that your once-encrypted message could be easily intercepted by attackers.

There are also other text and video messaging apps iPhone users can use in place of iMessage and FaceTime should they choose to disable them. Some of these are open-source, such as Signal.

The post Latest iPhone exploit, FORCEDENTRY, used to launch Pegasus attack against Bahraini activists appeared first on Malwarebytes Labs.

Cold wallet, hot wallet, or empty wallet? What is the safest way to store cryptocurrency?

In August of 2021, a thief stole about $600 million in cryptocurrencies from The Poly Network. They ended up giving it back, but not because they were forced to. Slightly more than one week later, Japanese cryptocurrency exchange Liquid was hacked and lost $97 million worth of digital coins.

These examples of recent news about hacked cryptocurrency exchanges left many investors wondering whether it was still smart to invest in cryptocurrencies and how to keep them safe.

We can’t answer the first question for you. I wish I knew. But we can explain the terminology, the methods, and the risks. So you can decide which would be best for you.

Wallets

A wallet is basically the name for the methods to store virtual money. Like you can keep non-virtual money in a bank account or under your mattress, you can keep virtual currencies in hot and cold wallets. An empty wallet has the same meaning ….. and the same value. So let’s try to avoid getting our wallets robbed empty.

Bank robbers

A big difference between bank robbers and hackers that are after crytpocurrency exchanges, besides the possible size of the loot, is that when money gets stolen from a bank they are not going to tell their customers that a certain amount of the stolen amount belonged to them. Unless the robbers emptied some private lockers, but that is not the point. If you have your cryptocurrency stored with an exchange and the hosted wallets get emptied, the exchange will be able to tell exactly whose money was stolen due to the traceability of each transaction that defines the very nature of cryptocurrencies. So the feeling that many will refer to as having the money safely in the bank, does not fully apply for crypto exchanges.

A hardware wallet

A hardware wallet is a place to safely store your private keys. The goal of the hardware wallet is to keep the private keys secret since they are needed to authorize transactions. Fundamentally, if you write the private key down on a piece of paper and put it in your safe at home, you have the most basic hardware wallet. And sometimes you will be advised to do just that.

Wallets often make use of a seed phrase. A seed phrase is a list of words which store all the information needed to recover cryptocurrency funds on-chain. Wallet software will typically generate a seed phrase and instruct the user to write it down on paper and keep it in a safe place. If you were to give out your seed phrase, for example as a result of a phishing attempt, the threat actor would then be able to get access to your wallet.

What is a cold wallet?

A much more sophisticated method of keeping your money under the mattress is a cold wallet. A cold wallet is a hardware wallet that is not connected to the internet. So this can be compared to having your money in a vault at home which you only open when you need to spend some of the funds. When it comes to the danger of having your cryptocurrency stolen by hackers, a cold wallet ranks highly as one of the safest storage methods. But a cold wallet has a few drawbacks:

  • They cost money. Prices for common hardware wallets range from $50 to $200. Not a big price to pay if you own a large amount of cryptocurrencies, but ridiculous to safeguard a few Satoshi.
  • They are not available for every cryptocurrency. You can easily find hardware wallets for the well-known cryptocurrencies like Bitcoin and Ethereum, but you will have more trouble finding a suitable one if you are investing in new or rare cryptocurrencies.
  • Lose your cold wallet or break it beyond repair and it is all gone.

Or as the IT engineer who accidentally threw away the hard drive of an old computer containing 7,500 bitcoins back in 2013 said: “I’ll keep looking.”

Hot wallet

A hot wallet may be called that because it compares to walking around with a lot of cash in your pockets in the worst of neighborhoods. A cryptocurrency exchange to hackers is like a huge pot of gold at the end of the rainbow. And looking at the events over the past years the coding behind these exchanges has been seriously lacking in the security department. Even if you can trust an exchange to not pull an inside job on you, can you trust the security measures they have taken to safeguard your savings?

The main job of an exchange is not to safely store your wallet, although many of them will certainly offer you that option. Their main job is to allow you to buy and sell cryptocurrencies. Most of the crypto brokers that works with these exchanges to ensure a continuous flow of supply and demand work with cold wallets and will probably advise you to do the same. But again, we are talking about amounts that are worth an investment in security.

Feel free to add your advice in the comments, but keep them civilized.

Remember, if you want to hold onto your cryptocurrencies, keep them safe!

The post Cold wallet, hot wallet, or empty wallet? What is the safest way to store cryptocurrency? appeared first on Malwarebytes Labs.

Mice “taking over the world!”, one Windows machine at a time

Famously, Pinky and the Brain were a pair of animated mice that wanted to take over the world. Of course they never succeed, but maybe they just set their sights too high. Because while mice may not be taking over the world yet, they are taking over computers.

In the last week, security researchers have reported not one, but two different mice (of the non-furry, non-animated variety) being used to seize control of Windows machines.

Which had us asking ourselves: How is it that something as simple as a mouse can cause security issues? Well, it’s all about ease of use. Things that are intended to make your life easier have a way of making life easier for those with mal-intent too. We’ll explain.

“Let’s take over the world!” Brain said to Pinky, and off they went…

Yesterday it was Razer

A few days ago, a security researcher discovered and disclosed a local privilege escalation (LPE) vulnerability that allows any user to walk up to an unlocked Windows machine and gain SYSTEM privileges, simply by plugging in a Razer Synapse mouse or keyboard. SYSTEM privileges allow them to install and run anything on the device, putting them in total control.

It needs to be said that this scenario is only something you need to start worrying about after an attacker has already gained physical access to your computer, be it stolen or otherwise. (But it’s also worth saying that getting physical access to computers is the sort of thing that attackers like to do.)

The problem stems from the fact that when you plug a Razer device into Windows 10 or Windows 11 computer, the operating system tries to be helpful by automatically downloading and installing the Razer software that allows you to alter the settings for that mouse.

It’s called “Plug and Play”, but you could this a case of “Plug and Privilege Escalation”.

Not just Razer as it turns out

Inspired by the story about Razer, another researcher conducted a test against a gaming keyboard from SteelSeries. It took him some trial and error, but the end result was the same: SYSTEM privileges for a process of your choice, allowing for a complete takeover.

The researcher also warned there are probably more out there too. He concluded that vendors aren’t forcing proper access control against their downloadable firmware, so we should look forward to hearing similar stories about multiple hardware products.

And he was soon proven right by yet another researcher, who used an Android phone (that was pretending to be a SteelSeries USB keyboard), to pull of the same attack.

The mice are not the problem

As you might have guessed, it’s not the mice that are the problem, it’s actually the Windows Desktop application that causes the trouble. That’s because it gets SYSTEM privileges during installation, without first asking for a system administrator’s permission.

When the Razer software is installed, the setup wizard allows you to choose the folder where you want to install it. This ability to select an installation folder is where an attacker can cut in.

When you change the location of the folder, a ‘Choose a Folder’ dialog will appear. If you press Shift and right-click on the dialog, you will be prompted to open ‘Open PowerShell window here,’ which will open a PowerShell terminal in the folder shown in the dialog. Since this PowerShell prompt is being launched by a process with SYSTEM privileges, the PowerShell prompt will also inherit those same privileges. In the elevated PowerShell prompt you can run any command (and you have effectively taken over).

The SteelSeries installer proved a bit harder to abuse, but the researcher discovered that opening the “Learn More” link in the license Agreement opened the default browser with SYSTEM privileges, allowing the user to save the agreement. And from that dialog it is possible to spawn a terminal with god-like powers.

Patches are in the works

Razer has awarded the researcher a bug bounty and is working on a patch. SteelSeries has announced it will disable the automatic start of the installation software when a new device is connected.

Which leaves two questions: What other mice are lurking, undiscovered, with ambitions unknown, and since this seems to be an issue with how installation works, shouldn’t Microsoft also be working on these problems?

To be continued.

The post Mice “taking over the world!”, one Windows machine at a time appeared first on Malwarebytes Labs.

The best browsers for privacy and security

Unfortunately there is a low correlation factor between what most people find the best browsers and what are the best browsers when it comes to privacy and security. If you look at the market share of the most popular browsers, there is one browser that steals the crown without a lot of competition: Google’s Chrome. Safari is the only other one that passes the 10% line, the rest merely look like marginal players. Of course, there are billions of browser users in the world, so even the marginal players are used by significant numbers of people, but they fade when compared to Chrome.

I’m assuming here that people use the browser that they like best. In case you are not, you know you do have a choice, right? It’s not even unheard of to use more than one browser on the same system. It does even have some merits:

  • Troubleshooting: Is that site really unavailable or is it my browser?
  • Segregation: Use one for work and another for home use.
  • Privacy: Using multiple browsers can disrupt tracking (although there are better ways).
  • Security: Switch to a different browser if your favorite is waiting for a security patch.

In this post we will look at how your choice of browser can contribute to your online safety and privacy. And tell you about some browsers that actually do care about those elements. We will also touch upon some methods to make the browser you like safer and more private.

Why you should care

As I have said in the past, a browser is not just a looking glass. When you are browsing websites the information stream goes two ways. Some of the information your browser gives to the websites you visit is necessary for the website to function properly. But sometimes the website owner just wants to have as much information as possible about their visitors: Where are my visitors located? What other websites have they visited recently? Which link did they click to get here? How long did they stay? Where did they go to next? How many free articles have they read. And in many cases the information can and will be used for targeted advertising.

Better security and privacy in your favorite browser

In the past I have written about how to tighten security and increase privacy on your browser. Feel free to read the whole post but here is a summary.

The upside of being able to use browser extensions is that there are many good ones out there that can help you establish a more private browsing experience. Ad-blockers, anti-tracking tools, and security extensions add further protection.

You can also tighten your privacy by using a Virtual Private Network (VPN) to anonymize your traffic. You have options here, since you can install a VPN to anonymize all your Internet traffic, or you can install a VPN extension that will do so for your browser only. Since a VPN can slow down the Internet connection, the choice will be based on which other programs that need the Internet connection you use and your personal preference.

Better browser choices

Besides using a VPN, you can also look at some alternative browsers that are already optimized for privacy and security. Here is our choice of best privacy browsers:

  • The Tor Browser protects your privacy by connecting you to the Internet using the Tor network, which was originally developed by the US Navy and DARPA. It hides your IP address like a VPN, but it doesn’t require you to trust a VPN provider, or share your real IP address with one. The Tor browser (which is based on Firefox) also includes a number of privacy features, plug-ins and defaults designed to protect your privacy. The Tor browser is available for Windows, macOs, and Linux.
  • Freenet is a peer-to-peer platform for censorship-resistant communication and publishing that is available for Windows, macOs, and Linux.
  • Waterfox is a secure and private browser based on Firefox, that allows you to use Firefox extensions. It is available for Windows, macOS, Linux, and Android.
  • Pale Moon is another Mozilla fork, but it doesn’t work with all Firefox extensions. It is available for Windows and Linux.
  • Brave is a Chromium-based browser that blocks unwanted content by default and does not need much tinkering to keep you safe and private. Brave is available for Windows, macOs, Linux, iOS, and Android.

There are some things to consider here, because the best browser for privacy is not necessarily always the best browser for security. But they are closely knit together. And while it is easy to enhance your security outside of your browser, it is hard for another program to stop a browser from leaking information about you. And if you do manage to do so, it is likely to interfere with how well the browser works.

Granted, it may take you a while to get used to a new browser. One thing you can do to make it easier to adapt is to choose a browser that is based on the one, or very similar to, the one you are already using. For example, if you are using Firefox now, have a look at the Tor Browser, Waterfox, or Pale Moon. Whereas Chrome users may find using Brave more intuitive.

Your choice

So, what is the best browser for privacy and security? Choosing between browsers is hard enough and making that choice for someone else is even harder. But if you try the above and see which one you like best, you will have made a choice that improves your online safety and privacy. Good for you!

Stay safe, everyone!

The post The best browsers for privacy and security appeared first on Malwarebytes Labs.

Realtek-based routers, smart devices are being gobbled up by a voracious botnet

A few weeks ago we blogged about a vulnerability in home routers that was weaponized by the Mirai botnet just two days after disclosure. Mirai hoovers up vulnerable Internet of Things (IoT) devices and adds them to its network of zombie devices, which can then be used to launch huge Distributed Denial of Service (DDoS) attacks.

Last time it was a vulnerability in the Arcadyan firmware found in devices distributed by some of today’s biggest router vendors and internet service providers, such as ASUS, Orange, Vodafone, Telstra, Verizon, Deutsche Telekom, and British Telecom.

A similar situation is going on right now with routers and Wi-Fi amplifiers that are built on the Realtek RTL819xD chipset. Realtek chipsets are found in many embedded IoT devices. At least 65 vendors are affected. The vulnerabilities enable unauthenticated attackers to fully compromise the target device and execute arbitrary code with the highest level of privilege. Exactly what Mirai wants.

Vulnerabilities

The vulnerabilities were found and disclosed by IoT Inspector, a platform for automated security analysis of IoT firmware. In total they identified more than a dozen vulnerabilities, but one of them (CVE-2021-35395) has already been found to be actively exploited in in the wild.

Publicly disclosed computer security flaws are listed in the Common Vulnerabilities and Exposures (CVE) database. Its goal is to make it easier to share data across separate vulnerability capabilities (tools, databases, and services). The description of CVE-2021-35395 contains a pretty dense explanation, but it boils down as follows.

There are two types of a management interfaces that can accessed over the Internet. Both of them are vulnerable to multiple stack buffer overflows due to “unsafe” copying of parameters, and two separate arbitrary command injection problems, again stemming from the apparently unsafe handling of parameters. These allow an attacker to run arbitrary commands on the vulnerable device.

For anyone unfamiliar with web programming, this implies that the code behind these Internet-exposed management interfaces are failing to perform the most basic security hygiene.

The description ends:

Some vendors use [the management interface] as-is, others add their own authentication implementation, some kept all the features from the server, some remove some of them, some inserted their own set of features. However, given that Realtek SDK implementation is full of insecure calls and that developers tends to re-use those examples in their custom code, any binary based on Realtek SDK web server will probably contain its own set of issues on top of the Realtek ones…

In other words, how vulnerable your device is may depend on whether, and how well, the vendor added their own authentication methods, but vendors may well have added more problems.

Same botnet, same operator?

With all the similarities in the vulnerabilities and the speed with which they are being exploited after disclosure, it will not come as a total surprise that the botnet that is actively going after these vulnerable devices is Mirai. Mirai is the name of the malware behind one of the most active and well-known IoT botnets. After the source code of the original Mirai botnet was leaked, it was quickly replicated by other cybercriminals, so there are now several independent operators each running their own Mirai-based botnets.

Researchers at SAM Seamless Network were able to establish that the web server serving the Mirai botnet behind these attacks uses the same network subnet seen by Unit 42 in March of 2021, indicating that the same attacker was behind those incidents. Due to the similarity in scripts it was assumed that the same actor was behind the exploitation of the vulnerability listed under CVE-2021-20090 which is present in the Arcadyan firmware.

It also stands to reason to assume this is the actor that was responsible for the largest DDoS attack recorded to date, just last week.

Mitigation

Realtek has since patched the vulnerabilities, but it will take a while for manufacturers who use their chipset to make the patches available to their customers. And again many of the owners of vulnerable devices are home users. They may have no idea whether their device is vulnerable and even if they do, they will likely need guidance to apply a firmware upgrade.

RealTek is a common chipset used for sound and Wi-Fi by many vendors such as ARRIS, ASUSTek, Belkin, Buffalo, D-Link, EnGenius, Huawei, LG, Logitec, NetGear, TRENDnet, and many more. I found a list of affected devices courtesy of Mainstream Technologies but this is only a partial list. Alongside its list, Mainstream Technologies warns that: “If your device is over 10 years old, it definitely will not get a patch. If it is over 5 years it probably will not get a patch”.

So even if your device is not on it, that doesn’t mean it’s not vulnerable. Any device that uses a Realtek RTL819D chipset is vulnerable and the bots scanning the internet for vulnerable devices will definitely be able to find them.

It is cases like these that could end up to be a deciding factor in the discussion whether vendors/governments/law enforcement should be allowed to patch vulnerable systems that do not belong to them or to the infrastructure they are responsible for.

Stay safe, everyone!

The post Realtek-based routers, smart devices are being gobbled up by a voracious botnet appeared first on Malwarebytes Labs.

Criminals exploited weak checks and old tech to pull off vast COVID benefit fraud

In life, when you encounter something momentuous—a sudden job loss, a routine check-up that revealed an illness you can’t afford the medical bills for—you can be assured that the federal or state government has benefits you can apply for it. And where there are benefits, you can also be assured that there will be individual scam artists and national (if not international) cybercrime gangs attempting to get those benefits by fraudulent means.

It was no different when the COVID pandemic hit.

And while there are domestic fraudsters in the US, the biggest agents of pandemic-related scams and fraud, according to law enforcement officials and private experts, are outside the country and read like a who’s who of cybercrime stereotypes: Nigerian scammers, Chinese hackers, and Russian mobsters.

The fraudulent filing of claims related to the COVID pandemic has been an on-and-off topic of discussion in news sites. And American nationals and legal residents in the US, in particular, who have lost their jobs due to the pandemic recession are the ones at the losing end of every fraud story out there.

According to the same law enforcement officials speaking to NBC News, the federal government “cannot say for sure how much of the more than $900 billion in pandemic-related unemployment relief has been stolen, but credible estimates range from $87 million to $400 billion—at least half of which went to foreign criminals”.

NBC News has pointed out that if you compare the amount being stolen via pandemic-related unemployment relief fraud, it dwarfs the annual budget the federal government allots on intelligence gathering or K-12 education. It even far outweighs the annual economic cost of ransomware attacks, which some put at around $20 billion USD.

“This is perhaps the single biggest organized fraud heist we’ve ever seen,” RSA’s Armen Najarian was quoted saying. Najarian had tracked down a Nigerian ring that was able to plunder millions of US dollars from many US states.

Exploiting weak ID checks

Criminals have been taking advantage of the Pandemic Unemployment Assistance (PUA) program, using stolen identities to land individual payouts of up to $20,000 USD.

When you file for unemployment relief, you have to prove that you were employed, before the pandemic affected your status. Some states have sought out the use of ID.me, which supplied NBC with a rogue’s gallery of pictures showing fraudsters trying to pull the wool over the eyes of the verification process with an assortment of silicon masks, barbie doll heads, and deepfake videos.

NBC reports that federal watchdogs have been flagging the weakness of some state’s verification methods for years—and the criminals know they can game the system.

In fact, the unemployment verification process in some states is so bad that prison and jail inmates were able to successfully apply for COVID-19 unemployment compensation.

Because of the rampant fraud of this nature, the Office of Inspector General (OIG) issued an alert to the US Department of Labor (DOL) that it should “take immediate action and increase its efforts to ensure SWAs,” or State Workers Agencies, “implement effective controls to mitigate fraud in these high risk areas.” The memo also identified potential fraud benefits paid in the following four areas:

  1. Multi-State Claimants — totalling $3.5 billion in UI benefits paid;
  2. Social Security Numbers of Deceased Individuals — totalling $58.7 million in UI benefits paid;
  3. Federal Prisons — totalling $98.3 million in UI benefits paid; and
  4. Suspicious Email Accounts — totalling $2 billion in UI benefits paid.

Since many states have already opted out (or will be opting out) of some or all of the unemployment relief stimulus as early as July 2021, it is expected that fraudsters will be moving on to other opportunities to make a COVID buck.

Outdated technology

Criminals are also exploiting a lack of data sharing between states. Almost half of states in the US have yet to join a national data exchange to check Social Security Numbers (SSNs), which can make it possible to use one SSN to file a claim in multiple states. Also, some states have not been sharing fraud data even though it’s required by federal law. On top of that, the IOG also released a report in May 2021 revealing that 40 percent of states did not perform the required Benefit Payment Control (BPC) activities (database identity checks), and 88 percent did not do the recommended BPC cross-matches.

Regardless of how fraudsters were able to get their hands on COVID government benefits, they are quick to move the money. Foreign organized criminals, for example, use mobile payment services—Cash App, in particular—to either move money or covert the stolen money to bitcoins, before moving it overseas. Sometimes, they also sought the aid of money mules to move cash.

Reporting fraud

If you think you might be a victim of pandemic-related relief fraud you should report it to:

  • Your employer,
  • Your state unemployment benefits agency, and
  • the Federal Trade Commission (FTC) via IdentityTheft.gov.

The FTC will also help you with what to do next to recover from the incident of stolen identity. You might also reach out to the Identity Theft Resource Center (ITRC), a not-for-profit organization that has helpful resources you can use to resolve ID theft and fraud problems.

It’s also a good idea to freeze your credit, which in turn makes it a lot more challenging for the fraudster to use your identity to open a new account.

Lastly, it’s a good idea to review your credit reports every now and then.

Stay safe!

The post Criminals exploited weak checks and old tech to pull off vast COVID benefit fraud appeared first on Malwarebytes Labs.

A week in security (August 16 – August 22)

Last week on Malwarebytes Labs:

Other cybersecurity news:

Stay safe, everyone!

The post A week in security (August 16 – August 22) appeared first on Malwarebytes Labs.

Patch now! Microsoft Exchange is being attacked via ProxyShell

Last Saturday the Cybersecurity and Infrastructure Security Agency issued an urgent warning that threat actors are actively exploiting three Microsoft Exchange vulnerabilities—CVE-2021-34473, CVE-2021-34523, and CVE-2021-31207. These vulnerabilities can be chained together to remotely execute arbitrary code on a vulnerable machine.

This set of Exchange vulnerabilities is often grouped under the name ProxyShell. Fixes were available in the May 2021 Security Updates issued by Microsoft. (To be more precise, the first two were patched in April and CVE-2021-31207 was patched in May.)

The attack chain

Simply explained, these three vulnerabilities can be chained together to allow a remote attacker to run code on the unpatched server. Attackers use them as follows:

  • Get in with CVE-2021-31207, a Microsoft Exchange Server security feature bypass vulnerability. The vulnerability allows a remote user to bypass the authentication process.
  • Take control with CVE-2021-34523, a Microsoft Exchange Server elevation of privilege (EoP) vulnerability. The vulnerability allows a user to raise their permissions.
  • Do bad things with CVE-2021-34523, a Microsoft Exchange Server remote code execution (RCE) vulnerability. The vulnerability allows an authenticated user to execute arbitrary code in the context of SYSTEM and write arbitrary files.

ProxyShell

The Record reports that ProxyShell has been used to take over some 2,000 Microsoft Exchange mail servers in just two days. This can only happen where organisations use the on-premise version of Exchange, and system administrators haven’t installed the April and May patches.

We know there are many reasons why patching is difficult, and often slow. The high number is surprising though, given the noise level about Microsoft Exchange vulnerabilities has been high since March. Although it may have been muffled by the other alarm cries about PrintNightmare, HiveNightmare, PetitPotam, and many others.

Ransomware

Several researchers have pointed to a ransomware group named LockFile that combines ProxyShell with PetitPotam. Kevin Beaumont has documented how his Exchange honeypot detected exploitation by ProxyShell to drop a webshell. Later, the threat actor revisited to initiate the staging of artefacts related to the LockFile ransomware. For those interested in how to identify whether their servers are vulnerable, and technical details about the stages in this attack, we highly recommend you read Kevin Beaumont’s post.

PetitPotam

Before we can point out how ProxyShell can lead to a full blown network-wide ransomware infection we ought to tell you more about PetiPotam. PetitPotam enables a threat actor to launch an NTLM relay attack on domain controllers.

PetitPotam uses the EfsRpcOpenFileRaw function of the Microsoft Encrypting File System Remote Protocol (MS-EFSRPC) API. MS-EFSRPC is used for maintenance and management operations on encrypted data that is stored remotely, and accessible over a network. The PetitPotam proof-of-concept (PoC) takes the form of a manipulator-in-the-middle (MitM) attack against Microsoft’s NTLM authentication system. The targeted computer is forced to initiate an authentication procedure and share its authentication details via NTLM.

Since the PetitPotam attack is not based on a vulnerability but uses a legitimate function in a way that was not intended, it will be hard to patch for this attack without “breaking stuff.” Further, stopping the Encrypting File System (EFS) service does not prevent the technique from being exploited. (For mitigation details, see our post about PetitPotam.)

LockFile

LockFile attacks have been recorded mostly in the US and Asia, focusing on organizations in financial services, manufacturing, engineering, legal, business services, travel, and tourism. Symantec pointed out in a blog post that the ransom note from LockFile ransomware is very similar to the one used by the LockBit ransomware group and that they reference the Conti gang in their email address. This may mean that members of those gangs have started a new operation, or just be another indication of how all these gangs are connected, and sharing resources and tactics.

Advice

CISA strongly urges organizations to identify vulnerable systems on their networks and immediately apply Microsoft’s Security Update from May 2021—which remediates all three ProxyShell vulnerabilities—to protect against these attacks.

We would like to add that you have a look at the mitigation advice for PetitPotam and prioritize tackling these problems in your updating processes.

Stay safe, everyone!

The post Patch now! Microsoft Exchange is being attacked via ProxyShell appeared first on Malwarebytes Labs.

New variant of Konni malware used in campaign targetting Russia

This blog post was authored by Hossein Jazi

In late July 2021, we identified an ongoing spear phishing campaign pushing Konni Rat to target Russia. Konni was first observed in the wild in 2014 and has been potentially linked to the North Korean APT group named APT37.

We discovered two documents written in Russian language and weaponized with the same malicious macro. One of the lures is about the trade and economic issues between Russia and the Korean Peninsula. The other one is about a meeting of the intergovernmental Russian-Mongolian commission.

In this blog post we provide on overview of this campaign that uses two different UAC bypass techniques and clever obfuscation tricks to remain under the radar.

Attack overview

The following diagram shows the overall flow used by this actor to compromise victims. The malicious activity starts from a document that executes a macro followed by a chain of activities that finally deploys the Konni Rat.

k 1
Figure 1: Overall Process

Document analysis

We found two lures used by Konni APT. The first document “Economic relations.doc” contains a 12 page article that seems to have been published in 2010 with the title: “The regional economic contacts of Far East Russia with Korean States (2010s)“. The second document is the outline of a meeting happening in Russia in 2021: “23th meeting of the intergovernmental Russian-Mongolian commission on Trade, Economic, scientific and technical operation“.

lures
Figure 2: Lures used by Konni APT

These malicious documents used by Konni APT have been weaponized with the same simple but clever macro. It just uses a Shell function to execute a one-liner cmd command. This one liner command gets the current active document as input and looks for the "^var" string using findstr and then writes the content of the line staring from “var” into y.js. At the end it calls Wscript Shell function to executes the Java Script file (y.js).

The clever part is that the actor tried to hide its malicious JS which is the start of its main activities at the end of the document content and did not put it directly into the macro to avoid being detected by AV products as well as hiding its main intent from them.

macro
Figure 3: Macro

The y.js file is being called with the active document as its argument. This javascript looks for two patterns encoded within the the active document and for each pattern at first it writes that content starting from the pattern into temp.txt file and then base 64 decodes it using its built-in base64 decoder function, function de(input), and finally writes the decoded content into the defined output.

yy.js is used to store the data of the first decoded content and y.ps1 is used to store the data of the second decoded content. After creating the output files, they are executed using Wscript and Powershell.

yjs scaled
Figure 4: y.js

The Powershell script (y.ps1), uses DllImport function to import URLDownloadToFile from urlmon.dll and WinExec from kernel32.dll. After importing the required functions it defines the following variabbles:

  • URL to download a file from it
  • Directory to store the downloaded file (%APPDATA%/Temp)
  • Name of the downloaded file that will be stored on disk.

In the next step it calls URLDownloadToFile to download a cabinet file and stores it in the %APPDATA%Temp directory with the unique random name created by GetTempFileName. At the end it uses WinExec to execute a cmd command that calls expand to extract the content of cabinet file and delete the cabinet file. The y.ps1 is deleted at the end using Winexec.

psfile
Figure 5: y.ps1

The extracted cabinet file contains 5 files: check.bat, install.bat, xmlprov.dll, xmlprov.ini and xwtpui.dll. The yy.js is responsible to execute check.bat file that extracted from the cabinet file and delete itself at the end.

yy.js
Figure 6: yy.js

Check.bat

This batch file checks if the command prompt is launched as administrator using net session > nul and if that is the case, it executes install.bat. If the user does not have the administrator privilege, it checks the OS version and if it is Windows 10 sets a variable named num to 4, otherwise it sets it to 1. It then executes xwtpui.dll using rundll32.exe by passing three parameters to it: EntryPoint (The export function of the DLL to be executed), num (the number that indicated the OS version) and install.bat.

check
Figure 7: check.bat

Install.bat

the malware used by the attacker pretends to be the xmlprov Network Provisioning Service. This service manages XML configuration files on a domain basis for automatic network provisioning.
Install.bat is responsible to install xmlprov.dll as a service. To achieve this goal, it performs the following actions:

  • Stop the running xmlprov service
  • Copy dropped xmlprov.dll and xmlrov.ini into the system32 directory and delete them from the current directory
  • Check if xmlProv service is installed or not and if it is not installed create the service through svchost.exe
  • Modify the xmlProv service values including type and binpath
  • Add xmlProv to the list of the services to be loaded by svchost
  • add xmlProv to the xmlProv registry key
  • Start the xmlProv service
install
Figure 8: Install.bat

xwtpui.dll

As we mentioned earlier if the victim’s machine does not have the right privilege, xwtpui.dll is being called to load install.bat file. Since install.bat is creating a service, it should have the high integrity level privilege and "xwtpui.dll" is used to bypass UAC and get the right privilege and then loads install.bat.

EntryPoint is the main export function of this dll. It starts its activities by resolving API calls. All the API call names are hard coded and the actor has not used any obfuscation techniques to hide them.

mainswt
Figure 9: EntryPoint

In the next step, it checks privilege level by calling the Check_Priviledge_Level function. This function performs the following actions and returns zero if the user does not have the right privilege or UAC is not disabled.

  • Call RtlQueryElevationFlags to get the elevation state by checking PFlags value. If it sets to zero, it indicates that UAC is disabled.
  • Get the access token associated to the current process using NtOpenProcessToken and then call NtQueryInformationToken to get the TokenElevationType and check if it’s value is 3 or not (If the value is not 3, it means the current process is elevated). The TokenElevationType can have three values:
    • TokenElevationDefault (1): Indicates that UAC is disabled.
    • TokenElevationTypeFull (2): Indicates that the current process is running elevated.
    • TokenElevationTypeLimited (3): Indicates that the process is not running elevated.
CheckPrivelege
Figure 10: Check privilege level

After checking the privilege level, it checks the parameter passed form check.bat that indicates the OS version and if the OS version is Windows 10 it uses a combination of a modified version of RPC UAC bypass reported by Google Project Zero and Parent PID Spoofing for UAC bypass while for other Windows versions it uses “Token Impersonation technique” technique to bypass UAC.

Token Impersonation UAC Bypass (Calvary UAC Bypass)

Calvary is a token impersonation/theft privilege escalation technique that impersonates the token of the Windows Update Standalone Installer process (wusa.exe) to spawn cmd.exe with highest privilege to execute install.bat. This technique is part of the US CIA toolsets leak known as Vault7.

The actor has used this method on its 2019 campaign as well. This UAC bypass starts by executing wusa.exe using ShellExecuteExw and gets its access token using NtOpenProcessToken. Then the access token of wusa.exe is duplicated using NtDuplicatetoken. The DesiredAccess parameter of this function specifies the requested access right for the new token. In this case the actor passed TOKEN_ALL_ACCESS as DesiredAccess value which indicates that the new token has the combination of all access rights of this current token. The duplicated token is then passed to ImpersonateLoggedOnUser and then a cmd instance is spawned using CreateProcessWithLogomW. At the end the duplicated token is assigned to the created thread using NtSetINformationThread to make it elevated.

cavalry
Figure 11: Cavalry PE

Windows 10 UAC Bypass

The UAC bypass used for Windows 10 uses a combination of a modified version of RPC based UAC bypass reported by Google project Zero and Parent PID spoofing to bypass UAC. The process is as follows:

  • Step 1: Creates a string binding handle for interface id “201ef99a-7fa0-444c-9399-19ba84f12a1a” and returns its binding handle and sets the required authentication, authorization and security Quality of service information for the binding handle.
bind
Figure 12: RPC Binding
  • Step 2: Initializes an RPC_ASYNC_STATE to make asynchronous calls and creates a new non-elevated process (it uses winver.exe as non-elevated process) through NdrAsyncClientCall.
asyncCall
Figure 13: RPC AsyncCall
  • Step 3: Uses NtQueryInformationProcess to Open a handle to the debug object by passing the handle of the created process to it. Then detaches the debugger from the process using NtRemoveProcessDebug and terminates this created process using TerminateProcess.
detach
Figure 14: Detach the process
  • Step 4: Repeats the step 1 and step 2 to create a new elevate process: Taskmgr.exe.
  • Step 5: Get full access to the taskmgr.exe process handle by retrieving its initial debug event.  At first It issues a wait on the debug object using WaitForDebugEvent to get the initial process creation debug event and then uses NtDuplicateObject to get the full access process handle.
taskmgr
Figure 15: Create Auto elevated process (TaskMgr.exe)
  • Step 6: After obtaining the fully privileged handle of Taskmgr.exe, the actor uses this handle to execute cmd as high privilege process to execute install.bat. To achieve this, the actor has used Parent PID Spoofing technique to spawn a new cmd process using CreateProcessW and handle of Taskmgr.exe which is an auto elevated process is assigned as its parent process using UpdateProcThreadAttribute.
pidspoof
Figure 16: Parent PID Spoofing

Xmlprov.dll (Konni Rat)

This is the final payload that has been deployed as a service using svchost.exe. This Rat is heavily obfuscated and is using multiple anti-analysis techniques. It has a custom section named “qwdfr0” which performs all the de-obfuscation process. This payload register itself as a service using its export function ServiceMain.

servicemain
Figure 17: ServiceMain

Even though this sample is heavily obfuscated its functionality has not changed much and it is similar to its previous version. It seems the actor just used a heavy obfuscation process to hinder all the security mechanisms. VirusTotal detection of this sample at the time of analysis was 3 which indicates that the actor was successful in using obfuscation and bypass most of the AV products.

This RAT has an encrypted configuration file “xmlprov.ini” which will be loaded and decrypted at the start of the analysis. The functionality of this RAT starts by collecting information from the victim’s machine by executing the following commands:

  • cmd /c systeminfo: Uses this command to collect the detailed configuration information about the victim’s machine including operation system configurations, security information and hardware data (RAM size, disk space and network cards info) and store the collected data in a tmp file.
  • cmd /c tasklist: Executes this command to collect a list of running processes on victim’s machine and store them in a tmp file.

In the next step each of the the collected tmp files is being converted into a cab file using cmd /c makecab and then encrypted and sent to the attacker server in an HTTP POST request (http://taketodjnfnei898.c1.biz/up.php?name=%UserName%).

upload
Figure 18: Upload data to server

After sending data to server it goes to a loop to receive commands from the server (http://taketodjnfnei898.c1.biz/dn.php?name=%UserName%&prefix=tt). At the time of the analysis the server was down and unfortunately we do not have enough information about the next step of this attack. The detail analysis of this payload will be published in a follow up blog post.

Campaign Analysis

Konni is a Rat that potentially is used by APT37 to target its victims. The main victims of this Rat are mostly political organizations in Russia and South Korea but it is not limited to these countries and it has been observed that it has targeted Japan, Vietnam, Nepal and Mongolia.

There were several operations that used this Rat but specifically the campaigns reported by ESTsecurity and CyberInt in 2019 and 2020 are similar to what we reported here. In those campaigns the actor used lures in Russian language to target Russia. There are several differences between past campaigns of this actor and what we documented here but still the main process is the same: in all the campaigns the actor uses macro weaponized documents to download a cab file and deploy the Konni RAT as a service.

Here are the some major differences between this new campaign and older ones:

  • The macros are different. In the old campaign the actor used TextBoxes to store its data while in the new one the content has been base64 encoded within the document content.
  • In the new campaign JavaScript files have been used to execute batch and PowerShell files.
  • The new campaign uses Powershell and URLMON API calls to download the cab file while in the old campaign it used certutil to download the cab file.
  • The new campaign has used two different UAC bypass techniques based on the victim’s OS while in the old one the actor only used the Token Impersonation technique.
  • In the new campaign the actor has developed a new variant of Konni RAT that is heavily obfuscated. Also, its configuration is encrypted and is not base64 encoded anymore. It also does not use FTP for exfiltration.

Malwarebytes customers are protected against this campaign.

block

IOCs

name Sha256
N/A fccad2fea7371ad24a1256b78165bceffc5d01a850f6e2ff576a2d8801ef94fa
economics relations.doc d283a0d5cfed4d212cd76497920cf820472c5f138fd061f25e3cddf65190283f
y.js 7f82540a6b3fc81d581450dbdf7dec7ad45d2984d3799084b29150ba91c004fd
yy.js 7a8f0690cb0eb7cbe72ddc9715b1527f33cec7497dcd2a1010def69e75c46586
y.ps1 617f733c05b42048c0399ceea50d6e342a4935344bad85bba2f8215937bc0b83
 tmpBD2B.tmp 10109e69d1fb2fe8f801c3588f829e020f1f29c4638fad5394c1033bc298fd3f
check.bat a7d5f7a14e36920413e743932f26e624573bbb0f431c594fb71d87a252c8d90d
install.bat 4876a41ca8919c4ff58ffb4b4df54202d82804fd85d0010669c7cb4f369c12c3
xwtpui.dll 062aa6a968090cf6fd98e1ac8612dd4985bf9b29e13d60eba8f24e5a706f8311
xmlprov.dll f702dfddbc5b4f1d5a5a9db0a2c013900d30515e69a09420a7c3f6eaac901b12
xmlprov.dll 80641207b659931d5e3cad7ad5e3e653a27162c66b35b9ae9019d5e19e092362
xmlprov.ini 491ed46847e30b9765a7ec5ff08d9acb8601698019002be0b38becce477e12f6

Domains:
takemetoyouheart[.]c1[.]biz
taketodjnfnei898[.]ueuo[.]com
taketodjnfnei898[.]c1[.]biz
romanovawillkillyou[.]c1[.]biz

The post New variant of Konni malware used in campaign targetting Russia appeared first on Malwarebytes Labs.

Largest DDoS attack ever reported gets hoovered up by Cloudflare

On the Cloudflare blog, the American web infrastructure behemoth that provides content delivery network (CDN) and DDoS mitigation services reports that it detected and mitigated a 17.2 million request-per-second (rps) DDoS attack. To put that number in perspective. The company reports that this is three times as large as anything it has seen before.

DDoS

In a DDoS attack, an attacker tries to stop people from using a service by making it so busy it either crashes or grinds to a halt. It does this by flooding the service with spurious requests from multiple, distributed locations.

If hacking is opening a door by picking its lock, then DDoS is blocking the door by boarding it up from the outside.

The target

The target of this enormous DDoS attack was a customer of Cloudflare in the financial sector. Cloudflare reports that within seconds, the botnet bombarded the its edge with over 330 million requests.

For Internet devices, the network edge is where the device, or the local network containing the device, communicates with the Internet. The “edge” in this case refers to the Cloudflare CDN, which customers use to improve the performance of their websites. CDNs are geographically dispersed clusters of servers that store web content. When users try to access a website that uses a CDN, they actually get directed to the nearest CDN server rather than the website itself, and Cloudflare handles the web traffic. Similarly, if somebody tries to DDoS attack the website, the attack ends up hitting the Cloudflare CDN.

The Cloudflare CDN is absolutely enormous, and is used by almost 20% of all websites, which means it can handle an absolutely enormous amount of traffic.

The botnet

The attack traffic is reported to have originated from more than 20,000 bots in 125 countries around the world. Based on the bots’ source IP addresses, almost 15% of the attack originated from Indonesia and another 17% from India and Brazil combined. Cloudflare attributes this attack to the Mirai botnet. Although the number of Mirai bots is on the decline, the botnet was still able to generate impressive volumes of attack traffic for short periods.

You may remember hearing about this botnet after the massive East Coast internet outage of 2016 when the Mirai botnet was leveraged in a DDoS attack aimed at Dyn, an Internet infrastructure company. Traffic to Dyn’s Internet directory servers throughout the US—primarily on the East Coast but later on the opposite end of the country as well—was stopped by a flood of malicious requests from tens of millions of IP addresses disrupting the system.

Although it hasn’t generated headlines like that for a few years, we recently we posted about how Mirai was trying to add a host of home routers to its collection of compromised devices. It was found hijacking routers using a vulnerability that was disclosed only two days earlier

As it happens Microsoft wrote about the Mozi botnet, which is essentially a Mirai variant, going after Netgear, Huawei, and ZTE gateways by using clever persistence techniques that are specifically adapted to each gateway’s particular architecture. Last year, security experts from IBM X-Force said that the Mozi botnet accounted for 90 percent of traffic from IoT devices at that time.

Vulnerabilities

Mirai works by harnessing tens of thousands of small, low-powered Internet-of-Things (IoT) devices, such as Internet-connected cameras and home routers. Although each device it compromises only adds a little horsepower to Mirai’s engine, there are plenty of them to hijack.

Vulnerabilities in home networking equipment often go unpatched for long periods. Since most home users are unaware of the existence of such vulnerabilities and many lack the skills and/or confidence to apply a patch if one is made available.

And almost the same can be said about many small and medium-sized businesses. As long as the equipment works many fail to see the need for patching or the need to replace vulnerable devices. In some cases patches are not even made available when devices are replaced by newer models. Or because vendors fail to inform users about the vulnerability existing in the first place.

Mitigation

When it coms to blocking DDoS attacks there is not much businesses can do, except hire specialized help. But there are some things you can do so you do not become part of the problem.

Businesses and consumers alike should also start worrying about securing their IoT devices in a manner that they can’t be used in a DDoS botnet. We have an excellent article called Internet of Things (IoT) security: what is and what should never be that explains in detail why and how you can make the IoT a safer place.

And maybe, just maybe, we should try and work out Internet protocols that are designed so that they do not offer opportunities for DDoS attacks.

The post Largest DDoS attack ever reported gets hoovered up by Cloudflare appeared first on Malwarebytes Labs.