Commit Graph

16866 Commits (4a8da8c448938b43d8d2f93f7a57458adb7a0291)
 

Author SHA1 Message Date
Juliana Fajardini 4a8da8c448 userguide/suricatactl: use suricata community page
We were mentioning "Suricata Support" page, which could be a bit
misleading -- and also used a link that is actually redirected to the
Suricata Community page, anyways.
4 months ago
Jason Ish 5718d5c0fa github-ci: pin rust version for clippy tests
Prevents CI breakage after a new Rust release until we're ready to make
the changes.
4 months ago
Jason Ish cbc296f313 github-ci: update rpm builder to fedora 41 4 months ago
Jason Ish 65b863b087 github-ci: update Fedora non-root build to Fedora 41 4 months ago
Jason Ish 70d5bae160 github-ci: remove fedora 40 builds where 41 exists
Remove Fedora 40 builds where there is a Fedora 41 equivalent.
4 months ago
Jason Ish facd525692 eve-parity: merge $ref props into current object
Allows for a "suricata" entry along with a "$ref".
4 months ago
Jason Ish 744f301df4 eve-parity: handle arrays of scalars
And add an example with "client_alpns".
4 months ago
Bryan Benson 15da9d783e rust: Update sawp dependencies to 0.13.1 due to SPDX license compatibility. 4 months ago
Jeff Lucovsky e9717f3ad2 detect/lua: Fix max value displayed in error msg
This commit corrects an error message displayed when the key length is
out of range.
4 months ago
Jeff Lucovsky 3d26f917ee var: Use 16-bit container for type
Issue: 6855: Match sigmatch type field in var and bit structs

Align the size and datatype of type, idx, and next members across:
- FlowVarThreshold
- FlowBit
- FlowVar
- GenericVar
- XBit
- DetectVarList

Note that the FlowVar structure has been intentionally constrained to
match the structure size prior to this commit. To achieve this, the
keylen member was restricted to 8 bits after it was confirmed its value
is checked against a max of 0xff.
4 months ago
Philippe Antoine d8ddef4c14 detect: delay tx cleanup in some edge case
Ticket: 7552

f->sgh_toserver may be NULL but because FLOW_SGH_TOSERVER is unset
and thus, we want to delay cleanup until detection has really been
run with the right signature group head.

This may happen for a rule using
`alert tcp any any -> any any` and
a app-layer keyword to client
with a app-layer supporting both udp and tcp
with stream.midstream=true
and with the first packet of a flow being a server response

In this case, we swap the flow and reset its signature group heads
4 months ago
Philippe Antoine d74bc774b7 detect: reset signature groups when reversing flow
Ticket: 7552

When we use midstream, and the first packet we see of a flow is
a response from server, and we want to match on some signature
to client :
- we had first set sgh_toserver/FLOW_SGH_TOSERVER as we first
  thought this was a packet to server
- we then swap/reverse the flow, so sgh_toclient becomes sgh_toserver
  but it contains signatures to server and cannot match our
  to_client signature

The detect engine with DetectRunSetup will set again the
signatures group heads properly
4 months ago
Jason Ish 6477b31199 eve-parity: skip transform keywords 4 months ago
Jason Ish 771d9d9d8b schema: mark dns.version and dns.grouped as having no keywords 4 months ago
Jason Ish 00a571a25c schema: mark "stats" and "drop" as having no keywords 4 months ago
Jason Ish 33c29be139 detect-dns-response: remove unit tests
Should have coverage by S-V now.
4 months ago
Jason Ish 861896ed39 script/eve-parity: add script for checking eve/keyword parity
Currently this script has two commands: "missing" and "having".

"missing" will show eve fields that do not map to any keywords.

"having" will sohw eve fields along with their keyword mappsings,
while also validating that those keywords really exist.

Related to tickets: #6463, #4772
4 months ago
Jason Ish 115d7d3c6d schema: add an object for mapping fields to keywords
To some EVE fields and a "suricata" object that contains an array of
keywords. These are the keywords that map directly to this field, or
somehow cover this field.

This is an attempt at tooling to help with EVE and keyword parity.

Related to tickets: #5642, #6463, #4772
4 months ago
Jason Ish 814e9ffb7a dns: add keywords for additionals and authorities rrnames
Add keywords dns.additionals.rrname and dns.authorities.rrname. Along
the way, consolidate dns.query.name and dns.answer.name into a single file
and register them altogether since there is a lot of common code.
4 months ago
Jason Ish c57e1425f5 detect: split new keyword id from registration
Split DetectHelperKeywordRegister into 2 functions, one for acquiring
a new keyword ID, and another to perform the registration.

This makes it easier to do the traditional C keyword initialization
with a dynamic ID.
4 months ago
Jason Ish 870bf73380 dns: refactor function to get rrname to be safe
Make the function safe by returning a reference to the DNSName object,
the unsafe C wrapper can do the conversion to pointers.
4 months ago
Jason Ish a9bf6bbd0e detect-dns-response: disable clang-format around byte arrays
These arrays are manually formatted for readability.
4 months ago
Jason Ish a026293b42 dns: rename dns.response keyword to dns.response.rrname
This is a better name as the keyword is looking at all rrname type
fields in the response.
4 months ago
Nathan Scrivens d3953dee8b doc/userguide: document dns.response
Feature: 7012
4 months ago
Nathan Scrivens 07632fdf4e dns: add dns.response sticky buffer
Feature: 7012
Add dns.response sticky buffer to match on dns response fields.
Add rust functions to return dns response packet data.
Unit tests verifying signature matching.
4 months ago
Philippe Antoine f68e2f5537 files: append data on closing even with FILE_NOSTORE
Ticket: 7577

