Windows WebDAV User Agent

Detects WebDav DownloadCradle

Rule Content

- title: Windows WebDAV User Agent
  id: e09aed7a-09e0-4c9a-90dd-f0d52507347e
  status: experimental
  description: Detects WebDav DownloadCradle
  references:
  - https://mgreen27.github.io/posts/2018/04/02/DownloadCradle.html
  author: Florian Roth
  date: 2018/04/06
  logsource:
    category: proxy
    product: null
    service: null
  detection:
    selection:
      c-useragent: Microsoft-WebDAV-MiniRedir/*
      cs-method: GET
    condition: selection
  fields:
  - ClientIP
  - c-uri
  - c-useragent
  - cs-method
  falsepositives:
  - Administrative scripts that download files from the Internet
  - Administrative scripts that retrieve certain website contents
  - Legitimate WebDAV administration
  level: high

Querying Elasticsearch

Import Libraries


In [ ]:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
import pandas as pd

Initialize Elasticsearch client


In [ ]:
es = Elasticsearch(['http://helk-elasticsearch:9200'])
searchContext = Search(using=es, index='logs-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='(c-useragent.keyword:Microsoft\-WebDAV\-MiniRedir\/* AND cs-method:"GET")')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()