id: smb-signing-not-required

info:
  name: SMB Signing Not Required
  author: pussycat0x
  severity: medium
  description: |
    Signing is not required on the remote SMB server. An unauthenticated, remote attacker can exploit this to conduct man-in-the-middle attacks against the SMB server.
  reference:
    - https://www.tenable.com/plugins/nessus/57608
    - https://nmap.org/nsedoc/scripts/smb2-security-mode.html
  metadata:
    verified: true
    max-request: 1
    shodan-query: port:445
  tags: js,network,smb,enum
javascript:
  - code: |
      var m = require("nuclei/smb");
      var c = m.SMBClient();
      var response = c.ListSMBv2Metadata(Host, Port, User, Pass);
      Export(response);

    args:
      Host: "{{Host}}"
      Port: "445"
      User: "test"
      Pass: "test"

    matchers:
      - type: word
        words:
          - '"SigningEnabled": true'
          - '"SigningRequired": false'
        condition: and
# digest: 490a00463044022049f49fd56a1d77d36b080f98b5db836b76f5d9cc4b8848ee1891876dc8cc33b10220120c94455a412326568ae385e5657e5539e1f5a8ae17274150bd7084ae3daa5b:922c64590222798bb761d5b6d8e72950