Project

General

Profile

Actions

Bug #2506

closed

filestore v1: with stream-depth not null, files are never truncated

Added by pascal delalande almost 6 years ago. Updated almost 4 years ago.

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

Description

Using suricata 4.1 beta2 (top of git - May 30 2018), and http session with this yaml:
- file-store:
enabled: yes # set to yes to enable
log-dir: files # directory to store the files
force-magic: no # force logging magic on all stored files
force-hash: [md5]
force-filestore: yes # force storing of all files
stream-depth: 1
whatever size of attached files within HTTP session, stored files are never truncated despite stream-depth is set at a fixed small value.
Example: stream-depth set to 1, we still have meta file like:

more file.8.meta
TIME: 05/30/2018-21:58:02.767116
SRC IP: 192.168.0.26
DST IP: 212.95.74.42
PROTO: 6
SRC PORT: 54303
DST PORT: 80
APP PROTO: http
HTTP URI: /async/articles/flashs
HTTP HOST: www.lefigaro.fr
HTTP REFERER: http://www.lefigaro.fr/
HTTP USER AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
FILENAME: /async/articles/flashs
MAGIC: <unknown>
STATE: CLOSED
SIZE: 55545

{"timestamp":"2018-05-30T21:58:02.848356+0200","flow_id":1136624478607845,"in_iface":"wlan0","event_type":"fileinfo","src_ip":"212.95.74.42","src_port":80,"dest_ip":"192.168.0.26","dest_port":54303,"proto":"TCP","http":{"hostname":"www.lefigaro.fr","url":"/async/articles/flashs","http_user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0","http_content_type":"application/json","http_refer":"http://www.lefigaro.fr/","http_method":"GET","protocol":"HTTP/1.1","status":200,"length":14626},"app_proto":"http","fileinfo":{"filename":"/async/articles/flashs","gaps":false,"state":"CLOSED","stored":true,"file_id":8,"size":55545,"tx_id":0}}

I do think this is not the expected behavior.


Related issues 3 (0 open3 closed)

Related to Suricata - Bug #2264: file-store.stream-depth not working as expected when configured to a specfic valueClosedGiuseppe LongoActions
Related to Suricata - Bug #2495: Stream depth and filestore interactionClosedActions
Related to Suricata - Support #2369: option force-filestore generate truncated fileClosedActions
Actions

Also available in: Atom PDF