Skip to content

Comments

Websockets 2695 v10#10119

Closed
catenacyber wants to merge 10 commits intoOISF:masterfrom
catenacyber:websockets-2695-v10
Closed

Websockets 2695 v10#10119
catenacyber wants to merge 10 commits intoOISF:masterfrom
catenacyber:websockets-2695-v10

Conversation

@catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/2695
https://redmine.openinfosecfoundation.org/issues/6647
https://redmine.openinfosecfoundation.org/issues/6645
https://redmine.openinfosecfoundation.org/issues/6648

Describe changes:

  • app-layer: websockets protocol support
  • rust : derive for protocol enumerations strings
  • enip: register on default port 44818 also for TCP (as is done on UDP)
  • http2: add newer settings, including the one for websocket over HTTP/2 cf https://www.rfc-editor.org/rfc/rfc8441#section-3
  • detect: integer keywords now accept bitmasks
SV_BRANCH=pr/1571

OISF/suricata-verify#1571

#10104 with rebase to get green CI

I think this is good enough for a first version even if there may be improvements (that can happen in later tickets) :

  • payload logging : waiting for feedback wether this is only for alerts, or also for websocket event
  • using latest HTTP/1 transaction in a single rule, instead of splitting rule and using flowbits
  • support websockets over HTTP/2 : need pcap
    This is a big one as websockets over HTTP/2 only use a single HTTP/2 stream and not the whole TCP connection which keeps having newer regular HTTP/2 streams

#10110 and #9870 should likely precede this

catenacyber and others added 10 commits January 5, 2024 08:15
if no config option is found,
as is done for udp

Ticket: 6304
Ticket: 6647

Allows keywords using integers to use strings in signature
parsing based on a rust enumeration with a derive.
Including the one for websocket over HTTP/2
port is used in AppLayerProtoDetectProbingParserPort
and not in AppLayerProtoDetectProbingParserElement
As for WebSocket which is detected only by protocol change.
When there is a protocol change, and a specific protocol is
expected, like WebSeocket, always run it, no matter the port.
So that we can write enip.revision: 0x203

Ticket: 6645
Ticket: 6648

Like &0x40=0x40 to test for a specific bit set
@catenacyber catenacyber mentioned this pull request Jan 5, 2024
@codecov
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 77 lines in your changes are missing coverage. Please review.

Comparison is base (a37fa62) 82.15% compared to head (c4e17c3) 82.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10119      +/-   ##
==========================================
- Coverage   82.15%   82.07%   -0.08%     
==========================================
  Files         974      980       +6     
  Lines      271925   272486     +561     
==========================================
+ Hits       223394   223645     +251     
- Misses      48531    48841     +310     
Flag Coverage Δ
fuzzcorpus 62.72% <52.23%> (-0.18%) ⬇️
suricata-verify 61.49% <77.11%> (+0.04%) ⬆️
unittests 62.76% <27.52%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@catenacyber
Copy link
Contributor Author

Replaced by #10121

@catenacyber catenacyber closed this Jan 5, 2024
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.

1 participant