Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dpkg decoder does not notice removal of certain packages #890

Open
MIPMHannes opened this issue Jan 3, 2025 · 0 comments
Open

dpkg decoder does not notice removal of certain packages #890

MIPMHannes opened this issue Jan 3, 2025 · 0 comments

Comments

@MIPMHannes
Copy link

MIPMHannes commented Jan 3, 2025

I run Wazuh 4.9.2.
This issue appears on Ubuntu 20.04.

Issue

Removing packages from an agent is sometimes not registered with wazuh. Does not appear in the logs.

When I removed this package zabbix-agent:amd64 1:5.4.12-1+ubuntu18.04 on an agent yesterday, nothing happend in the wazuh log.
Other packages worked fine.
Here is the ruleset output:

**Messages:
	WARNING: (7003): '1827d631' token expires
	INFO: (7202): Session initialized with token '840fb87d'

**Phase 1: Completed pre-decoding.
	full event: '2025-01-02 14:39:12 remove zabbix-agent:amd64 1:5.4.12-1+ubuntu18.04 <none>'

**Phase 2: Completed decoding.
	name: 'dpkg-decoder'
	arch: '5.4.12-1+ubuntu18.04'
	dpkg_status: 'remove zabbix-agent:amd64'
	package: '1'
	version: '<none>'

**Phase 3: Completed filtering (rules).
	id: '2900'
	level: '0'
	description: 'Dpkg (Debian Package) log.'
	groups: '["syslog","dpkg"]'
	firedtimes: '1'
	mail: 'false'

Cause

This happens with all the packages which have a second : in their name. For example:

  • update-manager-core:all 1:20.04.10.23
  • python3-update-manager:all 1:20.04.10.23
  • iputils-tracepath:amd64 3:20190709-3ubuntu1

The additional : causes the first regex rule in the Decoder to match. The second regex rule would be correct.

Possible fix/ Possible Workaround

Changing the order of the two regex rule in the dpkg decoder could be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant