Commit Graph

1398 Commits (689d05b10bd92cbb5a7a4277c2592b95e48dd302)

Author SHA1 Message Date
Victor Julien 4dd0169499 Fix detection_filter issue. 16 years ago
Victor Julien 4c3e17d4ab Fix thresholding issues. 16 years ago
Ondrej Slanina 79443b1991 added INT and TERM signals on WIN32 16 years ago
Pablo Rincon b491ef2be0 Removing FlowAllocDirect since it's not needed anymore 16 years ago
Victor Julien 2fd31a1a11 Remove dsize grouping from detection engine grouping reducing memory usage. Store sgh in flow to reduce lookups. Reduce locking in alert handling. Increase default grouping values as we use less memory. 16 years ago
Victor Julien b657705d8c Fix pcap file mode not shutting down on ctrl-c 16 years ago
Victor Julien dff6795df5 Detect cleanups. 16 years ago
Victor Julien 8e7b147a23 Fix a endless loop condition introduced by the threshold cleanup. 16 years ago
Victor Julien d470e11352 Disable flowbits stats. 16 years ago
Victor Julien d8ad975d09 Clean up flags keyword. 16 years ago
Victor Julien 3a8c0d2cfe Fix ringbuffer number wrap around issue causing buffer items getting overwritten and thus lost. 16 years ago
Victor Julien 8514132851 Cleanup thresholding code. 16 years ago
Victor Julien f80016530c Remove unnecessary locking for thread-local packet-queues breaking on Win32. 16 years ago
Anoop Saldanha f4120ff5d5 wrap multi line macros in do while 16 years ago
Ondrej Slanina 1357914d23 added support for synchronous log output on WIN32 16 years ago
Victor Julien 32e3fea9e6 Exclude parts of a flow that are not changing after init from the flow mutex. Cleanup flow-hash function. 16 years ago
Pablo Rincon 29a6fc2f03 Adding some flow improvements and recovery on emergency mode 16 years ago
Victor Julien 329742c10e Small ip to pcap dev cleanup. 16 years ago
Victor Julien 1e707803c0 Enable perf counter updates in the ringbuffer queue handler. 16 years ago
William Metcalf a42fff541f fix for potential NULL deref on error in detect-http-method.c 16 years ago
Victor Julien 0140a14a15 Introduce atomic operations API that supports GCC's atomic operations and a fallback using (spin)locks. Convert ringbuffer api to use the new atomic api. 16 years ago
Victor Julien daea85e491 Lock detection state reset function properly. 16 years ago
Victor Julien 0a0b33ef79 Fix adding the http_uri sigmatch to the uri list twice. 16 years ago
Victor Julien e3fc53ecb9 Fix a corner case where the pcap receive modules could alloc packets at line rate until memory was depleted. 16 years ago
Victor Julien 0a607fce3d Finish http_uri keyword, fix invalid read issue in one of the tests. 16 years ago
Gerardo Iglesias Galvan 55dfa36963 Add support for http_uri keyword 16 years ago
Victor Julien 2fe77bf65e Use ringbuffers in the pcap live auto runmode as well. 16 years ago
Pablo Rincon 3b0c4133fc Fixing asn1 relative offset, negative values 16 years ago
Gurvinder Singh cda664a8c4 memroy leaks fixes in detection module, app layer and counters 16 years ago
Pablo Rincon 18954a2c4c app layer ftp fix (mem leak) 16 years ago
William Metcalf 9ce1399db8 Add option for setting pcap buffer size if it is available 16 years ago
Gurvinder Singh a0fa924c15 fixed the memory leaks in htp and radix tree 16 years ago
Victor Julien 7a6d4b57f0 Add support for class id in classification code. Submitted by firnsy@securixlive.com, thanks. 16 years ago
Gurvinder Singh a8ca5719f6 fixed the typo in byte_jump and host.c, Thanks to rmkml for pointing out 16 years ago
Gurvinder Singh 0881be3b17 added the support for setting up distance sig when previous keyword is byte_jump (bug 163) 16 years ago
Jason Ish ea4b7cc33b add profiling to stateful detection engine + other fixups. 16 years ago
Jason Ish a9ed9a8196 In profiling output, include a % for each rule. 16 years ago
Victor Julien 53acf08996 Add multi packet reading for pcap live mode. Add a partly lock free multi writer, multi reader ringbuffer. 16 years ago
Victor Julien 4e7df60b2f Make pcap file mode read multiple packets per 'read'. Update threading model to deal with this. 16 years ago
Victor Julien 6f502f0da5 lockfree ringbuffer wip2, including proper shutdown. 16 years ago
Victor Julien a48a767efc Lockfree ringbuffer wip. 16 years ago
Victor Julien 7f29166aa8 Improve memory handling in error conditions in the radix implementation. 16 years ago
Victor Julien c73e9318b0 Bump version 0.9.1. 16 years ago
Victor Julien 10a3d7343d Remove unnecessary header inclusion in app layer ssl. 16 years ago
Victor Julien bc7c9d928f Fix radix and stateful detect engine memory leaks. 16 years ago
Victor Julien 747daf4bce Fix typo in depth changes. 16 years ago
Victor Julien dab679889c Properly update depth if offset+content_len < depth. Fixes #164. 16 years ago
William Metcalf e704d90aaa set proper caps based run_mode 16 years ago
Jason Ish a93b2e6b84 Support for reading ERF files. 16 years ago
William Metcalf 2eef905c07 GPL and Copyright header updates. 16 years ago
William Metcalf 0fc8f6cc37 More null deref fixes for util-radix-tree.c 16 years ago
William Metcalf 54da99fe53 compilation fixes for PF_RING and IPFW after removal of mutex_pending 16 years ago
Victor Julien c2fb90c745 Fix thresholding 'both'. Fixes bug #160. 16 years ago
Victor Julien 2c8282a70b Fix small memleak in ip only parsing code. 16 years ago
Victor Julien 54c2804ce4 Fix malformed ipv6 packet causing an endless loop in exthdr decoding. 16 years ago
Victor Julien 2910759943 Rename TranslateIPToPcapDev to PcapTranslateIPToDevice and make the length argument size_t. 16 years ago
Ondrej Slanina 55d0d1e7a1 added support for finding pcap device via it's IP. 16 years ago
William Metcalf 179372978f Null deref fix for detect-id.c 16 years ago
William Metcalf 9728e49773 Null deref fix for detect-tls-version.c 16 years ago
William Metcalf 32a2da147b Null deref fix for detect-engine-iponly.c 16 years ago
William Metcalf 73d2349149 Null deref fix for detect-engine-port.c 16 years ago
William Metcalf afa8a2b8ba Null deref fixe for detect-engine-address.c 16 years ago
William Metcalf b856e607c9 Null deref fixes for util-radix-tree.c 16 years ago
Victor Julien 98c3f0149c Improve SSL input validation. 16 years ago
Gurvinder Singh 5fe1dc1d24 support for sslv2/sslv3 their unit tests and better stream no reassembly flag handling 16 years ago
Victor Julien b8641f300d Rename asn1 files, fix an invalid free, fix improper init of vars in one unittest. 16 years ago
Pablo Rincon 3fa3229e01 ASN1 decoder and keyword implementation 16 years ago
Gurvinder Singh 6b49a90353 added support for setting up bytejump relative when previous keyword is byte_jump (bug 165) 16 years ago
Victor Julien 70b32f7380 First stab at creating a stateful detection engine.
Stateful detection for app layer detection keywords, except uricontent. Stores it's partial results in the flow structure. Other modifications:

