Devtoolslauncher.exe executes specified binary

The Devtoolslauncher.exe executes other binary

Rule Content

- title: Devtoolslauncher.exe executes specified binary
  id: cc268ac1-42d9-40fd-9ed3-8c4e1a5b87e6
  status: experimental
  description: The Devtoolslauncher.exe executes other binary
  references:
  - https://github.com/LOLBAS-Project/LOLBAS/blob/master/yml/OtherMSBinaries/Devtoolslauncher.yml
  - https://twitter.com/_felamos/status/1179811992841797632
  author: Beyu Denis, oscd.community (rule), @_felamos (idea)
  date: 2019/10/12
  modified: 2019/11/04
  tags:
  - attack.defense_evasion
  - attack.execution
  - attack.t1218
  level: critical
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      Image|endswith: \devtoolslauncher.exe
      CommandLine|contains: LaunchForDeploy
    condition: selection
  falsepositives:
  - Legitimate use of devtoolslauncher.exe by legitimate user

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='(process_path.keyword:*\\devtoolslauncher.exe AND process_command_line.keyword:*LaunchForDeploy*)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()