DEV Community

Lia
Lia

Posted on

How to Set Up SafeLine for a Ransomware Initial Access Investigation Using Web Request Logs

When ransomware is discovered, security owners need to determine whether a public web application provided the initial foothold. An attacker might exploit a vulnerable endpoint, abuse an upload function, or use stolen credentials before moving deeper into the environment. Web requests can help reconstruct that entry path, but an exploit attempt alone does not establish that the attacker succeeded.

This setup guide combines SafeLine deployment with an investigation checklist. SafeLine is a self-hosted web application firewall that filters and monitors HTTP traffic in front of an application. Its documented protections include attacks such as SQL injection, command injection, and path traversal. These capabilities support web attack defense, but they do not establish the cause of a ransomware incident. Source: SafeLine overview

1. Preserve existing evidence and define the investigation window

Before changing traffic routing, preserve existing reverse proxy, application, authentication, and host logs. Record their time zones, clock differences, retention periods, and known gaps. Keep original copies and perform analysis on working copies.

Start with the earliest confirmed malicious activity and work backward. Identify which public applications were reachable during that period, including administrative interfaces and upload endpoints. A newly deployed WAF cannot reconstruct requests that arrived before deployment.

Decide which questions the evidence must answer: Was a suspicious request delivered? Did the application process it? Did a process start, a file appear, or an account session begin afterward?

2. Check the deployment host and install SafeLine

The official installation guide lists Linux, Docker 20.10.14 or later, Docker Compose 2.0.0 or later, and minimum resources of one CPU core, 1 GB of memory, and 5 GB of disk. It also lists architecture and CPU requirements, which should be checked against the selected host. Source: installation guide

Use the current installation procedure in that guide. Its automated installation requires root privileges, so review the procedure through your normal administrative change process before running it.

After installation, the documented console address is https://<safeline-ip>:9443/. Retrieve the administrator credentials with the documented command:

docker exec safeline-mgt resetadmin
Enter fullscreen mode Exit fullscreen mode

Store the resulting credentials securely and restrict administrative access. The console address and credential command are documented in the installation guide.

3. Configure the application traffic path

In the SafeLine console, open Applications, select Add Application, and enter the application's domain, listening port, and upstream address. For HTTPS applications, the guide instructs users to select the SSL option. Then resolve the application domain to the SafeLine server's IP address. SafeLine acts as an HTTP/HTTPS reverse proxy and forwards traffic to the configured upstream. Source: application configuration

Verify ordinary application behavior after the routing change: login, essential API calls, uploads, and business transactions. Separately check whether clients can still reach the origin directly. Any alternate public route creates a visibility gap for an investigation based on traffic passing through the WAF.

Record the activation time. Keep historical incident evidence separate from requests observed after this change.

4. Validate blocking and inspect the documented attack details

On an application you are authorized to test, use a controlled test based on the official configuration guide. That guide provides sample attack requests and describes checking the blocking page, viewing the console attack list, and opening an entry's detail view. Source: application testing

Confirm that the test produces the expected result, then inspect which information your deployed version actually presents. The supplied documentation establishes an attack list and detail view; it does not establish a complete request archive, export format, retention period, or SIEM integration. Plan evidence collection around verified capabilities and retain application-side logs independently.

5. Correlate requests with application and host evidence

Build a timeline from the records available across your systems. Where recorded, compare timestamps, requested paths, HTTP methods, response codes, client addresses, and request identifiers. Treat client addresses cautiously when proxies are involved, and avoid copying credentials or session tokens into investigation notes.

Look for sequences rather than isolated payloads. An attacker may probe multiple paths, submit an exploit, and then repeatedly access a newly created endpoint. A suspicious upload followed by requests to an unexpected script warrants checking filesystem changes and application processes. Repeated login failures followed by a successful session warrants reviewing account activity and session creation.

Make each decision explicit. A blocked request demonstrates a defensive action for that request. A successful HTTP response requires further examination. A corresponding file creation or unexpected child process provides stronger evidence of execution. If compromise is confirmed, isolate affected systems through the incident response process and address the vulnerable application or compromised account before restoring access.

Does a blocked exploit request prove ransomware initial access?

No. It records an attempted action and its observed handling. Establish initial access by correlating it with evidence such as application execution, unauthorized sessions, or host changes.

Can SafeLine recover requests from before installation?

Do not assume it can. Investigate earlier activity using existing logs, backups, and other retained evidence. Record exactly when the new traffic path became active.

Should every suspicious request trigger an IP block?

Assess context first. Shared addresses and proxy infrastructure can make address-based decisions imprecise. Also check the targeted endpoint, account activity, repetition, and evidence of execution.

What should the investigation handoff contain?

Provide a timestamped timeline, preserved evidence locations, affected applications and accounts, confirmed findings, unresolved gaps, and containment actions. Distinguish attempted exploitation from confirmed compromise so responders can make defensible recovery decisions.


SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.

Top comments (0)