Commit Graph

17200 Commits (85f2f597f12cafbc4b83d7f3e8fb3caae8b6d370)
 

Author SHA1 Message Date
Philippe Antoine 85f2f597f1 defrag: remove unnecessary NULL check
CID: 727861
1 year ago
Philippe Antoine 9dac5ec23c util/mpm: prevents double free
CID: 1645545

PatternDatabaseGetCached frees cd on success
So, we should NULL it, so that in case PatternDatabaseGetSize fails
and we goto error, we do not free cd again.
1 year ago
Philippe Antoine e301e038ef detect: explicitly skip check on SCConfGet
CID: 1644571
1 year ago
Eric Leblond adfa46ab1c dox/userguide: add tx_cnt documentation 1 year ago
Eric Leblond 0044b5f682 eve/schema: remove duplicate fields 1 year ago
Eric Leblond 5cf6459f3f eve/flow: log tx_cnt
This patch adds a `tx_cnt` field to `netflow` events to give some
context about the underlying protocol activity.

Ticket: #7635
1 year ago
Eric Leblond 668c6d646e eve/netflow: add tx_cnt
This patch adds a `tx_cnt` field to `netflow` events to give some
context about the underlying protocol activity.

Ticket: #7635
1 year ago
Eric Leblond db11078315 eve/smb: add tx_id to event
As SMB protocol is using heavily transactions, getting the transaction
ID in SMB events can be really useful for automated analysis.
1 year ago
Philippe Antoine 16f74c68aa websocket: use max window bits of 15
Ticket: 7285

As this is the default for websocket, which is bigger than the
defaut for zlib usage

Also limit the decompressed content to the max-payload-size
configuration parameter also used for non-compressed content.

And also use a stateful decoder to store/remember the compression
state to be able to decompress later messages.
1 year ago
Philippe Antoine 44c8632284 rust: use flate2 with C zlib
move flate2.rs to a backend supporting the setting
of window_bits, which is not the case for miniz-oxide.

This will allow WebSocket to use Sec-WebSocket-Extensions
which can set a non-default window_bits
1 year ago
Philippe Antoine ff57a162d7 websocket: decompress single pdu message
Ticket: 7285

Previously, only messages over multiple PDUs could get decompressed
1 year ago
Jeff Lucovsky d59f5d6db6 output/rotate: Remove extra rotation flag register
Issue: 3436

Remove duplicate register of the rotation flag. Eventually, this will
cause corruption when the file context has been freed and the rotation
flag is deregistered.
1 year ago
Jeff Lucovsky 33445d01b3 output/rotate: Serialize rotation flag handling
Issue: 3436

Serialize rotation flag handling to avoid corruption.
1 year ago
Alice Akaki bda0890834 detect: add email.received keyword
email.received matches on MIME EMAIL Received
This keyword maps to the EVE field email.received[]
It is a sticky buffer
Supports multiple buffer matching
Supports prefiltering

Ticket: #7599
1 year ago
James deb761367d doc: Update bypass docs to use new keyword format
Ticket: #7143

Update documentation to reflect new sticky buffer keyword format
1 year ago
Victor Julien e3c6554ee6 detect/app-layer-protocol: allow matching on 'unknown' 1 year ago
Victor Julien 8f9c05243c firewall: detect: set firewall support flag on select keywords 1 year ago
Victor Julien f96e97205c firewall: detect: add feature flag for keywords supporting firewall 1 year ago
Victor Julien e6bd69b419 firewall: detect: set per rule table
For firewall mode, set the pseudo table in the rule and use this
in alert queue ordering, so that rule actions are applied in the
expected order:

        packet:filter -> packet:td -> app:filter -> app:td

This makes sure that a packet:td drop is applied before a app:filter
accept.
1 year ago
Victor Julien 1643b017b6 detect: don't set conflicting packet/flow actions
If for the same a packet a drop rule and a pass rule would match,
the applying of actions could be contradictionary:

- the drop would be applied to the packet
- the pass rule would also be considered, not overriding the drop,
  but still setting the flow pass flag.

This would lead to the packet being dropped, but the rest of the
flow getting passed, including retransmissions of the dropped
packet.

This patch only sets drop/pass actions if no conflicting action
has been set on the packet before. It respects the action-order.

Bug: #7653.
1 year ago
Victor Julien d6e61b6690 firewall: detect: add explanation 1 year ago
Victor Julien 49979587ce detect/alert: minor cleanup 1 year ago
Alice Akaki ca429ef5e3 detect: add email.url keyword
email.url matches on URLs extracted from an email
This keyword maps to the EVE field email.url[]
Supports multiple buffer matching
Supports prefiltering

Ticket: #7597
1 year ago
Jason Ish bea685bfcd rust/htp: remove authors; fix homepage
Remove the authors field as it is deprecated.

Update the repository page to the Suricata repository.

Remove the homepage, it can be found via the reposistory page.
1 year ago
Jason Ish e3a400a581 htp: rename to suricata-htp; allow publishing to crates.io
As the "suricata" crate depends on htp, we need to publish htp to
crates.io first, however "htp" name is already taken. So rename "htp" to
"suricata-htp".
1 year ago
Jason Ish b98b44a576 suricatactl: add description to Cargo.toml
For publishing to crates.io.
1 year ago
Jason Ish 0e65cccc09 rust: always update Cargo.lock.in
On a normal project where the Cargo.lock is checked in, it would be
normal to see an updated Cargo.lock in git status and the like. As we
use autoconf to generate this file, we should just copy it back to the
input file so we get the same convenience of seeing when it is
updated, which usually means it needs to be checked in.

