The Windows agent is forwarding every event *twice* to the ossec server. In debug mode 1, every event that is sent by the agent is accompanied by the following entries in the agent log:
2017/02/26 17:29:14 ossec-agent: WARN: Could not convert SID to string which returned (87) 2017/02/26 17:29:14 ossec-agent: DEBUG: Performing a LookupAccountSid() on (unknown) 2017/02/26 17:29:14 ossec-agent: ERROR: Could not move (tmp/Security-a11516) to (bookmarks/Security) which returned (5) 2017/02/26 17:29:14 ossec-agent: DEBUG: Attempting to send message to server. 2017/02/26 17:29:14 ossec-agent: ERROR: Could not rename_ex() temporary bookmark (tmp/Security-a11516) to (bookmarks/Security) for (Security) In debug mode 2, the events are clearly being sent twice with the same timestamps: 2017/02/26 21:22:37 ossec-agent: WARN: Could not convert SID to string which returned (87) 2017/02/26 21:22:37 ossec-agent: DEBUG: Performing a LookupAccountSid() on (unknown) 2017/02/26 21:22:37 ossec-agent: DEBUG: Performing a LookupAccountSid() on (unknown) 2017/02/26 21:22:37 ossec-agent: DEBUG: Attempting to send message to server. 2017/02/26 21:22:37 ossec-agent: DEBUG: Sending message to server: '2017 Feb 26 21:22:36 WinEvtLog: Security: AUDIT_SUCCESS(4688): Microsoft-Windows-Security-Auditing: (no user): no domain: Hostname: A new process has been created. Creator Subject: Security ID: S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX Account Name: Username Account Domain: DOMAIN Logon ID: 0xXXXXXX Target Subject: Security ID: S-1-0-0 Account Name: - Account Domain: - Logon ID: 0x0 Process Information: New Process ID: 0x45c New Process Name: C:\Program Files (x86)\Windows\Resource Kits\Tools\tail.exe Token Elevation Type: %%1937 Mandatory Label: S-1-16-12288 Creator Process ID: 0xXXX Creator Process Name: C:\Windows\System32\cmd.exe Process Command Line: tail -f ossec.log Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy. Type 1 is a full token with no privileges removed or groups disabled. A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account. Type 2 is an elevated token with no privileges removed or groups disabled. An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator. An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group. Type 3 is a limited token with administrative privileges removed and administrative groups disabled. The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.' 2017/02/26 21:22:37 ossec-agent: DEBUG: Sending message to server: '2017 Feb 26 21:22:36 WinEvtLog: Security: AUDIT_SUCCESS(4688): Microsoft-Windows-Security-Auditing: (no user): no domain: Hostname: A new process has been created. Creator Subject: Security ID: S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX Account Name: Username Account Domain: DOMAIN Logon ID: 0xXXXXXX Target Subject: Security ID: S-1-0-0 Account Name: - Account Domain: - Logon ID: 0x0 Process Information: New Process ID: 0x45c New Process Name: C:\Program Files (x86)\Windows\Resource Kits\Tools\tail.exe Token Elevation Type: %%1937 Mandatory Label: S-1-16-12288 Creator Process ID: 0xXXX Creator Process Name: C:\Windows\System32\cmd.exe Process Command Line: tail -f ossec.log Token Elevation Type indicates the type of token that was assigned to the new process in accordance with User Account Control policy. Type 1 is a full token with no privileges removed or groups disabled. A full token is only used if User Account Control is disabled or if the user is the built-in Administrator account or a service account. Type 2 is an elevated token with no privileges removed or groups disabled. An elevated token is used when User Account Control is enabled and the user chooses to start the program using Run as administrator. An elevated token is also used when an application is configured to always require administrative privilege or to always require maximum privilege, and the user is a member of the Administrators group. Type 3 is a limited token with administrative privileges removed and administrative groups disabled. The limited token is used when User Account Control is enabled, the application does not require administrative privilege, and the user does not choose to start the program using Run as administrator.' In normal mode, the following events are generated by the agent whenever an event is forwarded: 2017/02/26 21:10:02 ossec-agent: ERROR: Could not move (tmp/Security-a11740) to (bookmarks/Security) which returned (5) 2017/02/26 21:10:02 ossec-agent: ERROR: Could not rename_ex() temporary bookmark (tmp/Security-a11740) to (bookmarks/Security) for (Security) I have stopped agent and server, cleared the agent RIDs file at both ends, and restarted both, the doubled up events issue persists. Neither server nor agent are overloaded. How should I go about troubleshooting and fixing the issue? -- --- You received this message because you are subscribed to the Google Groups "ossec-list" group. To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.