- title: Execution in Outlook Temp Folder
  id: a018fdc3-46a3-44e5-9afb-2cd4af1d4b39
  status: experimental
  description: Detects a suspicious program execution in Outlook temp folder
  author: Florian Roth
  date: 2019/10/01
  tags:
  - attack.initial_access
  - attack.t1193
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      Image: '*\Temporary Internet Files\Content.Outlook\\*'
    condition: selection
  fields:
  - CommandLine
  - ParentCommandLine
  falsepositives:
  - Unknown
  level: high
In [ ]:
    
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
import pandas as pd
    
In [ ]:
    
es = Elasticsearch(['http://helk-elasticsearch:9200'])
searchContext = Search(using=es, index='logs-*', doc_type='doc')
    
In [ ]:
    
s = searchContext.query('query_string', query='process_path.keyword:*\\Temporary\ Internet\ Files\\Content.Outlook\\*')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))
    
In [ ]:
    
df.head()