However, to satisfy "make distcheck", only copy it if the input
template exists, if the input template does not exist we are in an out
of tree build.
1 year ago
Shivani Bhardwaj cff611a284 workflows: use aggressive-cleanup option w s-v
on the Fedora 41 + codecov job to avoid running out of disk space.
1 year ago
Jason Ish 87ce5ea8b5 configure: pickup pre-release versions from changelog
Pickup release versions like 8.0.0-beta1 and 8.0.0-rc1 from the
ChangeLog. This version is used in the generated documentation.
1 year ago
Victor Julien 95b079ae0d github-actions: f41 codecov improvements
Add missing gpg package.

Reduce disk space usage.
1 year ago
Victor Julien 88e96c9d49 detect/domain: move transform fully to rust 1 year ago
Victor Julien 679d25ccd2 detect/prefilter: fix coverity issue
** CID 1646448:  Null pointer dereferences  (NULL_RETURNS)
/src/detect-engine-prefilter.c: 944 in SetupNonPrefilter()

________________________________________________________________________________________________________
*** CID 1646448:  Null pointer dereferences  (NULL_RETURNS)
/src/detect-engine-prefilter.c: 944 in SetupNonPrefilter()
938                 const DetectBufferType *buf = DetectEngineBufferTypeGetById(de_ctx, list_id);
939                 /* for now, exclude app-layer-events, as they are not tied to a specific
940                  * progress value like other keywords. */
941                 SCLogDebug("list_id %d buf %p", list_id, buf);
942                 if (list_id == app_events_list_id)
943                     continue;
>>>     CID 1646448:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing "buf", which is known to be "NULL".
944                 if (buf->packet) {
945                     SCLogDebug("packet buf");
946                     /* packet is handled below */
947                     pkt_non_pf = true;
948                 } else if (buf->frame) {
949                     for (DetectEngineFrameInspectionEngine *f = de_ctx->frame_inspect_engines;
1 year ago
Jason Ish 1f57bd2c1b log-pcap: error out if malloc fails for bpf filter 1 year ago
Jason Ish b23c96198d doc/userguide: type in pfring upgrade notes 1 year ago
Jason Ish 8b2fafcfa2 version: start development towards 8.0.0-rc1 1 year ago
Shivani Bhardwaj c965c5687d release: 8.0.0-beta1; update changelog 1 year ago
Victor Julien 57c73880db lua: enable lua rules by default
Now that sandboxing is in place, lua rule support is enabled by default.
1 year ago
Alice Akaki d4ec5b9765 detect: add ldap.responses.attribute_type
ldap.responses.attribute_type matches on LDAP attribute type/description
This keyword maps the eve field ldap.responses[].search_result_entry.attributes[].type
It is a sticky buffer
Supports multiple buffer matching
Supports prefiltering

Ticket: #7533
1 year ago
Alice Akaki 75fb352bde detect: add ldap.request.attribute_type
ldap.request.attribute_type matches on LDAP attribute type/description
This keyword maps the following eve fields:
ldap.request.search_request.attributes[]
ldap.request.modify_request.changes[].modification.attribute_type
ldap.request.add_request.attributes[].name
ldap.request.compare_request.attribute_value_assertion.description
It is a sticky buffer
Supports multiple buffer matching
Supports prefiltering

Ticket: #7533
1 year ago
Alice Akaki 6d48acdd63 rustfmt: rust/src/ldap/detect.rs 1 year ago
Jeff Lucovsky fdc43e5ac4 app/ftp: Eliminate scan-build warning
Scan-build reports that FTPRealloc could be called with size=0. Modify
the logic so it's never passed 0.
1 year ago
Jeff Lucovsky 88c38fc4a0 doc/ftp: Document the ftp.reply keyword
Issue: 7508
1 year ago
Jeff Lucovsky e0131f6098 detect/ftp: Add ftp.reply rule keyword
Issue: 7508

Add the rule detection keyword "ftp.reply". This is a multi-buffer
command.
1 year ago
Jeff Lucovsky d674ce2510 app/ftp: Use Rust FTP response line handling
Use the Rust logic to parse FTP response lines with the goal to support
multi-buffer matches better.

A side effect is that the completion codes are no longer strings; the
schema update reflects this.

Issue: 4082
1 year ago
Jeff Lucovsky dfc896e2a7 app/ftp: Move FTP response handling to rust
Move handling of FTP responses to Rust to improve support for FTP
keyword matching. Parsing the response line when encountered
simplifies multi-buffer matching and metadata output.

Issue: 4082
1 year ago
Juliana Fajardini 63adfc6b1e userguide/pop3: minor typo and formatting fixing 1 year ago
Alex Savage 778053876b pop3: app-layer parser using sawp-pop3
This module uses the sawp-pop3 crate to parse POP3 requests and responses
Features:
- eve logging
- events for parsable but non-RFC-compliant messages

Ticket: 3243
1 year ago
Eric Leblond ed20e7cfe4 doc/userguide: doc domain and tld transforms 1 year ago
Eric Leblond 585c624482 tld: add new transform
Extract the TLD from a buffer.

Ticket: #5639
1 year ago
Eric Leblond 0b031a33c6 domain: add new transformation
Ticket: #5639
1 year ago