Flash Player Update from Suspicious Location

Detects a flashplayer update from an unofficial location

Rule Content

- title: Flash Player Update from Suspicious Location
  id: 4922a5dd-6743-4fc2-8e81-144374280997
  status: experimental
  description: Detects a flashplayer update from an unofficial location
  references:
  - https://gist.github.com/roycewilliams/a723aaf8a6ac3ba4f817847610935cfb
  author: Florian Roth
  logsource:
    category: proxy
    product: null
    service: null
  detection:
    selection:
      c-uri-query:
      - '*/install_flash_player.exe'
      - '*/flash_install.php*'
    filter:
      c-uri-stem: '*.adobe.com/*'
    condition: selection and not filter
  falsepositives:
  - Unknown flash download locations
  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-uri-query.keyword:(*\/install_flash_player.exe OR *\/flash_install.php*) AND (NOT (c-uri-stem.keyword:*.adobe.com\/*)))')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()