Use the OSquery of External Address in the /etc/hosts file playbook
Use this playbook to investigate incidents that indicate that an internal hostname or domain has been assigned to an external IP address on the local DNS(/etc/hosts) of a Linux server. The following steps give you a walkthrough of the actions, tasks, and subflows that are available in the OSquery of external address in the /etc/hosts file playbook.
Before you begin
Role required:
- sn_si.admin
- flow_designer
Procedure
- When the playbook is triggered and starts executing, in Action 1, identify the hostname or domain name corresponding to the external IP translation from the raw log.
- In Action 2, gather the details of the IP address and the hostname.
- In Action 3, check whether this IP address belongs to the internal organization's public/private IP range or not.
-
In Action 4, if the IP address belongs to the internal organization's public/private IP range, perform the following steps:
- If the IP address doesn’t belong to the internal organization's public/private IP range, then in Action 8, identify the user who logged in to the server during the alert timeframe.
- In Action 9, if the IP address seems suspicious, raise an IT ticket to the owner or the server's team to change the configuration as soon as possible.
- In Action 10, check whether there was any malicious activity on the server before and after adding the DNS entry.
- In Action 11, check for any connections to the external IP address from the server.
- In Action 12, document the findings so far.
- In Action 13, check whether the owner or team information is available or not.
-
In Action 14, if the owner or team information is available, perform the following steps:
- In Action 21, if the owner or team information is unavailable, isolate the host system.
- In Action 22, reset the potentially compromised credentials.
- In Action 23, block the network access to the compromised host.
- In Action 24, patch the affected devices.
- In Action 25, lift containment and bring systems back to operational standards.
- In Action 26, complete the post-incident review before closing the task.