Squirrel Lolbin

Detects Possible Squirrel Packages Manager as Lolbin

Rule Content

- title: Squirrel Lolbin
  id: fa4b21c9-0057-4493-b289-2556416ae4d7
  status: experimental
  description: Detects Possible Squirrel Packages Manager as Lolbin
  references:
  - http://www.hexacorn.com/blog/2019/03/30/sqirrel-packages-manager-as-a-lolbin-a-k-a-many-electron-apps-are-lolbins-by-default/
  - http://www.hexacorn.com/blog/2018/08/16/squirrel-as-a-lolbin/
  tags:
  - attack.execution
  author: Karneades / Markus Neis
  falsepositives:
  - 1Clipboard
  - Beaker Browser
  - Caret
  - Collectie
  - Discord
  - Figma
  - Flow
  - Ghost
  - GitHub Desktop
  - GitKraken
  - Hyper
  - Insomnia
  - JIBO
  - Kap
  - Kitematic
  - Now Desktop
  - Postman
  - PostmanCanary
  - Rambox
  - Simplenote
  - Skype
  - Slack
  - SourceTree
  - Stride
  - Svgsus
  - WebTorrent
  - WhatsApp
  - WordPress.com
  - atom
  - gitkraken
  - slack
  - teams
  level: high
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      Image:
      - '*\update.exe'
      CommandLine:
      - '*--processStart*.exe*'
      - '*--processStartAndWait*.exe*'
      - "*\u2013createShortcut*.exe*"
    condition: selection

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:(*\\update.exe) AND process_command_line.keyword:(*\-\-processStart*.exe* OR *\-\-processStartAndWait*.exe* OR *–createShortcut*.exe*))')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()