Blocking a malicious actor

In this POC, you are able to identify the monitored Windows endpoint IP address as a bad reputation one. To do this, you need to log into the Windows endpoint as the attacker and try connecting to the victim’s Apache server running on a CentOS 8 system.


  • You need an Apache server running on the monitored CentOS 8 system.

  • Configure the Wazuh CentOS 8 host to monitor the Apache access logs in the /var/ossec/etc/ossec.conf configuration file.



Configure your environment as follows to test the POC.

  1. Download the Alienvault IP reputation database to your Wazuh manager.

    # wget -O /var/ossec/etc/lists/alienvault_reputation.ipset
  2. Run the following command at the Wazuh manager (the attacker), replacing <your_windows_ip_address> with the monitored Windows endpoint’s IP address.

    # echo "<your_windows_ip_address>" >> /var/ossec/etc/lists/alienvault_reputation.ipset
  3. Download the script to convert from the ipset format to the cdb list format.

    # wget -O /tmp/
  4. Convert the alienvault_reputation.ipset file to a .cdb format using the previously downloaded script.

    # python /tmp/ /var/ossec/etc/lists/alienvault_reputation.ipset /var/ossec/etc/lists/blacklist-alienvault
  5. Optionally, remove the alienvault_reputation.ipset file and the script, as they are no longer needed.

    # rm -rf /var/ossec/etc/lists/alienvault_reputation.ipset
    # rm -rf /var/ossec/etc/lists/
  6. Assign the right permissions and ownership to the generated file.

    # chown ossec:ossec /var/ossec/etc/lists/blacklist-alienvault
    # chmod 660 /var/ossec/etc/lists/blacklist-alienvault
  7. Add a custom rule to trigger the active response. This can be done in the /var/ossec/etc/rules/local_rules.xml file at the Wazuh manager.

    <group name="attack,">
    <rule id="100100" level="10">
        <list field="srcip" lookup="address_match_key">etc/lists/blacklist-alienvault</list>
        <description>IP address found in AlienVault reputation database.</description>
  8. Add the appropriate active response settings to the ruleset section of the /var/ossec/etc/ossec.conf file at the Wazuh manager.

            <!-- Default ruleset -->
            <!-- User-defined ruleset -->
  9. Restart the Wazuh Manager.

    # systemctl restart wazuh-manager

Steps to generate the alerts

  1. Log into the attacker’s system (the monitored Windows endpoint).

  2. Connect to the victim’s system (the Apache server in the monitored CentOS 8 endpoint) from a web browser.

    The custom firewall rule will temporarily block any connection from the attacker system for 60 seconds.

Query the alerts

You can visualize the alert data in the Wazuh Kibana plugin. To do this, go to the Security events module and add the filters in the search bar to query the alerts.

  • OR 100100)


  • Python command not working during step 4.

This can be solved by creating a symbolic link.

# ln -s /usr/bin/python3 /usr/bin/python