TLP-WHITE

Logo

Walkthroughs, challenges, and examples of host compromises

View My GitHub Profile

Exercise: WebShell - Solution

Date: 09/08/2020

Attacker IP addresses?

There are 2: 86.168.182[.]25 - This is used for web site recon 86.168.182[.]10 - Used for remote access

Attacker User Agent string?

There are 2:

What was the vulnerable web page?

upload.aspx

The last 10 rows in the iis.log shows interactions with upload.aspx. This differs from the recon activity. It is likely this was used by the attacker to gain a foothold.

Name of malicious file uploaded?

iis.aspx was one malicious file uploaded. This file wasn’t detected as part of the recon, thus it can be concluded that this was uploaded. A filesystem check would detect the creation date.

We know that from the sysmon log at 12:42 cmd.exe /c net user was invoked, parent process w3wp.exe (IIS). However the IIS log doesn’t have accurate timestamps. An assumption that this was a webshell being invoked.

What tools were uploaded onto the server?

Check sysmon log

What was the utility of the tools?

Using sysmon log, hashes are captured [event record ID 1076].

808502752CA0492ACA995E9B620D507B jp.exe [JuicyPotato], a local privilege escalation tool. Search this hash reveals that this is a common technique. FoxKitten

pe-shell.bat was likely used to launch shell2.ps1. This created a remote PowerShell session to the attacker machine [reverse shell].

Were any changes made to the server i.e. config changes to accounts etc?

There was an attempt to add a user to the local administrators group - sysmon eventID 1086. This doesn’t appear have been successful, as there were no account creation events in the security audit log.

Two files added to c:\logs folder, pe-shell.bat and jp.exe

We noticed a lot of random http requests in the log. What tool was used?

The IIS log shows enumeration activity against the web site. This is the recon stage and is designed to understand the implementation of the web site, specifically for vulnerabilities. The tool used is burpsuite. In the log there are a number of references to burpcollaborator[.]net. Look up this domain:

“Burp Collaborator Server

Burp Collaborator is a service that is used by Burp Suite when testing web applications for security vulnerabilities.”

Any recommendations to harden the host?

What information was gathered?

Method of attack (ATT&CK technique)

Establish time line of events

timeline

What IoCs could be used?

Attacker IPs:

Tools hashes:

Filenames:

Note, filenames could result in false positives.

Username - attempt at adding to local group:

What SIEM correlation rules could be used to detect the attack earlier?

Produce an incident report detailing the attack and recommendations.

Incident report would summarise the above, covering the facts and observed events. Usually there would be a prioritisation applied, however this is determined by the organisation i.e. severity of incident based on impact etc, P1, P2, P3 would be designated and have different response times, i.e. P1 would be a high severity, and could require urgent intervention.

Incident Summary

Date/Time of Incident

Detection

Indicators of Compromise

Status/Stage

Impact

Incident Category

Assets Affected

Recommendations/Response

Source Data The following raw event generated the SIEM alert

event

References