LoFP LoFP / normal archive transfer via http protocol may trip this detection.

Techniques

Sample rules

Multiple Archive Files Http Post Traffic

Description

This search is designed to detect high frequency of archive files data exfiltration through HTTP POST method protocol. This are one of the common techniques used by APT or trojan spy after doing the data collection like screenshot, recording, sensitive data to the infected machines. The attacker may execute archiving command to the collected data, save it a temp folder with a hidden attribute then send it to its C2 through HTTP POST. Sometimes adversaries will rename the archive files or encode/encrypt to cover their tracks. This detection can detect a renamed archive files transfer to HTTP POST since it checks the request body header. Unfortunately this detection cannot support archive that was encrypted or encoded before doing the exfiltration.

Detection logic

`stream_http` http_method=POST 
|eval archive_hdr1=substr(form_data,1,2) 
| eval archive_hdr2 = substr(form_data,1,4) 
|stats values(form_data) as http_request_body min(_time) as firstTime max(_time) as lastTime count by src_ip dest_ip http_method http_user_agent uri_path url bytes_in bytes_out archive_hdr1 archive_hdr2 
|where count >20 AND (archive_hdr1 = "7z" OR archive_hdr1 = "PK" OR archive_hdr2="Rar!") 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `multiple_archive_files_http_post_traffic_filter`