Security News

Cybersecurity news aggregator

CRITICAL Attacks The Hacker News

Attackers Compile khunt Inside Oracle to Turn SQL Injection Into Windows SYSTEM Access

Attackers exploited a SQL injection flaw in a public-facing web application to execute arbitrary Java code within an Oracle database, using the `CREATE JAVA SOURCE` privilege to compile the post-exploitation toolkit "khunt" into schema objects and achieve SYSTEM-level command execution on the underlying Windows host. This technique leverages Oracle's embedded JVM and is not mitigated by an Oracle patch; mitigation requires securing the vulnerable application, enforcing least privilege on database accounts, and hunting for objects with names beginning "Khunt" or SQL logs containing "KHUNT%".
Read Full Article →

Attackers Compile khunt Inside Oracle to Turn SQL Injection Into Windows SYSTEM Access  Swati Khandelwal  Aug 06, 2026 Database Security / Endpoint Security Attackers broke into an organization's Oracle database through a SQL injection flaw in a public-facing web application, then installed a post-exploitation toolkit without writing an executable to disk. They fed Java source code to the database, let Oracle compile it into stored schema objects, and ran commands from inside the database engine. Huntress, which tracks the toolkit as khunt , investigated after credential-theft detections fired on July 27, 2026, and traced the chain to SYSTEM-level code execution on the underlying Windows server. The flaw sat in the application, where an autocomplete search field passed unvalidated input to the database over a Java Database Connectivity (JDBC) connection. The account behind that connection had enough privilege to create Java objects. No Oracle patch closes either the application flaw or the account privilege behind it. Finding the toolkit means hunting: search the Oracle installation for object names beginning Khunt, and SQL logs for KHUNT%. A Java class compiled into a database schema object is not a process, a binary, or a file on the filesystem, and endpoint detection and response products do not generally inspect Oracle's internals. As Huntress frames it, the database stops being something attackers query and becomes a beachhead they attack from. Oracle ships an embedded Java Virtual Machine, and the CREATE JAVA SOURCE statement lets a user hand it Java code that the database compiles and stores as a schema object. In a user's own schema, Oracle's documentation puts the bar at a single system privilege, CREATE PROCEDURE. Spawning an operating-system process from that code runs through Runtime.exec , which needs its own file-execution permission, and Oracle says those are issued only by privileged administrators . Huntress does not say which grants the compromised account held, or whether the attackers had to add any. The chain succeeded, so it had enough for both. The technique is at least two decades old. Marco Ivaldi's raptor_oraexec.sql , dated 2006, creates an Oracle source object with command-execution and file-read methods, then publishes them to SQL through PL/SQL wrappers. The khunt objects use the same basic architecture. "The use of the technique in the wild has rarely been documented," Huntress said . Six Java objects and several khunt_* PL/SQL wrappers made up the toolkit: KhuntCmd loaded cmd.exe and ran arbitrary operating-system commands passed in as SQL. KhuntHash read usernames and password hashes from Oracle's internal user table and wrote them to a file. KhuntFS and KhuntFS2 listed, read, searched, and sized files. KhuntT confirmed the toolkit was reachable, and KhuntUnzip unpacked archives. Running cmd.exe /c whoami through KhuntCmd returned SYSTEM. The attackers then used PowerShell and reg.exe to copy the SECURITY and SYSTEM registry hives into F:\Oracle, ran tasklist /svc into khunttasks.txt, and copied the SAM and SECURITY hives with esentutl.exe. Huntress observed the files being staged locally, but did not establish that they were exfiltrated. The firm named no threat actor and traced the malicious requests to 178.162.151[.]229. Those indicators are specific to this toolkit, so no search for Khunt or KHUNT% will surface the technique behind it. The fix is parameterized queries and input validation in the application, plus least privilege underneath: an account serving a public-facing app should not be able to author Java sources or run stored procedures it has no reason to touch. Found this article interesting? Follow us on Google News , Twitter and LinkedIn to read more exclusive content we post. SHARE      Tweet  Share  Share  Share   Share on Facebook  Share on Twitter  Share on Linkedin  Share on Reddit  Share on Hacker News  Share on Email  Share on WhatsApp Share on Facebook Messenger  Share on Telegram SHARE  database security , endpoint security , oracle , privilege escalation , SQL Injection , Vulnerability , Web Security , Windows Security ⚡ Top Stories This Week New Bit2Watt Attack Could Let Cloud Tenants Disrupt Power Grids Without an Exploit Open-Source Android AI Agents Could Let Invisible Screen Text Run Code on Host PCs Critical SharePoint RCE CVE-2026-50522 Under Active Exploitation After Public PoC AWS Kiro Flaw Let a Poisoned Web Page Rewrite Its Config and Run Code Apple Fixes Hide My Email Bug That Exposed Real Addresses in Mail Logs Microsoft Azure DevOps MCP Flaw Lets Hidden PR Comments Hijack AI Review Agents OpenAI Says Its AI Models Escaped Sandbox, Targeted Hugging Face to Cheat Benchmark Adobe Acrobat Extension Flaw Let Malicious Sites Read WhatsApp Web Data Ubuntu snap-confine Flaw Could Give Local Users Root on Default Desktop Installs Nine-Year-Old RefluXFS Linux Flaw Gives Local Users Root on Default RHEL Installs Attackers Weaponize GitHub Actions Runners to Target cPanel and WHM Servers Claude Cowork Flaw Could Let AI Agent Escape Its VM and Access Mac Files ThreatsDay: Android Spyware, PLC Attacks, AI Image Prompt Injection + 12 More Stories Kimi K3 Agents Found Redis Zero-Days and Built RCE Exploit, Researchers Say Hacker Runs Hermes AI Agent Unattended for Post-Exploitation at Thai Finance Ministry ChatGPT AgentForger Flaw Could Deploy Rogue Workspace Agents via a Phishing Link Certighost Exploit Lets Low-Privileged Active Directory Users Impersonate a Domain Controller Researcher Publishes GitLab RCE PoC Letting Authenticated Users Run Commands as Git Fastjson 1.x RCE Vulnerability Targeted in Attacks With No Patched Available Malvertising Sends Malware in Pieces, Then Makes the Browser Build the Executable ⭐ Featured Resources [Webinar] How Militaries Can Trust the Data Behind Autonomous Missions Download the 5-Step Action Plan for AI-Speed Exploitation Get the Checklist for Gaining Control of AI Use Across Your Organization Get the 2026 CISO Benchmark Report Based on 600 Security Leaders

Share this article