{"record":{"id":"f68c8626366c0c8e","repo":"shadow1ng/fscan","slug":"service-no-credentials-f68c86","errorCode":"service_no_credentials","errorMessage":"service_no_credentials","messagePattern":"service_no_credentials","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/telnet.go","lineNumber":77,"sourceCode":"\t\treturn p.identifyService(ctx, info, session)\n\t}\n\n\t// 检测未授权访问\n\tif result := p.testUnauthAccess(ctx, info, session); result != nil && result.Success {\n\t\tif ok, osType, evidence := p.verifyCommandExecution(ctx, info, \"\", \"\", session); ok {\n\t\t\tsession.LogVuln(i18n.Tr(\"telnet_service\", target, result.Banner))\n\t\t\tsession.LogVuln(i18n.Tr(\"telnet_unauth_rce\", target, osType, evidence))\n\t\t\treturn result\n\t\t}\n\t}\n\n\t// 生成密码字典\n\tcredentials := plugins.GenerateCredentials(\"telnet\", config)\n\tif len(credentials) == 0 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"telnet\",\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"service_no_credentials\")),\n\t\t}\n\t}\n\n\t// 转换凭据类型\n\tcreds := make([]Credential, len(credentials))\n\tfor i, c := range credentials {\n\t\tcreds[i] = Credential{Username: c.Username, Password: c.Password}\n\t}\n\n\t// CVE-2026-24061: 并发检测 Telnetd Authentication Bypass 漏洞\n\tif cveResult := p.checkCVE202624061Concurrent(ctx, info, session, config); cveResult != nil {\n\t\treturn cveResult\n\t}\n\n\t// 使用公共框架进行并发凭据测试\n\tauthFn := p.createAuthFunc(info, session)\n\ttestConfig := DefaultConcurrentTestConfigWithTarget(config, info)\n","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/telnet.go#L59-L95","documentation":"The Telnet plugin's Scan found no credentials to try: GenerateCredentials('telnet', config) returned an empty slice, so Scan fails immediately with 'service_no_credentials'. This is a configuration precondition check, not a network failure.","triggerScenarios":"Calling Scan on the Telnet plugin when the configuration provides no credential pairs and no dictionaries that generate any entries.","commonSituations":"Missing user/password lists in config; empty dictionary files; a config mode that disables credential generation; wrong config keys so options are ignored.","solutions":["Add explicit telnet username/password credentials to the config.","Provide non-empty user and password dictionaries.","Verify with debug logging that GenerateCredentials receives your config values.","Check for typos in the configuration option names."],"exampleFix":"// before\ncfg.SetUsers([]string{})\ncfg.SetPasswords([]string{})\n// after\ncfg.SetUsers([]string{\"admin\", \"root\"})\ncfg.SetPasswords([]string{\"admin\", \"123456\", \"password\"})","handlingStrategy":"validation","validationCode":"creds := plugins.GenerateCredentials(\"telnet\", config)\nif len(creds) == 0 { return errors.New(\"no telnet credentials configured\") }","typeGuard":"func hasCredentials(n int) bool { return n > 0 }","tryCatchPattern":null,"preventionTips":["Provide telnet user/password lists before scanning","Log generated credential count at startup","Check dictionary files are non-empty and paths correct","Validate config keys for typos"],"tags":["telnet","credentials","config"],"backgroundTag":"missing-credentials","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}