<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Splunk on Alexander Roca</title><link>https://alexanderroca.dev/tags/splunk/</link><description>Recent content in Splunk on Alexander Roca</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 22 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://alexanderroca.dev/tags/splunk/index.xml" rel="self" type="application/rss+xml"/><item><title>Brains Write-up</title><link>https://alexanderroca.dev/tactics/brains-write-up/</link><pubDate>Fri, 22 May 2026 00:00:00 +0000</pubDate><guid>https://alexanderroca.dev/tactics/brains-write-up/</guid><description>The main objective is to find how an attacker exploited the server and afterwards make a forensic examination of the host to identify the attacker&amp;#39;s footprints at the post-exploitation stage.</description><content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/brains">🔗 Room Link</a></p>
<p><strong>Difficulty:</strong> Easy<br>
<strong>Tags:</strong> CTF, Remote Code Execution, Forensic, Splunk<br>
<strong>Target IP:</strong> <code>10.113.190.140</code></p>
<h1 id="objective">Objective</h1>
<p>The main objective is to determine how an attacker exploited the server and subsequently perform a forensic examination of the host to identify the attacker&rsquo;s footprints during the post-exploitation stage.</p>
<h1 id="exploiting-the-server">Exploiting the Server</h1>
<h2 id="reconnaissance--enumeration">Reconnaissance &amp; Enumeration</h2>
<h3 id="scanning-services">Scanning Services</h3>
<p>Making a quick scan of the target would be useful to get more context of our scenario and to verify which services are available using <code>nmap 10.113.190.140</code></p>
<p><strong>Discovered services:</strong>
<img alt="1" loading="lazy" src="/images/tactics/brains/1.png"></p>
<ul>
<li><code>ssh</code></li>
<li><code>http</code></li>
<li><code>ibm-db2</code></li>
</ul>
<blockquote>
<p><code>ibm-db2</code> is a family of relational database products from <strong>IBM</strong> for storing, managing, and analyzing structured data.</p>
</blockquote>
<p>Using <code>nmap -p 50000 --script db2-das-info -sV 10.113.190.140</code> confirms the DB2 listener details to identify what host, port, and features are used to authenticate with a DB2 Client.</p>
<p><img alt="2" loading="lazy" src="/images/tactics/brains/4.png"></p>
<p>Looking at the output, we can extract the port <em>50000</em> is speaking <strong>HTTP</strong> and identifies a path to login manually to <code>/login.html</code> page.</p>
<h3 id="initial-access">Initial Access</h3>
<p>Examining the <code>http</code> service using a web browser to gather more information: <code>http://10.113.190.140</code>
<img alt="3" loading="lazy" src="/images/tactics/brains/2.png"></p>
<p>Upon visiting the homepage and inspecting the <strong>Page Source</strong>, anything relevant was found.</p>
<p>Examining the <code>ibm-db2</code> service (which is actually running a web interface) using the web browser: <code>http://10.113.190.140:50000/login.html</code>
<img alt="4" loading="lazy" src="/images/tactics/brains/5.png"></p>
<p>The service is operating an old version <code>2023.11.3 (build 147512)</code></p>
<h3 id="directory-bruteforcing">Directory Bruteforcing</h3>
<h4 id="http-service">HTTP Service</h4>
<p>Using <code>gobuster</code> with a standard wordlist to find hidden directories and files:
<code>gobuster dir -u http://10.113.190.140 -x php,txt,html -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</code></p>
<p><strong>Discovered Paths:</strong>
<img alt="5" loading="lazy" src="/images/tactics/brains/3.png"></p>
<p>Nothing significant was revealed.</p>
<h4 id="ibm-db2-service">IBM-DB2 Service</h4>
<p>Using <code>gobuster</code> with a standard wordlist to find hidden directories and files on the specific port:
<code>gobuster dir -u http://10.113.190.140:50000 -x php,txt,html -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</code></p>
<p><strong>Discovered Paths</strong>:
<img alt="6" loading="lazy" src="/images/tactics/brains/6.png"></p>
<ul>
<li><code>login.html</code></li>
<li><code>400.html</code></li>
<li><code>forgotPassword.html</code></li>
<li><code>resetPassword.html</code></li>
</ul>
<h3 id="vulnerability-research">Vulnerability Research</h3>
<p>Searching for a vulnerability for the specific version <code>2023.11.3</code> in <strong>JetBrains</strong> products.
<img alt="7" loading="lazy" src="/images/tactics/brains/7.png"></p>
<p>There is an identified critical authentication bypass vulnerability tracked as <a href="https://nvd.nist.gov/vuln/detail/cve-2024-27198">CVE-2024-27198</a> an allows performing admin actions.</p>
<h2 id="exploitation">Exploitation</h2>
<h3 id="command-execution--remote-code-execution">Command Execution &amp; Remote Code Execution</h3>
<p>Knowing there is a specific vulnerability to perform admin actions implies we will be able to execute code remotely. To make the exploitation process quick, <code>Metasploit</code> will help to automate the entire process. Launch <code>msfconsole</code></p>
<h4 id="step-1-select-exploit-module">Step 1: Select Exploit module</h4>
<p>Searching for the specific exploit module, <code>search cve:2024-27198</code>
<img alt="8" loading="lazy" src="/images/tactics/brains/8.png"></p>
<p>Select the exploit,<code>exploit/multi/http/jetbrains_teamcity_rce_cve_2024_27198</code>
<img alt="9" loading="lazy" src="/images/tactics/brains/9.png"></p>
<h4 id="step-2-execute-the-payload">Step 2: Execute the payload</h4>
<p>Firstly, examining the required options to be filled in, <code>show options</code>
<img alt="10" loading="lazy" src="/images/tactics/brains/10.png"></p>
<p>The required options in this scenario are:</p>
<ul>
<li><code>RHOSTS</code></li>
<li><code>RPORT</code></li>
</ul>
<p>Insert the needed values use <code>set RHOSTS 10.113.170.99</code> and <code>set RPORT 50000</code> and verify that are correctly selected using <code>show options</code> again.
<img alt="11" loading="lazy" src="/images/tactics/brains/11.png"></p>
<p>Verify if the target is vulnerable after setting the options using <code>check</code>, then run the exploit with <code>run</code>
<img alt="12" loading="lazy" src="/images/tactics/brains/12.png"></p>
<h4 id="step-3-environment-check">Step 3: Environment Check</h4>
<p>Execute basic commands to understand the environment:</p>
<ul>
<li><code>whoami</code></li>
<li><code>pwd</code></li>
<li><code>ls</code>
<img alt="13" loading="lazy" src="/images/tactics/brains/13.png"></li>
</ul>
<p>The flag is mentioned to be in the home flag. Therefore, navigate to the specific folder using <code>cd /home</code> and <code>ls ubuntu</code>
<img alt="14" loading="lazy" src="/images/tactics/brains/14.png"></p>
<p>Read the content of the file <code>flag.txt</code> using <code>cat ubuntu/flag.txt</code>
<img alt="15" loading="lazy" src="/images/tactics/brains/15.png"></p>
<p><strong>Output:</strong><code>THM{faa9bac345709b6620a6200b484c7594}</code></p>
<blockquote>
<p><strong>Home folder flag Found:</strong><code>THM{faa9bac345709b6620a6200b484c7594}</code></p>
</blockquote>
<h1 id="investigation">Investigation</h1>
<p>The IT department has provided the compromised server. The goal is to identify the attacker&rsquo;s footprints in the post-exploitation stage. <strong>Splunk</strong> will be the first place to delve into the scenario.</p>
<ul>
<li>Username: <code>splunk</code></li>
<li>Password: <code>analyst123</code></li>
</ul>
<h2 id="splunk-examination">Splunk Examination</h2>
<h3 id="malicious-user">Malicious User</h3>
<p>Access Splunk using the following URL, <code>http://10.114.181.179:8000</code>
<img alt="16" loading="lazy" src="/images/tactics/brains/16.png"></p>
<p>It is required to explore the <code>Search &amp; Reporting</code> app to investigate the logs from the <code>brains</code> service. Select the option <code>Data Summary</code> to extract all the entrances classified by specific criteria.
<img alt="17" loading="lazy" src="/images/tactics/brains/17.png"></p>
<p>Since the attacker has been authorized as a <code>root</code> all the authentication logs are stored in <code>auth.log</code>
<img alt="18" loading="lazy" src="/images/tactics/brains/18.png"></p>
<p>Display all records captured from <code>auth.log</code> by selecting the time frame as <code>All time</code>
<img alt="19" loading="lazy" src="/images/tactics/brains/19.png"></p>
<p>Since the next flag mentions <strong>user</strong>, looking at the section called <code>INTERESTING FIELDS</code> does not mention anything about <code>name</code> or <code>user</code> initially, but there is an option to select <code>more fields</code>
<img alt="20" loading="lazy" src="/images/tactics/brains/20.png"></p>
<p>In the <code>Field</code> column there is an instance called <code>name</code>. By displaying the field, there is an interesting line that mentions the user.
<img alt="21" loading="lazy" src="/images/tactics/brains/21.png"></p>
<blockquote>
<p><strong>Name of the backdoor user which was created on the server after exploitation:</strong> <code>eviluser</code></p>
</blockquote>
<p>By including the filter of the known malicious user, we can identify the day of the attack.
<img alt="22" loading="lazy" src="/images/tactics/brains/22.png"></p>
<p>It is vital to inspect <code>7/14/24</code></p>
<h3 id="malicious-package">Malicious Package</h3>
<p>Within the <code>Data Summary</code>, the <code>Sourcetypes</code> section mentions <code>packages</code>. Therefore, the next step is to review its content. Before anything, apply an advisable filter to reduce the entrances by selecting <code>Date &amp; Time Range</code> and specifying the date <code>07/14/2024</code>
<img alt="23" loading="lazy" src="/images/tactics/brains/23.png"></p>
<p>Now there are all the instances with the source type <code>packages</code> that were registered in the system before <code>7/24/24</code>
<img alt="24" loading="lazy" src="/images/tactics/brains/24.png"></p>
<p>The first instance contains a suspicious name called <code>datacollector</code></p>
<blockquote>
<p><strong>Name of the malicious-looking package installed on the server</strong>: <code>datacollector</code></p>
</blockquote>
<h3 id="plugin-installed">Plugin Installed</h3>
<p>To look for the malicious plugin, it is mandatory to first review the service that was attacked. It is called <code>teamcity</code>. Therefore, look in the <code>Data Summary</code> within the <code>Sources</code> section where  <code>teamcity-activities.log</code>.</p>
<p>Repeating the same temporal criteria as for the malicious package and apply an additional filter <code>*plugin*</code>. The entries generated by Splunk will be the most relevant to inspect based on the scenario.
<img alt="25" loading="lazy" src="/images/tactics/brains/25.png"></p>
<p>Looking at the first instance it reveals a bizarre name <code>AyzzbuXY</code> and it is a <code>zip</code> file. This is the plugin.</p>
<blockquote>
<p><strong>Name of the plugin installed on the server after successful exploitation:</strong> <code>AyzzbuXY.zip</code></p>
</blockquote>
<h1 id="conclusion">Conclusion</h1>
<p>By scanning the IP, identifying the service on port <code>50000</code> as a <strong>JetBrains TeamCity</strong> instance, and exploiting a known vulnerability (<strong>CVE-2024-27198</strong>) that allows a remote code execution as the root user, we successfully retrieved the initial flag.</p>
<p>By accessing Splunk to review <code>Data Summary</code> where was registered the authentication and TeamCity service activities were registered as logs, we successfully retrieved the forensic flags.</p>
<h1 id="mitigations-and-remediations">Mitigations and Remediations</h1>
<p>To prevent these specific vulnerabilities in a production environment, the following measures should be implemented:</p>
<ol>
<li><strong>Patch Management</strong>: immediately update JetBrains TeamCity to the latest version to mitigate known CVEs like CVE-2024-27198.</li>
<li><strong>Network Segmentation</strong>: restrict access to administrative interfaces (like TeamCity login page) to trusted IP ranges only, rather than exposing them publicly.</li>
<li><strong>Log Monitoring &amp; SIEM</strong>: implement robust logging and real-time monitoring (like Splunk) to detect anomalous user creation, suspicious package installations, and unauthorized plugin activity.</li>
<li><strong>Principle of Least Privilege</strong>: ensure that services do not run with unnecessary root privileges and that user accounts are strictly controlled.</li>
</ol>
<h2 id="final-answers">Final Answers</h2>
<ol>
<li><strong>Home folder flag:</strong> <code>THM{faa9bac345709b6620a6200b484c7594}</code></li>
<li><strong>Name of the backdoor user which was created on the server after exploitation:</strong> <code>eviluser</code></li>
<li><strong>Name of the malicious-looking package installed on the server</strong>: <code>datacollector</code></li>
<li><strong>Name of the plugin installed on the server after successful exploitation:</strong> <code>AyzzbuXY.zip</code></li>
</ol>
]]></content:encoded></item></channel></rss>