Skip to content

SenseOn SOC Playbook: Malware

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

File Analysis

Action for provider of SenseOn MDR

If Endpoint Protection (EPP) detected a suspected malicious file, the observation details show the hash of the file. It is possible that EPP quarantined the file. This depends on the EPP configuration, the operating system of the device and the version of the sensor. To find the file in the case, refer to Managing quarantined files. For details about how to get a sample safely for analysis, contact SenseOn support. As an alternative, use the SenseOn Resilience script ‘Directory & File Control’.

💡 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.

If you are a SenseOn customer or MDR provider, contact SenseOn support for access to this repository.

Hash Intelligence/Third Party Review

Action for provider of SenseOn MDR

Do a check of the file hash against open source threat intelligence vendors. File hash analysis is passive. Thus, it is not necessary to upload samples externally. Pay special attention to the malware variant that these sites attribute this sample to. This information is useful during the eradication phase.

⚠ Do not share files: Do not upload files to any public third party service. If you upload a file, third parties can get it. This can leak private information. It can also tell the attacker that you detected a unique file from that compromise. Only search for file hashes.

Optional sources:

Dynamic Analysis

Action for provider of SenseOn MDR

  1. Upload the file to a private malware assessment solution. If you have access to the SenseOn private malware assessment solution, follow the privately shared steps. Use them to open the solution and upload the files.
  2. If the file is malicious, follow the standard escalation procedure to a senior analyst.

Result Analysis and Corroboration

Action for provider of SenseOn MDR

Does the analysis show that this is a suspicious or malicious file? 1. How confident is the dynamic analysis? 2. Do third party analysis tools agree with this assessment? 3. For other analysis results, refer to the third party review of the hash.

IOC and TTP Analysis

Action for provider of SenseOn MDR

You can use the queries that follow as start points to look for the IOCs that you found. Adapt and change these queries to agree with the results of the static and dynamic analysis.

DNS Check
SELECT _time_observed,
source_hostname,
query_name
FROM network_dns
WHERE query_name IN ['IOC1','IOC2']

HTTP Check

SELECT _time_observed,
source_hostname,
dest_hostname,
request_uri
FROM network_http
WHERE dest_hostname IN ['IOC1','IOC2']
OR request_uri IN ['IOC1','IOC2']
OR dest_ip IN ['IOC1','IOC2']

TLS Check

SELECT _time_observed,
source_hostname,
dest_hostname
FROM network_tls
WHERE dest_hostname IN ['IOC1','IOC2']
OR dest_ip IN ['IOC1','IOC2'] 

Check for TTP & Process behaviours

SELECT _time_observed,
parent_name,
name,
command,
username
FROM endpoint_process
WHERE name IN ['IOC1','IOC2']
OR command LIKE ‘%IOC1%’

Containment

After you make sure that the behaviour is malicious and you know the attack scope, do an impact assessment. Do this before you take containment actions. Use the steps that follow:

Impact Assessment

Action for provider of SenseOn MDR

  1. Find the number of affected hosts. If more than 2 hosts are affected, escalate internally.
  2. Assess the asset severity of these hosts.
  3. Is customer escalation necessary? If any asset is on the list of priority assets, follow the standard escalation procedure to a senior analyst. Do this before you notify the customer.

Isolation

Action for provider of SenseOn MDR

  1. After you get approval, isolate compromised devices. SenseOn recommends that each customer has pre-agreed decision criteria. These criteria make prompt containment possible, with the minimum of business impact.
  2. Continuously assess the wider estate with the IOCs and TTPs that you found in the investigation. If you see additional malicious behaviour, isolate more devices.

Account Containment

Action for customer

  1. Reset the credentials of compromised users across Active Directory / Microsoft Entra.
  2. Where applicable, rotate the keys of users.
  3. Revoke any active user sessions.
  4. If necessary, lock the affected accounts.

Persistence

Action for provider of SenseOn MDR

If EPP did not automatically clean up the malware, use eviction scripts from the SenseOn repository. These scripts remove malicious processes and persistence mechanisms. If EPP cleaned up the infection, manually make sure that all traces are removed.

The optional queries that follow help you to find persistence methods. It can be necessary to change them for the incident.

Check the recently logged in sessions for this account around compromise time frame:
SELECT user,
_hostname,
min(_time_observed),
max(_time_observed)
FROM endpoint_logon_session
WHERE user = 'X'
GROUP BY user,
_hostname
Check recently authorised accounts on compromised device
SELECT _time_observed,
_hostname,
user,
profile_path,
home_directory
FROM endpoint_logon_session
WHERE _hostname = 'X'

Review

  1. Review all IOCs across the environment. Make sure that no additional compromise occurred during the incident.
  2. Review the user lockout status. Make sure that nobody unlocked the account during the incident, through the Service desk or by other means.
  3. Review active user sessions across the device. New sessions after the lockout can show a gap. Escalate this gap.

Eradication

Joint action for customer and provider of SenseOn MDR

  1. Start an AntiVirus full scan on the device for initial cleanup and remediation.
  2. Review the dynamic analysis report for endpoint modifications. Examples are registry changes, scheduled task additions and the locations of dropped files.
  3. Compare the dynamic analysis with online resources for the malware strain that you found.
  4. Use these results on the compromised endpoint to make sure that the AV cleanup is complete. If remnants are left, remove the modifications or revert them to their previous state.
  5. Restore from backup or from a fresh image. The severity and scope of the incident tell you which method to use.

Recovery

Joint action for customer and provider of SenseOn MDR

  1. The SenseOn MDR provider must monitor for continued activity with the threat hunting queries that it created. This makes sure that there are no gaps in the containment and eradication stages.
    1. Create ‘health monitoring’ tasks for endpoint & user behaviour. These tasks are checks that you do frequently.
  2. After the time window that you agreed with the customer, remove the device isolation restrictions.
  3. When you find no additional anomalous behaviour after the eradication period, agree with the customer that the recovery is successful.