Notes taken about the 6 August 2026 The Hacker News article — not a republication of Huntress or THN.

khunt Inside Oracle: SQL Injection to SYSTEM — Notes

Notes on The Hacker News recap of Huntress's investigation, with Multi-Tier JDBC as the missing privilege boundary.

Published 6 August 2026 · Swati Khandelwal / The Hacker News · Huntress investigation 5 August 2026

Synopsis

Notes on Swati Khandelwal's 6 August 2026 The Hacker News recap of a Huntress investigation: attackers used SQL injection in a public Tomcat autocomplete field, sent the payload over a direct JDBC session to Oracle, compiled the khunt Java toolkit as schema objects, and ran cmd.exe as SYSTEM. Huntress's own fix is parameterized queries plus least privilege. A separate commentary below applies OpenLink Multi-Tier JDBC and the JDBC-to-JDBC Bridge as the connectivity control plane that would have refused CREATE JAVA SOURCE from that public application identity.

View this analysis as a KG entity

What the article reports: initial access

A public Tomcat app accepted unvalidated autocomplete input and executed it as SQL over a JDBC connection whose Oracle account could create Java objects. Huntress traced the traffic to 178.162.151.229. No Oracle patch closes the application flaw or the account privilege.

1. Inject the public autocomplete field

Unvalidated input on a public-facing Java/Tomcat autocomplete search field accepted SQL.

2. Forward the payload over a direct JDBC session

Tomcat sent the injected SQL to Oracle as a first-class JDBC session whose account could create Java objects.

178.162.151.229

Source IP Huntress attributed to the malicious requests against the injectable endpoint.

What the article reports: the khunt toolkit

Attackers fed Java to CREATE JAVA SOURCE. Oracle compiled six Java objects and several khunt_* PL/SQL wrappers. A Java class stored as a schema object is not a process, binary, or filesystem file, so EDR products generally miss it.

KhuntUnzip

Unpacked archives from inside the database session.

KhuntT

Reachability check confirming the toolkit was installed and callable.

KhuntFS2

Second file-explorer module with the same host-filesystem role as KhuntFS.

khunt

Post-exploitation toolkit Huntress tracks as khunt: Java schema objects plus khunt_* PL/SQL wrappers compiled inside Oracle after SQL injection.

KhuntCmd

Loaded cmd.exe and ran arbitrary OS commands passed in as SQL.

KhuntFS

Listed, read, searched, and sized files on the host.

KhuntHash

Read usernames and password hashes from Oracle's internal user table and wrote them to a file.

What the article reports: post-compromise on Windows

KhuntCmd ran cmd.exe /c whoami and returned SYSTEM, with oracle.exe as parent. Attackers used PowerShell and reg.exe to copy SECURITY and SYSTEM hives into F:\Oracle, wrote tasklist /svc to khunttasks.txt, and used esentutl.exe to copy SAM and SECURITY. Huntress saw staging, not confirmed exfiltration.

Staged registry hive files

F:\Oracle\khuntSECURITY.hiv, khuntSYSTEM.hiv, khuntSAM.hiv, khunt_SECURITY.hiv, and khunttasks.txt.

Windows SYSTEM

Local Windows identity returned by whoami through KhuntCmd, confirming OS-level code execution from inside Oracle.

What the article reports: defender guidance

Huntress and The Hacker News tell defenders to parameterize queries and validate input, and to stop giving the public-app account CREATE JAVA SOURCE or unused stored-procedure rights. Hunting for Khunt* object names or KHUNT% in SQL logs finds this toolkit, not the technique.

Principle of least privilege

Grant only the rights a role needs. A public search account should not CREATE JAVA SOURCE.

Prepared statement

Bind user values as parameters instead of concatenating them into SQL. Huntress's application-layer fix.

Related coverage

The Hacker News recap is notes on Huntress's 5 August 2026 investigation, not a replacement for it.

Toolkit Installation via SQL Injection Shows the Classics Still Hit

Huntress investigation published 5 August 2026 by Ben Nahorney and Michael Tigges; primary technical source for the The Hacker News recap.

Key voices and quotations

