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

detect/integers: test enum with negated strings - v2 #2257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AkakiAlice
Copy link
Contributor

@AkakiAlice AkakiAlice commented Jan 27, 2025

Ticket: #7513

Description:

  • add test to check enum with negated strings

Changes:

  • move tests to file websocket-ping

Redmine ticket: https://redmine.openinfosecfoundation.org/issues/7513

Suricata PR: OISF/suricata#12484
Previous PR: #2250


checks:
- filter:
count: 1
match:
event_type: websocket
websocket.opcode: ping
websocket.opcode: ping # ping is not pong
pcap_cnt: 8
- filter:
count: 1
match:
event_type: websocket
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to add new checks for event_type: alert (and the absence of it)

@@ -0,0 +1,2 @@
alert websocket any any -> any any (msg:"There is no pong opcode in this packet"; websocket.opcode:!pong; sid:1;)
alert websocket any any -> any any (msg:"There is no ping opcode in this packet"; websocket.opcode:!ping; sid:2;)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also have !text to make it maybe clearer

Copy link
Collaborator

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New checks are needed for alerts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants