Hi, I need to extract files from different protocols. The document says that suricata is able to deal with 5 kinds of protocols: http, smb, ftp, nfs, smtp. I tried all of them, but only http and smb work. Suricata 6.0.3 was used in my experiment, and the configuration yaml is as follows:
outputs:
- http
- files
- ftp
…
file-store:
version: 2
enabled: yes # set to yes to enable
Summary
This text will be hidden
dir: filestore # directory to store the files
force-hash: [md5]
force-filestore: yes # force storing of all files
stream-depth: 0
write-fileinfo: yes
max-open-files: 2000
app-layers:
ftp:
enabled: yes
nfs:
enabled: yes
rules:
alert ftp-data any any → any any (msg:“FTP files”; filestore; sid:3; rev:1;)
alert nfs any any → any any (msg:“File found within NFS and stored”; filestore; sid:34; rev:1;)
I have tried afpacket, pcap and pfring module, but none of them completely extract files successfully. Suricata couldn’t even extract any files sometimes. It seems that pfring and afpacket loss some packets. Please help me with the issue.
My pcap files:
ftp_nta_file_new_zip.pcap (7.4 KB)
nfs-little.pcap (3.0 MB)