libhtp icon indicating copy to clipboard operation
libhtp copied to clipboard

response: fix connect tunneling bug - v3

Open cccs-sadugas opened this issue 8 months ago • 6 comments

The response was emitting partial body data depending on how you fed the parser with inbound and outbound data chunks. It seems the intended behavior is to not emit body data if HTP_STREAM_TUNNEL will eventually be entered (please correct if mistaken).

The fix was to allow htp_connp_REQ_CONNECT_WAIT_RESPONSE to resume in order to enter the HTP_STREAM_TUNNEL or complete the request.

The tunneling transaction was also incomplete because the request side wasn't being finalized after entering HTP_STREAM_TUNNEL.

See test case for example.

cccs-sadugas avatar Jun 06 '24 13:06 cccs-sadugas