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

REPLAY: Revisiting Play Ransomware Anti-Analysis Techniques

Aug 08 2024

Summary

The Play ransomware, also known as PlayCrypt, is a ransomware that first emerged in June 2022. The ransomware has been targeting industries such as healthcare and telecommunication as well as a wide range of regions such as Latin America, Europe, and North America. The Play ransomware is known for gaining access to networks through compromised valid accounts or by exploiting specific vulnerabilities. Once inside the network, it uses a big pool of known post-exploitation tools to continue its attack. Tools like Bloodhound, PsExec, Mimikatz, and AdFind are some examples of tools previously used in attacks involving this ransomware.

Another aspect of the malware that makes it famous is the amount of anti-analysis techniques it uses in its payloads such as abusing SEH and using ROP to redirect the execution flow. By employing techniques to slow down the reverse engineering process, threat actors make detection and prevention of the malware more difficult. 

Back in 2022, other researchers published an excellent blog post analyzing the malware itself and some of the anti-analysis techniques it used. In this blog post, we’ll revisit the anti-analysis techniques employed by recent variants of Play ransomware, explaining how they work and also how we can defeat some of them using automation scripts.

Return-oriented programming (ROP)

When reverse engineering malware, making sure that the control flow is not obfuscated is one of the first things we need to do in order to properly understand the malware. 

As an attempt to obfuscate its control flow, the Play ransomware often uses an ROP technique in its payload. It does so by calling over a hundred functions that patch the value on the top of the stack and then redirects the execution flow to it. Before we talk about how the malware does this exactly, let’s take a look at how the CALL and RET assembly instructions work in general.

When a CALL happens (a near call in this case to be more specific), the processor pushes the value of the instruction pointer register (EIP in this case) on the stack and then branches to the address specified by the call target operand, which in this case is an offset relative to the instruction pointer. The address in the instruction pointer, plus this offset, will result in the address of the function to be called.

The RET instruction on the other hand indicates the end of a function call. This instruction is responsible for transferring the program control flow to the address on the top of the stack. And yes, this is exactly the address initially pushed by the call instruction!

Considering what was mentioned, in an ideal scenario the highlighted address in the image below would be the next instruction to be executed after a call to the target function (sub_42a4b9):

Example of a function call

What the malware does to abuse how the CALL and RET instructions work can be observed in the following image:

Example of a ROP technique used to redirect the program flow

Once the function is called, the address 0x42a4b4 is pushed to the stack, so ESP will point to it. The called function then adds the value 0xA to the address pointed by ESP and then returns using the RET instruction. These operations result in the control flow being redirected to 0x42a4be (0x42a4b4 + 0xa) instead of 0x42a4b4.

By applying this technique the malware makes not only static analysis more complex, since the program flow will not be trivial, but it can also make debugging harder because if you step over this type of function a lot of things can happen before the regular “next instruction” is executed.

Another way the malware implements this ROP technique is by using the approach shown in the code below, which is very common in shellcodes. The offset specified by the target operand of the call instruction is zero, resulting in the address of the function to be called exactly the address of the next instruction. This address is then pushed onto the top of the stack and the rest of the operations are exactly the same as the previous example:

Another example of ROP technique used

In order to help in the analysis of the Play ransomware, Netskope Threat Labs developed a script, based on previous work of other researchers, to fix the ROP obfuscation employed.

The script searches for possible ROP candidates, collects the offset to be added to the top of the stack and patches the addresses performing the ROP calls with an absolute jump, where the target is the modified transfer address calculated at runtime.

The following is an example of how the malware payload would look before and after the script execution:

Before:

Example instructions of the malware payload before the fixing script execution

After:

Example instructions of the malware payload after the fixing script execution

Anti-disassembling

An anti-disassembly technique used to trick analysts and disassemblers is to transfer the execution flow to targets located in the middle of other valid instructions.

Let’s take the function call at 0x42a4af used in the ROP section above as an example. The opcodes for that CALL instruction are “E8 05 00 00 00”. The byte 0xE8 is the opcode of the CALL instruction itself and the other 4 bytes represent the target operand (the offset relative to EIP).

As we discussed previously, the address of the function to be called would be the value of EIP (0x42a4b4) + the offset (0x5) and that results in the address 0x42a4b9. However, this value  falls into the last byte of another valid instruction at 0x42a4b5:

Example of function address in the middle of a valid instruction

In terms of execution, this type of behavior changes nothing because the processor will understand the instructions correctly. However, a disassembler might not present the instructions correctly depending on the approach it uses (e.g. linear sweep), making static analysis a bit tricky.

The script we provided to fix the ROP calls also handles this scenario for the ROP targets. Considering we use a JMP instruction to patch the calls we end up also forcing the disassembler to understand the correct flow to follow.

Junk code

Although this is a very simple technique it’s still worth mentioning because it can definitely slow down the analysis of the malware. The junk/garbage code insertion technique is exactly what the name suggests: the insertion of unnecessary instructions in the binary. 

Unlike the techniques presented so far, junk code insertion would not trick the disassembler, but it might make one waste time analyzing unnecessary code and the Play ransomware uses it quite often, especially in the ROP calls targets.