When HTTP1 post multipart handles a small file, it will call
HTPFileClose with some data
This data needs to be appended to the streaming buffer for usage
by file.data keyword even if we do not end up storing the file
4 months ago
Alice Akaki 137f7fe652 detect: add ldap.responses.message
ldap.responses.message matches on LDAPResult error message
This keyword maps the following eve fields:
ldap.responses[].bind_response.message
ldap.responses[].search_result_done.message
ldap.responses[].modify_response.message
ldap.responses[].add_response.message
ldap.responses[].del_response.message
ldap.responses[].mod_dn_response.message
ldap.responses[].compare_response.message
ldap.responses[].extended_response.message
It is a sticky buffer
Supports prefiltering

Ticket: #7532
4 months ago
Alice Akaki 84605db01d detect: add ldap.responses.result_code
ldap.responses.result_code matches on LDAP result code
This keyword maps the following eve fields:
ldap.responses[].bind_response.result_code
ldap.responses[].search_result_done.result_code
ldap.responses[].modify_response.result_code
ldap.responses[].add_response.result_code
ldap.responses[].del_response.result_code
ldap.responses[].mod_dn_response.result_code
ldap.responses[].compare_response.result_code
ldap.responses[].extended_response.result_code
It is an unsigned 32-bit integer
Doesn't support prefiltering

Ticket: #7532
4 months ago
Alice Akaki d827728661 ldap: create a generic funtion to match integer responses 4 months ago
Alice Akaki bfa3558cf0 ldap: refactor function aux_ldap_parse_protocol_resp_op
Split code to create a generic function that parses LdapIndex
4 months ago
Alice Akaki caffde9428 ldap: rename DetectLdapRespData struct to be more specific 4 months ago
Alice Akaki 599d33c5bf ldap: return empty buffer in ldap_tx_get_responses_dn
Funciton ldap_tx_get_responses_dn returns empty buffer in case
the response doesn't contain the distinguished name field

Fixes: 73ae6e997f ("detect: add ldap.responses.dn")
4 months ago
Alice Akaki 82ca3e667b ldap: fix LDAPDN nits
Change variable name 'req' to 'resp' in function ldap_tx_get_responses_dn and documentation nits

Fixes:
73ae6e997f ("detect: add ldap.responses.dn")
16dcee46fc ("detect: add ldap.request.dn")
4 months ago
Alice Akaki 3b6106e8f4 ldap: apply rustfmt
Fixes: 4554c4778d ("rust: use AppProto from generated bindings instead of duplicating")
4 months ago
Philippe Antoine 544469780a ci: fix clusterfuzzlite build 4 months ago
dependabot[bot] 93bd1935bb github-actions: bump actions/upload-artifact from 4.6.0 to 4.6.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65c4c4a1dd...4cec3d8aa0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] 2d7937b3ce github-actions: bump codecov/codecov-action from 5.3.1 to 5.4.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](13ce06bfc6...0565863a31)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] 5d38c4de19 github-actions: bump github/codeql-action from 3.28.8 to 3.28.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.28.8...v3.28.10)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] 47e08ee48e github-actions: bump actions/download-artifact from 4.1.8 to 4.1.9
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.8 to 4.1.9.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](fa0a91b85d...cc20338598)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
dependabot[bot] 03b113f7e3
github-actions: bump ossf/scorecard-action from 2.4.0 to 2.4.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](62b2cac7ed...f49aabe0b5)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
Jason Ish 2e52e9501f mqtt: naming and visibility cleanups
- remove rs_prefix, replace with SC if needed
- remove pub and no_mangle where not needed
- remove some unused functions and fields

Related to ticket: #7498
5 months ago
Jason Ish 0fe11cdfe5 enip: remove rs_ prefix
Related to ticket: #7498
5 months ago
Jason Ish c726d67bb0 dcerpc: visibility and naming cleanups
- replace rs_ prefixed names with SC
- remove no_mangle and pub where not needed
- remove some unused functions

Related to ticket: #7498
5 months ago
Jason Ish f0116c3a6b bittorrent: no_mangle, pub and naming cleanups
- Remove rs_prefix
- Remove no_mangle and pub when not needed

Related to ticket: #7498
5 months ago
Jason Ish 05dd607f34 rust: use CBINDGEN variable and not "cbindgen"
This uses the cbindgen found during ./configure, and not the one
found on the path during "make", which while often the same, aren't
always the same.

Ticket: #6384
5 months ago
Jason Ish 1b27febdd8 github-ci: re-enable RPM builds
The RPM has been updated to handle the conversion of suricatasc and
suricatactl to Rust.

Also fixes the "if" expression to prevent one job running both upload
sections.
5 months ago
Jeff Lucovsky 9b088ed018 applayer/ftp: Misc cleanup
Issue: 4082

Small fixups.
5 months ago
Jeff Lucovsky b7d240fb14 applayer/ftp: Move MPM declaration
This commit moves the MPM fn declaration into core.rs making it
available for other Rust modules.

Issue: 4082
5 months ago
Jeff Lucovsky 4d0cf8a8fa app-layer/ftp: Fixup state values
Issue: 4082

Fixup the incorrect state values -- they should be the default enum
values to match the pre-Rust implementation.
5 months ago
Jason Ish 0dc5b72c89 github-ci: skip rpm builds for now
RPMs will need to be fixed after merge.
5 months ago