-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add ndpi integration #11671
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
Closed
Closed
Add ndpi integration #11671
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c8d659f
Add initial nDPI integration
lucaderi c9262c4
Format ndpi patch with clang-format
cardigliano d8e237d
Add ndpi-protocol and ndpi-risk keywords documentation
cardigliano de33b11
Fix unit tests in detect-ndpi-risk
cardigliano ca32564
Merge branch 'OISF:master' into ndpi-integration-v0
cardigliano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
nDPI Protocol Keyword | ||
===================== | ||
|
||
ndpi-protocol | ||
------------- | ||
|
||
Match on the Layer-7 protocol detected by nDPI. | ||
|
||
This requires Suricata to be compiled with nDPI support: | ||
|
||
.. code-block:: console | ||
|
||
./configure --enable-ndpi --with-ndpi=/home/user/nDPI | ||
|
||
Syntax:: | ||
|
||
ndpi-protocol:[!]<protocol>; | ||
|
||
Where protocol is one of the application protocols detected by nDPI. | ||
Plase check ndpiReader -H for the full list. | ||
It is possible to specify the transport protocol, the application | ||
protocol, or both (dot-separated). | ||
|
||
Examples:: | ||
|
||
ndpi-protocol:HTTP; | ||
ndpi-protocol:!TLS; | ||
ndpi-protocol:TLS.YouTube; | ||
|
||
Here is an example of a rule matching TLS traffic on port 53: | ||
|
||
.. container:: example-rule | ||
|
||
alert tcp any any -> any 53 (msg:"TLS traffic over DNS standard port"; ndpi-protocol:TLS; sid:1;) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
nDPI Risk Keyword | ||
================= | ||
|
||
ndpi-risk | ||
--------- | ||
|
||
Match on the flow risks detected by nDPI. Risks are potential issues detected | ||
by nDPI during the packet dissection and include: | ||
|
||
- Known Proto on Non Std Port | ||
- Binary App Transfer | ||
- Self-signed Certificate | ||
- Susp DGA Domain name | ||
- Malware host contacted | ||
- and many other... | ||
|
||
This requires Suricata to be compiled with nDPI support: | ||
|
||
.. code-block:: console | ||
./configure --enable-ndpi --with-ndpi=/home/user/nDPI | ||
Syntax:: | ||
|
||
ndpi-risk:[!]<risk>; | ||
|
||
Where risk is one (or multiple comma-separated) of the risk codes supported by | ||
nDPI (e.g. NDPI_BINARY_APPLICATION_TRANSFER). Please check ndpiReader -H for the | ||
full list. | ||
|
||
Examples:: | ||
|
||
ndpi-risk:NDPI_BINARY_APPLICATION_TRANSFER; | ||
ndpi-risk:NDPI_TLS_OBSOLETE_VERSION,NDPI_TLS_WEAK_CIPHER; | ||
|
||
Here is an example of a rule matching HTTP traffic transferring a binary application: | ||
|
||
.. container:: example-rule | ||
|
||
alert tcp any any -> any any (msg:"Binary application transfer over HTTP"; ndpi-protocol:HTTP; ndpi-risk:NDPI_BINARY_APPLICATION_TRANSFER; sid:1;) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Q: Should we add any a reference here for what was consulted to define those and where people could check them, or isn't this necessary?
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.
See https://github.com/ntop/nDPI/blob/dev/doc/flow_risks.rst