Detection: PaperCut NG Suspicious Behavior Debug Log

EXPERIMENTAL DETECTION

This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

The following analytic identifies potential exploitation attempts on a PaperCut NG server by analyzing its debug log data. It detects unauthorized or suspicious access attempts from public IP addresses and searches for specific URIs associated with known exploits. The detection leverages regex to parse unstructured log data, focusing on admin login activities. This activity is significant as it can indicate an active exploitation attempt on the server. If confirmed malicious, attackers could gain unauthorized access, potentially leading to data breaches or further compromise of the server.

 1`papercutng` (loginType=Admin OR userName=admin) 
 2| eval uri_match=if(match(_raw, "(?i)(\/app\?service=page\/SetupCompleted
 3|\/app
 4|\/app\?service=page\/PrinterList
 5|\/app\?service=direct\/1\/PrinterList\/selectPrinter&sp=l1001
 6|\/app\?service=direct\/1\/PrinterDetails\/printerOptionsTab\.tab)"), "URI matches", null()) 
 7| eval ip_match=if(match(_raw, "(?i)((25[0-5]
 8|2[0-4][0-9]
 9|[01]?[0-9][0-9]?)\.(25[0-5]
10|2[0-4][0-9]
11|[01]?[0-9][0-9]?)\.(25[0-5]
12|2[0-4][0-9]
13|[01]?[0-9][0-9]?)\.(25[0-5]
14|2[0-4][0-9]
15|[01]?[0-9][0-9]?))") AND NOT match(_raw, "(?i)(10\.(25[0-5]
16|2[0-4][0-9]
17|[01]?[0-9][0-9]?)\.(25[0-5]
18|2[0-4][0-9]
19|[01]?[0-9][0-9]?)\.(25[0-5]
20|2[0-4][0-9]
21|[01]?[0-9][0-9]?))
22|(172\.(1[6-9]
23|2[0-9]
24|3[0-1])\.(25[0-5]
25|2[0-4][0-9]
26|[01]?[0-9][0-9]?)\.(25[0-5]
27|2[0-4][0-9]
28|[01]?[0-9][0-9]?))
29|(192\.168\.(25[0-5]
30|2[0-4][0-9]
31|[01]?[0-9][0-9]?)\.(25[0-5]
32|2[0-4][0-9]
33|[01]?[0-9][0-9]?))"), "IP matches", null()) 
34| where  (isnotnull(uri_match) OR isnotnull(ip_match)) 
35| stats sparkline, count, values(uri_match) AS uri_match, values(ip_match) AS ip_match latest(_raw) BY host, index, sourcetype 
36| `papercut_ng_suspicious_behavior_debug_log_filter`

Data Source

No data sources specified for this detection.

Macros Used

Name Value
papercutng sourcetype="papercutng"
papercut_ng_suspicious_behavior_debug_log_filter search *
papercut_ng_suspicious_behavior_debug_log_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1190 Exploit Public-Facing Application Initial Access
T1133 External Remote Services Initial Access
Delivery
Installation
DE.AE
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event False
This configuration file applies to all detections of type hunting.

Implementation

Debug logs must be enabled and shipped to Splunk in order to properly identify behavior with this analytic.

Known False Positives

False positives may be present, as this is based on the admin user accessing the Papercut NG instance from a public IP address. Filter as needed.

Associated Analytic Story

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit Passing Dataset papercutng papercutng
Integration ✅ Passing Dataset papercutng papercutng

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 4