Direct statements from the reporting, kept separate from the later Multi-Tier commentary.

The database becomes a beachhead

The database stops being something attackers query and becomes a beachhead they attack from.

Use of the technique in the wild has rarely been documented

The use of the technique in the wild has rarely been documented.

Reported attack chain

Six stages from the public form to staged registry hives, as Huntress reconstructed them.

1. Inject the public autocomplete field

Unvalidated input on a public-facing Java/Tomcat autocomplete search field accepted SQL.

2. Forward the payload over a direct JDBC session

Tomcat sent the injected SQL to Oracle as a first-class JDBC session whose account could create Java objects.

3. Issue CREATE JAVA SOURCE

Oracle documentation puts CREATE JAVA SOURCE in a user's own schema at CREATE PROCEDURE. Runtime.exec needs a separate file-execution grant that Oracle says only privileged administrators issue. The chain succeeded, so the account had enough for both.

4. Compile khunt as schema objects

Six Java objects and khunt_* PL/SQL wrappers were stored inside Oracle, not as files on disk.

5. Spawn cmd.exe as SYSTEM

KhuntCmd loaded cmd.exe; whoami returned SYSTEM; parent process was oracle.exe.

6. Stage SAM, SECURITY, and SYSTEM hives

reg.exe and esentutl.exe wrote hive copies and khunttasks.txt under F:\Oracle. Huntress did not establish exfiltration.

Connectivity comparison

Six dimensions comparing the incident's direct JDBC path with Multi-Tier JDBC for Oracle and a JDBC-to-JDBC Bridge. ComparisonDimension is the corpus class; instances are source-grounded.

AspectDirect vendor JDBC in TomcatMulti-Tier JDBC for OracleJDBC-to-JDBC Bridge
Privilege boundary locationInside Oracle, on the account Tomcat already holds. That account could CREATE JAVA SOURCE.At the Request Broker, before SQL is forwarded to Oracle.At the same Request Broker; the JDBC Agent never sees a write session from this Application.
Session mode for the public appRead-write Oracle session. Autocomplete could issue DDL.Session rule binds Application plus DMZ host to a read-only agent template.Identical rule: this Application, from this host, is search-only.
Credential and driver residenceOn the public Tomcat host, in the app's JDBC pool.On the broker and Oracle agent host, behind the application tier.ojdbc and the Oracle password stay on the broker host; Tomcat speaks only the OpenLink client protocol.
Application identity awarenessOracle roles do not see Application or client process identity.Session rules evaluate Application, OS, user, and machine or IP from oplrqb.ini.Same Session Rules Book and Application attribute.
CREATE JAVA SOURCE forwardingForwarded. Oracle compiled khunt.Rejected as non-read. No toolkit, no Runtime.exec, no SYSTEM shell.Rejected the same way. The attacker never gets a raw Oracle session from the DMZ.
Residual SELECT injection riskFull account privilege, including DDL and OS exec.Read-only forwarding still allows SELECT. A UNION against SYS.USER$ remains possible if the agent account can read it.Same residual SELECT risk. The Oracle account used by the agent must be SELECT-only on autocomplete objects.
Direct vendor JDBC in TomcatIncident
Inside Oracle, on the account Tomcat already holds. That account could CREATE JAVA SOURCE.
Read-write Oracle session. Autocomplete could issue DDL.
On the public Tomcat host, in the app's JDBC pool.
Oracle roles do not see Application or client process identity.
Forwarded. Oracle compiled khunt.
Full account privilege, including DDL and OS exec.
Multi-Tier JDBC for OracleRead-only rule
At the Request Broker, before SQL is forwarded to Oracle.
Session rule binds Application plus DMZ host to a read-only agent template.
On the broker and Oracle agent host, behind the application tier.
Session rules evaluate Application, OS, user, and machine or IP from oplrqb.ini.
Rejected as non-read. No toolkit, no Runtime.exec, no SYSTEM shell.
Read-only forwarding still allows SELECT. A UNION against SYS.USER$ remains possible if the agent account can read it.
JDBC-to-JDBC BridgeDrop-in
At the same Request Broker; the JDBC Agent never sees a write session from this Application.
Identical rule: this Application, from this host, is search-only.
ojdbc and the Oracle password stay on the broker host; Tomcat speaks only the OpenLink client protocol.
Same Session Rules Book and Application attribute.
Rejected the same way. The attacker never gets a raw Oracle session from the DMZ.
Same residual SELECT risk. The Oracle account used by the agent must be SELECT-only on autocomplete objects.

