New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Configuring Host-Based Intrusion Detection

Free

Set up HIDS for robust endpoint security monitoring.

Get this skill

Free · Opens the source repo

What Configuring Host-Based Intrusion Detection does

This skill provides a comprehensive approach to configuring host-based intrusion detection systems (HIDS) such as OSSEC, Wazuh, and AIDE. It is designed for system administrators and cybersecurity professionals who need to monitor file integrity, system calls, and configuration changes across both Windows and Linux endpoints. By leveraging this skill, users can ensure that their systems are compliant with security standards and can quickly detect unauthorized changes or potential breaches.

The skill guides users through the deployment of HIDS agents, focusing on critical steps such as installing the Wazuh agent on various operating systems, configuring file integrity monitoring (FIM), and setting up rootkit detection. It also includes the necessary configurations for alerting and active response mechanisms to enhance security posture. This structured workflow ensures that users can effectively monitor their endpoints for security violations and respond to incidents in a timely manner.

Additionally, the skill integrates seamlessly with SIEM platforms for centralized alert management, allowing users to visualize alerts through dashboards. This capability is crucial for organizations that require a holistic view of their security landscape. By following the provided configurations, users can create tailored monitoring policies that meet their specific compliance requirements and security needs.

Overall, this skill is essential for those looking to implement a robust HIDS solution, providing the necessary tools and configurations to safeguard their endpoints against potential threats.

When to use it

Use this skill when deploying HIDS agents like Wazuh or OSSEC to monitor file integrity and system changes.

When not to use it

Do not use this skill for network-based intrusion detection systems or endpoint detection and response (EDR) solutions.

What you can build with it

Deploying HIDS Agents

Quickly set up Wazuh or OSSEC agents on Windows and Linux systems to begin monitoring.

Configuring File Integrity Monitoring

Establish FIM policies to ensure critical files are monitored for unauthorized changes.

Integrating with SIEM Platforms

Connect HIDS alerts to your SIEM for centralized monitoring and alert management.

How to install Configuring Host-Based Intrusion Detection

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/configuring-host-based-intrusion-detection --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mukul975

Configuring Host-Based Intrusion Detection

When to Use

Use this skill when:

  • Deploying HIDS agents (Wazuh, OSSEC, AIDE) across Windows and Linux endpoints
  • Configuring file integrity monitoring (FIM) for compliance (PCI DSS 11.5, NIST SI-7)
  • Monitoring system configuration changes, rootkit detection, and security policy violations
  • Integrating HIDS alerts with SIEM platforms for centralized monitoring

Do not use this skill for network-based IDS (Suricata, Snort) or for EDR deployment.

Prerequisites

  • Wazuh server (manager) deployed and accessible from endpoints
  • Administrative access to target endpoints
  • Network connectivity: agents to Wazuh manager on port 1514 (TCP/UDP) and 1515 (TCP enrollment)
  • Wazuh dashboard (OpenSearch Dashboards) for alert visualization
  • Understanding of critical files/directories to monitor per OS

Workflow

Step 1: Install Wazuh Agent

Windows:

# Download and install Wazuh agent
Invoke-WebRequest -Uri "https://packages.wazuh.com/4.x/windows/wazuh-agent-4.9.0-1.msi" `
  -OutFile "wazuh-agent.msi"
msiexec /i wazuh-agent.msi /q WAZUH_MANAGER="wazuh-manager.corp.com" `
  WAZUH_REGISTRATION_SERVER="wazuh-manager.corp.com" WAZUH_AGENT_GROUP="windows-workstations"
net start WazuhSvc

Linux (Debian/Ubuntu):

curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --dearmor -o /usr/share/keyrings/wazuh.gpg
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" \
  > /etc/apt/sources.list.d/wazuh.list
apt-get update && apt-get install wazuh-agent -y
sed -i 's/MANAGER_IP/wazuh-manager.corp.com/' /var/ossec/etc/ossec.conf
systemctl daemon-reload && systemctl enable --now wazuh-agent

Step 2: Configure File Integrity Monitoring (FIM)

Edit agent configuration (/var/ossec/etc/ossec.conf or C:\Program Files (x86)\ossec-agent\ossec.conf):

<syscheck>
  <!-- Scan frequency: every 12 hours -->
  <frequency>43200</frequency>
  <scan_on_start>yes</scan_on_start>
  <alert_new_files>yes</alert_new_files>

  <!-- Linux critical directories -->
  <directories check_all="yes" realtime="yes">/etc</directories>
  <directories check_all="yes" realtime="yes">/usr/bin</directories>
  <directories check_all="yes" realtime="yes">/usr/sbin</directories>
  <directories check_all="yes" realtime="yes">/bin</directories>
  <directories check_all="yes" realtime="yes">/sbin</directories>
  <directories check_all="yes">/boot</directories>

  <!-- Windows critical directories -->
  <directories check_all="yes" realtime="yes">C:\Windows\System32</directories>
  <directories check_all="yes" realtime="yes">C:\Windows\SysWOW64</directories>
  <directories check_all="yes" realtime="yes">%PROGRAMFILES%</directories>

  <!-- Windows registry monitoring -->
  <windows_registry>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run</windows_registry>
  <windows_registry>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce</windows_registry>
  <windows_registry>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services</windows_registry>

  <!-- Ignore frequently changing files -->
  <ignore>/etc/mtab</ignore>
  <ignore>/etc/resolv.conf</ignore>
  <ignore type="sregex">.log$</ignore>
