Skip to content

SenseOn SOC Playbook: Ransomware

This page gives the process that SenseOn recommends to managed providers of SenseOn, to extend the investigation of incidents in end customer estates. It also gives best practice guidance for additional manual threat hunting and containment.

Process Flowchart

Malware flowchart

Identification

If there is a ransomware incident in the estate, do the steps that follow.

  1. Initial identification can come from a SenseOn case, a SOC escalation or a customer notification. For example, a third party compromise or IOCs can trigger a SenseOn threat hunt of the estate. Ransomware typically affects multiple systems. Thus, find all affected resources. To do this, use the Hunt Lab queries in the Query Library with titles that start with ‘Threat Hunting’. Also search for IOCs such as file names and network requests to related malicious locations.
    1. In Hunt Lab, use the IOCs that you received or found to find the scope of the ransomware attack. Search for these IOCs across the full estate. Record any additional IOCs that you see during this threat hunt. Do the analysis across areas that include: Installed software, running processes, startup items, scheduled tasks and network connections.
    2. Also, do a check of the IOCs with OSINT tools such as VirusTotal. If possible, find the ransomware variant. It is possible that you also find additional IOCs from threat intelligence sources.
    3. The timeframe of the search in the environment is not always the same. Threat actors frequently get initial access and then stay dormant in the network to avoid immediate detection. We recommend that you start with a historical search of one week for the IOCs that you found. If there are artefacts that are one week old, we recommend that you increase the timeframe of the search. Continue until you find the approximate date of initial access.
    4. When it is certain that there is a ransomware attack, the customer must start its disaster recovery plan. The customer must share the plan with the SenseOn MDR provider, so that the triage efforts work together. SenseOn and the customer will also make and maintain an incident timeline. The timeline records the progress towards containment and remediation.
  2. After you assess the scope of the attack and the affected systems and users, get a sample of the malware. Analyse it for additional IOCs. To get the sample, use the ‘File Download’ Resilience script. Note: Do this at the same time as the containment actions in the Containment section. Put any new IOCs from this analysis into the previous steps. This makes sure that you find and contain all affected systems promptly.

    💡 Resilience Script Access: If you are a SenseOn MDR provider or customer, you can get access to the SenseOn Resilience script repository. If you do not have access, contact the SenseOn support team. Scripts run in an Active Response device session. Thus, you also must have Active Response access.

    1. Do static analysis of the malware on isolated machines. First, make a hash of the malware. Compare the hash with threat intelligence databases such as VirusTotal, to find if the malware strain is already known in the wild. Where possible, this saves time because you use work that others did. It can also give valuable information, and you do not have to observe the malware when it runs. Examples are the related threat actors, how they operate and how the malware itself functions.
    2. Then do dynamic analysis of the malware. In dynamic analysis, you run the malware in a safe and controlled environment. You observe how it functions and get more information about it. Typically, you use a virtual environment for this. An example is a virtual machine with monitoring software installed, such as the SenseOn agent, which you can deploy to the virtual machine.
  3. With the results of the previous steps, find patient zero of the attack. It is important to find patient zero. With it, you can track the behaviour of the threat actor and anticipate motives. It also helps the remediation that follows.
  4. Use the data exfiltration playbook to find signs of data exfiltration. Ransomware actors frequently exfiltrate data, to use it as more pressure on the victim. For more information about this, refer to the data exfiltration playbook.

Containment

To contain a ransomware threat, do the steps that follow.

Assess the wider estate

Action for provider of SenseOn MDR

During the identification stage, the investigation and analysis usually show IOCs. These IOCs can be processes, programs, scheduled tasks, startup items, services or C2 locations. Use them to assess the wider estate and to make sure that you found all affected devices. To do this, use the Hunt Lab query library items with titles that start with ‘Threat Hunting’. As an alternative, follow the steps in the malware playbook.

Assess severity

Action for provider of SenseOn MDR

During customer onboarding, SenseOn recommends that its MDR providers make an agreement with customers. The agreement says which resources in the estate must have permission before a remote session starts. It also gives the actions that the agreement permits as part of containment activity.

This agreement makes efficient and prompt containment activities possible, with the minimum risk of operational disruption. The image that follows shows a high level example of such a matrix:

Ransomware containment matrix

During the investigation, the SenseOn MDR provider will assess the sensitivity of affected hosts. This shows how business critical the affected systems are. Later, this information helps to make a recovery plan. It also helps to find which systems to address first, and how to do this with the minimum effect on the business.

To contain a ransomware threat, do the steps that follow.

Isolate affected devices

Action for provider of SenseOn MDR

