-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] NetFlow: Add Cisco ASA fields #11201
Conversation
Pinging @elastic/secops |
return aclIDLength | ||
} | ||
|
||
func (u ACLIDDecoder) Decode(data []byte) (interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method ACLIDDecoder.Decode should have comment or be unexported
return aclIDLength | ||
} | ||
|
||
func (u ACLIDDecoder) MaxLength() uint16 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method ACLIDDecoder.MaxLength should have comment or be unexported
|
||
const aclIDLength = 12 | ||
|
||
func (u ACLIDDecoder) MinLength() uint16 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method ACLIDDecoder.MinLength should have comment or be unexported
@@ -322,6 +323,34 @@ func (u UnsupportedDecoder) Decode(data []byte) (interface{}, error) { | |||
|
|||
var _ Decoder = (*UnsupportedDecoder)(nil) | |||
|
|||
type ACLIDDecoder struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type ACLIDDecoder should have comment or be unexported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you add a changelog entry.
ff7d309
to
3aee8e9
Compare
Cisco ASA NetFlow implementation requires a new field datatype, ACL ID, with 12-byte length, that encodes the following information: - First four bytes are the ACL name ID. - Next four bytes are the ACL entry ID / Object-Group ID. - Final four bytes are the Extended ACL Entry ID. Following with Logstash tradition, these fields are converted to string featuring the 3 ID's in encoded in hex and separated by a hypen.
Cisco ASA uses some custom fields for NetFlow V9. From "Cisco ASA NetFlow Implementation Guide": - 33000 NF_F_INGRESS_ACL_ID, renamed to ingress_acl_id - 33001 NF_F_EGRESS_ACL_ID, renamed to egress_acl_id - 33002 NF_F_FW_EXT_EVENT, renamed to fw_ext_event - 40000 NF_F_USERNAME, renamed to username Some devices also use the following fields, from "Information Elements for Stealthwatch v7.0": - 40001 ASAXlateSourceAddressIPV4, renamed to xlate_source_address_ipv4 - 40002 ASAXlateDestinationAddressIPV4, renamed to xlate_destination_address_ipv4 - 40003 ASAXlateSourcePort, renamed to xlate_source_port - 40004 ASAXlateDestinationPort, renamed to xlate_destination_port - 40005 ASAFirewallEvent, renamed to firewall_event
3aee8e9
to
ebea41b
Compare
Cisco ASA uses some custom fields for NetFlow V9.
From Cisco ASA NetFlow Implementation Guide:
Some devices also use the following fields,
from Information Elements for Stealthwatch v7.0:
The ACL_ID are stored in binary format, 12-byte length, encoding the following information:
Following with Logstash tradition, these fields are converted to string featuring the 3 IDs in encoded in hex and separated by a hyphen.