projectdiscovery/nuclei · warning

not a oracle service

Error message

not a oracle service

What it means

Returned by OracleClient.ExecuteQuery when the preliminary IsOracle probe completes but reports the service is not Oracle (isOracleResp.IsOracle == false). The TNS probe (via fingerprintx's ORACLEPlugin) read the listener's banner and it did not match Oracle, so the query is refused rather than sending Oracle wire traffic to a foreign service. Probe errors (dial failure, timeouts, dialer init) surface as their own errors instead of this one.

Solutions

  1. Branch on oracle.IsOracle(host, port).IsOracle before running queries
  2. Verify the listener: `tnsping` / lsnrctl status on the target, or confirm the port with a port scan
  3. Treat this as 'skip target' in template logic, not a scan failure
  4. For Oracle-compatible services the probe rejects, use the code protocol with a raw go-ora driver via DSN

Example fix

// before
const res = client.ExecuteQuery('acme.com', 1521, 'user', 'pass', 'XE', 'SELECT @@version');

// after
const probe = oracle.IsOracle('acme.com', 1521);
if (probe.IsOracle) {
  const res = client.ExecuteQuery('acme.com', 1521, 'user', 'pass', 'XE', 'SELECT @@version');
} else {
  log('not oracle: ' + probe.Banner);
}
Defensive patterns

Strategy: validation

Validate before calling

const probe = oracle.IsOracle(host, port);
if (probe && probe.IsOracle) {
  client.ExecuteQuery(host, port, user, pass, dbName, query);
} else {
  log('not oracle (banner: ' + (probe && probe.Banner) + ')');
}

Try / catch

try { client.ExecuteQuery(host, port, user, pass, dbName, query); } catch (e) { if (String(e) === 'not a oracle service') { /* skip target */ } else { throw e; } }

Prevention

When it happens

Trigger: Calling client.ExecuteQuery against a port that is not an Oracle listener: wrong port, another database or TCP service, or an Oracle listener with a banner the fingerprinter does not recognize. Host policy denial surfaces earlier as ErrHostDenied, and missing dialers as the dialer init error.

Common situations: Cred-check templates sweeping port ranges; containers where 1521 is mapped to another app; Oracle setups (e.g. behind a connection manager or non-default listener) whose greeting defeats detection; hardcoded 1521 against renamed ports.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/7545a929f31b58a4. Report an issue: GitHub.

Appendix: source

Thrown at pkg/js/libs/oracle/oracle.go:209

// It returns the results of the query or an error if something goes wrong.
// @example
// ```javascript
// const oracle = require('nuclei/oracle');
// const client = new oracle.OracleClient;
// const result = client.ExecuteQuery('acme.com', 1521, 'username', 'password', 'XE', 'SELECT @@version');
// log(to_json(result));
// ```
func (c *OracleClient) ExecuteQuery(ctx context.Context, host string, port int, username, password, dbName, query string) (*utils.SQLResult, error) {
	if host == "" || port <= 0 {
		return nil, fmt.Errorf("invalid host or port")
	}

	isOracleResp, err := c.IsOracle(ctx, host, port)
	if err != nil {
		return nil, err
	}
	if !isOracleResp.IsOracle {
		return nil, fmt.Errorf("not a oracle service")
	}

	connStr := goora.BuildUrl(host, port, dbName, username, password, nil)

	return c.ExecuteQueryWithDSN(ctx, connStr, query)
}

// ExecuteQueryWithDSN executes a query on an Oracle database using a DSN
// @example
// ```javascript
// const oracle = require('nuclei/oracle');
// const client = new oracle.OracleClient;
// const result = client.ExecuteQueryWithDSN('oracle://user:password@host:port/service', 'SELECT @@version');
// log(to_json(result));
// ```
func (c *OracleClient) ExecuteQueryWithDSN(ctx context.Context, dsn string, query string) (*utils.SQLResult, error) {
	executionId := ctx.Value("executionId").(string)

View on GitHub (pinned to 265b3a3dec)