| Title | Suspicious Curl File Upload |
|:-------------------------|:------------------|
| **Description** | Detects a suspicious curl process start the adds a file to a web request |
| **ATT&CK Tactic** |
- [TA0010: Exfiltration](https://attack.mitre.org/tactics/TA0010)
|
| **ATT&CK Technique** | - [T1567: Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1567)
|
| **Data Needed** | - [DN_0002_4688_windows_process_creation_with_commandline](../Data_Needed/DN_0002_4688_windows_process_creation_with_commandline.md)
- [DN_0003_1_windows_sysmon_process_creation](../Data_Needed/DN_0003_1_windows_sysmon_process_creation.md)
|
| **Trigger** | There is no documented Trigger for this Detection Rule yet |
| **Severity Level** | medium |
| **False Positives** | - Scripts created by developers and admins
|
| **Development Status** | experimental |
| **References** | - [https://twitter.com/d1r4c/status/1279042657508081664](https://twitter.com/d1r4c/status/1279042657508081664)
- [https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76](https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76)
|
| **Author** | Florian Roth |
## Detection Rules
### Sigma rule
```
title: Suspicious Curl File Upload
id: 00bca14a-df4e-4649-9054-3f2aa676bc04
status: experimental
description: Detects a suspicious curl process start the adds a file to a web request
author: Florian Roth
date: 2020/07/03
modified: 2020/09/05
references:
- https://twitter.com/d1r4c/status/1279042657508081664
- https://medium.com/@petehouston/upload-files-with-curl-93064dcccc76
logsource:
category: process_creation
product: windows
tags:
- attack.exfiltration
- attack.t1567
detection:
selection:
Image|endswith: '\curl.exe'
CommandLine|contains: ' -F '
condition: selection
fields:
- CommandLine
- ParentCommandLine
falsepositives:
- Scripts created by developers and admins
level: medium
```
### powershell
```
Get-WinEvent | where {($_.message -match "Image.*.*\\\\curl.exe" -and $_.message -match "CommandLine.*.* -F .*") } | select TimeCreated,Id,RecordId,ProcessId,MachineName,Message
```
### es-qs
```
(winlog.event_data.Image.keyword:*\\\\curl.exe AND winlog.event_data.CommandLine.keyword:*\\ \\-F\\ *)
```
### xpack-watcher
```
curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_watcher/watch/00bca14a-df4e-4649-9054-3f2aa676bc04 <