shadow1ng/fscan · error

service_no_credentials

service_no_credentials

Error message

service_no_credentials

What it means

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.

Source

Thrown at plugins/services/telnet.go:77

		return p.identifyService(ctx, info, session)
	}

	// 检测未授权访问
	if result := p.testUnauthAccess(ctx, info, session); result != nil && result.Success {
		if ok, osType, evidence := p.verifyCommandExecution(ctx, info, "", "", session); ok {
			session.LogVuln(i18n.Tr("telnet_service", target, result.Banner))
			session.LogVuln(i18n.Tr("telnet_unauth_rce", target, osType, evidence))
			return result
		}
	}

	// 生成密码字典
	credentials := plugins.GenerateCredentials("telnet", config)
	if len(credentials) == 0 {
		return &ScanResult{
			Success: false,
			Service: "telnet",
			Error:   fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
		}
	}

	// 转换凭据类型
	creds := make([]Credential, len(credentials))
	for i, c := range credentials {
		creds[i] = Credential{Username: c.Username, Password: c.Password}
	}

	// CVE-2026-24061: 并发检测 Telnetd Authentication Bypass 漏洞
	if cveResult := p.checkCVE202624061Concurrent(ctx, info, session, config); cveResult != nil {
		return cveResult
	}

	// 使用公共框架进行并发凭据测试
	authFn := p.createAuthFunc(info, session)
	testConfig := DefaultConcurrentTestConfigWithTarget(config, info)

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Add explicit telnet username/password credentials to the config.
  2. Provide non-empty user and password dictionaries.
  3. Verify with debug logging that GenerateCredentials receives your config values.
  4. Check for typos in the configuration option names.

Example fix

// before
cfg.SetUsers([]string{})
cfg.SetPasswords([]string{})
// after
cfg.SetUsers([]string{"admin", "root"})
cfg.SetPasswords([]string{"admin", "123456", "password"})
Defensive patterns

Strategy: validation

Validate before calling

creds := plugins.GenerateCredentials("telnet", config)
if len(creds) == 0 { return errors.New("no telnet credentials configured") }

Type guard

func hasCredentials(n int) bool { return n > 0 }

Prevention

When it happens

Trigger: Calling Scan on the Telnet plugin when the configuration provides no credential pairs and no dictionaries that generate any entries.

Common situations: Missing user/password lists in config; empty dictionary files; a config mode that disables credential generation; wrong config keys so options are ignored.

Related errors


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/f68c8626366c0c8e. Report an issue: GitHub.