Quantify the value of Netskope One SSE – Get the 2024 Forrester Total Economic Impact™ study

close
close
  • Why Netskope chevron

    Changing the way networking and security work together.

  • Our Customers chevron

    Netskope serves more than 3,400 customers worldwide including more than 30 of the Fortune 100

  • Our Partners chevron

    We partner with security leaders to help you secure your journey to the cloud.

A Leader in SSE. Now a Leader in Single-Vendor SASE.

Learn why Netskope debuted as a leader in the 2024 Gartner® Magic Quadrant™️ for Single-Vendor Secure Access Service Edge

Get the report
Customer Visionary Spotlights

Read how innovative customers are successfully navigating today’s changing networking & security landscape through the Netskope One platform.

Get the eBook
Customer Visionary Spotlights
Netskope’s partner-centric go-to-market strategy enables our partners to maximize their growth and profitability while transforming enterprise security.

Learn about Netskope Partners
Group of diverse young professionals smiling
Your Network of Tomorrow

Plan your path toward a faster, more secure, and more resilient network designed for the applications and users that you support.

Get the white paper
Your Network of Tomorrow
Netskope Cloud Exchange

The Netskope Cloud Exchange (CE) provides customers with powerful integration tools to leverage investments across their security posture.

Learn about Cloud Exchange
Aerial view of a city
  • Security Service Edge chevron

    Protect against advanced and cloud-enabled threats and safeguard data across all vectors.

  • SD-WAN chevron

    Confidently provide secure, high-performance access to every remote user, device, site, and cloud.

  • Secure Access Service Edge chevron

    Netskope One SASE provides a cloud-native, fully-converged and single-vendor SASE solution.

The platform of the future is Netskope

Security Service Edge (SSE), Cloud Access Security Broker (CASB), Cloud Firewall, Next Generation Secure Web Gateway (SWG), and Private Access for ZTNA built natively into a single solution to help every business on its journey to Secure Access Service Edge (SASE) architecture.

Go to Products Overview
Netskope video
Next Gen SASE Branch is hybrid — connected, secured, and automated

Netskope Next Gen SASE Branch converges Context-Aware SASE Fabric, Zero-Trust Hybrid Security, and SkopeAI-powered Cloud Orchestrator into a unified cloud offering, ushering in a fully modernized branch experience for the borderless enterprise.

Learn about Next Gen SASE Branch
People at the open space office
SASE Architecture For Dummies

Get your complimentary copy of the only guide to SASE design you’ll ever need.

Get the eBook
SASE Architecture For Dummies eBook
Make the move to market-leading cloud security services with minimal latency and high reliability.

Learn about NewEdge
Lighted highway through mountainside switchbacks
Safely enable the use of generative AI applications with application access control, real-time user coaching, and best-in-class data protection.

Learn how we secure generative AI use
Safely Enable ChatGPT and Generative AI
Zero trust solutions for SSE and SASE deployments

Learn about Zero Trust
Boat driving through open sea
Netskope achieves FedRAMP High Authorization

Choose Netskope GovCloud to accelerate your agency’s transformation.

Learn about Netskope GovCloud
Netskope GovCloud
  • Resources chevron

    Learn more about how Netskope can help you secure your journey to the cloud.

  • Blog chevron

    Learn how Netskope enables security and networking transformation through secure access service edge (SASE)

  • Events and Workshops chevron

    Stay ahead of the latest security trends and connect with your peers.

  • Security Defined chevron

    Everything you need to know in our cybersecurity encyclopedia.

Security Visionaries Podcast

2025 Predictions
In this episode of Security Visionaries, we're joined by Kiersten Todt, President at Wondros and former Chief of Staff for the Cybersecurity and Infrastructure Security Agency (CISA) to discuss predictions for 2025 and beyond.

Play the podcast Browse all podcasts
2025 Predictions
Latest Blogs

Read how Netskope can enable the Zero Trust and SASE journey through secure access service edge (SASE) capabilities.

Read the blog
Sunrise and cloudy sky
SASE Week 2024 On-Demand

Learn how to navigate the latest advancements in SASE and zero trust and explore how these frameworks are adapting to address cybersecurity and infrastructure challenges

Explore sessions
SASE Week 2024
What is SASE?

Learn about the future convergence of networking and security tools in today’s cloud dominant business model.

Learn about SASE
  • Company chevron

    We help you stay ahead of cloud, data, and network security challenges.

  • Careers chevron

    Join Netskope's 3,000+ amazing team members building the industry’s leading cloud-native security platform.

  • Customer Solutions chevron

    We are here for you and with you every step of the way, ensuring your success with Netskope.

  • Training and Accreditations chevron

    Netskope training will help you become a cloud security expert.

Supporting sustainability through data security

Netskope is proud to participate in Vision 2045: an initiative aimed to raise awareness on private industry’s role in sustainability.

Find out more
Supporting Sustainability Through Data Security
Help shape the future of cloud security

At Netskope, founders and leaders work shoulder-to-shoulder with their colleagues, even the most renowned experts check their egos at the door, and the best ideas win.

Join the team
Careers at Netskope
Netskope dedicated service and support professionals will ensure you successful deploy and experience the full value of our platform.

Go to Customer Solutions
Netskope Professional Services
Secure your digital transformation journey and make the most of your cloud, web, and private applications with Netskope training.

Learn about Training and Certifications
Group of young professionals working

Khonsari: New Ransomware Delivered Through Log4Shell

Dec 16 2021

Summary

While many organizations are patching the two recent Apache Log4j vulnerabilities (CVE-2021-44228 and CVE-2021-45046), attackers have been racing to exploit them to deliver malware, such as botnets, backdoors, and cryptominers.

