id: cap-hookexkeylogger-malware

info:
  name: CAP HookExKeylogger Malware - Detect
  author: daffainfo
  severity: info
  reference: https://github.com/Yara-Rules/rules/blob/master/malware/MALW_CAP_HookExKeylogger.yar
  tags: malware,file
file:
  - extensions:
      - all

    matchers-condition: or
    matchers:
      - type: word
        part: raw
        words:
          - "SetWindowsHookEx"
          - "WH_KEYBOARD_LL"
        condition: and
        case-insensitive: true

      - type: word
        part: raw
        words:
          - "SetWindowsHookEx"
          - "WH_KEYBOARD"
        condition: and
        case-insensitive: true

      - type: word
        part: raw
        words:
          - "WH_KEYBOARD"
          - "WH_KEYBOARD_LL"
        condition: and
        case-insensitive: true
# digest: 4b0a004830460221009479ba5ad7519332a962bd9ca6788d1ba932994f523014b868dd2bf26d026092022100ea109bef6d5be29a5ae8daf7961bbab797c410ea25f33a8982ab417bd19f6293:922c64590222798bb761d5b6d8e72950