Use Resilience to isolate the affected systems from the network. To do this, use the quick actions feature, or manually run the ‘Isolation’ Resilience script. For both methods, you must have Active Response access. Then make sure that the isolation of the affected devices is successful. Use one of these methods:

  • Make sure that Assets > Devices shows the devices as isolated.
  • Make sure that the SenseOn senseon.query_isolate() function in Resilience gives the isolation status ‘True’. If you print the result of this function, you can see the isolation status.
  • Manually make sure that isolated devices cannot make network connections, except to the SenseOn platform.

💡 Resilience Script Access: If you are a SenseOn MDR provider or customer, you can get access to the SenseOn Resilience script repository. If you do not have access, contact the SenseOn support team. Scripts run in an Active Response device session. Thus, you also must have Active Response access.

Isolation prevents more spread of the infection. It stops all command and control connections to ransomware operators. It also disrupts any data exfiltration efforts.

User Account Containment

Action for customer

Disable all non-critical affected user accounts, on-premise and in the cloud (for example, Azure AD). This prevents more access to the affected systems and more abuse of them.

In addition to the reset of these accounts, look for backdoor accounts and accounts with newly elevated privileges. Remove these accounts. To do this, use the ‘Interesting Windows Event IDs’ Hunt Lab query. Also manually examine the Windows event and user account logs.

For more account containment guidance, refer to the recovery section of this guide.

Process Containment

Action for provider of SenseOn MDR

If processes that you found still run on devices, stop them with the 'Process Control' Resilience script. Then use Hunt Lab to make sure that these processes stopped and did not start again.

💡 Resilience Script Access: If you are a SenseOn MDR provider or customer, you can get access to the SenseOn Resilience script repository. If you do not have access, contact the SenseOn support team. Scripts run in an Active Response device session. Thus, you also must have Active Response access.

Block Attacker infrastructure

Action for customer

The customer must block the IOCs from the investigation on all infrastructure that the SenseOn MDR provider does not manage. Examples are firewalls and web filters.

Eradication

Preserve data

Action for customer

It is important to preserve any volatile data. Then further analysis is possible after the recovery from the incident. The customer must make this decision, based on feasibility and the necessary effort. In the SenseOn platform, Long Term Telemetry Retention (LTTR) retains all SenseOn telemetry on a long-term basis. To have it enabled, contact SenseOn Support or your Customer Success Manager.

Run antivirus scans

Action for customer

Update the signatures and definitions of all antivirus solutions on devices across the estate. If the solution does not detect the malicious hashes that you found before, report this to the vendor.

After you update the signatures, run antivirus scans on devices. The scans find any malware that possibly got onto the device during the attack. If you find malware, refer to the malware playbook and follow it.

Artefact Removal

Action for provider of SenseOn MDR

Remove from affected systems all malicious artefacts that you found during the identification phase. These artefacts include:

  • Malicious processes
  • Startup items/registry keys
  • Services
  • Custom software
  • Remote management tools
  • Firewall rules
  • File dropped locations such as OneDrive and network share folders

Use the Resilience scripts in the SenseOn repository to remove these artefacts.

Recovery

Restore systems

Action for customer

Use backups to revert systems to a state from before the incident. If backups are not available, rebuild the machines from an image or with a clean, new installation of the operating system.

After this, do IOC checks on these systems with the indicators that you found during the identification phase. Make sure that no malicious artefacts are present. Then deploy the applicable software or security patches for all vulnerabilities that the attack exploited.

Setup monitoring

Action for provider of SenseOn MDR

After you restore the affected systems, put in place a plan to monitor the affected devices and the estate. The plan must assess the devices and the full estate for signs of IOCs that you saw before. This makes sure that the remediation of the previous incident is complete. Typically, the plan has an hourly check. You can use Hunt Lab for this check.

Review regulatory requirements

Action for customer

Review the applicable regulatory and legislative documentation. Find if you must tell any governing bodies about the incident. For example, in ransomware incidents, threat actors frequently exfiltrate data. In this case, in the UK, it is probably necessary to tell the Information Commissioner’s Office. But this depends on the type of data that the threat actors exfiltrated.

For more detail about legislation and regulation, you can refer to the data exfiltration playbook.

Reset privileged accounts

Action for customer

Reset all highly privileged accounts and tokens. In some instances, reset them two times. For example, reset the KRBTGT account and the ADFS Token Sign Certificate two times. But reset the AzureADSSOACC$, all the Domain Controller machine accounts, and the AAD Sync account only one time.

For more guidance about this, refer to the ‘SenseOn AD Recovery Guide’ confluence page.