🕳️
The Cyber Security Library
  • The Library
  • Offensive Security
    • Solar, Exploiting log4j
      • Reconnaissance
      • Discovery
      • Proof of Concept
      • Exploitation
    • Basic Authentication Bypass
      • Username Enumeration
      • Brute Force
      • Logic Flaw
      • Cookie Tampering
    • Insekube
      • Recon with Nmap
      • Checking out the web address
      • Creating a Reverse shell
      • Inside the Kubernetes pod
      • CVE-2021-43798
    • Snort
      • What is Snort? (For the uninitiated)
      • Task exercise
      • Traffic Generator
      • Brief overview of IDS and IPS
      • Checking Snort
      • Snort Sniffer mode
      • Packet Logger mode
    • Runtime Detection Evasion
      • Learning Objectives of AMSI
      • Runtime detections
      • AMSI Overview
      • AMSI Instrumentation
      • Powershell Downgrade
      • Powershell Reflection
      • Patching AMSI
    • Red team recon using OSINT
      • Taxonomy of Reconnaissance
      • Built-in tools
      • Advanced Searching
      • Specialized Search Engines
  • Malware
    • Introduction to Malware Analysis
      • What are the different types of malware analysis
      • Doing different types of analysis
      • Anti analysis techniques
    • Ransomeware: Maze
    • Exploring Steganography
    • Simple Trojan with Python
      • The Python Trojan
      • Breaking down the python code
  • Vulnerability Management
    • Nessus
      • Introduction
      • Nessus Essentials
      • Scans
      • Authenticated Scans
      • Results
      • Running custom scans
  • Cloud
    • AWS
      • AWS CDK: Deploy and using amazon SQS Que from Repo
        • Node modules and Bootstrapping troubleshooting
        • Sending and Receiving information from the stack
        • Destroying the stack and cleaning up
      • Using Different AWS Services with Splunk
        • AWS Config
          • How Does Config work?
          • How to enable Config
          • Settings
          • Aggregation
          • Creating Config Resource
          • Creating Aggregator
          • Adding Rules
        • CloudTrail
          • What is CloudTrail?
          • Features of CloudTrail
          • Benefits of CloudTrail
          • CloudTrail Event History
          • Securing CloudTrail
        • EventBridge
          • Configuring EventBridge and Event Patterns
          • EventBridge Targets
        • CloudWatch
          • The CloudWatch Dashboard
            • Virtual Machine
          • CloudWatch Alarms and Metric Filters
            • Searching logs using metric filters
            • CloudWatch Alarms
          • CloudWatch CIS Alarms
            • SNS
        • Configuring VPC Flow Logs
          • An introduction to VPC flow logs
        • Automating Incident Response with EventBridge
          • Creating Lambda functions
        • CloudTrail SIEM Integration (Splunk)
          • AWS architecture for integrating with Splunk
      • AWS DevOps EBS Volumes
        • CloudWatch
        • EBS Volume
        • Lambda
      • EKS Creating a deployment with AWS in the command Line
        • Setting up AWS Cloud9
        • Creating a Cluster
        • Creating Deployment
      • How to CloudShell SSH in to ec2 Instances
    • Azure
      • Worker CTF (Azure DevOps)
        • Enumeration
        • Using SVN
        • Exploring the Domain
        • Cracking Azure DevOps console
      • Software development environments and Azure DevOps pipeline abuse
        • Accessing Azure Devops
        • Exploring Project Pages
  • Splunk
    • Splunk SIEM Integration
      • AWS architecture for integrating with Splunk
    • Splunk Threat Hunting Ep.6 Credential Access
  • DevOps
    • Using AWS, Docker, Jenkins and SonarQube to improve code quality
      • Updating the Cloud Instance and Getting Docker
      • Installing SonarQube
      • Creating Jenkins Server
      • Manaing SonarQube and Jenkins
    • Creating a Codebuild project and getting the output with CloudWatch Logs
      • IAM
      • CodeBuild
  • CTF's
    • THM Wonderland
      • Nmap and Gobuster
      • Entering Wonderland
      • Privilege Escalation
    • Healthcare OpenEMR system -THM Plotted EMR
      • Recon with Nmap
      • Exploring the ports found
      • Gobuster
      • Searchsploit Open emr
    • Steam Cloud CTF Exploiting Kubernetes
      • SteamCloud Privilege Escalation
    • THM Flatline CTF
      • Recon with Nmap
      • Searchsploit for freeswitch
      • Using the exploit
      • Escalating my privileges
      • Gaining access inside the Windows RDP
    • Biteme CTF
      • Recon
      • Looking into the PHP code and decoding hexadecimal
      • Python script and Bash script
      • Bruteforcing MFA Code
      • Trying to gain access via SSH
      • Inside SSH
      • Fail2ban Privilege Escalation
    • Devoops CTF
      • Enumeration
      • Exploiting Web Page
      • Creating Python exploit
    • GoBox CTF
      • Enumeration
      • Using Burpsuite and creating Reverse shell
    • Explore: Android Box
      • Enumeration
      • Initial foothold
      • Privilege escalation
