id: samba-detect

info:
  name: Samba Service Detection
  author: pussycat0x
  severity: info
  description: Samba is a free and open-source software that allows files to be shared across Windows and Linux systems simply and easily.
  reference:
    - https://www.samba.org/samba/what_is_samba.html
    - https://www.samba.org/samba/history/security.html
  remediation: Always apply the latest security patch.
  classification:
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: network,smb,samba,detect

tcp:
  - inputs:
      - data: 000000a4ff534d4272000000000801400000000000000000000000000000400600000100008100025043204e4554574f524b2050524f4752414d20312e3000024d4943524f534f4654204e4554574f524b5320312e303300024d4943524f534f4654204e4554574f524b5320332e3000024c414e4d414e312e3000024c4d312e3258303032000253616d626100024e54204c414e4d414e20312e3000024e54204c4d20302e313200
        type: hex
    host:
      - "{{Hostname}}"
    port: 139
    matchers-condition: and
    matchers:
      - type: word
        words:
          - "SMBr"

      - type: word
        words:
          - "HTTP/1.1"
        negative: true
# digest: 490a0046304402205c153fbf52a7b2dfadb408469629086b32e13a3223444116b3e82f4d762044d2022007d379537a766d3cd6913722a0ef27530f0b94fe88229c24efb1786afd25b1fb:922c64590222798bb761d5b6d8e72950