Skip to content

Commit 38d8972

Browse files
committed
Fix USB monitoring example to use local ossec.conf
The process-monitoring USB example placed a full_command localfile inside agent_config, but OSSEC rejects remote command localfile entries pushed from the manager via agent.conf. Configure the localfile on each Windows agent's ossec.conf and link to the localfile restriction. Closes #309 Assisted-By: Auto
1 parent 839d41f commit 38d8972

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

docs/manual/monitoring/process-monitoring.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,22 @@ Detecting USB Storage Usage
135135
OSSEC. He used our policy auditing module for that, but I think USB monitoring
136136
can be done in a much easier way with our new :xml:`check_diff` feature.
137137

138-
To get started, first configure your Windows agents to monitor the USBSTOR
139-
registry entry using the reg command:
138+
To get started, configure each Windows agent to monitor the USBSTOR registry entry
139+
using the ``reg`` command. This must be in the agent's local ``ossec.conf`` — the
140+
manager cannot push ``command`` or ``full_command`` localfile entries through
141+
``agent.conf`` (see :ref:`ossec_config.localfile`).
140142

141143
.. code-block:: xml
142144
143-
<agent_config os="windows">
145+
<ossec_config>
144146
<localfile>
145147
<log_format>full_command</log_format>
146148
<command>reg QUERY HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR</command>
149+
<frequency>3600</frequency>
147150
</localfile>
148-
</agent_config>
151+
</ossec_config>
149152
150-
151-
152-
Next create a local rule for that command:
153+
Next create a local rule for that command on the manager:
153154

154155
.. code-block:: xml
155156

0 commit comments

Comments
 (0)