</syscheck>

Step 3: Configure Rootkit Detection

<rootcheck>
  <disabled>no</disabled>
  <frequency>43200</frequency>
  <rootkit_files>/var/ossec/etc/shared/rootkit_files.txt</rootkit_files>
  <rootkit_trojans>/var/ossec/etc/shared/rootkit_trojans.txt</rootkit_trojans>
  <system_audit>/var/ossec/etc/shared/system_audit_rcl.txt</system_audit>
  <check_dev>yes</check_dev>
  <check_files>yes</check_files>
  <check_if>yes</check_if>
  <check_pids>yes</check_pids>
  <check_ports>yes</check_ports>
  <check_sys>yes</check_sys>
  <check_trojans>yes</check_trojans>
  <check_unixaudit>yes</check_unixaudit>
</rootcheck>

Step 4: Configure Log Analysis Rules

<!-- Custom rules in /var/ossec/etc/rules/local_rules.xml -->
<group name="local,syscheck,">
  <!-- Alert on critical binary modifications -->
  <rule id="100001" level="12">
    <if_sid>550</if_sid>
    <match>/usr/bin/|/usr/sbin/|/bin/|/sbin/</match>
    <description>Critical system binary modified: $(file)</description>
    <group>syscheck,pci_dss_11.5,</group>
  </rule>

  <!-- Alert on new executable in temp directories -->
  <rule id="100002" level="10">
    <if_sid>554</if_sid>
    <match>/tmp/|/var/tmp/</match>
    <description>New file created in temp directory: $(file)</description>
    <group>syscheck,malware,</group>
  </rule>

  <!-- Alert on SSH configuration changes -->
  <rule id="100003" level="10">
    <if_sid>550</if_sid>
    <match>/etc/ssh/sshd_config</match>
    <description>SSH configuration modified</description>
    <group>syscheck,authentication,</group>
  </rule>
</group>

Step 5: Configure Active Response

<!-- Auto-block IP after repeated authentication failures -->
<active-response>
  <command>firewall-drop</command>
  <location>local</location>
  <rules_id>5712</rules_id>
  <timeout>600</timeout>
</active-response>

<!-- Disable account after brute force detection -->
<active-response>
  <disabled>no</disabled>
  <command>disable-account</command>
  <location>local</location>
  <rules_id>100100</rules_id>
  <timeout>3600</timeout>
</active-response>

Step 6: Integrate with SIEM

# Wazuh to Splunk via Filebeat
# Edit /etc/filebeat/filebeat.yml:
filebeat.inputs:
  - type: log
    paths:
      - /var/ossec/logs/alerts/alerts.json
    json.keys_under_root: true
output.elasticsearch:
  hosts: ["https://splunk-hec:8088"]

# Wazuh to Elastic via direct integration
# Wazuh indexer feeds directly into OpenSearch/Elasticsearch
# Dashboard: https://wazuh-dashboard:5601

Key Concepts

TermDefinition
HIDSHost-based Intrusion Detection System; monitors individual endpoints for malicious activity
FIMFile Integrity Monitoring; detects unauthorized changes to files by comparing cryptographic hashes
SyscheckWazuh/OSSEC module for file integrity monitoring and registry monitoring
RootcheckWazuh/OSSEC module for rootkit and malware detection
Active ResponseAutomated defensive action triggered by HIDS alert (IP block, account disable)
CDB ListConstant Database list used for custom lookups in Wazuh rules

Tools & Systems

  • Wazuh: Open-source HIDS platform (fork of OSSEC) with manager, agent, and dashboard
  • OSSEC: Original open-source HIDS (predecessor to Wazuh)
  • AIDE (Advanced Intrusion Detection Environment): Standalone file integrity checker for Linux
  • Tripwire: Commercial file integrity monitoring solution
  • Samhain: Open-source HIDS focused on file integrity and log monitoring

Common Pitfalls

  • Monitoring too many directories: FIM on entire filesystems generates excessive alerts. Focus on critical system binaries, configuration files, and web roots.
  • Not excluding noisy files: Frequently changing files (logs, temp, caches) generate false positive FIM alerts. Maintain exclusion lists.
  • Ignoring baseline establishment: First FIM scan creates a baseline. Changes detected before baseline stabilization are noise, not threats. Allow 48 hours for baseline.
  • Active response without testing: Auto-blocking IPs or disabling accounts can cause outages. Test active response rules in a non-production environment first.
  • Agent enrollment failures: Agents must successfully enroll with the manager before monitoring begins. Verify firewall rules allow port 1514 and 1515 traffic.

Frequently asked questions about Configuring Host-Based Intrusion Detection

Similar skills