suricata
detect-engine-register.c
Go to the documentation of this file.
1/* Copyright (C) 2007-2024 Open Information Security Foundation
2 *
3 * You can copy, redistribute or modify this Program under the terms of
4 * the GNU General Public License version 2 as published by the Free
5 * Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * version 2 along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18/**
19 * \file
20 *
21 * \author Victor Julien <victor@inliniac.net>
22 */
23
24#include "detect-smb-ntlmssp.h"
25#include "suricata-common.h"
26#include "suricata.h"
27#include "detect.h"
28#include "flow.h"
29#include "flow-private.h"
30#include "flow-bit.h"
31
32#include "detect-parse.h"
33#include "detect-engine.h"
35
36#include "detect-engine-alert.h"
39#include "detect-engine-proto.h"
40#include "detect-engine-port.h"
41#include "detect-engine-mpm.h"
45
46#include "rust.h"
47
50#include "detect-dns-name.h"
51#include "detect-dns-response.h"
52#include "detect-tls-sni.h"
53#include "detect-tls-certs.h"
58#include "detect-tls-alpn.h"
60#include "detect-tls-random.h"
61#include "detect-tls-ja3-hash.h"
65#include "detect-engine-state.h"
67
68#include "detect-http-cookie.h"
69#include "detect-http-method.h"
70#include "detect-http-ua.h"
71#include "detect-http-host.h"
72
73#include "detect-mark.h"
75#include "detect-nfs-version.h"
76
77#include "detect-engine-event.h"
78#include "decode.h"
79
80#include "detect-config.h"
81
82#include "detect-smb-share.h"
83#include "detect-smb-version.h"
84#include "detect-smtp.h"
85
87#include "detect-base64-data.h"
88#include "detect-ipaddr.h"
89#include "detect-ipopts.h"
90#include "detect-tcp-flags.h"
91#include "detect-fragbits.h"
92#include "detect-fragoffset.h"
93#include "detect-gid.h"
94#include "detect-tcp-ack.h"
95#include "detect-tcp-seq.h"
96#include "detect-content.h"
97#include "detect-uricontent.h"
98#include "detect-pcre.h"
99#include "detect-depth.h"
100#include "detect-nocase.h"
101#include "detect-rawbytes.h"
102#include "detect-bytetest.h"
103#include "detect-bytemath.h"
104#include "detect-bytejump.h"
105#include "detect-sameip.h"
106#include "detect-l3proto.h"
107#include "detect-ipproto.h"
108#include "detect-within.h"
109#include "detect-distance.h"
110#include "detect-offset.h"
111#include "detect-sid.h"
112#include "detect-prefilter.h"
113#include "detect-priority.h"
114#include "detect-classtype.h"
115#include "detect-reference.h"
116#include "detect-tag.h"
117#include "detect-threshold.h"
118#include "detect-metadata.h"
119#include "detect-msg.h"
120#include "detect-rev.h"
121#include "detect-flow.h"
122#include "detect-flow-age.h"
123#include "detect-flow-pkts.h"
124#include "detect-requires.h"
125#include "detect-tcp-window.h"
126#include "detect-tcp-wscale.h"
127#include "detect-ftpbounce.h"
129#include "detect-isdataat.h"
130#include "detect-id.h"
131#include "detect-rpc.h"
132#include "detect-asn1.h"
133#include "detect-filename.h"
134#include "detect-filestore.h"
135#include "detect-filemagic.h"
136#include "detect-filemd5.h"
137#include "detect-filesha1.h"
138#include "detect-filesha256.h"
139#include "detect-filesize.h"
140#include "detect-dataset.h"
141#include "detect-datarep.h"
142#include "detect-dsize.h"
143#include "detect-flowvar.h"
144#include "detect-flowint.h"
145#include "detect-pktvar.h"
146#include "detect-noalert.h"
147#include "detect-flowbits.h"
148#include "detect-hostbits.h"
149#include "detect-xbits.h"
150#include "detect-csum.h"
151#include "detect-stream_size.h"
153#include "detect-ttl.h"
154#include "detect-fast-pattern.h"
155#include "detect-itype.h"
156#include "detect-icode.h"
157#include "detect-icmp-id.h"
158#include "detect-icmp-seq.h"
159#include "detect-icmpv4hdr.h"
160#include "detect-dce-iface.h"
161#include "detect-dce-opnum.h"
162#include "detect-dce-stub-data.h"
163#include "detect-urilen.h"
164#include "detect-bsize.h"
168#include "detect-http-header.h"
170#include "detect-http-headers.h"
172#include "detect-http-uri.h"
173#include "detect-http-protocol.h"
174#include "detect-http-start.h"
175#include "detect-http-stat-msg.h"
178#include "detect-http2.h"
179#include "detect-byte-extract.h"
180#include "detect-file-data.h"
181#include "detect-pkt-data.h"
182#include "detect-replace.h"
183#include "detect-tos.h"
186#include "detect-lua.h"
187#include "detect-iprep.h"
188#include "detect-geoip.h"
190#include "detect-template.h"
191#include "detect-template2.h"
192#include "detect-tcphdr.h"
193#include "detect-tcpmss.h"
194#include "detect-udphdr.h"
195#include "detect-icmpv6hdr.h"
196#include "detect-icmpv6-mtu.h"
197#include "detect-ipv4hdr.h"
198#include "detect-ipv6hdr.h"
199#include "detect-krb5-cname.h"
200#include "detect-krb5-errcode.h"
201#include "detect-krb5-msgtype.h"
202#include "detect-krb5-sname.h"
204#include "detect-sip-method.h"
205#include "detect-sip-uri.h"
206#include "detect-target.h"
207#include "detect-quic-sni.h"
208#include "detect-quic-ua.h"
209#include "detect-quic-version.h"
210#include "detect-quic-cyu-hash.h"
212#include "detect-ja4-hash.h"
213#include "detect-ftp-command.h"
214#include "detect-entropy.h"
217#include "detect-ftp-reply.h"
218#include "detect-ftp-mode.h"
220
221#include "detect-bypass.h"
222#include "detect-ftpdata.h"
224
227
228#include "util-rule-vars.h"
229
230#include "app-layer.h"
231#include "app-layer-protos.h"
232#include "app-layer-htp.h"
233#include "app-layer-smtp.h"
234#include "detect-frame.h"
235#include "detect-tls.h"
237#include "detect-tls-version.h"
238#include "detect-ssh-proto.h"
240#include "detect-ssh-software.h"
242#include "detect-ssh-hassh.h"
247#include "detect-ssl-version.h"
248#include "detect-ssl-state.h"
249#include "detect-modbus.h"
250#include "detect-dnp3.h"
251#include "detect-ike-exch-type.h"
252#include "detect-ike-spi.h"
253#include "detect-ike-vendor.h"
254#include "detect-ike-chosen-sa.h"
259#include "detect-vlan.h"
260#include "detect-email.h"
261
262#include "action-globals.h"
263#include "tm-threads.h"
264
265#include "pkt-var.h"
266
267#include "conf.h"
268#include "conf-yaml-loader.h"
269
270#include "stream-tcp.h"
271#include "stream-tcp-inline.h"
272
273#include "util-lua.h"
274#include "util-var-name.h"
277#include "util-print.h"
278#include "util-unittest.h"
279#include "util-unittest-helper.h"
280#include "util-debug.h"
281#include "util-hashlist.h"
282#include "util-privs.h"
283#include "util-profiling.h"
284#include "util-validate.h"
285#include "util-optimize.h"
286#include "util-path.h"
287#include "util-mpm-ac.h"
288#include "runmodes.h"
289
292
293static void PrintFeatureList(const SigTableElmt *e, char sep)
294{
295 const uint16_t flags = e->flags;
296
297 int prev = 0;
298 if (flags & SIGMATCH_NOOPT) {
299 printf("No option");
300 prev = 1;
301 }
303 if (prev == 1)
304 printf("%c", sep);
305 printf("compatible with IP only rule");
306 prev = 1;
307 }
309 if (prev == 1)
310 printf("%c", sep);
311 printf("compatible with decoder event only rule");
312 prev = 1;
313 }
315 if (prev == 1)
316 printf("%c", sep);
317 printf("content modifier");
318 prev = 1;
319 }
321 if (prev == 1)
322 printf("%c", sep);
323 printf("sticky buffer");
324 prev = 1;
325 }
327 if (prev == 1)
328 printf("%c", sep);
329 printf("supports firewall");
330 prev = 1;
331 }
332 if (e->Transform) {
333 if (prev == 1)
334 printf("%c", sep);
335 printf("transform");
336 prev = 1;
337 }
338 if (e->SupportsPrefilter) {
339 if (prev == 1)
340 printf("%c", sep);
341 printf("prefilter");
342 prev = 1;
343 }
344 if (prev == 0) {
345 printf("none");
346 }
347}
348
349static void SigMultilinePrint(size_t i, const char *prefix)
350{
351 if (sigmatch_table[i].desc) {
352 printf("%sDescription: %s\n", prefix, sigmatch_table[i].desc);
353 }
354 printf("%sFeatures: ", prefix);
355 PrintFeatureList(&sigmatch_table[i], ',');
356 if (sigmatch_table[i].url) {
357 printf("\n%sDocumentation: %s%s", prefix, GetDocURL(), sigmatch_table[i].url);
358 }
359 if (sigmatch_table[i].alternative) {
360 printf("\n%sReplaced by: %s", prefix, sigmatch_table[sigmatch_table[i].alternative].name);
361 }
362 printf("\n");
363}
364
365/** \brief Check if a keyword exists. */
366bool SigTableHasKeyword(const char *keyword)
367{
368 for (int i = 0; i < DETECT_TBLSIZE; i++) {
369 const char *name = sigmatch_table[i].name;
370
371 if (name == NULL || strlen(name) == 0) {
372 continue;
373 }
374
375 if (strcmp(keyword, name) == 0) {
376 return true;
377 }
378 }
379
380 return false;
381}
382
383int SigTableList(const char *keyword)
384{
385 size_t size = DETECT_TBLSIZE;
386 size_t i;
387
388 if (keyword == NULL) {
389 printf("=====Supported keywords=====\n");
390 for (i = 0; i < size; i++) {
391 const char *name = sigmatch_table[i].name;
392 if (name != NULL && strlen(name) > 0) {
393 if (name[0] == '_' || strcmp(name, "template") == 0)
394 continue;
395
396 printf("- %s\n", name);
397 }
398 }
399 } else if (strcmp("csv", keyword) == 0) {
400 printf("name;description;app layer;features;documentation\n");
401 for (i = 0; i < size; i++) {
402 const char *name = sigmatch_table[i].name;
403 if (name != NULL && strlen(name) > 0) {
404 if (name[0] == '_' || strcmp(name, "template") == 0)
405 continue;
406
407 printf("%s;", name);
408 if (sigmatch_table[i].desc) {
409 printf("%s", sigmatch_table[i].desc);
410 }
411 /* Build feature */
412 printf(";Unset;"); // this used to be alproto
413 PrintFeatureList(&sigmatch_table[i], ':');
414 printf(";");
415 if (sigmatch_table[i].url) {
416 printf("%s%s", GetDocURL(), sigmatch_table[i].url);
417 }
418 printf(";");
419 printf("\n");
420 }
421 }
422 } else if (strcmp("all", keyword) == 0) {
423 for (i = 0; i < size; i++) {
424 const char *name = sigmatch_table[i].name;
425 if (name != NULL && strlen(name) > 0) {
426 if (name[0] == '_' || strcmp(name, "template") == 0)
427 continue;
428 printf("%s:\n", sigmatch_table[i].name);
429 SigMultilinePrint(i, "\t");
430 }
431 }
432 } else {
433 for (i = 0; i < size; i++) {
434 if ((sigmatch_table[i].name != NULL) &&
435 strcmp(sigmatch_table[i].name, keyword) == 0) {
436 printf("= %s =\n", sigmatch_table[i].name);
437 SigMultilinePrint(i, "");
438 return TM_ECODE_DONE;
439 }
440 }
441 printf("Non existing keyword\n");
442 return TM_ECODE_FAILED;
443 }
444 return TM_ECODE_DONE;
445}
446
447static void DetectFileHandlerRegister(void)
448{
449 for (int i = 0; i < DETECT_TBLSIZE_STATIC; i++) {
450 if (filehandler_table[i].name)
452 }
453}
454
455static void SigCleanCString(SigTableElmt *base)
456{
457 SCSigTableNamesElmt kw;
458 // remove const for mut to release
459 kw.name = (char *)base->name;
460 kw.desc = (char *)base->desc;
461 kw.url = (char *)base->url;
462 SCDetectSigMatchNamesFree(&kw);
463}
464
466{
467 sigmatch_table[id].Cleanup = SigCleanCString;
468}
469
471{
472 if (sigmatch_table != NULL) {
473 for (int i = 0; i < DETECT_TBLSIZE; i++) {
474 if ((sigmatch_table[i].Cleanup) == NULL) {
475 continue;
476 }
478 }
480 sigmatch_table = NULL;
481 DETECT_TBLSIZE = 0;
482 }
483}
484
485#define ARRAY_CAP_STEP 16
486static void (**PreregisteredCallbacks)(void) = NULL;
487static size_t preregistered_callbacks_nb = 0;
488static size_t preregistered_callbacks_cap = 0;
489
490// Plugins can preregister keywords with this function :
491// When an app-layer plugin is loaded, it wants to register its keywords
492// But the plugin is loaded before keywords can register
493// The preregistration callbacks will later be called by SigTableSetup
494int SCSigTablePreRegister(void (*KeywordsRegister)(void))
495{
496 if (preregistered_callbacks_nb == preregistered_callbacks_cap) {
497 void *tmp = SCRealloc(PreregisteredCallbacks,
498 sizeof(void *) * (preregistered_callbacks_cap + ARRAY_CAP_STEP));
499 if (tmp == NULL) {
500 return 1;
501 }
502 preregistered_callbacks_cap += ARRAY_CAP_STEP;
503 PreregisteredCallbacks = tmp;
504 }
505 PreregisteredCallbacks[preregistered_callbacks_nb] = KeywordsRegister;
506 preregistered_callbacks_nb++;
507 return 0;
508}
509
510void SigTableInit(void)
511{
512 if (sigmatch_table == NULL) {
515 if (sigmatch_table == NULL) {
516 DETECT_TBLSIZE = 0;
517 FatalError("Could not allocate sigmatch_table");
518 }
519 }
520}
521
523{
525
540
541 /* NOTE: the order of these currently affects inspect
542 * engine registration order and ultimately the order
543 * of inspect engines in the rule. Which in turn affects
544 * state keeping */
560
568
571
575
580
589
600
605
608 /* end of order dependent regs */
609
611
737
740
741 DetectTransformCompressWhitespaceRegister();
742 DetectTransformStripWhitespaceRegister();
743 DetectTransformStripPseudoHeadersRegister();
744 DetectTransformMd5Register();
745 DetectTransformSha1Register();
746 DetectTransformSha256Register();
747 DetectTransformDotPrefixRegister();
749 DetectTransformUrlDecodeRegister();
750 DetectTransformXorRegister();
751 DetectTransformToLowerRegister();
752 DetectTransformToUpperRegister();
753 DetectTransformHeaderLowercaseRegister();
754 DetectTransformFromBase64DecodeRegister();
755 SCDetectTransformDomainRegister();
757
758 DetectFileHandlerRegister();
759
762
764
766 SCDetectDHCPRegister();
767 SCDetectWebsocketRegister();
768 SCDetectEnipRegister();
769 SCDetectMqttRegister();
770 SCDetectRfbRegister();
771 SCDetectSipRegister();
772 SCDetectTemplateRegister();
773 SCDetectLdapRegister();
774 SCDetectSdpRegister();
775 SCDetectDNSRegister();
776 SCDetectPgsqlRegister();
777
778 for (size_t i = 0; i < preregistered_callbacks_nb; i++) {
779 PreregisteredCallbacks[i]();
780 }
781
782 /* close keyword registration */
784}
785
786#ifdef UNITTESTS
788{
789 /* register the tests */
790 for (int i = 0; i < DETECT_TBLSIZE; i++) {
791 g_ut_modules++;
792 if (sigmatch_table[i].RegisterTests != NULL) {
794 g_ut_covered++;
795 } else {
796 SCLogDebug("detection plugin %s has no unittest "
797 "registration function.", sigmatch_table[i].name);
798
800 SCLogWarning("detection plugin %s has no unittest "
801 "registration function.",
803 }
804 }
805}
806#endif
uint8_t flags
Definition decode-gre.h:0
void DetectAppLayerEventRegister(void)
Registers the keyword handlers for the "app-layer-event" keyword.
void DetectAppLayerProtocolRegister(void)
void DetectAppLayerStateRegister(void)
void DetectAsn1Register(void)
Registration function for asn1.
Definition detect-asn1.c:48
void DetectBase64DataRegister(void)
void DetectBase64DecodeRegister(void)
void DetectBsizeRegister(void)
Registration function for bsize: keyword.
void DetectBypassRegister(void)
Registration function for keyword: bypass.
void DetectByteExtractRegister(void)
Registers the keyword handlers for the "byte_extract" keyword.
void DetectBytejumpRegister(void)
void DetectBytemathRegister(void)
Registers the keyword handlers for the "byte_math" keyword.
void DetectBytetestRegister(void)
void DetectClasstypeRegister(void)
Registers the handler functions for the "Classtype" keyword.
void DetectConfigRegister(void)
Registers the "config" keyword for detection.
void DetectContentRegister(void)
void DetectCsumRegister(void)
Registers handlers for all the checksum keywords. The checksum keywords that are registered are ipv4-...
void DetectDatarepRegister(void)
void DetectDatasetRegister(void)
void DetectDceIfaceRegister(void)
Registers the keyword handlers for the "dce_iface" keyword.
void DetectDceOpnumRegister(void)
Registers the keyword handlers for the "dce_opnum" keyword.
void DetectDceStubDataRegister(void)
Registers the keyword handlers for the "dce_stub_data" keyword.
void DetectDepthRegister(void)
void DetectDetectionFilterRegister(void)
Registration function for detection_filter: keyword.
void DetectDistanceRegister(void)
void DetectDNP3Register(void)
void DetectDnsNameRegister(void)
void DetectDnsResponseRegister(void)
void DetectDsizeRegister(void)
Registration function for dsize: keyword.
void DetectEmailRegister(void)
void DetectEngineEventRegister(void)
Registration function for decode-event: keyword.
int DETECT_TBLSIZE_IDX
#define ARRAY_CAP_STEP
void SigTableSetup(void)
int DETECT_TBLSIZE
int SigTableList(const char *keyword)
int SCSigTablePreRegister(void(*KeywordsRegister)(void))
void SCDetectHelperKeywordSetCleanCString(uint16_t id)
bool SigTableHasKeyword(const char *keyword)
Check if a keyword exists.
void SigTableCleanup(void)
void SigTableInit(void)
void SigTableRegisterTests(void)
#define DETECT_TBLSIZE_STEP
@ DETECT_TBLSIZE_STATIC
Data structures and function prototypes for keeping state for the detection engine.
void DetectBufferTypeCloseRegistration(void)
void DetectEntropyRegister(void)
void DetectFastPatternRegister(void)
Registration function for fast_pattern keyword.
DetectFileHandlerTableElmt filehandler_table[DETECT_TBLSIZE_STATIC]
void DetectFiledataRegister(void)
Registration function for keyword: file_data.
void DetectFileRegisterFileProtocols(DetectFileHandlerTableElmt *reg)
void DetectFilemagicRegister(void)
Registration function for keyword: filemagic.
void DetectFileMd5Register(void)
Registration function for keyword: filemd5.
void DetectFilenameRegister(void)
Registration function for keyword: filename.
void DetectFileSha1Register(void)
Registration function for keyword: filesha1.
void DetectFileSha256Register(void)
Registration function for keyword: filesha256.
void DetectFilesizeRegister(void)
Registration function for filesize: keyword.
void DetectFilestoreRegister(void)
Registration function for keyword: filestore.
void DetectFlowAgeRegister(void)
void DetectFlowBytesToServerRegister(void)
void DetectFlowPktsRegister(void)
void DetectFlowBytesRegister(void)
void DetectFlowBytesToClientRegister(void)
void DetectFlowPktsToClientRegister(void)
void DetectFlowPktsToServerRegister(void)
void DetectFlowRegister(void)
Registration function for flow: keyword.
Definition detect-flow.c:65
void DetectFlowbitsRegister(void)
uint32_t id
void DetectFlowintRegister(void)
void DetectFlowvarRegister(void)
void DetectFragBitsRegister(void)
Registration function for fragbits: keyword.
void DetectFragOffsetRegister(void)
Registration function for fragoffset.
void DetectFrameRegister(void)
Registration function for keyword: ja3_hash.
void DetectFtpCommandDataRegister(void)
void DetectFtpCommandRegister(void)
void DetectFtpCompletionCodeRegister(void)
void DetectFtpDynamicPortRegister(void)
void DetectFtpModeRegister(void)
void DetectFtpReplyReceivedRegister(void)
Registration function for ftp.reply_received: keyword.
void DetectFtpReplyRegister(void)
void DetectFtpbounceRegister(void)
Registration function for ftpbounce: keyword.
void DetectFtpdataRegister(void)
Registration function for ftpcommand: keyword.
void DetectGeoipRegister(void)
Registration function for geoip keyword (no libgeoip support)
void DetectGidRegister(void)
Registration function for gid: keyword.
Definition detect-gid.c:49
void DetectHostbitsRegister(void)
void DetectHttpClientBodyRegister(void)
Registers the keyword handlers for the "http_client_body" keyword.
void DetectHttpHeaderNamesRegister(void)
Registers the keyword handlers for the "http.header_names" keyword.
void DetectHttpHeaderRegister(void)
Registers the keyword handlers for the "http_header" keyword.
void DetectHttpResponseHeaderRegister(void)
void DetectHttpRequestHeaderRegister(void)
void DetectHttpHeadersRegister(void)
void DetectHttpHHRegister(void)
Registers the keyword handlers for the "http_host" keyword.
void DetectHttpMethodRegister(void)
Registration function for keyword: http_method.
void DetectHttpProtocolRegister(void)
Registers the keyword handlers for the "http.protocol" keyword.
void DetectHttpRawHeaderRegister(void)
Registers the keyword handlers for the "http_raw_header" keyword.
void DetectHttpRequestLineRegister(void)
Registers the keyword handlers for the "http_request_line" keyword.
void DetectHttpResponseLineRegister(void)
Registers the keyword handlers for the "http_response_line" keyword.
void DetectHttpServerBodyRegister(void)
Registers the keyword handlers for the "http_server_body" keyword.
void DetectHttpStartRegister(void)
Registers the keyword handlers for the "http_start" keyword.
void DetectHttpStatCodeRegister(void)
Registration function for keyword: http_stat_code.
void DetectHttpStatMsgRegister(void)
Registration function for keyword: http_stat_msg.
void DetectHttpUARegister(void)
Registers the keyword handlers for the "http_user_agent" keyword.
void DetectHttpUriRegister(void)
Registration function for keywords: http_uri and http.uri.
void DetectHttp2Register(void)
Registration function for HTTP2 keywords.
void DetectIcmpIdRegister(void)
Registration function for icode: icmp_id.
void DetectIcmpSeqRegister(void)
Registration function for icmp_seq.
void DetectIcmpv4HdrRegister(void)
Registration function for icmpv4.hdr: keyword.
void DetectICMPv6mtuRegister(void)
Registration function for icmpv6.mtu: keyword.
void DetectICMPv6hdrRegister(void)
Registration function for icmpv6.hdr: keyword.
void DetectICodeRegister(void)
Registration function for icode: keyword.
void DetectIdRegister(void)
Registration function for keyword: id.
Definition detect-id.c:65
void DetectIkeChosenSaRegister(void)
Registration function for ike.ChosenSa keyword.
void DetectIkeExchTypeRegister(void)
Registration function for ike.exchtype keyword.
void DetectIkeKeyExchangePayloadLengthRegister(void)
Registration function for ike.key_exchange_payload_length keyword.
void DetectIkeKeyExchangeRegister(void)
void DetectIkeNoncePayloadLengthRegister(void)
Registration function for ike.nonce_payload_length keyword.
void DetectIkeNonceRegister(void)
void DetectIkeSpiRegister(void)
void DetectIkeVendorRegister(void)
Registration function for ike.vendor keyword.
void DetectIPAddrBufferRegister(void)
void DetectIpOptsRegister(void)
Registration function for ipopts: keyword.
void DetectIPProtoRegister(void)
Registration function for ip_proto keyword.
void DetectIPRepRegister(void)
void DetectIpv4hdrRegister(void)
Registration function for ipv4.hdr: keyword.
void DetectIpv6hdrRegister(void)
Registration function for ipv6.hdr: keyword.
void DetectIsdataatRegister(void)
Registration function for isdataat: keyword.
void DetectITypeRegister(void)
Registration function for itype: keyword.
void DetectJa4HashRegister(void)
Registration function for keyword: ja4.hash.
void DetectKrb5CNameRegister(void)
void DetectKrb5ErrCodeRegister(void)
Registration function for krb5_err_code: keyword.
void DetectKrb5MsgTypeRegister(void)
Registration function for krb5_msg_type: keyword.
void DetectKrb5SNameRegister(void)
void DetectKrb5TicketEncryptionRegister(void)
void DetectL3ProtoRegister(void)
Registration function for ip_proto keyword.
void DetectLuaRegister(void)
Registration function for keyword: lua.
Definition detect-lua.c:83
void DetectMarkRegister(void)
Registration function for nfq_set_mark: keyword.
Definition detect-mark.c:57
void DetectMetadataRegister(void)
void DetectModbusRegister(void)
Registration function for Modbus keyword.
void DetectMsgRegister(void)
Definition detect-msg.c:42
void DetectNfsProcedureRegister(void)
Registration function for nfs_procedure keyword.
void DetectNfsVersionRegister(void)
Registration function for nfs_procedure keyword.
void DetectNoalertRegister(void)
void DetectNocaseRegister(void)
void DetectOffsetRegister(void)
void DetectRegisterAppLayerHookLists(void)
register app hooks as generic lists
SigTableElmt * sigmatch_table
void DetectPcreRegister(void)
Definition detect-pcre.c:97
void DetectPktDataRegister(void)
Registration function for keyword: file_data.
void DetectPktvarRegister(void)
void DetectPrefilterRegister(void)
void DetectPriorityRegister(void)
Registers the handler functions for the "priority" keyword.
void DetectQuicCyuHashRegister(void)
void DetectQuicCyuStringRegister(void)
void DetectQuicSniRegister(void)
Registration function for quic.sni: keyword.
void DetectQuicUaRegister(void)
Registration function for quic.ua: keyword.
void DetectQuicVersionRegister(void)
Registration function for quic.version: keyword.
void DetectRawbytesRegister(void)
void DetectReferenceRegister(void)
Registration function for the reference: keyword.
void DetectReplaceRegister(void)
void DetectRequiresRegister(void)
void DetectRevRegister(void)
Definition detect-rev.c:41
void DetectRpcRegister(void)
Registration function for rpc keyword.
Definition detect-rpc.c:61
void DetectSameipRegister(void)
Registration function for sameip: keyword.
void DetectSidRegister(void)
Definition detect-sid.c:41
void DetectSipMethodRegister(void)
void DetectSipUriRegister(void)
void DetectSmbNtlmsspUserRegister(void)
void DetectSmbNtlmsspDomainRegister(void)
void DetectSmbNamedPipeRegister(void)
void DetectSmbShareRegister(void)
void DetectSmbVersionRegister(void)
Registers the keyword handlers for the "smb_version" keyword.
void SCDetectSMTPRegister(void)
void DetectSshHasshServerStringRegister(void)
Registration function for hasshServer.string keyword.
void DetectSshHasshServerRegister(void)
Registration function for hasshServer keyword.
void DetectSshHasshStringRegister(void)
Registration function for hassh.string keyword.
void DetectSshHasshRegister(void)
Registration function for hassh keyword.
void DetectSshVersionRegister(void)
Registration function for keyword: ssh.protoversion.
void DetectSshProtocolRegister(void)
void DetectSshSoftwareVersionRegister(void)
Registration function for keyword: ssh.softwareversion.
void DetectSshSoftwareRegister(void)
void DetectSslStateRegister(void)
Registers the keyword handlers for the "ssl_state" keyword.
void DetectSslVersionRegister(void)
Registration function for keyword: ssl_version.
void DetectStreamSizeRegister(void)
Registration function for stream_size: keyword.
void DetectTagRegister(void)
Registration function for keyword tag.
Definition detect-tag.c:69
void DetectTargetRegister(void)
Registration function for target keyword.
void DetectAckRegister(void)
Registration function for ack: keyword.
void DetectFlagsRegister(void)
Registration function for flags: keyword.
void DetectSeqRegister(void)
Registration function for ack: keyword.
void DetectWindowRegister(void)
Registration function for window: keyword.
void DetectTcpWscaleRegister(void)
Registration function for tcp.wscale keyword.
void DetectTcphdrRegister(void)
Registration function for tcp.hdr: keyword.
void DetectTcpmssRegister(void)
Registration function for tcpmss: keyword.
void DetectTemplate2Register(void)
Registration function for template2: keyword.
void DetectTemplateRegister(void)
Registration function for template: keyword.
void DetectThresholdRegister(void)
Registration function for threshold: keyword.
void DetectTlsAlpnRegister(void)
Registration function for keyword: tls.alpn.
void DetectTlsFingerprintRegister(void)
Registration function for keyword: tls.cert_fingerprint.
void DetectTlsIssuerRegister(void)
Registration function for keyword: tls.cert_issuer.
void DetectTlsSerialRegister(void)
Registration function for keyword: tls.cert_serial.
void DetectTlsSubjectRegister(void)
Registration function for keyword: tls.cert_subject.
void DetectTlsValidityRegister(void)
Registration function for tls validity keywords.
void DetectTlsCertChainLenRegister(void)
void DetectTlsCertsRegister(void)
Registration function for keyword: tls.certs.
void DetectTlsJa3HashRegister(void)
Registration function for keyword: ja3_hash.
void DetectTlsJa3StringRegister(void)
Registration function for keyword: ja3.string.
void DetectTlsJa3SHashRegister(void)
Registration function for keyword: ja3s.hash.
void DetectTlsJa3SStringRegister(void)
Registration function for keyword: ja3s.string.
void DetectTlsRandomRegister(void)
Registration function for keyword: tls.random.
void DetectTlsSniRegister(void)
Registration function for keyword: tls.sni.
void DetectTlsSubjectAltNameRegister(void)
Registration function for keyword: tls.subjectaltname.
void DetectTlsVersionRegister(void)
Registration function for keyword: tls.version.
void DetectTlsRegister(void)
Registration function for keyword: tls.version.
Definition detect-tls.c:101
void DetectTosRegister(void)
Register Tos keyword.
Definition detect-tos.c:64
void DetectTransformLuaxformRegister(void)
void DetectTransformPcrexformRegister(void)
void DetectTtlRegister(void)
Registration function for ttl: keyword.
Definition detect-ttl.c:54
void DetectUdphdrRegister(void)
Registration function for udp.hdr: keyword.
void DetectUricontentRegister(void)
Registration function for uricontent: keyword.
void DetectUrilenRegister(void)
Registration function for urilen: keyword.
void DetectVlanLayersRegister(void)
void DetectVlanIdRegister(void)
void DetectWithinRegister(void)
void DetectXbitsRegister(void)
#define SIGMATCH_IPONLY_COMPAT
Definition detect.h:1653
#define SIGMATCH_NOOPT
Definition detect.h:1651
#define SIGMATCH_INFO_STICKY_BUFFER
Definition detect.h:1676
#define SIGMATCH_DEONLY_COMPAT
Definition detect.h:1655
#define SIGMATCH_SUPPORT_FIREWALL
Definition detect.h:1682
#define SIGMATCH_INFO_CONTENT_MODIFIER
Definition detect.h:1674
element in sigmatch type table.
Definition detect.h:1419
uint16_t flags
Definition detect.h:1450
void(* RegisterTests)(void)
Definition detect.h:1448
void(* Cleanup)(struct SigTableElmt_ *)
Definition detect.h:1465
const char * name
Definition detect.h:1459
void(* Transform)(DetectEngineThreadCtx *, InspectionBuffer *, void *context)
Definition detect.h:1434
bool(* SupportsPrefilter)(const Signature *s)
Definition detect.h:1443
int coverage_unittests
Definition suricata.c:943
int g_ut_covered
Definition suricata.c:945
int g_ut_modules
Definition suricata.c:944
const char * GetDocURL(void)
Definition suricata.c:1165
@ TM_ECODE_FAILED
@ TM_ECODE_DONE
const char * name
#define FatalError(...)
Definition util-debug.h:510
#define SCLogDebug(...)
Definition util-debug.h:275
#define SCLogWarning(...)
Macro used to log WARNING messages.
Definition util-debug.h:255
#define SCFree(p)
Definition util-mem.h:61
#define SCRealloc(ptr, sz)
Definition util-mem.h:50
#define SCCalloc(nm, sz)
Definition util-mem.h:53