Commit Graph

10137 Commits (7384744c3e52977b8db8a451df7f15a06cb8a2b8)
 

Author SHA1 Message Date
Jeff Lucovsky fb019213e7 eve/ftp: minor cleanups and fixes 5 years ago
Zach Kelly 1588cd8735 eve/ftp: Bug fix and banner capture
1. Correct off-by-one error in server response whitespace removal
2. Include banner response (before first command entered)
5 years ago
Jeff Lucovsky a04b1c1664 eve/ftp: Log initial responses
This changeset ensures that unknown commands are logged.
Unknown commands are either
- Banner responses when connecting to the FTP port
- Commands not includes in the FtpCommands descriptor table
5 years ago
Jeff Lucovsky a66383569c userguide: formatting: remove tabs 5 years ago
Jeff Lucovsky c68510437f userguide: ftp formatting updates 5 years ago
Jeff Lucovsky 2149807bd6 eve/ftp: Transaction support for unmatched requests
Modified transaction logic to create a new transaction with each
request; replies location transactions by using the oldest "open"
(unmatched) transaction or the last transaction if none are open.
5 years ago
Jeff Lucovsky 9b88ecb3c1 suricata.yaml: Add ftp logging option to eve-log 5 years ago
Jeff Lucovsky 1930b1f504 eve/ftp: Log FTP transactions
This changeset includes changes that
1. Add transaction support to the FTP parser
2. Support eve json logging of FTP transactions
5 years ago
Philippe Antoine 2d217e6661 http: fixes overflow in range parsing 5 years ago
Victor Julien 5ddfc42b87 stream: fix midstream reverse flow handling
When a TCP session is picked up from the response the flow is
reversed by the protocol detection code.

This would lead to duplicate logging of the response. The reason this
happened was that the per stream app progress tracker was not handled
correctly by the direction reversing code. While the streams were
swapped the stream engine would continue to use a now outdated pointer
to what had become the wrong direction.

This patches fixes this by making the stream a ptr to ptr that can be
updated by the protocol detection as well.

In addition, the progress tracking was cleaned up and the GAP error
handling in this case was improved as well.
5 years ago
Eric Leblond 2c1b923500 ebpf: remove left over debug in lb.c 5 years ago
Philippe Antoine 94a976d47e ftp: removes one use of atoi
Fixes only one small part of #3053
5 years ago
Victor Julien 66d6196e9b pcap: code reformatting and minor cleanups 5 years ago
Victor Julien 255ab1528b flow: minor formatting updates 5 years ago
Max Fillinger bcc03f172a af-packet: Always fill in vlan_id
The vlan tag will be filled in either from the extended header (for
kernel version >= 3.0) or from the packet itself.

Related to https://redmine.openinfosecfoundation.org/issues/3076
5 years ago
Max Fillinger 09c54471e5 pfring: Always fill in vlan_id
Previously, source-pfring.c would copy the vlan_id from the extended
header only if vlan.use-for-tracking was enabled. This commit removes
that check.

Related to https://redmine.openinfosecfoundation.org/issues/3076
5 years ago
Max Fillinger 44bea80d3c decode erspan: Always fill in vlan_id
Fill in the vlan_id fields unconditionally. We can now remove the check
for the vlan.use-for-tracking setting in decode.c. The debug log message
is moved to suricata.c.
5 years ago
Max Fillinger 8d3b04b0e3 decode vlan: Always fill in vlan_id
Since the vlan.use-for-tracking setting is now handled in flow-hash.c,
we can fill in the vlan_id fields unconditionally. This makes the vlanh
fields unnecessary.

Related to https://redmine.openinfosecfoundation.org/issues/3076
5 years ago
Max Fillinger cef9961f59 flow hash: Mask vlan_id if not used for tracking
If vlan.use-for-tracking is disabled, set the vlan_id fields to 0 when
hashing or comparing flows. This is done using a bitmask as suggested by
Victor Julien in IRC, in order to avoid adding more branches to this
code.

Currently, suricata does not fill in vlan_id fields if
vlan.use-for-tracking is disabled and instead leaves them at the default
0 value, so this commit makes no functional change. This change is in
preparation for future commits where the vlan_ids will be always filled
in.