- Generalize transaction tracking, logging and inspection.
- Adapt http and dcerpc to use the new transaction handling.
- Stream engine now always notifies app layer of a stream eof.

This commit fixes bug #124.
16 years ago
Jason Ish 18e5ac8cde Basic rule profiling even though the results may be skewed by a bad rule in a grouping of rules. 16 years ago
William Metcalf b629b7c5c1 only show cli opts via help that we have support for 16 years ago
Victor Julien 42eeb84c9a Properly lock flow before setting IP only action flags. Small alert api cleanups. 16 years ago
Pablo Rincon 9bae6a8628 Moving alert logic to detect-engine-alert.c 16 years ago
Victor Julien 692eb935ea Fix updated memory api using debug mode by default. Small cleanups. 16 years ago
Gerardo Iglesias Galvan 9f4fae5b1a Fix inconsistent use of dynamic memory allocation 16 years ago
Victor Julien a8dd484aba Fix small potential bug in debug mode found by clang. 16 years ago
William Metcalf 8d66323f62 clang fixes for null derefrences 16 years ago
Gurvinder Singh 32a2658233 support setting up byte_test/relative when byte_jumo is previous keyword 16 years ago
Gurvinder Singh 9378bdbad4 set the byte_jum/byte_test with relative keyword when pcre is previous keyword (bug 142) 16 years ago
Gurvinder Singh ea3165b198 support setting up within keyword when previous keyword is pcre (bug 145) and added unit test for the same 16 years ago
Gurvinder Singh 07e10681d6 fixed a typo in the detect-content.h 16 years ago
Gurvinder Singh 2ea8205063 fixed the flags checking and make it more strict in default case (bug 153) 16 years ago
Victor Julien bb685751d9 Fix NFQ receive/verdict race condition in cases where the packetpool is empty. 16 years ago
Victor Julien 647b1c0eba Fix NFQ compilation. 16 years ago
Victor Julien f4812586de Fix broken ICMPv4 unittests. Fixes #161. 16 years ago
Victor Julien ecf5a8fbcc Fix broken stream unittest. 16 years ago
Victor Julien 76d62778c3 Use bigger stream msg. 16 years ago
Victor Julien 61099cd725 Fix compilation if debug is disabled. 16 years ago
Victor Julien e741bd0202 Cleanup packet recycling code. Fix issues in the packet tunnel/pseudo code. 16 years ago
Victor Julien e1a8c8f76c Switch time api from mutex to spinlock. 16 years ago
Victor Julien 19584d0416 Fix tunneled and defrag reassembled packets with the new pending limits. 16 years ago
Victor Julien ccf22cf563 Move to different way of enforcing max_pending. Should require less locks. 16 years ago
Victor Julien 42c4b5d53c Use one less thread in pcap file mode. Reduces locking overhead. 16 years ago
Victor Julien 53b388b669 Improve flow hash debugging, switch to csv output. 16 years ago
Victor Julien 548a3b2c93 Improve flow hash debugging functions. Make sure ICMP errors don't create flows. Handle ICMP DEST UNREACH errors in the flow they are sending the error about. 16 years ago
Victor Julien 2dc5405d3a Add debug code for tracking flow hash distribution. Only add ICMP DEST_UNREACH packets to the flow engine. 16 years ago
Gurvinder Singh a4625bd333 fixed setting up byte_test relative when byte_jump is previous keyword (bug 146) 16 years ago
Gurvinder Singh b05762a575 added unit test for the bug 144 to test isdataat setup 16 years ago
Gurvinder Singh fdc3f728af set the isdataat keyword when previous sigmatch is either content or pcre (bug 144) 16 years ago
Victor Julien 8dceb2784e Small ICMPV6PayloadTest01 unittest cleanup. 16 years ago
Gurvinder Singh 9a2bcb6a3c added unittest to check the payload setup, which causes the segv in detection module 16 years ago
Gurvinder Singh 21a89e22de fixed the segv caused by null payload due to incorrect icmpv6 decoding 16 years ago
Victor Julien 0ebf7cbc5e Convert flow bucket lock from mutex to spinlock. Locks should be very short, so spinlocks should be faster. 16 years ago
Victor Julien e27cefa6f7 Complete conversion of pattern id mpm storage vs sig id storage. 16 years ago
Victor Julien 46831e0f8f Fix signature grouping bug for protocols without ports. Add debugging code. 16 years ago
Victor Julien 7a427ec7f4 Switch to pattern id based results checking in the mpm. Move app layer proto detection towards a more signature based approach. 16 years ago
William Metcalf 41172f0024 increment packet count before assigning value, tshark/wireshark starts with pkt no 1 so should we 16 years ago
Pablo Rincon 46187bfe73 Fix action logic after last pass changes 16 years ago
Gurvinder Singh 2db6756048 added unit test for the icmp dsize (bug 151) 16 years ago
Gurvinder Singh ad9ec4dbe9 fixed the payload_len for icmpv6 (bug 151) 16 years ago
Gurvinder Singh 3721037de5 unittests for bug 134&139 and some typo correction 16 years ago
Victor Julien 52cdfb332e Fix a compiler warning, add some comments, cleanup layout of smb parser. 16 years ago
root 73c6fb16ba Return 0 instead of -1 when SMB and DCERPC encounter non fatal errors to clean up errors emitted in AppLayerParse. 16 years ago
William Metcalf 7d63fbdaea small CentOS 4 workarounds 16 years ago
William Metcalf 5fb405335e Small wrapper fixes to allow for windows compilation 16 years ago
Victor Julien a372c1d14e Fix/workaround a strange detection issue. 16 years ago
Victor Julien bca75f6255 Bump version to 0.9.0. 16 years ago
Victor Julien ce90e87304 Fix failing thresholding unittests 16 years ago
Pablo Rincon e18e2ec998 Changing threshold logic 16 years ago
Pablo Rincon 8bcdf29ab7 Small fix on pass action handling and added more unittests 16 years ago
Pablo Rincon 1238668961 Adding actions order and suport for rule action "pass" 16 years ago
Victor Julien 6dd5446893 Use proper tcp/udp macro's in alert-debuglog 16 years ago
Victor Julien 26ef58342d Fix typo in uricontent within handling causing within to be wrong. 16 years ago
Victor Julien cc5c78dae9 Add tcp seq info and pcap file packet number to the alert-debuglog. 16 years ago
Victor Julien 543abf145c Fix a within calculation bug for cases where distance + pattern length > within setting. Fixes #148. 16 years ago
Pablo Rincon 9ccfda22ec Radix tree issue fix (from Steve Grubs report) 16 years ago
Victor Julien 2576f4a149 Fix a bug in the signature grouping code that didn't properly setup the mpm ctx's in some cases. 16 years ago
Victor Julien b90ebc1ce5 Add a packet count var for pcap file mode to the Packet structure to ease debugging. 16 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 16 years ago
Victor Julien c3392b7c22 Fix checking for the stream GAP after the ssn ptr was initialized. 16 years ago
Victor Julien b6a45fd1a4 Hack around cornercase in debug code in stream engine. Works around #140. 16 years ago
Victor Julien 9676273e6d Kick out streams with gaps in them in the app layer parser until we add proper support. 16 years ago
Pablo Rincon 6abcb0d1fd http_heade fix, check first that we have a connp before checking transactions 16 years ago
Victor Julien 070ed778b8 Libcap-ng support by Gurvinder Singh and myself. Basic support for per thread caps is added, but not activated as it doesn't seem to work yet. Work around for incompatibility between libnet 1.1 and libcap-ng added. 16 years ago
Victor Julien e0c2c86342 Make HTTP proto detection more reliable. Add HEAD keyword. Thanks rmkml for the report/request. 16 years ago
Gurvinder Singh 07ff24301f fixed the depth updation when content_len is small (bug 139) 16 years ago
Pablo Rincon 1891c2a60d Adding missing error msgs at some http_header unittests 16 years ago
Gurvinder Singh e0b4838471 fix bug 133, error caused by seq mismatch in fin_wait_2 state, whis was dicarding the packet which should be accepted 16 years ago
Pablo Rincon 83f5be11e7 Fixing http_header unittest printf errors format 16 years ago
Pablo Rincon ab02ab9ead adding http_header keyword support 16 years ago
William Metcalf 57a679be49 Small fix where a space was added before \n in fast-log if a xref wasn't used 16 years ago
Gurvinder Singh 074b896879 fixed typo in dcerpc (bug 137) 16 years ago
Gurvinder Singh 5b802f6099 fixed type in htp (bug 138) 16 years ago
Gurvinder Singh 7330bcd12c fixed the regex in bug 136 16 years ago
Gurvinder Singh 0c4687f768 correct the typos (but 135) 16 years ago
Victor Julien 294b39bb3a Properly set content and uricontent depth. Fixes #134. 16 years ago
Gurvinder Singh 719fa5f5e1 fixed the incorrect depth update incase of offset is 0 (bug 134) 16 years ago
Victor Julien fc2029ef58 Fix small memuse counter issue in flow subsys, remove emergency printfs 16 years ago
Jason Ish 00974d157b Fix issue 131.
Flow-timeouts likely don't need to be a sequence, but rather mappings.  We'd only need a sequence if you wanted to list something like "tcp" twice which I don't think makes sense for configuration section.

Also fixup flow.c to not attempt to use the sequence, and put the timeouts into their correct place.
16 years ago
Pablo Rincon a152623e11 Bug 130: detect-nocase was not recreating the BmCtx with nocase chars, so it was not working with patterns of capital letters as expected 16 years ago
Victor Julien 285c561559 Remove inline from counters to make gnu99 happy. 16 years ago
Victor Julien 0eabde4a9b Gnu99 inline fixes for stream engine. 16 years ago
Victor Julien 23cb020493 Fix thread flag code to compile with gnu99 16 years ago
Victor Julien c942b98f44 Fix radix inline error on gnu99 16 years ago
Victor Julien 951be71f92 Fix pm algo's inline errors in gnu99 16 years ago
Victor Julien 0fa1936923 Fix stream_size detection inline errors in gnu99 16 years ago
Victor Julien 09b48d2697 Fix payload and uri detection inline errors in gnu99 16 years ago
Victor Julien 1789e78f29 Fix compilation of pm algo's with gnu99 16 years ago
Pablo Rincon 591e5e7da7 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon b1d1ea87ff Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Victor Julien 53656f0d5d Remove inline's from spm to satisfy gnu99 16 years ago
Victor Julien be5b547803 Convert DecodeSetNoPayloadInspectionFlag and DecodeSetNoPacketInspectionFlag to macro's. 16 years ago
Victor Julien 63cb1818ed Move TmThread*Flag functions to the header so they can be inline with gnu99 as well. 16 years ago
Pablo Rincon bd8111f868 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 3212a75c63 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 3047135817 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon d94d929b04 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon a429192507 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 224a33f19e Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon d85176bb8b Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon b334036d75 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 943b4742a8 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 98e35ee1a9 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 779f154fc6 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon b823fc0b66 Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Pablo Rincon 9209eaeaf6 Fix some error messages and coding style at uri/content modifiers 16 years ago
Anoop Saldanha 0b6dc3e8d5 Fix globalinit memset for trans_q 16 years ago
Victor Julien accd19ba03 Fix a typo in detect-decode-event.h causing a compilation error. 16 years ago
Victor Julien 13e6c8035d Make sure we don't leak memory on app layer protocols we detect, but don't parse. Fixed #132. Thanks to Gurvinder Singh for pointing out where the issue was. 16 years ago
Victor Julien 7c314e8d21 Switch decode-event comments to doxygen format 16 years ago
Gerardo Iglesias Galvan 2128310ebe Add decode events and comments 16 years ago
Victor Julien 79a780ffe4 Improve a number of error and info messages. 16 years ago
Victor Julien 591c898f6a NFQ inline changes
- split NFQRecvPkt into a Linux and Windows version for readability
- Add many function header comments
- convert tabs to spaces in Windows code.
16 years ago
Jan Jezek 366671a8ce Added inline mode support on Windows 16 years ago
Victor Julien 54aa1790f3 Remove Makefile.am reference to non-existing file. 16 years ago
Victor Julien 2dd28ea7fd Use threadsafe time functions. 16 years ago
Victor Julien 8ec51fce57 Remove leftover debug print. 16 years ago
Victor Julien 2797e67a79 Print Suricata version after initializing logging subsys. 16 years ago
Victor Julien 27bff56cd7 Bump version to 0.8.2 16 years ago
Victor Julien 655b6acad9 Flush fp to be sure before closing. 16 years ago
Victor Julien d3b573348e Make sure that the SC_LOG_OP_FILTER env var overrides config as well. 16 years ago
Victor Julien 958b61ab85 Fix errors in the unittests reported by valgrind's drd tool. Add explanation of a FP. 16 years ago
Victor Julien 4875c2daf4 Console logging settings are now overridden by env vars. 16 years ago
William Metcalf 9527aa26a2 Small windows fixes ifdef wrapper for netinet/in.h O_NOFOLLOW def missing so added ifndef define install doc updated. 16 years ago
Victor Julien cec124df10 Fix icmp_id keyword and improve icmp_seq keyword logic. 16 years ago
Victor Julien 18e00dc6d0 Add warning about needing a patch for Barnyard 0.2.0 on 64-bit. Rename sc_timeval32 to SCTimeval32. 16 years ago
Victor Julien 0febe449e6 In unified1-alert the ip addresses are in host order. 16 years ago
Jason Ish 12962c5969 ./configure option, --enable-unified-native-timeval to have unified outputs use a native timeval to be compatible with unpatched barnyard 1 on 64 bit systems. 16 years ago
Jason Ish 2c6dd6b8fa Be compatible with Snort. Stick with a 32 bit style of timeval for the unified outputs. 16 years ago
Victor Julien b7c089df42 Fix a couple of harmless compiler warnings. 16 years ago