shadow1ng/fscan · error

service_no_credentials

Error message

service_no_credentials

What it means

Oracle service Scan first calls GenerateCredentials("oracle", config); if it yields an empty list there is nothing to test, so Scan aborts with the localized service_no_credentials error instead of launching a pointless concurrent credential test. It signals a configuration problem, not a network or auth failure.

Source

Thrown at plugins/services/oracle.go:45

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

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

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

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

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

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

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

	return result
}

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

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Provide oracle usernames and passwords in the config (or enable default credential lists)
  2. Check the i18n message key 'service_no_credentials' text for the exact hint your build gives
  3. Validate the config with a dry-run of GenerateCredentials("oracle", config) before scanning
  4. If scanning is intended to be credential-free, use the unauthorized-access test (testUnauthorizedAccess) path instead

Example fix

// before
Scan(config) // config has no oracle credentials
// after
config.Services["oracle"].Usernames = []string{"system", "scott"}
config.Services["oracle"].Passwords = []string{"oracle", "manager"}
Scan(config)
Defensive patterns

Strategy: validation

Validate before calling

creds := GenerateCredentials("oracle", config)
if len(creds) == 0 {
    return errors.New("no oracle credentials configured; add usernames/passwords to config")
}

Try / catch

result, err := plugin.Scan(ctx, info, config, state)
if err != nil && strings.Contains(err.Error(), "service_no_credentials") {
    // fix config, then retry once
    config.Services["oracle"].Usernames = defaultOracleUsers
    config.Services["oracle"].Passwords = defaultOraclePasswords
    result, err = plugin.Scan(ctx, info, config, state)
}

Prevention

When it happens

Trigger: Calling Scan with a config from which no oracle username/password pairs can be derived — e.g. no username list, no password list, and no default credential set enabled for the oracle service.

Common situations: Config file omits oracle credential sections; CLI flags for usernames/passwords not passed; credential generation disabled globally; typo in config keys so the generator finds no entries.

Related errors


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