Related to https://redmine.openinfosecfoundation.org/issues/3076
5 years ago
Max Fillinger 38731d30da flow hash: Make CMP_FLOW macro an inline function 5 years ago
Victor Julien 7ccf14bc60 runmodes: remove unused prototypes 5 years ago
Victor Julien c12252617c afl: fix afl-ftp causing FPE due to missing ippair 5 years ago
Victor Julien 9e70716d5a runmodes: remove no-Rust logic 5 years ago
Victor Julien 8c6251ea6c runmodes: simply default runmode logic 5 years ago
Victor Julien 3282fb4967 runmodes: code cleanups 5 years ago
Philippe Antoine feda5e7392 leak: Fixes leak in AppLayerProtoDetectPMRegisterPattern
Fixes #3070
5 years ago
Philippe Antoine 66c500eaac leak: Fixes leak in DetectAppLayerEventPrepare 5 years ago
Philippe Antoine 684f101710 log: use SCLogError instead of fprintf 5 years ago
Philippe Antoine 19ab85f17e leak: fixes leak in DetectAddressParse2 5 years ago
Victor Julien 8b87801b80 geoip: fix unittests w/o db present 5 years ago
Victor Julien a7d65668ae mem: avoid potential shadow vars with 'len' name 5 years ago
Bill Meeks d1525c6fb8 mem: add SCStrndup() function to wrap strndup(). 5 years ago
Bill Meeks a291209e47 detect/geoip: migrate to GeoIP2 database format
Issue #2765
5 years ago
Victor Julien d6323ae33d detect/mpm: improve stats reporting 5 years ago
Victor Julien 24f0092b72 detect: add ipv6.hdr sticky buffer
Inspects IPv6 header and extension headers.
5 years ago
Victor Julien 3c9a557810 decode/ipv6: track length of ext hdrs 5 years ago
Victor Julien 9252400f68 decoder/ipv6: minor cleanups
Remove unused field and macros.

Minor code style cleanups.
5 years ago
Victor Julien 4ac327f5b5 detect/ipv4: add ipv4.hdr sticky buffer 5 years ago
Victor Julien 367e3e1895 detect/tcp/udp: minor cleanups 5 years ago
Victor Julien 4dff903b35 detect: introduce pkt mpm engines
Instead of the hardcode L4 matching in MPM that was recently introduced,
add an API similar to the AppLayer MPM and inspect engines.

Share part of the registration code with the AppLayer.

Implement for the tcp.hdr and udp.hdr keywords.
5 years ago
Victor Julien 14896365ef detect: remove Threadvars argument from API calls
Remove it as it's (almost) never used. If it is really needed it can
be accessed through DetectEngineThreadCtx::tv as well.
5 years ago
Victor Julien c1dd4534d9 detect/bsize: support transforms in case w/o content 5 years ago
Jason Ish 963abc961c python: fix parsing Suricata version from configure.ac
If parsing the version fails, or no version is found, fail
instead of defaulting to a version of 0.0.0.
5 years ago
Victor Julien 82de6e0659 decoder/vxlan: improvements and cleanups
Implement port config handling. Also check both src port and dest
port for tunnels that only set the destination port to the VXLAN
port. At the point of the check we don't know the packet direction
yet.

Implement as Suricata tunnel similar to Teredo.

Cleanups.
5 years ago
Henrik Lund Kramshoej 3519b011b7 decoder/vxlan: initial implementation of decoder 5 years ago
Victor Julien 35b88991c3 mem: fix shadow declaration warning
Avoid clash by adding a leading underscore to the declaration in the
macro. These temporary vars should never clash with valid variables
from the code where they are called from.
5 years ago
Victor Julien 034555644b doc: add tcp.hdr and udp.hdr 5 years ago
Philippe Antoine e30a77c5a1 warnings : Fixes integer sizes in format strings 5 years ago
Andreas Herz 0795dc1e14 configure: update configure.ac to reflect modern autoconf syntax 5 years ago
Pierre Chifflier af7d245a31 rust/snmp: add event when expected/received PDU versions mismatch 5 years ago