Agent-authored commentary: Multi-Tier JDBC as the missing privilege boundary

Separate from the article. Applies OpenLink Multi-Tier JDBC and the JDBC-to-JDBC Bridge to Huntress's facts. Author is the kg-generator skill; Kingsley Uyi Idehen is the accountable person. This is not Huntress or The Hacker News guidance.

The JDBC session was the privilege boundary the application failed to enforce

The lethal step was not the injectable string. It was a write-capable Oracle session from a public search form. Multi-Tier moves that decision to a Request Broker that can refuse CREATE JAVA SOURCE before Oracle compiles anything.

Multi-Tier does not parameterize the application

The drivers do not rewrite autocomplete SQL and are not a WAF. If Tomcat concatenates input, a SELECT injection can still be formed. The claim is escalation stoppage under a read-only public-app rule, not magic removal of SQL injection.

A read-only Application rule stops khunt

Autocomplete is a read. A session rule that matches the Tomcat application and DMZ host to a read-only agent template does not forward CREATE JAVA SOURCE, CREATE PROCEDURE, or CALL wrappers that compile or exec. Oracle never compiles KhuntCmd.

The JDBC-to-JDBC Bridge is the least-disruption swap

Huntress said Tomcat used JDBC. The Bridge changes the driver class and URL, leaves SQL as-is, parks ojdbc and credentials on the broker host, and applies the same read-only rule. Native Multi-Tier JDBC for Oracle is the same split with an Oracle agent instead of a JDBC agent.

Two layers remain required

Broker: public Tomcat identity to a read-only agent. Oracle account used by that agent: SELECT only on autocomplete objects, no CREATE JAVA, no SYS.USER$, no Runtime.exec. Parameterized queries remain the fix for the injection itself. A misconfigured read-write public DSN would still forward the payload.

SPARQL recipes

Queries scoped to the DAV named graph of this collection.

People

Swati Khandelwal

Co-founder and infosec journalist at The Hacker News; byline on the 6 August 2026 khunt recap.

Ben Nahorney

Staff Technical Community Engagement Writer at Huntress; co-author of the 5 August 2026 khunt investigation.

Michael Tigges

Principal Tactical Response Analyst at Huntress; co-author of the 5 August 2026 khunt investigation.

Marco Ivaldi

Author of raptor_oraexec.sql (2006), the CREATE JAVA SOURCE plus PL/SQL wrapper architecture Huntress said khunt follows.

Kingsley Uyi Idehen

Founder and CEO of OpenLink Software; accountable person for the agent-authored Multi-Tier commentary in this notes collection.

Organizations

Oracle

Vendor of the Oracle Database whose embedded JVM compiled the injected khunt Java sources.

The Hacker News

Cybersecurity news publisher of the 6 August 2026 khunt recap.

Huntress

Security firm that investigated the July 2026 incident and tracks the toolkit as khunt.

OpenLink Software

Vendor of Multi-Tier JDBC drivers, the JDBC-to-JDBC Bridge, and the Request Broker session-rules control plane applied in the commentary.

Knowledge Graph Explorer 189 nodes · 501 links

Interactive graph visualization derived from the companion RDF. Click nodes to resolve, drag to explore. Graph data embedded from companion RDF at generation time.

khunt Inside Oracle: SQL Injection to SYSTEM — Notes

Nodes: 0 Links: 0
Click SVG to activate zoom, click outside to release | Drag nodes to pin, double-click to unpin
Classes Properties Instances

SPARQL Workbench 4 sample queries

Query this knowledge graph on URIBurner. The editor opens on the canonical SAMPLE entity-type summary (DAV named graph). Pick a recipe, edit freely, then run live or copy.

