CVE-2023-36192

7.8 HIGH

📋 TL;DR

CVE-2023-36192 is a heap buffer overflow vulnerability in sngrep v1.6.0 that allows attackers to execute arbitrary code or cause denial of service by sending specially crafted packets. This affects users running sngrep for SIP protocol analysis and packet capture. The vulnerability resides in the capture_ws_check_packet function in /src/capture.c.

💻 Affected Systems

Products:
  • sngrep
Versions: v1.6.0
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects sngrep when actively capturing packets via its WebSocket interface.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the sngrep process, potentially leading to full system compromise.

🟠

Likely Case

Application crash causing denial of service for SIP monitoring functionality.

🟢

If Mitigated

Limited impact if sngrep runs with minimal privileges and network exposure is restricted.

🌐 Internet-Facing: MEDIUM - Requires network access to sngrep's capture interface, but exploitation depends on specific packet handling.
🏢 Internal Only: MEDIUM - Internal attackers could exploit if they can send packets to the sngrep instance.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending specially crafted packets to the vulnerable function, but no public exploit code is available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.6.1 or later

Vendor Advisory: https://github.com/irontec/sngrep/issues/438

Restart Required: Yes

Instructions:

1. Check current version with 'sngrep --version'. 2. Update using package manager: 'sudo apt update && sudo apt upgrade sngrep' (Debian/Ubuntu) or compile from source at https://github.com/irontec/sngrep. 3. Restart any running sngrep processes.

🔧 Temporary Workarounds

Disable packet capture

linux

Stop using sngrep for live packet capture until patched

killall sngrep
systemctl stop sngrep

Network isolation

linux

Restrict network access to sngrep's capture interface

iptables -A INPUT -p tcp --dport 8080 -j DROP
ufw deny 8080

🧯 If You Can't Patch

  • Run sngrep with minimal privileges using non-root accounts
  • Implement network segmentation to isolate sngrep from untrusted networks

🔍 How to Verify

Check if Vulnerable:

Run 'sngrep --version' and check if output shows version 1.6.0

Check Version:

sngrep --version

Verify Fix Applied:

Run 'sngrep --version' and confirm version is 1.6.1 or higher

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault or crash logs from sngrep process
  • Unexpected process termination of sngrep

Network Indicators:

  • Unusual traffic patterns to sngrep's default port (8080)
  • Malformed SIP packets targeting the capture interface

SIEM Query:

process_name="sngrep" AND (event_type="crash" OR exit_code="139")

🔗 References

📤 Share & Export