id: crypto-mining-malware

info:
  name: Crypto Mining Malware - Detect
  author: geeknik
  severity: info
  description: |
    Checks websites for crypto-mining malware.
  reference:
    - https://github.com/xd4rker/MinerBlock/blob/master/assets/filters.txt
  metadata:
    max-request: 1
  tags: miscellaneous,malware,crypto,mining,misc,generic,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    redirects: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '(?mi)cryptonight\.wasm|deepMiner|proxy\=ws|coinhive\.min\.js|wpupdates\.github\.io\/ping|cryptonight\.asm\.js|coin-hive\.com|jsecoin\.com|cryptoloot\.pro'
          - '(?mi)webassembly\.stream|monero\-miner|wasmminer|cn\-asmjs\.min\.js|aj(\-?)cryptominer|wp\-monero\-miner\-pro|crlt\.js|pool\/direct\.js|\.n\.2\.1\.(js|l.*)'
          - '(?mi)ppoi\.org|xmrstudio|webmine\.pro|miner\.start|allfontshere\.press|upgraderservices\.cf|vuuwd\.com|gridcash\.js|worker\-asmjs\.min\.js|perfekt\=wss\:'
          - '(?mi)coin\-hive\.com|coinhive|CoinHive|miner\.start|me0w\.js|web(x?)mr(4?)\.js|miner\.js|static\/js\/tpb\.js|lib\/crypta\.js'
          - '(?mi)bitrix\/js\/main\/core\/core\_(tasker|loader)\.js'
        condition: or

      - type: word
        part: header
        words:
          - "text/html"

      - type: word
        part: body
        words:
          - "<title>Access Denied</title>"
          - "You don't have permission to access"
        condition: or
        negative: true
# digest: 4a0a00473045022057833b75ca56257c5ba4128c4103a12b4441889ef6402aab902f6591dbc97efa022100f771af68ded3923215a4965cf94af4db1b591c1e14df7de1726f87d8b4766981:922c64590222798bb761d5b6d8e72950