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

Decode_CEF preprocessor fails when MAC address is without separators #27050

Closed
LaZyDK opened this issue Jul 26, 2021 · 4 comments · Fixed by #27109
Closed

Decode_CEF preprocessor fails when MAC address is without separators #27050

LaZyDK opened this issue Jul 26, 2021 · 4 comments · Fixed by #27109

Comments

@LaZyDK
Copy link
Contributor

LaZyDK commented Jul 26, 2021

Describe the enhancement:
Decode_CEF preprocessor needs to support MAC addresses without separating characters.

func toMACAddress(v string) (string, error) {

Describe a specific use case for the enhancement or feature:
While sending syslog in CEF format from Aruba ClearPass we get errors.

Log from Aruba ClearPass:
<143>Jul 26 2021 15:09:34 192.168.203.220 CEF:0|Aruba Networks|ClearPass|6.8.7.120583|2001|Failed Authentications|5|cat=Session Logs dvc=192.168.203.220 duser=0011223359e4 destinationServiceName=TEST_PROD MAC-AUTH Wired dpriv=TEST-VL1, [User Authenticated] cs2=Local:localhost cs2Label=Auth Source requestMethod=MAC-AUTH cs4=UNKNOWN cs4Label=System Posture Token outcome=[Update Endpoint Known], TEST-MerakiAP-VL1, MAC-AUTH-port-mode dmac=0011223359e4 src=192.168.1.78 cn1=0 cn1Label=Error Code rt=Jul 26 2021 15:08:37

Error message:
error in field 'dmac': address 0011223359e4: invalid MAC address

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 26, 2021
@andrewkroh
Copy link
Member

The parser is expecting a separator because the documention we used to implement it specified it for dmac. I tend to think Aruba should fix their formatter, but we should make our parser handle this case too.

Six colon-seperated hexadecimal numbers. Example: “00:0D:60:AF:1B:61”

Screen Shot 2021-07-26 at 1 54 19 PM

Reference: https://ia801002.us.archive.org/11/items/commoneventformatv25/CommonEventFormatV25.pdf

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Jul 27, 2021

I agree that Aruba should stick to the CEF format, but even though they might fix this in the future we have no way of supporting their older software versions.
Having the parser doing this operation will be the best solution to support all needs.

@andrewkroh
Copy link
Member

PR: #27109

andrewkroh added a commit to andrewkroh/beats that referenced this issue Jul 28, 2021
Accept MAC addresses that do not contain separators (i.e. `000D60AF1B61`).

Fixes elastic#27050
andrewkroh added a commit that referenced this issue Aug 2, 2021
Accept MAC addresses that do not contain separators (i.e. `000D60AF1B61`).

Fixes #27050
mergify bot pushed a commit that referenced this issue Aug 2, 2021
Accept MAC addresses that do not contain separators (i.e. `000D60AF1B61`).

Fixes #27050

(cherry picked from commit 88d854c)
andrewkroh added a commit that referenced this issue Aug 2, 2021
Accept MAC addresses that do not contain separators (i.e. `000D60AF1B61`).

Fixes #27050

(cherry picked from commit 88d854c)

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants