You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:start-after: // rule types documentation tag start: SignatureProperties
465
+
:end-before: // rule types documentation tag end: SignatureProperties
466
+
467
+
Signature Examples per Type
468
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
469
+
470
+
Decoder Events Only
471
+
^^^^^^^^^^^^^^^^^^^
472
+
473
+
For more examples check https://github.com/OISF/suricata/blob/master/rules/decoder-events.rules.
474
+
475
+
.. container:: example-rule
476
+
477
+
alert pkthdr any any -> any any (msg:"SURICATA IPv4 malformed option"; :example-rule-emphasis:`decode-event:ipv4.opt_malformed;` classtype:protocol-command-decode; sid:2200006; rev:2;)
478
+
479
+
Packet
480
+
^^^^^^
481
+
482
+
.. container:: example-rule
483
+
484
+
alert udp any any -> any any (msg:"UDP with flow direction"; flow:to_server; sid:1001;)
485
+
486
+
.. container:: example-rule
487
+
488
+
alert tcp any any -> any any (msg:"ttl"; :example-rule-emphasis:`ttl:123;` sid:701;)
489
+
490
+
IP Only
491
+
^^^^^^^
492
+
493
+
.. container:: example-rule
494
+
495
+
alert tcp-stream any any -> any any (msg:"tcp-stream, no content"; sid:101;)
496
+
497
+
498
+
.. container:: example-rule
499
+
500
+
alert tcp-pkt [192.168.0.0/16,10.0.0.0/8,172.16.0.0/12] any -> any any (msg:"tcp-pkt, no content"; sid:201;)
501
+
502
+
IP Only (contains negated address)
503
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
504
+
505
+
.. container:: example-rule
506
+
507
+
alert tcp 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12 any -> :example-rule-emphasis:`![192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]` any (msg:"tcp, has negated IP address"; sid:304;)
508
+
509
+
.. container:: example-rule
510
+
511
+
alert tcp :example-rule-emphasis:`[10.0.0.0/8,!10.10.10.10]` any -> :example-rule-emphasis:`[10.0.0.0/8,!10.10.10.10]` any (msg:"tcp, has negated IP address"; sid:305;)
512
+
513
+
Protocol Detection Only
514
+
^^^^^^^^^^^^^^^^^^^^^^^
515
+
516
+
.. container:: example-rule
517
+
518
+
alert tcp any any -> any any (msg:"tcp, pd negated"; :example-rule-emphasis:`app-layer-protocol:!http;` sid:401;)
519
+
520
+
521
+
.. container:: example-rule
522
+
523
+
alert tcp any any -> any any (msg:"tcp, pd positive"; :example-rule-emphasis:`app-layer-protocol:http;` sid:402;)
524
+
525
+
526
+
Packet-Stream
527
+
^^^^^^^^^^^^^
528
+
529
+
.. container:: example-rule
530
+
531
+
alert tcp any any -> any any (msg:"tcp, anchored content"; :example-rule-emphasis:`content:"abc"; startswith;` sid:303;)
532
+
533
+
.. container:: example-rule
534
+
535
+
alert http any any -> any any (msg:"http, anchored content"; :example-rule-emphasis:`content:"abc"; startswith;` sid:603;)
536
+
537
+
538
+
Stream
539
+
^^^^^^
540
+
541
+
.. container:: example-rule
542
+
543
+
alert :example-rule-emphasis:`tcp-stream` any any -> any any (msg:"tcp-stream, simple content"; :example-rule-emphasis:`content:"abc";` sid:102;)
544
+
545
+
.. container:: example-rule
546
+
547
+
alert :example-rule-emphasis:`http` any any -> any any (msg:"http, simple content"; :example-rule-emphasis:`content:"abc";` sid:602;)
548
+
549
+
.. container:: example-rule
550
+
551
+
alert tcp any any -> any any (msg:"byte_extract with dce"; byte_extract:4,0,var,dce; byte_test:4,>,var,4,little; sid:901;)
552
+
553
+
554
+
Application Layer Protocol
555
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
556
+
557
+
.. container:: example-rule
558
+
559
+
alert :example-rule-emphasis:`http` any any -> any any (msg:"http, no content"; sid:601;)
560
+
561
+
Application Layer Protocol Transactions
562
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
563
+
564
+
.. container:: example-rule
565
+
566
+
alert tcp any any -> any any (msg:"http, pos event"; :example-rule-emphasis:`app-layer-event:http.file_name_too_long;` sid:501;)
567
+
568
+
.. container:: example-rule
569
+
570
+
alert http any any -> any any (msg:"Test"; flow:established,to_server; :example-rule-emphasis:`http.method; content:"GET"; http.uri; content:".exe";` endswith; :example-rule-emphasis:`http.host; content:!".google.com";` endswith; sid:1102;)
571
+
572
+
.. container:: example-rule
573
+
574
+
alert udp any any -> any any (msg:"DNS UDP Frame"; flow:to_server; :example-rule-emphasis:`frame:dns.pdu;` content:"\|01 20 00 01\|"; offset:2; content:"suricata"; offset:13; sid:1402; rev:1;)
0 commit comments