id: mssql-detect

info:
  name: Microsoft SQL(mssql) - Detect
  author: Ice3man543,tarunKoyalwar
  severity: info
  metadata:
    max-request: 1
    shodan-query: port:1433
  tags: js,mssql,detect,network,discovery

javascript:
  - code: |
      var m = require("nuclei/mssql");
      var c = m.MSSQLClient();
      c.IsMssql(Host, Port);
    args:
      Host: "{{Host}}"
      Port: "1433"
    matchers:
      - type: dsl
        dsl:
          - "response == true"
          - "success == true"
        condition: and
# digest: 4a0a00473045022029aff7a0d5cc3b9baa98af69a1b0cfe4cf19d089a74988842c741f585093128d022100eaaf7fb352512fa7a28199444e00e73be05cda052ecdb60db9ce2c4a865b5532:922c64590222798bb761d5b6d8e72950