Use the OSquery of External Address in the /etc/hosts file playbook
Rversion finale: Australia
Mis à jour 12 mars 2026
2 minutes de lecture
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.
Avant de commencer
Role required:
sn_si.admin
flow_designer
Procédure
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.
Figure 1. OSquery of External Address in /etc/hosts file playbook
In Action 4, if the IP address belongs to the internal organization's public/private IP range, perform the following steps:
In Action 5, document the findings so far.
In Action 6, initiate a post incident review.
In Action 7, after the post incident review, the flow ends.
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 15, reach out to the owner or the server’s team to see if they recognize the activity.
You can use the provided email template to contact the owner or the server's team.
In Action 16, check whether the owner or team provided a valid business justification or not.
In Action 17, if the owner or team provided didn’t provide a valid business justification, then the flow ends.
But, if the owner or team provided a valid business justification, perform the following steps:
In Action 18, document the findings so far.
In Action 19, initiate a post incident review.
In Action 20, after the post incident review, the flow ends.
Figure 2. Using the OSquery of External Address in /etc/hosts file playbook
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.