shadow1ng/fscan · error

service_no_credentials

Error message

service_no_credentials

What it means

Guard in PostgreSQLPlugin.Scan: GenerateCredentials produced no postgresql credential pairs (empty username/password config for this service), so brute forcing is impossible and the scan aborts with this shared sentinel before testing any logins.

Source

Thrown at plugins/services/postgresql.go:50

	state := session.State
	target := info.Target()

	if config.DisableBrute {
		return p.identifyService(ctx, info, session)
	}

	// 先测试未授权访问
	if result := p.testUnauthorizedAccess(ctx, info, config, state); result != nil && result.Success {
		session.LogVuln(i18n.Tr("postgresql_vuln", target, result.VulInfo))
		return result
	}

	credentials := GenerateCredentials("postgresql", config)
	if len(credentials) == 0 {
		return &ScanResult{
			Success: false,
			Service: "postgresql",
			Error:   fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
		}
	}

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

	result := TestCredentialsConcurrently(ctx, credentials, authFn, "postgresql", testConfig)

	if result.Success {
		session.LogVuln(i18n.Tr("postgresql_credential", target, result.Username, result.Password))
	}

	return result
}

// createAuthFunc 创建PostgreSQL认证函数
func (p *PostgreSQLPlugin) createAuthFunc(info *common.HostInfo, config *common.Config, state *common.State) AuthFunc {

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Add postgres usernames/passwords to the scan configuration
  2. Enable default credential sets for postgresql
  3. Use --disable-brute to run identification only
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugins/services/postgresql.go:50 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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