id: rdp-detect

info:
  name: RDP - Detection
  author: pussycat0x
  severity: info
  description: |
    Detects if a target host is running Remote Desktop Protocol (RDP) service on port 3389. This template helps identify Windows systems that have RDP enabled, which is commonly used for remote administration but can also be a security risk if not properly secured.
  metadata:
    verified: true
    max-request: 1
    shodan-query: port:"3389"
  tags: js,network,rdp,info,enum,discovery

javascript:
  - code: |
      let m = require('nuclei/rdp');
      let response = m.IsRDP(Host,Port);
      Export(response);

    args:
      Host: "{{Host}}"
      Port: "3389"

    matchers:
      - type: dsl
        dsl:
          - 'success == true'
          - 'contains(response, "\"IsRDP\": true")'
        condition: and
# digest: 4a0a00473045022021668f07a6009c8cfd2057dce4e7cc9f1538a0d8450bb4f45b23a8f47feebc80022100cefce2194081e68300363e9b39f176114696f766dee69e47586588c658b3bb17:922c64590222798bb761d5b6d8e72950