Among the threats delivered using Log4Shell exploits, a new ransomware family was found by Bitdefender: Khonsari. For now, only a Windows version of the malware was found, first spotted on December 11th, where attackers were using the CVE-2021-44228 vulnerability to deliver the executable. Microsoft has also spotted a few cases where Khonsari was being launched from compromised Minecraft clients.

At this point, Khonsari appears to be an individual effort, not working in the popular Ransomware-as-a-Service (RaaS) model, used by REvil, LockBit, BlackMatter, and Hive

Log4Shell

The first file involved in the attack was named “Main.class”, which is a Java downloader being delivered through Log4Shell.

Screenshot of Log4Shell pattern that could be used to deliver Khonsari
Log4Shell pattern that could be used to deliver Khonsari

The Java file is a simple downloader, and two days after Khonsari was first spotted, December 13th, the attackers changed the “Main.class” file to deliver another malware known as Orcus RAT.

Screenshot of Java file delivered through Log4Shell, downloading Orcus RAT.
Java file delivered through Log4Shell, downloading Orcus RAT.

Khonsari Ransomware

The ransomware was developed in .NET, where the attacker has manipulated the compiled time date stamp to 46 years in the future.

Screenshot of Khonsari binary details.
Khonsari binary details.

The malware developer has used minor obfuscation to hide some classes, functions, and variable names.

Screenshot of Decompiled Khonsari.
Decompiled Khonsari.

All the strings used by the ransomware are encrypted, using a quite simple rolling XOR algorithm, which can be represented by the following Python code:

Screenshot of decrypting Khonsari strings.
Decrypting Khonsari strings.

As soon as it runs, Khonsari sends a network request to an external server.

Screenshot of the first action in Khonsari’s main function.
The first action in Khonsari’s main function.

This is probably just for metrics, as no data is sent or received in this process. Also, we noticed that the process crashes if the URL doesn’t respond, meaning that this URL can be added to blocklists to prevent the ransomware execution.

Screenshot of network request sent by Khonsari.
Network request sent by Khonsari.

After the network request, Khonsari enumerates all available drives that are different from “C:\”. Then, it creates a list containing the directories that will be encrypted, such as Downloads, Desktop, Videos, Pictures, etc.

Screenshot of Khonsari building a list of directories.
Khonsari building a list of directories.

With all the directories enumerated, Khonsari starts the encryption process (each step listed is highlighted in the figure below):

  1. Iterating over the files in each directory;
  2. Reading and encrypting the file contents;
  3. Renaming the file to add the “khonsari” extension;
  4. Once the loop is done, it creates the ransom note, opening it automatically.
Screenshot of Khonsari encryption routine.
Khonsari encryption routine.

Throughout this process, Khonsari also checks the file extension before encrypting it. In the binary we analyzed, it skips the encryption if the file ends with “.khonsari”, “.ini”, and “ink”.

Screenshot showing that Khonsari skips the encryption according to the file’s extension.
Khonsari skips the encryption according to the file’s extension.

The last one seems to be a typo, as the developer probably wanted to skip “.lnk” files. However, this one encrypts links anyway, as the string checked by the code is “ink”.

Screenshot of Khonsari encrypting “.lnk” files
Khonsari encrypting “.lnk” files

For encryption, Khonsari uses AES 128 to encrypt the files, and RSA to encrypt the keys. This is how the flow works:

  1. The AES key and IV is generated once Khonsari runs;
  2. AES is then used to encrypt all the files, using both the key and IV previously generated;
  3. Khonsari encrypts both AES key and IV using a public RSA key hardcoded in the binary;
  4. The encrypted key and IV are then encoded with base64 and stored within the ransom note.
Screenshot of Khonsari AES + RSA encryption.
Khonsari AES + RSA encryption.

Once done, Khonsari creates the ransom note with the instructions along with the information to recover the files (encrypted/encoded AES key + IV).

Screenshot of ransomware creating the ransom note.
Ransomware creating the ransom note.

Khonsari opens the ransom note automatically to display the message to its victims.

Screenshot of Khonsari ransom note.
Khonsari ransom note.

If the user accidentally deletes the ransom note, the decryption of the files is impossible, since the key is stored along with the recovery message.

Conclusion

The vulnerabilities discovered in Apache Log4j are a nightmare for people and organizations around the world. It was just a matter of time before we start seeing Log4Shell being used to deliver threats, like Khonsari. We should be on the lookout for more threats that are abusing this vulnerability, as well as patch all systems using Log4j as soon as possible to mitigate the risks. Furthermore, Khonsari related URLs should be blocked, as the threat doesn’t work when the network request fails.

Protection

Netskope Threat Labs is actively monitoring this campaign and has ensured coverage for all known threat indicators and payloads. 

  • Netskope Threat Protection
    • ByteCode-MSIL.Ransomware.Khonsari
  • Netskope Advanced Threat Protection provides proactive coverage against this threat.
    • Gen.Malware.Detect.By.StHeur indicates a sample that was detected using static analysis
    • Gen.Malware.Detect.By.Sandbox indicates a sample that was detected by our cloud sandbox

IOCs

A full list of IOCs and a Yara rule are all available in our Git repo.

author image
Gustavo Palazolo
Gustavo Palazolo is an expert in malware analysis, reverse engineering and security research, working many years in projects related to electronic fraud protection.
Gustavo Palazolo is an expert in malware analysis, reverse engineering and security research, working many years in projects related to electronic fraud protection.

Stay informed!

Subscribe for the latest from the Netskope Blog