{"record":{"id":"40f8296526d7e653","repo":"shadow1ng/fscan","slug":"rdp-port-closed","errorCode":null,"errorMessage":"rdp_port_closed","messagePattern":"rdp_port_closed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/rdp.go","lineNumber":147,"sourceCode":"\t\t\tsession.LogVuln(result)\n\n\t\t\treturn &ScanResult{\n\t\t\t\tSuccess:  true,\n\t\t\t\tType:     plugins.ResultTypeCredential,\n\t\t\t\tService:  \"rdp\",\n\t\t\t\tUsername: cred.Username,\n\t\t\t\tPassword: cred.Password,\n\t\t\t\tBanner:   p.buildBanner(osInfo),\n\t\t\t}\n\t\t}\n\n\t\t// 记录失败（仅调试时）\n\t\tif err != nil && strings.Contains(err.Error(), \"dial err\") {\n\t\t\t// 端口未开放，直接返回\n\t\t\treturn &ScanResult{\n\t\t\t\tSuccess: false,\n\t\t\t\tService: \"rdp\",\n\t\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"rdp_port_closed\")),\n\t\t\t}\n\t\t}\n\t}\n\n\t// 所有凭据都失败\n\treturn &ScanResult{\n\t\tSuccess: false,\n\t\tService: \"rdp\",\n\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"service_auth_failed\")),\n\t}\n}\n\n// rdpCrack 使用NLA认证验证凭据，不建立完整会话，不会挤掉已登录用户\nfunc (p *RDPPlugin) rdpCrack(host, domain, user, password string, config *common.Config, state *common.State) (bool, error) {\n\ttimeout := int64(config.ModuleTimeout().Seconds())\n\n\t// 使用NLA仅验证模式：只验证凭据，不建立RDP会话\n\t// 这样不会挤掉目标机器上已登录的用户","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/rdp.go#L129-L165","documentation":"Guard in RDPPlugin.Scan: an rdpCrack error containing 'dial err' indicates the TCP connection to the RDP port could not be established, so all remaining credentials are skipped and the port is reported as closed instead of auth-failed.","triggerScenarios":"Thrown at plugins/services/rdp.go:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the RDP port (3389 or custom) is open","Check firewall/Network Level Authentication reachability","Increase connection timeout for slow targets"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}