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

[panw] TCP syslog parsing fails because of rfc6587 framing #4511

Closed
andrewkroh opened this issue Oct 27, 2022 · 9 comments · Fixed by #5787
Closed

[panw] TCP syslog parsing fails because of rfc6587 framing #4511

andrewkroh opened this issue Oct 27, 2022 · 9 comments · Fixed by #5787
Assignees
Labels
bug Something isn't working, use only for issues Integration:panw Palo Alto Next-Gen Firewall

Comments

@andrewkroh
Copy link
Member

When receiving syslog messages from PAN-OS over TLS it appears that rfc6587 framing is used. Parsing with the syslog processor fails because of the leading message length.

795 <14>1 2022-10-11T16:20:32.360Z hostname logforwarder - panwlogs ...

This results in errors like:

syslog failed to process field "message": validation error at position 1: parsing time "761" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "761" as "2006"

The fix is to specify framing: rfc6587 option into the "Advance options" for the TCP input in the PANW integration.

Screen Shot 2022-10-25 at 13 40 39

I'd like to know if the integration should add this option by default for the TCP input, but I don't know enough about PANW PAN-OS to say for sure. Does anyone know if this is the default behavior?

References

@andrewkroh andrewkroh added bug Something isn't working, use only for issues Team:Security-External Integrations Integration:panw Palo Alto Next-Gen Firewall labels Oct 27, 2022
@elasticmachine
Copy link

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

@jamiehynds
Copy link

Based on their docs they seem to recommend IETF format for TCP/TLS, but I'm not sure if it's the default. Given that they recommend IETF, we could call that our in our docs too and add the framing parameter by default for the TCP input.

I'm in touch with Palo at the moment - I can get their input and report back.

@sunilemanjee
Copy link

Does this impact syslog over UDP as well?

@andrewkroh
Copy link
Member Author

I would not expect it to. This type of framing is used in TCP only because multiple messages are sent over the same connection. In UDP you get separate packets for each message so there is no need for framing.

@taylor-swanson
Copy link
Contributor

Echoing Andrew's statement, syslog over UDP is one syslog message per UDP datagram per RFC 5426 (https://www.rfc-editor.org/rfc/rfc5426#section-3.1)

@NateUT99
Copy link

NateUT99 commented Nov 2, 2022

I believe this issue was opened based on some troubleshooting that my team was involved with. I wanted to add that in our specific case, the logs were being exported from Cortex Data Lake in PAN-OS format (from their Prisma Access solution). We will be switching our on-premise PAN-OS logs from udp to tcp later this week; I'll post an update on if the framing option was necessary for these as well.

@NateUT99
Copy link

NateUT99 commented Nov 3, 2022

Confirmed, sending PAN-OS logs from on-premise appliances via TCP and IETF format requires the rfc6587 framing to be enabled.

@jamiehynds
Copy link

Thanks for checking, @NateUT99. Can you confirm if Palo set the format to IETF as default when you send via TCP, or it BSD the default?

@NateUT99
Copy link

NateUT99 commented Nov 3, 2022

Thanks for checking, @NateUT99. Can you confirm if Palo set the format to IETF as default when you send via TCP, or it BSD the default?

It actually kept it BSD. There is a separate option that has to be configured to tell it which format to use. The documentation (https://docs.paloaltonetworks.com/pan-os/10-1/pan-os-admin/monitoring/use-syslog-for-monitoring/configure-syslog-monitoring) does mention that IETF should be used with tcp, but it didn't seem to actively enforce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues Integration:panw Palo Alto Next-Gen Firewall
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants