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

Unifi device logs match overly generic Symantec-av decoder #840

Open
kmfreder1 opened this issue Aug 17, 2021 · 3 comments
Open

Unifi device logs match overly generic Symantec-av decoder #840

kmfreder1 opened this issue Aug 17, 2021 · 3 comments

Comments

@kmfreder1
Copy link

kmfreder1 commented Aug 17, 2021

Wazuh version
4.1.5

The current symantec-av decoder appears to be too generic.

We have multiple clients who have unifi devices that send non-standard syslog in a format that matches the Symantec-AV decoder. In order to write custom decoders/rules for these devices, we have to exclude the stock Symantec decoders and rules. This could present a problem when a customer uses both Unifi devices and Symantec-AV or Web Security.

Here are a couple of sample Unifi logs:
Aug 17 10:51:57 some-unifi-AP-dns-name 74acb9bc33f5,UAP-AC-Lite-5.43.36+12724: kernel: [1359238.979852] [wifi1] FWLOG: [49676369] WAL_DBGID_TX_BA_SETUP ( 0x4365a4, 0x0, 0x0, 0x10040, 0xfe4271fd )

Aug 17 10:51:12 some-unifi-switch-dns-name e063dacde998,US-16-150W-5.64.8+13083: switch: DOT1S: inst(0) has elected a new STP root: FF:AA:BB:DD:DD:0D:32:1C

Here is the output of wazuh-logtest:
/var/ossec/bin/wazuh-logtest
Starting wazuh-logtest v4.1.5
Type one log per line

Aug 17 10:51:57 some-unifi-AP-dns-name 74acb9bc33f5,UAP-AC-Lite-5.43.36+12724: kernel: [1359238.979852] [w ifi1] FWLOG: [49676369] WAL_DBGID_TX_BA_SETUP ( 0x4365a4, 0x0, 0x0, 0x10040, 0xfe4271fd )

**Phase 1: Completed pre-decoding.
full event: 'Aug 17 10:51:57 some-unifi-AP-dns-name 74acb9bc33f5,UAP-AC-Lite-5.43.36+12724: kernel : [1359238.979852] [wifi1] FWLOG: [49676369] WAL_DBGID_TX_BA_SETUP ( 0x4365a4, 0x0, 0x0, 0x10040, 0xfe4271 fd )'
timestamp: 'Aug 17 10:51:57'
hostname: 'some-unifi-AP-dns-name'

**Phase 2: Completed decoding.
name: 'symantec-av'

**Phase 3: Completed filtering (rules).
id: '7300'
level: '0'
description: 'Grouping of Symantec AV rules.'
groups: '['symantec']'
firedtimes: '1'
mail: 'False'

It would be helpful if the symantec-av decoder contained more specific criteria instead of simply <prematch>^\w\w\w\w\w\w\w\w\w\w\w\w,</prematch>

@branchnetconsulting
Copy link
Contributor

Something like one of these would probably make a better prematch for the symantec-av decoder:

<prematch type="pcre2">^[0-9A-Z]{12},</prematch>
<prematch>^\w\w\w\w\w\w\w\w\w\w\w\w,\d+,\d+,</prematch>

@kmfreder1
Copy link
Author

I would vote for something that's a mix of the two like: <prematch type="pcre2">^[0-9A-Z]{12},\d+,\d+</prematch>. That way it's looking for more than just a MAC address followed by a comma.

@CyberAbwehr
Copy link

Still not working

Wazuh Version: 4.4.4

Unifi Log:
Jun 30 10:39:16 UAP-HD f09fc26b7ee8,UAP-HD-6.2.49+14111: stahtd: stahtd[2207]: [STA-TRACKER].stahtd_dump_event(): {"message_type":"STA_ASSOC_TRACKER","event_id":"3","mac":"40:b4:cd:f3:d9:8a","vap":"ath0","arp_reply_gw_seen":"yes","event_type":"fixup","assoc_status":"0","dns_resp_seen":"yes","avg_rssi":"-67"}

Output Ruleset Test:
**Phase 1: Completed pre-decoding.
full event: 'Jun 30 10:39:16 UAP-HD f09fc26b7ee8,UAP-HD-6.2.49+14111: stahtd: stahtd[2207]: [STA-TRACKER].stahtd_dump_event(): {"message_type":"STA_ASSOC_TRACKER","event_id":"3","mac":"40:b4:cd:f3:d9:8a","vap":"ath0","arp_reply_gw_seen":"yes","event_type":"fixup","assoc_status":"0","dns_resp_seen":"yes","avg_rssi":"-67"}'
timestamp: 'Jun 30 10:39:16'
hostname: 'UAP-HD'

**Phase 2: Completed decoding.
name: 'symantec-av'

**Phase 3: Completed filtering (rules).
id: '7300'
level: '0'
description: 'Grouping of Symantec AV rules.'
groups: '["symantec"]'
firedtimes: '5'
mail: 'false'

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

3 participants