Powered by GitBook
On this page
  • Delivery
  • Web drive by
  • Macro docs
  • Email
  • The ransomware
  • Stolen files
  • Log analysis
  • Ransomware Lab
  • Analysis Lab
  1. Malware

Ransomeware: Maze

PreviousAnti analysis techniquesNextExploring Steganography

Last updated 1 year ago

Attackers use Maze ransomware to encrypt organizations' files and issue ransom demands in return for the decryption keys. In this lab, you’ll observe how attackers execute the Maze ransomware strain. You’ll then perform static, dynamic, and log analysis tasks to extract indicators of compromise from the malware and its behavior.

Delivery

Maze operates under an affiliate model, commonly referred to as ransomware as a service. The affiliates have used several distribution methods to target their victims. Attacks can be either targeted or indiscriminate, depending on the affiliate.

Web drive by

Initially, the primary method of malware delivery was web exploit kits implanted in legitimate websites.

Macro docs

More recently, Office documents with macros have been used to deliver and install the ransomware on victim machines. These tend to use standard phishing themes: tax, invoice, deliveries, and trending news stories.

Email

Throughout the campaigns, email has been used to deliver infected documents or links to compromised websites. These emails match the themes used for the malicious attachments.

The ransomware

Like most modern malware, Maze has a "secure" implementation – meaning when files are encrypted, they can't be decrypted again unless the ransom is paid and the attacker sends over the recovery key.

The encryption uses a combination of ChaCha and RSA-2048 on all but essential operating system files. The ransomware will also target all drives on the infected machine, including USB drives and shared network drives.

It doesn't have the ability to self-replicate across networks, but in the event of manual exploitation, it's possible the operator could reach multiple hosts.

Maze operators run an interactive website with live help; this website can be accessed via the dark web or a standard internet browser. It has the ability to prove they can decrypt files with a free test.

Stolen files

As with most ransomware operators, there's been a shift to post-compromise deployment of the ransomware. This shift enables operators to exfiltrate stolen documents that can be used as leverage when attempting to force a ransom payment.

This technique is not new to Maze and has been observed by other malware families.

Log analysis

When ransomware is executed on a host with logging enabled, several key indicators can reveal when ransomware is running. This lab uses a custom Sysmon configuration to only filter specific events.

Useful Sysmon event logs to search for include:

  • Event ID 1: Process creation

  • Event ID 11: FileCreate

  • Event ID 23: FileDelete

Additional common indicators can include commands used to delete backup files or volume shadows.

With a set of known behaviors, you can create Sigma rules to aid investigations. Below is an example Sigma rule that detects shadow copies being deleted.

I have access to a compromised Windows machine, event logs, and the ransomware sample that's been executed.

I’ll need to observe the initial execution of the Maze ransomware strain and perform static, dynamic, and log analysis tasks to extract indicators of compromise (IoCs) from the malware and its behaviour.

Ransomware Lab

Analysis Lab

Using Splunk to find what standard windows management tool does Maze run after being executed and what arguments are supplied to the executable

Now conduct analysis in Ghidra

Using Ghidra to find the name of the imported DLL that exposes the cryptographic functionality. Within the imports the Crypto folder gave it away.

Using Ghidra to identify the memory address of the ‘entry’ function

Using defined strings to find the memory address of the ransomware note