Commit Graph

2845 Commits (c4b34e6ef73f9915b4da1d52673279ea7537f6f0)
 

Author SHA1 Message Date
Anoop Saldanha 6240131a4e updates to accomodate master rebase 13 years ago
Anoop Saldanha 7c9d1b80fd Update size parsing API with new calls for returing u8, u16, u32 and u64 values. Make updates in the codebase to use these new calls 13 years ago
Anoop Saldanha 52b37fef3e Update yaml size params to use kb, mb, gb to indicate size, in place of raw bytes 13 years ago
Anoop Saldanha e0c13434ef bug 333 - support new Size Parsing API. Update various conf params inside the engine to use this API to parse sizes in the format xxx <-just the no represents bytes, xxxkb <- kilobytes, xxxmb <- megabytes, xxxgb <- gigabytes, where xxx is a \d+ 13 years ago
Eileen Donlon 79e0299643 Fixed coredump compile problems on bsd, windows 13 years ago
Anoop Saldanha b970273163 fix broken unittest 13 years ago
Anoop Saldanha 651f91e4de fix setting pseudo packet from this commit:
commit 259e022f721a7c3a70c26447b1cf730bb8a1f6cd
Author: Anoop Saldanha <poonaatsoc@gmail.com>
Date:   Sun Dec 4 13:20:43 2011 +0530

    fix setting ipv4 header in pseudo packet
13 years ago
Anoop Saldanha d40fb5b933 Remove unnecessary flow NULL check 13 years ago
Anoop Saldanha 8533cd2cdf fix mapping of tcp states to flow_established and flow_closed. Improves accuracy 13 years ago
Anoop Saldanha cc7db6315c Move setting packet iponly flags from decode section to stream section 13 years ago
Anoop Saldanha eaf15911e7 fix setting ipv4 header in pseudo packet 13 years ago
Victor Julien 322779fb23 flow engine: release flow lock earlier in flow kill/prune process. Minor cleanups. 13 years ago
Victor Julien 5401764697 flow engine: minor cleanup. 13 years ago
Victor Julien bfa872b9b7 flow engine: no longer allow FlowRequeue to be called with the same src and dst queue. 13 years ago
Victor Julien 84c7480c06 flow engine: convert flow hash code FlowRequeue call to FlowEnqueue. 13 years ago
Victor Julien ad4e016288 flow engine: make FlowEnqueue lock the queue. Adapt callers. 13 years ago
Victor Julien fbbdbb251f flow engine: remove unneeded 'need_srclock' argument for FlowRequeue 13 years ago
Victor Julien 0331da9773 flow engine: introduce FlowRequeueMoveToSpare
As part of a clean up of how FlowRequeue is used, introduce
FlowRequeueMoveToSpare for moving a flow from a locked queue to the
spare queue.
13 years ago
Victor Julien 7fa3df33f2 flow engine: introduce FlowRequeueMoveToBot
As part of a clean up of how FlowRequeue is used, introduce
FlowRequeueMoveToBot for moving a flow to the bottom of it's queue.
13 years ago
Victor Julien ae1e4c1d7d Add missing hash row unlock. 13 years ago
Victor Julien f47f601f09 Fix unified2 setting the wrong eth_type. 13 years ago
Eric Leblond 9422a36851 unified2: avoid to log RAW packet
If the packet datalink is ethernet, we add a fake ethernet
header to stream logging to avoid that barnyard2 create
different files.
13 years ago
Eric Leblond fc56abfcd0 unified2: log an ethernet header for stream alert.
If packet is a of type ethernet, we log the alert reconstructed
payload as an ethernet packet and not a raw packet. This will avoid
to confuse barnyard2 pcap output.
13 years ago
Victor Julien 49d6885ec7 Improve debug validation code for packet, add new macro for flow. 13 years ago
Victor Julien 3009429e3c HTTP transaction handling improvement
In some cases AppLayerTransactionGetInspectId can return -1, which is
now handled by all it's callers.

