
Executive Summary
In a significant cybersecurity incident, hackers leveraged a SQL injection vulnerability to install a post-exploitation toolkit known as khunt directly within an Oracle database. This breach was discovered by Huntress on July 27, 2026, when credential theft was detected on a server hosting the database. The attackers exploited a vulnerable search engine endpoint in a public-facing Java application running on Apache Tomcat, demonstrating the severe risks associated with inadequate input validation.
What Happened
The attack began with the exploitation of a SQL injection flaw that allowed the attackers to issue SQL commands through an autocomplete search feature. This vulnerability was traced back to a public-facing Java application, which failed to properly validate user inputs. Once inside the Oracle database, the attackers installed the khunt toolkit as a Java object, utilizing Oracle's embedded Java Virtual Machine.
The toolkit included various components capable of executing commands, managing files, and stealing credentials. The attackers confirmed their access level by executing system commands that revealed they had SYSTEM-level permissions on the Windows server hosting the database.
Technical Root Cause
The root cause of this incident lies in the failure to adequately validate user input in the Java application. Specifically, the autocomplete search feature allowed attackers to inject SQL commands without proper sanitation. This oversight enabled the exploitation of the SQL injection vulnerability, leading to unauthorized access to the Oracle database.
Furthermore, the attackers took advantage of Oracle's capability to store and execute Java source code within the database. By compiling the khunt toolkit directly into the database schema, they bypassed traditional security measures that would typically prevent the execution of unauthorized executables on the server.
Exposure and Affected Environments
The attack primarily affected organizations using Oracle databases with vulnerable Java applications exposed to the internet. The specific IP address associated with the attack was traced, but further details regarding the extent of the breach or the number of affected organizations have not been publicly disclosed.
Given the nature of the SQL injection vulnerability, any organization that utilizes similar configurations or fails to implement robust input validation measures could be at risk. This incident underscores the importance of securing public-facing applications and databases against such vulnerabilities.
Patch and Mitigation Playbook
To mitigate the risks associated with SQL injection vulnerabilities and similar attacks, organizations should adopt the following strategies:
- Input Validation: Implement strict input validation and sanitization for all user-supplied data to prevent SQL injection attacks.
- Database Privileges: Limit the privileges of database accounts used in public-facing applications. These accounts should not have the ability to create Java sources or execute unnecessary stored procedures.
- Regular Audits: Conduct regular security audits and penetration testing to identify and remediate vulnerabilities in applications and databases.
- Monitoring and Logging: Enhance monitoring and logging capabilities to detect unauthorized access attempts and anomalous activities within the database.
- Patch Management: Stay informed about security patches and updates for all software components, including databases and web applications.
Security Program Lessons Learned
This incident serves as a stark reminder of the vulnerabilities that can exist within enterprise applications and databases. Key lessons include:
- Importance of Input Sanitization: Ensuring that all user inputs are properly validated is crucial in preventing SQL injection attacks.
- Database Security Practices: Organizations must implement strict access controls and limit the capabilities of database accounts, especially those exposed to the internet.
- Proactive Security Measures: Regular security assessments and updates are vital to maintaining a robust security posture.
“Security teams log 54% of successful attacks and alert on just 14%. The rest move through your environment unseen.”
Sources
For further reading and information, refer to the following sources:
- Hackers run khunt post-exploitation toolkit from Oracle database
- CISA warns of hackers exploiting Langflow, N-central, Apache Tomcat flaws
- COLDCARD security audit phishing attack installs remote access tool
A recent attack exploited a SQL injection vulnerability in an Oracle database, allowing hackers to install a post-exploitation toolkit, highlighting critical security lapses in database management.
to issue SQL commands through an autocomplete search feature. This vulnerability was traced back to a public-facing Java application, which failed to properly validate user inputs. Once inside the Oracle database, the attackers installed the khunt toolkit as a Java object, utilizing Oracle's embedded Java Virtual Machine. The toolkit included various components capable of executing commands, managing files, and stealing credentials. The attackers confirmed their access level by executing system commands that revealed they had SYSTEM-level permissions on the Windows server hosting the database. Technical Root Cause The root cause
This report consolidates available public details and highlights where evidence is still limited, helping teams prioritize immediate defensive action while additional technical indicators are collected.
Operational Security Context
of this incident lies in the failure to adequately validate user input in the Java application. Specifically, the autocomplete search feature allowed attackers to inject SQL commands without proper sanitation. This oversight enabled the exploitation of the SQL injection vulnerability, leading to unauthorized access to the Oracle database. Furthermore, the attackers took advantage of Oracle's capability to store and execute Java source code within the database. By compiling the khunt toolkit directly into the database schema, they bypassed traditional security measures that would typically prevent the execution of unauthorized executables
on the server. Exposure and Affected Environments The attack primarily affected organizations using Oracle databases with vulnerable Java applications exposed to the internet. The specific IP address associated with the attack was traced, but further details regarding the extent of the breach or the number of affected organizations have not been publicly disclosed. Given the nature of the SQL injection vulnerability, any organization that utilizes similar configurations or fails to implement robust input validation measures could be at risk. This incident underscores the importance of securing public-facing applications and databases
Based on observed patterns in recent campaigns, the likely attacker objective is to establish durable access, exploit trust relationships, and later pivot toward higher-value systems. Where specific attribution or tooling data is absent, these details are not publicly disclosed and should be treated as unknown.
SOC Detection and Triage Workflow
against such vulnerabilities. Patch and Mitigation Playbook To mitigate the risks associated with SQL injection vulnerabilities and similar attacks, organizations should adopt the following strategies: Input Validation: Implement strict input validation and sanitization for all user-supplied data to prevent SQL injection attacks. Database Privileges: Limit the privileges of database accounts used in public-facing applications. These accounts should not have the ability to create Java sources or execute unnecessary stored procedures. Regular Audits: Conduct regular security audits and penetration testing to identify and remediate vulnerabilities in applications and databases. Monitoring and
Logging: Enhance monitoring and logging capabilities to detect unauthorized access attempts and anomalous activities within the database. Patch Management: Stay informed about security patches and updates for all software components, including databases and web applications. Security Program Lessons Learned This incident serves as a stark reminder of the vulnerabilities that can exist within enterprise applications and databases. Key lessons include: Importance of Input Sanitization: Ensuring that all user inputs are properly validated is crucial in preventing SQL injection attacks. Database Security Practices: Organizations must implement strict access controls and limit
the capabilities of database accounts, especially those exposed to the internet. Proactive Security Measures: Regular security assessments and updates are vital to maintaining a robust security posture. “Security teams log 54% of successful attacks and alert on just 14%. The rest move through your environment unseen.” Sources For further reading and information, refer to the following sources: Hackers run khunt post-exploitation toolkit from Oracle database CISA warns of hackers exploiting Langflow, N-central, Apache Tomcat flaws COLDCARD security audit phishing attack installs remote access tool Hackers exploited a SQL injection vulnerability
Security engineering teams should validate exploitability across environments, map exposure by asset criticality, and confirm whether available telemetry can detect pre-compromise reconnaissance, exploitation attempts, and post-exploitation behavior.
Engineering Remediation Checklist
to install a post-exploitation toolkit directly inside an Oracle database that was used to breach a corporate network. [...] issue SQL commands to the Oracle database. Huntress traced the malicious requests to the IP address 178.162.151[.]229. After exploiting the SQL injection flaw, the attackers installed a post-exploitation toolkit called khunt directly into the Oracle database as a Java object. Oracle has an embedded Java Virtual Machine and the CREATE JAVA SOURCE statement, which allows Java source code to be stored and compiled as a database schema object. These Java objects
Organizations with internet-facing systems, third-party integrations, or delayed patch cycles generally carry elevated risk. Internal segmentation gaps can increase blast radius if an attacker obtains initial foothold credentials.
Detection and Monitoring Priorities
- Correlate authentication anomalies with unusual process execution and outbound traffic spikes.
- Alert on privilege escalation events, lateral movement indicators, and unauthorized persistence changes.
- Prioritize monitoring of externally exposed services and high-value identity providers.
- Track integrity changes in scripts, scheduled tasks, startup items, and critical configuration files.
- Hunt for command-and-control beaconing patterns and suspicious use of remote administration tools.
Detection coverage should be validated through tabletop simulation or controlled testing to ensure response teams receive actionable, high-confidence alerts quickly.
Mitigation Checklist
- Patch affected services and validate version levels across all environments.
- Restrict exposed management and service ports to trusted networks only.
- Enable detailed logging and alerting for suspicious process or network activity.
- Harden endpoint controls and isolate high-risk systems until remediation completes.
- Conduct post-remediation validation and document residual risk.
Mitigations should be sequenced by risk: immediately reduce exposed attack surface, then remove persistence opportunities, and finally harden architecture to prevent recurrence.
Incident Response and Recovery Planning
- Establish a clear incident commander and communication cadence across security, IT, and leadership.
- Capture and preserve relevant logs and forensic artifacts before major containment changes.
- Contain compromised accounts and hosts, then execute structured eradication with validation checkpoints.
- Document lessons learned and implement control improvements with owner accountability and timelines.
Recovery should include business continuity planning, legal or regulatory assessment where required, and transparent stakeholder updates based on verified facts.
Validation and Follow-through
can then be executed via SQL commands, which if configured to do so, can execute commands on the host This report consolidates available public details and highlights where evidence is still limited, helping teams prioritize immediate defensive action while additional technical indicators are collected. operating system. The attackers abused this functionality to compile and store the khunt toolkit directly inside the Oracle database rather than deploying them as executable files on the server. "The use of the technique in the wild has rarely been documented," Huntress said . The toolkit
contained multiple Java components and PL/SQL wrappers that could execute commands, steal credentials, and manage files. The attackers used KhuntCmd to run cmd.exe /c whoami, confirming that commands executed through the Oracle database had SYSTEM-level permissions on the Windows server. They then used PowerShell and Windows utilities to copy the SAM, SECURITY, and SYSTEM registry hives, which can be used to recover password hashes for local Windows accounts. The attackers also ran tasklist /svc to enumerate running services and saved the output to khunttasks.txt. Huntress said the registry hives were
Security leaders should align technical remediation with stakeholder communication, incident readiness, and continuous monitoring to reduce repeat exposure.