{"record":{"id":"dc0486c52f9c9d39","repo":"shadow1ng/fscan","slug":"service-no-credentials-dc0486","errorCode":null,"errorMessage":"service_no_credentials","messagePattern":"service_no_credentials","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/services/rsync.go","lineNumber":61,"sourceCode":"\t\tsession.LogSuccess(i18n.Tr(\"rsync_service\", target, result.Banner))\n\t\tfindings = append(findings, result.Banner)\n\t}\n\n\t// 生成密码字典\n\tcredentials := plugins.GenerateCredentials(\"rsync\", config)\n\tif len(credentials) == 0 {\n\t\tif len(findings) > 0 {\n\t\t\treturn &ScanResult{\n\t\t\t\tSuccess: true,\n\t\t\t\tType:    plugins.ResultTypeService,\n\t\t\t\tService: \"rsync\",\n\t\t\t\tBanner:  findings[0],\n\t\t\t}\n\t\t}\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"rsync\",\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// 使用公共框架进行并发凭据测试\n\tauthFn := p.createAuthFunc(info, session)\n\ttestConfig := DefaultConcurrentTestConfigWithTarget(config, info)\n\n\tresult := TestCredentialsConcurrently(ctx, creds, authFn, \"rsync\", testConfig)\n\n\tif result.Success {\n\t\tsession.LogVuln(i18n.Tr(\"rsync_credential\", target, result.Username, result.Password))\n\t\treturn result","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/rsync.go#L43-L79","documentation":"The rsync service Scan produces a successful service-identification result but then finds no candidate credentials to test. When the credentials slice is empty, it returns a failed ScanResult with service_no_credentials, meaning the module cannot proceed to authentication because the caller supplied no username/password pairs.","triggerScenarios":"Scan is invoked on a host where an rsync banner was detected (findings non-empty) but the credentials parameter has zero entries, so the early-return branch fires with i18n.GetText(\"service_no_credentials\").","commonSituations":"Running the scanner without a username/password wordlist loaded; credential config file missing or filtered out for the rsync module; intentionally testing only service identification but expecting auth attempts.","solutions":["Supply at least one credential pair (or an anonymous/empty-password pair) in the scan configuration.","Check the credential-loading config so the rsync module receives the shared credential list.","If anonymous rsync is expected, pass an empty username/password credential explicitly."],"exampleFix":"// before\nscan(target, credentials=[]) // service_no_credentials\n// after\nscan(target, credentials=[{user: \"\", pass: \"\"}, {user: \"root\", pass: \"root\"}])","handlingStrategy":"validation","validationCode":"if len(credentials) == 0 {\n    return errors.New(\"skipping rsync module: no credentials configured; add at least one user/pass or an anonymous pair\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Load and validate credential wordlists before starting the scan run.","Always include an empty-credential entry for anonymous rsync modules.","Assert non-empty credentials per module in scan-config unit tests."],"tags":["rsync","credentials","configuration","brute-force"],"backgroundTag":"missing-credentials","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"}