Improve logic of selecting which transactions are inspected by the various
HTTP keywords.
13 years ago
Eileen Donlon dbdf2d888f Enable/disable core dump in config (feature 319) 13 years ago
Victor Julien 7b0f261fdc Add some debug statements for debugging a smtp issue. 13 years ago
Victor Julien 004b5dde88 Support libhtp's different handling of CONNECT requests. 13 years ago
Victor Julien 117d51c965 Fix a compile warning when debug is enabled. 13 years ago
Victor Julien 1df3304655 Clean up for unittests code: only compile unittest api code when unittests are enabled. Fix unittest code that wasn't wrapped in the proper UNITTESTS ifdefs. 13 years ago
Victor Julien a138b32533 flow manager: timing change
Set default timeout for the flow manager to wake up to 1 second. The 0.4 sec
performed best on a Xeon, but in kvm vm's it was horrible:

32 bit vm: 60% cpu for flowmgr when idle.
64 bit vm: 30% cpu for flowmgr when idle.

With the 1 second timeout both are at 0.3% cpu.
13 years ago
Victor Julien 786148319c Lower flow manager wake up timer to 0.4 seconds as that performs 2% better in my tests. 13 years ago
Anoop Saldanha 776bf633e3 flow manager code cleanup. Remove unused code + fix indentation. Remove unused vars 13 years ago
Anoop Saldanha 5133098bd6 Accomodate pcap-file mode to signal flow mgr to wakeup when it exceeds a certain time interval. This let's the flow mgr keep in sync with pcap timestamp changes 13 years ago
Anoop Saldanha 9917744707 separate timers for flow mgr thread for normal and emerg mode. Signal flow mgr thread when in emerg mode 13 years ago
Eric Leblond 5a63662766 Flow: use condition system instead of short sleep
Short sleep can lead to some really annoying performance issue in
some environnement like virtual systems. This technic was used in
the flow manager. This patch uses an alternate approach based on
a timed condition which is triggered each time a new flow has to
be created. This avoid to run out of flow. A counter is also done
to be able not to run the cleaning code at each new flow.
13 years ago
Victor Julien 34450b9b57 Don't parse layers / ext headers above ipv6 frag header. This is taken care of by defrag. 13 years ago
Victor Julien 938e9b3db0 Fix filestore related segv. 13 years ago
Victor Julien e6d8d0443c Unify output functions for alert-debug for IPv4 and IPv6. 13 years ago
Victor Julien 3c7f09d1ea Add debug output to engine event. 13 years ago
Victor Julien fd4e1460cf Add checksum validation rules to decoder events rules. 13 years ago
Victor Julien e6af837b25 Convert StreamTcpSetEvent function into macro. Eases debug. 13 years ago
Victor Julien 58011554b0 Don't consider payload len in ACK value validation check. 13 years ago
Victor Julien 9878eca086 file handling: expand filestore keyword
Filestore keyword by default (... filestore; ... ) marks only the file in the
same direction as the rule match for storing. This makes sense when inspecting
individual files (filemagic, filename, etc) but not so much when looking at
suspicious file requests, where the actual file is in the response.

The filestore keyword now takes 2 optional options:

filestore:<direction>,<scope>;

By default the direction is "same as rule match", and scope is "currently
inspected file".

For direction the following values are possible: "request" and "to_server",
"response" and "to_client", "both".

For scope the following values are possible: "tx" for all files in the current
HTTP/1.1 transation, "ssn" and "flow" for all files in the session/flow.

For the above case, where a suspious request should lead to a response file
download, this would work:

alert http ... content:"/suspicious/"; http_uri; filestore:response; ...
13 years ago
Victor Julien ddfa5c49c6 Stream engine: gap handling
Set a stream event for stream gaps.
Add a (disabled by default) signature to the stream-event.rules.
13 years ago
Victor Julien 45d86ff58a Stream reassembly / app layer: disable gap errors
Gap errors on the app layer are now silently handled. No longer printed
to the screen.
13 years ago
Victor Julien 425294f912 stream reassembly: account stream gaps
Add counter to the stream reassembly engine to count stream gaps. Stream gaps
are the result of missing packets (usually due to packet loss). This missing
data stops the reassembly for the app layer.
13 years ago
Victor Julien d8d8fdd9f5 Improve handling of packets when stream is in the fin_wait1 or fin_wait2 state. 13 years ago
Victor Julien b74c73309b file handling: improve filestore keyword handling
In stateful detection only inspect the file portion of the rule after all
other conditions matched. This to prevent "filestore" from tagging files
for storage during a partial match.

Add a couple of unittests to test the behaviour change.
13 years ago
Victor Julien 4cbe7519fa Add missing file util code. 13 years ago