Project

General

Profile

Actions

Documentation #7573

open

Clarify which buffers affect subsequent PCRE

Added by Travis Green 9 months ago. Updated 15 days ago.

Status:
In Review
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

It would be nice to understand which pcre are affected by sticky buffers and which aren't. Initial search reveals http.request_body and http.response_body do not affect following pcre, yet http.host and http.uri do.

Examples:
pcre modifier required:
http.request_body; pcre:"/^[\x20-\x7e\r\n]{0,20}[^\x20-\x7e\r\n]/P";
http.response_body; <...> pcre:"/function(\s_0x[0-9a-f]{4})?\(_0x[0-9a-f]{6},_0x[0-9a-f]{6}\){var _0x[0-9a-f]{6}=/Qi";

pcre modifier not required:
http.host; pcre:"/(github\x2eio|bitbucket\x2eorg)$/";
http.uri; content:".bmp"; endswith; pcre:"/^\x2f\d\x2f[a-z0-9]{1,4}\x2ebmp$/";

Actions #1

Updated by Victor Julien 17 days ago

  • Status changed from In Progress to New
Actions #2

Updated by Victor Julien 17 days ago

http.request_body and http.response_body should act as regular sticky buffers.

Actions #3

Updated by Victor Julien 16 days ago

Added https://github.com/OISF/suricata-verify/pull/2754 to show these http body keywords parse correctly w/o this modifiers.

Actions #4

Updated by Philippe Antoine 15 days ago

  • Status changed from New to In Review
  • Assignee changed from OISF Dev to Victor Julien
Actions

Also available in: Atom PDF