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

TCP Flags should be directional #1033

Open
arunj18 opened this issue Apr 10, 2024 · 6 comments
Open

TCP Flags should be directional #1033

arunj18 opened this issue Apr 10, 2024 · 6 comments
Labels
network_activity Issues related to Network Activity Category

Comments

@arunj18
Copy link

arunj18 commented Apr 10, 2024

I was looking at the data dictionary on https://schema.ocsf.io/1.1.0/dictionary?extensions= and noticed that the tcp_flags are set on the Network Connection Information object with no directionality specified.

My understanding is TCP flags are directional and should exist on the Network Traffic object since it is directional in nature.

See https://www.site24x7.com/learn/linux/tcp-flags.html for an example that TCP flags are set in each packet. In systems that log network traffic, TCP flags that are received by the system and sent by the system will be different.

@pagbabian-splunk
Copy link
Contributor

The object network_connection_info does have a direction_id to go along with the tcp_flags attribute. Do you want to add tcp_flags with direction to network_traffic as well? These objects often are paired together, for example all the Network Activity classes have both.

@arunj18
Copy link
Author

arunj18 commented Apr 22, 2024

Hmm, looking at it more it looks like there are inconsistencies between the Network Traffic and Network Connection Information. I see that Network Traffic accounts for bidirectional flow of traffic via fields like bytes_in, bytes_out etc. but each Network Connection Info accounts for unidirectional flow of traffic.

How do we model bidirectional flow of traffic if we are to use the Network Connection Info?

Adding a direction_id to Network Traffic would result in the existing fields being invalid in the modeling (since they have bytes_in, bytes_out etc.).

@pagbabian-splunk
Copy link
Contributor

We discussed in the Network meeting today. Perhaps you can supply us with an example of a log you have in mind? The current objects used with Network Activity classes seem to be as designed for the use cases we have so far.

@mikeradka mikeradka added the network_activity Issues related to Network Activity Category label Apr 24, 2024
@mlartz
Copy link

mlartz commented Apr 26, 2024

Unfortunately our data is internal, but is similar to an IPFIX biflow using Direction by Perimeter: https://datatracker.ietf.org/doc/html/rfc5103. IPFIX biflows provide directional containers (fwd/rev) within the flow to hold the various packet metadata. In this case, we have the tcpControlBits ((https://www.rfc-editor.org/rfc/rfc9565.html) for fwd and rev directions in our IPFIX biflow. How would we represent these TCP flags in OCSF? In our scenario, we were thinking they likely belonged with the other directional fields (bytes, packets, etc) in the Network Traffic object.

@pagbabian-splunk
Copy link
Contributor

You might be able to dummy out anything considered sensitive but we have been discussing this on the Network weekly call and without an example (I looked online) that counters it, it should be mapped like VPC Flow Logs which so far have used the Network Activity class. The direction is indicated within Network Connection Information as are the flags (hence the flags would be for that direction). We should have labeled the object Network Information as to not imply it must be a connection (since IPFIX is connectionless). Otherwise, a non-connection based class could be considered, but I wouldn't want to have implementations that have mapped flow logs to Network Activity to feel they should remap.

@mlartz
Copy link

mlartz commented May 1, 2024

The issue is that VPC Flow Logs are (roughly) unidirectional flow, not biflow. I'll see if we can sanitize our data and provide an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network_activity Issues related to Network Activity Category
Projects
None yet
Development

No branches or pull requests

4 participants