Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next/sv/178/20231117/v1 #1472

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions tests/bug-4903/bug-4903-01/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ checks:
- filter:
count: 1
match:
dest_ip: 192.168.200.1
dest_port: 22
event_type: ssh
proto: TCP
src_ip: 192.168.100.1
src_port: 10000
ssh.server.proto_version: '1.99'
ssh.server.software_version: Cisco_server-1.24
- filter:
Expand Down
4 changes: 0 additions & 4 deletions tests/bug-4903/bug-4903-02/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ checks:
- filter:
count: 1
match:
dest_ip: 192.168.200.1
dest_port: 22
event_type: ssh
proto: TCP
src_ip: 192.168.100.1
src_port: 10001
ssh.server.proto_version: '1.99'
ssh.server.software_version: Cisco_server-1.24
- filter:
Expand Down
4 changes: 0 additions & 4 deletions tests/bug-4903/bug-4903-04/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,9 @@ checks:
- filter:
count: 1
match:
dest_ip: 192.168.200.1
dest_port: 22
event_type: ssh
pcap_cnt: 6
proto: TCP
src_ip: 192.168.100.1
src_port: 10003
ssh.client.proto_version: '2.0'
ssh.client.software_version: Cisco_client-1.25
ssh.server.proto_version: '1.99'
Expand Down
1 change: 1 addition & 0 deletions tests/ftp/ftp-too-long-command/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ checks:
match:
event_type: alert
alert.signature_id: 2232000
ftp.command: "RETR"
1 change: 1 addition & 0 deletions tests/krb5-kerberoasting/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ checks:
match:
event_type: alert
alert.signature_id: 1
krb5.msg_type: KRB_TGS_REP
- filter:
count: 1
match:
Expand Down
Binary file added tests/mqtt-connect-rules/mqtt5_pub_jpeg.pcap
Binary file not shown.
16 changes: 16 additions & 0 deletions tests/mqtt-connect-rules/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%YAML 1.1
---

outputs:
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
types:
- mqtt
- alert

app-layer:
protocols:
mqtt:
enabled: yes
4 changes: 4 additions & 0 deletions tests/mqtt-connect-rules/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
alert mqtt any any -> any any (msg:"MQTT CONNECT protocol string SUCCESS"; mqtt.connect.protocol_string; content:"MQTT"; sid:1;)
alert mqtt any any -> any any (msg:"MQTT CONNECT protocol string SUCCESS2"; mqtt.connect.protocol_string; content:"M"; sid:2;)
alert mqtt any any -> any any (msg:"MQTT CONNECT protocol string FAIL"; mqtt.connect.protocol_string; content:"Foobar"; sid:3;)

63 changes: 63 additions & 0 deletions tests/mqtt-connect-rules/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
requires:
files:
- src/detect-mqtt-connect-protocol-string.c

args:
- -k none

checks:

- filter:
count: 1
match:
event_type: mqtt
mqtt.connect.protocol_string: MQTT
mqtt.connect.protocol_version: 5
mqtt.connect.flags.username: true
mqtt.connect.flags.password: true
mqtt.connect.flags.will: false
mqtt.connect.flags.will_retain: false
mqtt.connect.flags.clean_session: true
mqtt.connect.client_id: ""
mqtt.connect.username: user
mqtt.connect.password: pass
mqtt.connect.properties.receive_maximum: 20
mqtt.connack.session_present: false
mqtt.connack.return_code: 0
mqtt.connack.properties.topic_alias_maximum: 10

- filter:
count: 1
match:
event_type: mqtt
mqtt.publish.qos: 0
mqtt.publish.retain: false
mqtt.publish.dup: false
mqtt.publish.topic: topicX

- filter:
count: 1
match:
event_type: mqtt
mqtt.disconnect.qos: 0
mqtt.disconnect.retain: false
mqtt.disconnect.dup: false
mqtt.disconnect.reason_code: 0

- filter:
count: 1
match:
event_type: alert
alert.signature: MQTT CONNECT protocol string SUCCESS

- filter:
count: 1
match:
event_type: alert
alert.signature: MQTT CONNECT protocol string SUCCESS2

- filter:
count: 0
match:
event_type: alert
alert.signature: MQTT CONNECT protocol string FAIL
6 changes: 6 additions & 0 deletions tests/output-eve-tftp-01/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ checks:
count: 1
match:
event_type: alert
- filter:
min-version: 7
count: 1
match:
event_type: alert
tftp.packet: "read"
Loading