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

[cisco_ftd] Add network and dns ECS fields #5522

Merged
merged 22 commits into from Mar 28, 2023
Merged

[cisco_ftd] Add network and dns ECS fields #5522

merged 22 commits into from Mar 28, 2023

Conversation

LaZyDK
Copy link
Contributor

@LaZyDK LaZyDK commented Mar 13, 2023

What does this PR do?

This will sum up source.bytes and destination.bytes into network.bytes, along with extracting dns.question.registered_domain from dns.question.name.
user.name will be removed if the string is "Not Found".

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

@LaZyDK LaZyDK requested a review from a team as a code owner March 13, 2023 14:31
@elasticmachine
Copy link

elasticmachine commented Mar 13, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-03-28T07:23:50.629+0000

  • Duration: 20 min 31 sec

Test stats 🧪

Test Results
Failed 0
Passed 20
Skipped 0
Total 20

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@efd6
Copy link
Contributor

efd6 commented Mar 13, 2023

/test

…ne/default.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
@elasticmachine
Copy link

elasticmachine commented Mar 13, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚
Classes 100.0% (1/1) 💚
Methods 100.0% (19/19) 💚
Lines 67.861% (1288/1898)
Conditionals 100.0% (0/0) 💚

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 16, 2023

I need help fixing usernames from FTD integrated with Passive Authentication.
This will generate the user.name with the format:
STRING\username

The string can be a custom description of the domain used for user lookup, but it is not required to be an actual domain name. (Eg. AD or COMPANYAD etc.)
I am using this in a custom pipeline, but I am not sure this is the correct way to implement the fix for example when the data source is Cisco ASA and not FTD.
(?:%{DATA}\\)?%{GREEDYDATA:user.name}

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline test expects need to be updated for this.

Also needs additions to fields/ecs.yml:

[0] field "dns.question.registered_domain" is undefined
[1] field "dns.question.subdomain" is undefined
[2] field "dns.question.top_level_domain" is undefined

@efd6
Copy link
Contributor

efd6 commented Mar 16, 2023

For #5522 (comment) do you have examples where they would differ and how that would cause an issue?

LaZyDK and others added 3 commits March 17, 2023 09:17
…ne/default.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 17, 2023

For #5522 (comment) do you have examples where they would differ and how that would cause an issue?

I cannot comprehend the different options here, hence me asking.
Looking at some Cisco ASA data i find the user.name field filled with different things like:

  • real usernames (when cisco.asa.destination_username: LOCAL\user then user.name: user)
  • IPv4 addresses from Site2site tunnels (event.code: 602304)
  • "DefaultL2LGroup" and "Unknown" from IKEv2 tunnels (event.code: 750002 and 750003)

@efd6
Copy link
Contributor

efd6 commented Mar 17, 2023

Yeah, you really need to glean that on a case-by-case basis from the Cisco documentation.

@efd6
Copy link
Contributor

efd6 commented Mar 17, 2023

/test

@LaZyDK LaZyDK closed this Mar 17, 2023
@LaZyDK LaZyDK deleted the patch-3 branch March 17, 2023 10:26
@LaZyDK LaZyDK restored the patch-3 branch March 17, 2023 10:33
@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 17, 2023

My mistake.

@LaZyDK LaZyDK reopened this Mar 17, 2023
@efd6
Copy link
Contributor

efd6 commented Mar 17, 2023

/test

@efd6 efd6 added enhancement New feature or request Team:Security-External Integrations Integration:CiscoFTD Cisco FTD Firepower Threat Defense labels Mar 20, 2023
@elasticmachine
Copy link

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

@efd6
Copy link
Contributor

efd6 commented Mar 20, 2023

Needs an elastic-package build.

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 21, 2023

Ready for review

@efd6
Copy link
Contributor

efd6 commented Mar 21, 2023

/test

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 23, 2023

should be good now

@efd6
Copy link
Contributor

efd6 commented Mar 27, 2023

/test

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide test cases for the new event.outcome classifications?

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 27, 2023

Can you provide test cases for the new event.outcome classifications?

Added test case for event.outcome "monitor".
Still need to find events for "trust", "block with reset" and "domain not found".

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 27, 2023

Added test cases for event.outcome "trust" and "block with reset".
Still need to find event for "domain not found".

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 27, 2023

I found another value for event.outcome, so now I am looking for test data for both "pass" and "domain not found".

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 27, 2023

I need help fixing usernames from FTD integrated with Passive Authentication. This will generate the user.name with the format: STRING\username

The string can be a custom description of the domain used for user lookup, but it is not required to be an actual domain name. (Eg. AD or COMPANYAD etc.) I am using this in a custom pipeline, but I am not sure this is the correct way to implement the fix for example when the data source is Cisco ASA and not FTD. (?:%{DATA}\\)?%{GREEDYDATA:user.name}

Fixed with this: https://github.com/elastic/integrations/pull/5522/files#diff-753433e478ec043eaee29b5dcd39b3f7153a0f858323be73401e0e1aab3e7255R2137

@efd6
Copy link
Contributor

efd6 commented Mar 27, 2023

/test

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor nit.

@LaZyDK
Copy link
Contributor Author

LaZyDK commented Mar 28, 2023

Minor nit removed. All good from here. Ready to go.

@efd6 efd6 merged commit 890323c into elastic:main Mar 28, 2023
3 checks passed
@LaZyDK LaZyDK deleted the patch-3 branch March 28, 2023 08:22
@elasticmachine
Copy link

Package cisco_ftd - 2.9.2 containing this change is available at https://epr.elastic.co/search?package=cisco_ftd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:CiscoFTD Cisco FTD Firepower Threat Defense
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants