Docsity

Splunk RCE - remote code execution, Traduções de Segurança de Informação e Linguagem de Marcação

Pré-visualização parcial do texto

Baixe Splunk RCE - remote code execution e outras Traduções em PDF para Segurança de Informação e Linguagem de Marcação, somente na Docsity!

CVE-2023-

RCE in Splunk

Enterprise

for SOC Analysts

OF CONTENTS

TABLE

Alert

Detection

Analysis

Containment

Appendix

Author: Muhammet Donmez
Detection

Verify As can be seen above, the relevant request came at “12:23 PM”. It was seen that the relevant request came from the IP address “180.101.88.240” located in China. As a result of the investigations carried out so far, it has been confirmed that there was an attempt to upload files to the system. Therefore the corresponding alarm is True Positive. However, in order to make a clear decision, it is necessary to examine the content of the file being tried to be uploaded. Relevant files have been shared for download in detail of the alarm. The alarm was triggered as a result of trying to upload the file named "shell.xsl" on Splunk in the request coming to the system. Below is the request that triggered the alarm. The relevant request can be searched and confirmed on Log Management. RequestURL: http[:]//3.133.116.124:8000/en-US/splunkd/__upload/ indexing/preview?output_mode=json&props.NO_BINARY_CHECK=1&input.path= shell.xsl

Analysis

Reputation Check https://www.abuseipdb.com/check/180.101.88. While uploading the file, the reputation of "180.101.88.240" seen in the Source IP should be checked.

Initial Access Source: https://advisory.splunk.com/advisories/SVD-2023- When a detailed POC examination was performed for the relevant vulnerability, it was seen that the attacker needed a few prerequisites to exploit the relevant vulnerability in the target system. The first and important prerequisite is accessibility to the target system. So, as here, the target system must have access to 3.133.116.124 (Splunk IP) Remote or the information must have been compromised by someone who has accessed it. For example, let access to Splunk remote be disabled.However,remoteaccesstothesystemshouldbepossiblewithVPN.The VPN information of the person(s) accessing here must be leaked. So here it is less likely that the target system is open to remote. To test this, access can be attempted via port 8000 of the relevant IP. As a result of the relevant control, access to Splunk could not be achieved, as can be seen below. When we search for "Splunk App for Lookup File Editing RCE via User XSLT" on Google, we come across the CVE-2023-46214 vulnerability. In the details of the relevant vulnerability, it was shared that in vulnerable versions, attackers can upload the malicious "XSLT" file to the target systems, which will allow remote code execution (RCE) on the target system. Before starting the analysis, the details of the RCE that the attacker tried on the system should be investigated. Which vulnerability on the system should the relevant RCE arise from? If this question is understood, investigations will become easier. There is a detail shared as a real-world example in the alert details.

The above file is apparently a Bash reverse shell command. This command is used to create a shell on a target system and direct that shell as a reverse connection to the specified IP address and port number. Creates a TCP connection using Bash's It is understood from here that access to the target system was achieved through other means. The system was accessed with the credentials of others (3rd party company employees), which is one of the most commonly used methods by attackers. Thus, “Trusted Relationship(T1199)” can be said for access initial. In addition, a second initial access technique can be called "Exploit Public-Facing Application". Because the attacker exploited the vulnerability in Splunk to gain access to the system. The second important point to exploit the vulnerability is the credential information of the user who is authorized to log in to the target system. After the attacker logs into the target system with the Python code he will run, he leaves “shell.sh” in the “/opt/splunk/bin/scripts/” file path. The content of the relevant file is among the files shared in the alert details and can be viewed from there.

The relevant IP can be searched in Endpoint Security to confirm. As a result, it appears that the relevant IP belongs to the “Splunk Enterprise” host. In the alarm details, "172.16.20.13" is seen as the destination IP. If the IP 18.219.80.54 belongs to Splunk, what is this IP? This IP is Splunk's local IP. In the details of the proxy logs, it is seen as the client for this IP. While examining Log Management, it is necessary to search according to the relevant local IP. Because the attacker's behavior after receiving a Reverse Shell on the target system should also be examined. For this reason, it is expected that the relevant logs appear on local IP.

Add User As can be seen above, when searching for IP 172.16.20.13, there are OS, DNS and Firewall logs after the proxy logs. Continuing the analysis by time, it is seen that the attacker logged in with “admin” at 12:24 PM. In the following OS log, it is seen that the attacker added users to gain permanence on the system.

Containment

The attacker's attempt to upload "shell.xsl" to the system to exploit the "CVE-2023- 46214" vulnerability on Splunk was detected in the proxy logs. Afterwards, it was observed that the attacker received a reverse shell. Therefore, it is recommended to isolate the system from the network. The relevant operation can be done on Endpoint Security as follows.

Appendix
Lesson Learned

● Productsshouldbekeptup-to-datetoavoidbeingaffectedbyvulnerabilities. ● It is recommended not to open Splunk to Remote to avoid being affected by vulnerabilities. ● Accessgivento3rdpartycompaniesshouldberestricted. ● Training should be provided periodically to increase information security awareness among users. ● Detection rules can be written in security products for IOCs reported with relevant vulnerabilities. MITRE