Sample Queries

Reproduced verbatim from the companion RDF. Execute loads the query into the workbench below and runs it live.

Entity types in this graph
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT
    ?type
    (SAMPLE(?s) AS ?sampleEntity)
    (SAMPLE(?label) AS ?sampleLabel)
    (COUNT(?s) AS ?entityCount)
WHERE {
    GRAPH <https://linkeddata.uriburner.com/DAV/demos/daas/khunt-oracle-sqli-mt-jdbc-mitigation-grok_4_6-1.ttl> {
        ?s rdf:type ?type .
        OPTIONAL { ?s rdfs:label ?label }
    }
}
GROUP BY ?type
ORDER BY DESC(?entityCount)

Canonical SAMPLE-based type census used by the footer SPARQL button.

Reported attack-chain steps
PREFIX schema: <http://schema.org/>
PREFIX : <https://thehackernews.com/2026/08/attackers-compile-khunt-inside-oracle.html#>

SELECT ?step ?name ?position ?description
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/khunt-oracle-sqli-mt-jdbc-mitigation-grok_4_6-1.ttl>
WHERE {
    ?step a :AttackChainStep ;
          schema:name ?name ;
          schema:position ?position ;
          schema:description ?description .
}
ORDER BY ?position
Connectivity comparison dimensions
PREFIX schema: <http://schema.org/>
PREFIX cdx: <https://neo4j.com/blog/graph-database/introducing-neo4j-virtual-graph-graph-reasoning-on-the-data-you-already-have/#>
PREFIX : <https://thehackernews.com/2026/08/attackers-compile-khunt-inside-oracle.html#>

SELECT ?dim ?name ?direct ?mt ?bridge
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/khunt-oracle-sqli-mt-jdbc-mitigation-grok_4_6-1.ttl>
WHERE {
    ?dim a cdx:ComparisonDimension ;
         schema:name ?name ;
         schema:position ?position ;
         :directJdbcStance ?direct ;
         :mtJdbcStance ?mt ;
         :bridgeStance ?bridge .
}
ORDER BY ?position
FAQ questions and answers
PREFIX schema: <http://schema.org/>
PREFIX : <https://thehackernews.com/2026/08/attackers-compile-khunt-inside-oracle.html#>

SELECT ?q ?question ?answer
FROM <https://linkeddata.uriburner.com/DAV/demos/daas/khunt-oracle-sqli-mt-jdbc-mitigation-grok_4_6-1.ttl>
WHERE {
    :faqSection schema:mainEntity ?q .
    ?q schema:name ?question ;
       schema:acceptedAnswer ?a ;
       schema:position ?position .
    ?a schema:text ?answer .
}
ORDER BY ?position

Query editor

▶ Run live on URIBurner SELECT: text/x-html+tr | DESCRIBE/CONSTRUCT: text/x-html-nice-turtle

Frequently Asked Questions

SQL injection against an unvalidated autocomplete search field on a public Java/Tomcat application that forwarded the input to Oracle over JDBC.

The JDBC account could CREATE JAVA SOURCE. Attackers compiled khunt inside Oracle and used KhuntCmd to run cmd.exe. whoami returned SYSTEM with oracle.exe as parent.

Huntress's name for the in-database toolkit: KhuntCmd, KhuntHash, KhuntFS, KhuntFS2, KhuntT, KhuntUnzip, and khunt_* PL/SQL wrappers. It is a schema object, not a file on disk.

No. The Hacker News states no Oracle patch closes the application flaw or the account privilege. The technique dates to at least raptor_oraexec.sql in 2006.

Parameterize queries and validate input, and do not let the public-app account author Java sources or run stored procedures it has no reason to touch. Hunt for Khunt* objects and KHUNT% in SQL logs.

No. Multi-Tier does not parameterize Tomcat's SQL. The approved claim is that a read-only public-app session rule would have blocked the escalation (compile to exec to SYSTEM), not the injectable SELECT itself.

Bind the Tomcat Application and DMZ host to a read-only Oracle agent in oplrqb.ini. CREATE JAVA SOURCE is not a read. The broker never forwards it. Oracle never compiles KhuntCmd.

