CVE-2025-64328 Splunk · SPL

Detect Sangoma FreePBX OS Command Injection (CVE-2025-64328) in Splunk

Detects exploitation of an OS command injection vulnerability in Sangoma FreePBX. An authenticated or unauthenticated attacker may inject arbitrary OS commands through vulnerable FreePBX web interfaces or API endpoints, leading to remote code execution on the underlying Linux host. This vulnerability is tracked as CVE-2025-64328 and is listed in CISA's Known Exploited Vulnerabilities catalog.

MITRE ATT&CK

Tactic
Initial Access Execution Persistence

SPL Detection Query

Splunk (SPL)
spl
index=linux sourcetype IN ("linux_audit", "syslog", "auditd") 
("asterisk" OR "freepbx" OR "amportal" OR "httpd" OR "apache2")
| eval suspicious_cmd=if(match(process, "(wget|curl|chmod\s+[0-7]+|bash\s+-i|/dev/tcp|python\s+-c|perl\s+-e|nc\s+-e|mkfifo|base64\s+-d|socat|id;|whoami;|ncat)"), 1, 0)
| where suspicious_cmd=1
| eval parent_suspicious=if(match(parent_process, "(asterisk|freepbx|amportal|httpd|apache2|nginx|php)"), 1, 0)
| where parent_suspicious=1
| table _time, host, user, process, parent_process, dest
| sort - _time
critical severity high confidence

Detects suspicious shell commands spawned from FreePBX/Asterisk parent processes on Linux hosts using audit logs, indicating potential OS command injection.

Data Sources

Linux Audit DaemonSyslogAuditd

Required Sourcetypes

linux_auditsyslogauditd

False Positives & Tuning

  • Legitimate administrative scripts executed under asterisk service context
  • FreePBX module installation or upgrade processes that invoke shell utilities
  • Monitoring agents or health-check scripts running in the context of the PBX service user

Other platforms for CVE-2025-64328


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1FreePBX OS Command Injection via Admin Web Interface Parameter

    Expected signal: Linux audit log entry for execve of 'id' with ppid mapping to httpd/apache2; DeviceProcessEvents showing id or sh spawned from apache2 parent process

  2. Test 2Reverse Shell Establishment via FreePBX Command Injection

    Expected signal: DeviceNetworkEvents showing outbound TCP connection from FreePBX host to ATTACKER_IP:4444 initiated by bash process with asterisk user context; auditd execve of bash with -i flag

  3. Test 3Post-Exploitation Persistence via Cron Job Implant

    Expected signal: File creation or modification event for /var/spool/cron/asterisk; auditd SYSCALL write to cron spool directory by asterisk UID

  4. Test 4Web Shell Deployment Following FreePBX Command Injection

    Expected signal: File creation event for shell.php in FreePBX web root directory with www-data initiating process; subsequent HTTP GET request to shell.php with cmd parameter; DeviceProcessEvents showing id spawned from httpd/apache2

Unlock Pro Content

Get the full detection package for CVE-2025-64328 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections