iOS Implant URL Pattern

Detects URL pattern used by iOS Implant

Rule Content

- title: iOS Implant URL Pattern
  id: e06ac91d-b9e6-443d-8e5b-af749e7aa6b6
  status: experimental
  description: Detects URL pattern used by iOS Implant
  references:
  - https://googleprojectzero.blogspot.com/2019/08/implant-teardown.html
  - https://twitter.com/craiu/status/1167358457344925696
  author: Florian Roth
  date: 2019/08/30
  logsource:
    category: proxy
    product: null
    service: null
  detection:
    selection:
      c-uri: '*/list/suc?name=*'
    condition: selection
  fields:
  - ClientIP
  - c-uri
  - c-useragent
  falsepositives:
  - Unknown
  level: critical

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.keyword:*\/list\/suc?name\=*')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()