When the team wants to keep Oracle's JDBC driver and only change Tomcat's driver class and URL. ojdbc and credentials move to the broker host; the Session Rules Book stays the same.

Injected SELECT still forwards. If the agent account can read SYS.USER$, a KhuntHash-style hash dump is still possible. The agent account must be SELECT-only on autocomplete objects.

A Java class compiled into a schema object is not a process, binary, or filesystem file. Huntress says EDR products do not generally inspect Oracle internals. Detections fired later on credential-theft from oracle.exe.

Oracle documents CREATE JAVA SOURCE in a user's own schema at CREATE PROCEDURE. Spawning an OS process via Runtime.exec needs a file-execution permission Oracle says only privileged administrators issue. Huntress did not list the exact grants; the chain succeeded.

Hive files under F:\Oracle with khunt prefixes, khunttasks.txt, source IP 178.162.151.229, Java object names KhuntT, KhuntFS, KhuntFS2, KhuntCmd, KhuntHash, KhuntUnzip, and KHUNT% in SQL logs.

Huntress: Ben Nahorney and Michael Tigges, 5 August 2026. The Hacker News recap: Swati Khandelwal, 6 August 2026.

The broker forwards CREATE JAVA SOURCE. Multi-Tier is architecture plus policy, not an automatic deny. The public search identity must be bound to a read-only agent.

Glossary of Terms

SQL injection

Inserting SQL into an application input that is concatenated into a statement. Here, an autocomplete field.

Java Database Connectivity

Java API for SQL data sources. Huntress said Tomcat used a JDBC connection to Oracle.

Prepared statement

Bind user values as parameters instead of concatenating them into SQL. Huntress's application-layer fix.

Principle of least privilege

Grant only the rights a role needs. A public search account should not CREATE JAVA SOURCE.

Endpoint detection and response

Host telemetry focused on processes, binaries, and files. It generally does not inspect Oracle Java schema objects.

CREATE JAVA SOURCE

Oracle SQL that hands Java source to the embedded JVM and stores the compiled class as a schema object.

Session Rules Book

OpenLink text rules in oplrqb.ini. The Request Broker evaluates Application, OS, user, and machine attributes and binds a session to an agent template.

Logical firewall

OpenLink name for attribute-based session rules that constrain read versus read-write before a connection reaches the database.

Request Broker

OpenLink Multi-Tier listener (oplrqb) that accepts generic client sessions and binds them to a database or JDBC agent under session rules.

Java source schema object

Compiled Java stored inside Oracle's data dictionary rather than as a host file. That is why khunt evaded typical EDR.

Runtime.exec

Java API Oracle documents for spawning an operating-system process from in-database Java. KhuntCmd used this path to cmd.exe.

How-To Guide

1

Name the public app as an Application identity

Treat the Tomcat process as a first-class Application attribute in the Session Rules Book, not as whoever happens to hold the Oracle username.

2

Place a Request Broker between Tomcat and Oracle

Install Multi-Tier JDBC for Oracle, or the JDBC-to-JDBC Bridge if ojdbc must stay. Tomcat talks to the broker, not to the Oracle listener.

3

Bind that Application to a read-only agent

In oplrqb.ini, match Application and DMZ host to a read-only agent template. Autocomplete is a read. CREATE JAVA SOURCE must not forward.

4

Keep ojdbc and Oracle credentials off the Tomcat host

Especially with the Bridge: vendor driver, Oracle password, and the network path to Oracle live on the broker or agent host.

5

Shrink the Oracle account the agent uses

SELECT only on autocomplete objects. No CREATE JAVA, no CREATE PROCEDURE, no SYS.USER$, no Runtime.exec grants.

6

Parameterize the autocomplete query

Stop concatenating the search field. Session rules do not replace prepared statements. They stop the compile-to-shell step if injection still occurs.

7

Hunt schema objects and broker denies

Search Oracle for object names beginning Khunt and SQL logs for KHUNT%. Also review Request Broker deny logs for rejected CREATE JAVA SOURCE from the public DSN.