Skip to content

Conversation

victorjulien
Copy link
Member

@victorjulien victorjulien commented Oct 4, 2025

Implements initial SSLproxy decrypted traffic parsing.
https://redmine.openinfosecfoundation.org/issues/7979

Improves on pop3 parser so it doesn't error out on trivial traffic.
https://redmine.openinfosecfoundation.org/issues/7709

Misc other improvements.

SV_BRANCH=OISF/suricata-verify#2675

@suricata-qa
Copy link

WARNING:

ERROR: QA failed on IPS_AFP_drop_chk.

field baseline test %
SURI_TLPW1_stats_chk
.app_layer.error.pop3.parser 6 3 50.0%
.app_layer.tx.pop3 207 1026 495.65%
SURI_TLPR1_stats_chk
.uptime 652 627 96.17%
.app_layer.flow.failed_tcp 167813 149548 89.12%
IPS_AFP_stats_chk
.ips.blocked 1324080 708480 53.51%
.ips.drop_reason.flow_drop 1225800 642600 52.42%
.ips.drop_reason.applayer_error 32400 0 -
.flow.end.state.established 582119 549719 94.43%
.flow.end.state.closed 1016272 1048672 103.19%
.flow.end.tcp_state.established 201960 169560 83.96%
.flow.end.tcp_state.closed 1016272 1048672 103.19%
.exception_policy.app_layer.error.drop_flow 32400 0 -
.app_layer.error.pop3.parser 32400 0 -
.app_layer.tx.pop3 162000 194400 120.0%
TREX_GENERIC_stats_chk
.app_layer.error.pop3.parser 15015 0 -
.app_layer.tx.pop3 75075 90090 120.0%

Pipeline = 27854

@suricata-qa
Copy link

WARNING:

ERROR: QA failed on IPS_AFP_drop_chk.

field baseline test %
SURI_TLPW1_stats_chk
.app_layer.error.pop3.parser 6 3 50.0%
.app_layer.tx.pop3 207 1026 495.65%
SURI_TLPR1_stats_chk
.uptime 652 629 96.47%
IPS_AFP_stats_chk
.ips.blocked 1324080 708480 53.51%
.ips.drop_reason.flow_drop 1225800 642600 52.42%
.ips.drop_reason.applayer_error 32400 0 -
.flow.end.state.established 582119 549719 94.43%
.flow.end.state.closed 1016272 1048672 103.19%
.flow.end.tcp_state.established 201960 169560 83.96%
.flow.end.tcp_state.closed 1016272 1048672 103.19%
.exception_policy.app_layer.error.drop_flow 32400 0 -
.app_layer.error.pop3.parser 32400 0 -
.app_layer.tx.pop3 162000 194400 120.0%
TREX_GENERIC_stats_chk
.app_layer.error.pop3.parser 15015 0 -
.app_layer.tx.pop3 75075 90090 120.0%

Pipeline = 27855

victorjulien and others added 7 commits October 5, 2025 08:39
For SSLproxy that gives no hint about the decrypted protocol.
Allow a parser to return OK with only consuming partial data and then
immediately processing the rest of the data, giving it a change to rerun
protocol detection on the remaining data.

For this a new AppLayerResult::ok_partial_continue has been added, which
only indicates the number of bytes consumed.

Meant for SSLproxy, where the data will include the special header as well
as the first line of the decrypted protocol. The SSLproxy parser will then
be able to return after the special header and have the data for it consumed.
Allow tagging of a flow as decrypted. This also allows the caller to set
a new flow tuple that will be used to translate new packets to the new
tuple.

This is developed for the SSLproxy usecase, where the packets on the
wire do not reflect the real tuple, but instead a connection between the
proxy and a helper tool. The SSLproxy header at the start of the
connection holds the original tuple, so that can then be applied to the
packets.
Implement support for SSLproxy as a minimalistic app-layer parser. It
will:

- be detected as a SSLproxy connection
- parse the special header containing the original tuple
- mark the flow as decrypted and set the original tuple as the
  translation tuple
- trigger a protocol detection on the data post SSLproxy header

Flow records will then have `app_proto_orig` set to `sslproxy`.

Ticket: OISF#7979.
Improve detection after TLS decrypt.
Improve multiline commands and SASL auth.

Work around missing support in crate for empty server challenge and SASL base64 data.

Ticket: OISF#7709.
@suricata-qa
Copy link

WARNING:

ERROR: QA failed on IPS_AFP_drop_chk.

field baseline test %
SURI_TLPW1_stats_chk
.app_layer.error.pop3.parser 6 3 50.0%
.app_layer.tx.pop3 207 1026 495.65%
SURI_TLPR1_stats_chk
.uptime 652 626 96.01%
IPS_AFP_stats_chk
.ips.blocked 1324080 708480 53.51%
.ips.drop_reason.flow_drop 1225800 642600 52.42%
.ips.drop_reason.applayer_error 32400 0 -
.flow.end.state.established 582119 549719 94.43%
.flow.end.state.closed 1016272 1048672 103.19%
.flow.end.tcp_state.established 201960 169560 83.96%
.flow.end.tcp_state.closed 1016272 1048672 103.19%
.exception_policy.app_layer.error.drop_flow 32400 0 -
.app_layer.error.pop3.parser 32400 0 -
.app_layer.tx.pop3 162000 194400 120.0%
TREX_GENERIC_stats_chk
.app_layer.error.pop3.parser 15015 0 -
.app_layer.tx.pop3 75075 90090 120.0%

Pipeline = 27856

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