<?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 Fidan Valieva on Medium]]></title>
        <description><![CDATA[Stories by Fidan Valieva on Medium]]></description>
        <link>https://medium.com/@fvliyeva465?source=rss-9d24db282be4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Fidan Valieva on Medium</title>
            <link>https://medium.com/@fvliyeva465?source=rss-9d24db282be4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 02:03:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fvliyeva465/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[Static Malware Analysis on Windows: A Beginner-Friendly Guide]]></title>
            <link>https://medium.com/@fvliyeva465/static-malware-analysis-on-windows-a-beginner-friendly-guide-566e8a256ada?source=rss-9d24db282be4------2</link>
            <guid isPermaLink="false">https://medium.com/p/566e8a256ada</guid>
            <dc:creator><![CDATA[Fidan Valieva]]></dc:creator>
            <pubDate>Wed, 28 May 2025 05:18:55 GMT</pubDate>
            <atom:updated>2025-05-28T05:18:55.754Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we’re going to talk about <strong>static malware analysis</strong>, especially how it’s done on <strong>Windows systems</strong>. But before we dive in, let’s first understand what static analysis means and how it’s different from dynamic analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*1m4xtvRlimJQkAV0JStG_g.png" /></figure><p><strong>Static analysis</strong> is the process of examining a suspicious file <strong>without running it</strong>. Instead of executing the file, we look at its contents — like the code, file structure, and hidden strings — to figure out what it might do. This is a safer way to learn about malware without letting it actually harm your system.</p><p>On the other hand, <strong>dynamic analysis</strong> means running the file in a controlled environment (like a virtual machine) and watching what it does — such as creating new files, connecting to the internet, or changing system settings.</p><p>Both static and dynamic analysis are important, but static analysis is usually the <strong>first step</strong>, because it helps us get a quick idea of how the malware works and what to look out for — without taking the risk of executing it.</p><blockquote><strong>Identifying The File Type</strong></blockquote><p>Before analyzing a suspicious file, it’s important to know <strong>what kind of file you’re dealing with</strong>. Is it an executable (EXE)? A script? A document file? Knowing the file type helps you choose the right tools and approach for analysis.</p><p>Even if a file has a misleading extension (like .pdf.exe), you can still determine its actual type using tools that look at the file’s <strong>magic bytes</strong>—a signature stored at the beginning of the file.</p><p>We can use a tool like <strong>CFF Explorer</strong>, to check the type of a suspicious file. On Windows systems, one of the quickest ways to identify an executable is by looking at its <strong>first two bytes</strong>. If the file starts with the ASCII characters <strong>&quot;MZ&quot;</strong> (or <strong>4D 5A</strong> in hexadecimal), it usually means it&#39;s a Windows <strong>executable file</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*gZ8LfdJFQZwxnjVpKav41Q.png" /></figure><blockquote><strong>Malware Fingerprinting</strong></blockquote><p>Once we’ve identified the file type, the next step is to generate a <strong>unique fingerprint</strong> for the malware sample. This fingerprint is usually a <strong>cryptographic hash</strong>, such as <strong>MD5</strong>, <strong>SHA-1</strong>, or <strong>SHA-256</strong>. These hashes help uniquely identify files, even if just one byte is changed.</p><p>Fingerprinting serves several important purposes:</p><p><strong>Identify and track</strong> different malware samples</p><p><strong>Scan other systems</strong> to detect if the same malware exists elsewhere</p><p><strong>Verify past analysis</strong> to see if this sample has already been encountered</p><p><strong>Share as IOCs</strong> (Indicators of Compromise) with security teams, organizations, or threat intelligence communities</p><p>How to Generate Hashes Using PowerShell:</p><pre># Replace &#39;C:\Path\To\malware.exe&#39; with your file&#39;s path<br>$FilePath = &quot;C:\Path\To\malware.exe&quot;<br><br># Get MD5 hash<br>Get-FileHash -Path $FilePath -Algorithm MD5<br><br># Get SHA-256 hash<br>Get-FileHash -Path $FilePath -Algorithm SHA256</pre><blockquote><strong>File Hash Lookup</strong></blockquote><p>After generating the file hash in the previous step, the next move is to check it against <strong>online malware databases and sandboxes</strong>. This helps us find out if the sample has already been analyzed or flagged by others.</p><p>One of the most widely used platforms for this is <a href="https://www.virustotal.com/"><strong>VirusTotal</strong></a>. It aggregates results from dozens of antivirus engines and security tools. By submitting a hash like <strong>SHA-256</strong>, we can quickly see whether the file is recognized as malicious.</p><p>For example: The <em>44d88612fea8a8f36de82e1278abb02f is </em><strong>MD5 hash of the EICAR test file</strong>, which is <em>not</em> actual malware but is used as a <strong>standard test file</strong> to trigger antivirus engines</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DAFTjxyO4Bvzb-9Be5QxPg.png" /></figure><h4>⚠️ Hash Limitations</h4><p>While file hashes like <strong>MD5</strong>, <strong>SHA-1</strong>, and <strong>SHA-256</strong> are great for identifying <strong>exact file matches</strong>, they don’t work well for <strong>similar</strong> but slightly modified malware.</p><p>Why?<br> Because even a small change in the file — like modifying one byte or recompiling the code — will generate a <strong>completely different hash</strong>.</p><blockquote><strong>Imphash</strong></blockquote><p><strong>IMPHASH</strong> stands for <strong>Import Hash</strong>. It’s a special kind of hash that helps analysts detect <strong>similar malware samples</strong>, even if the file has been slightly changed.</p><p>Unlike MD5 or SHA-256, which calculate a hash based on the entire file, IMPHASH is generated from the <strong>imported functions</strong> listed in a <strong>Windows Portable Executable (PE)</strong> file.</p><p>You can find the <strong>IMPHASH</strong> of a file in the <strong>“Details”</strong> tab on <a href="https://www.virustotal.com/"><strong>VirusTotal</strong></a> after submitting a file or its hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OEf1VqWbdTybczOr1pdRcg.png" /></figure><p>Here’s a Python script that calculates the IMPHASH of a Windows PE file using the popular pefile library.</p><pre><br>import pefile<br>import hashlib<br>import sys<br><br>def calculate_imphash(pe):<br>    if not hasattr(pe, &#39;DIRECTORY_ENTRY_IMPORT&#39;):<br>        return None<br><br>    imports = []<br><br>    for entry in pe.DIRECTORY_ENTRY_IMPORT:<br>        dll_name = entry.dll.decode(errors=&#39;ignore&#39;).lower()<br>        for imp in entry.imports:<br>            if imp.name is not None:<br>                func_name = imp.name.decode(errors=&#39;ignore&#39;).lower()<br>                imports.append(f&quot;{dll_name}:{func_name}&quot;)<br><br>    # Sort imports alphabetically<br>    imports.sort()<br><br>    # Join into a single string<br>    import_str = &quot;,&quot;.join(imports)<br><br>    # Calculate MD5 hash<br>    imphash = hashlib.md5(import_str.encode()).hexdigest()<br>    return imphash<br><br>if __name__ == &quot;__main__&quot;:<br>    if len(sys.argv) != 2:<br>        print(f&quot;Usage: {sys.argv[0]} &lt;path_to_pe_file&gt;&quot;)<br>        sys.exit(1)<br><br>    pe_path = sys.argv[1]<br><br>    try:<br>        pe = pefile.PE(pe_path)<br>        imphash = calculate_imphash(pe)<br>        if imphash:<br>            print(f&quot;IMPHASH: {imphash}&quot;)<br>        else:<br>            print(&quot;No import table found in the PE file.&quot;)<br>    except Exception as e:<br>        print(f&quot;Error processing file: {e}&quot;)</pre><blockquote><strong>Fuzzy Hashing (SSDEEP)</strong></blockquote><p><strong>Fuzzy hashing</strong>, also known as <strong>context-triggered piecewise hashing (CTPH)</strong>, is a method used to measure how similar two files are — not just whether they’re exactly the same.</p><p>Unlike traditional hashes (like MD5 or SHA-256) that produce completely different values if even a single byte changes, fuzzy hashing breaks a file into smaller pieces (blocks), hashes each piece, and then combines those hashes into one fuzzy hash.</p><p>You can use the ssdeep tool to generate and compare fuzzy hashes easily.</p><pre>ssdeep malware_sample.exe</pre><p>Compare two files and get a similarity score:</p><pre>ssdeep -s malware_sample.exe known_malware.exe</pre><p>The output might look like:</p><pre>malware_sample.exe matches known_malware.exe (92%)</pre><p>A high percentage (closer to 100%) means the files are very similar.</p><blockquote><strong>Section Hashing (Hashing PE Sections)</strong></blockquote><p><strong>Section Hashing</strong> is a useful technique in malware analysis that focuses on hashing individual sections of a <strong>Portable Executable (PE)</strong> file — such as .text, .data, or .rsrc. Each section of a PE file contains different kinds of data like code, variables, resources, etc.</p><p>Attackers often make slight modifications to malware files to avoid detection. While overall file hashes (like MD5 or SHA256) change easily, <strong>hashing each section separately</strong> allows analysts to detect what specific part of the file has been altered.If two malware samples have the <strong>same section hashes</strong>, it’s a strong indication they share a common structure or origin, even if their filenames or overall hashes differ.</p><p>You can use the pefile library to extract and hash each section of a PE file. Here&#39;s a simple script to calculate SHA-256 hashes of each section:</p><pre>import sys<br>import pefile<br>pe_file = sys.argv[1]<br>pe = pefile.PE(pe_file)<br>for section in pe.sections:<br>    print (section.Name, &quot;MD5 hash:&quot;, section.get_hash_md5())<br>    print (section.Name, &quot;SHA256 hash:&quot;, section.get_hash_sha256())</pre><p>We can also use pestudio for that purpose:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*4qRqgCb5jSPz5RaH_GVDnQ.png" /></figure><blockquote><strong>String Analysis</strong></blockquote><p><strong>String analysis</strong> is one of the simplest yet most valuable techniques in static malware analysis. In this phase, our goal is to extract <strong>ASCII</strong> and <strong>Unicode</strong> strings from a binary file. These strings can offer critical insights into what the malware is doing or intends to do.</p><p>Strings can reveal a lot about a malware sample, including:</p><p><strong>Embedded filenames</strong> — e.g., names of files the malware creates or drops</p><p><strong>IP addresses and domains</strong> — where the malware may connect or receive commands</p><p><strong>Registry paths/keys</strong> — targeted by the malware for persistence or information</p><p><strong>Windows API calls</strong> — such as CreateProcess, WriteFile, or WinExec</p><p><strong>Command-line arguments</strong> — used to control the malware’s behavior</p><p><strong>Indicators of specific threat actors</strong> — such as hardcoded usernames, campaign tags, or language patterns</p><p>One of the best tools for extracting strings on Windows is the <strong>strings utility from Sysinternals</strong>.</p><p>If you’ve downloaded the Sysinternals Suite and placed it under C:\Tools\Sysinternals\, run:</p><pre>C:\Tools\Sysinternals\strings.exe -nobanner -accepteula malware_sample.exe &gt; strings_output.txt</pre><ul><li>-nobanner skips the license banner</li><li>-accepteula auto-accepts the EULA</li></ul><p>It’s also worth mentioning that <strong>FLOSS</strong> (FireEye Labs Obfuscated String Solver) is another powerful tool available for Windows systems. Unlike traditional string extraction tools, <strong>FLOSS can identify and decode obfuscated or dynamically constructed strings</strong> often used by malware to hide its true intentions.</p><p>Let’s say you have a suspicious file called agent32.exe located in:</p><p><em>C:\Users\Analyst\Desktop\SuspiciousFiles\</em></p><p>To extract readable and obfuscated strings from this file using <strong>FLOSS</strong>, you can run:</p><pre>floss C:\Users\Analyst\Desktop\SuspiciousFiles\agent32.exe &gt; C:\Users\Analyst\Desktop\agent32_strings.txt</pre><blockquote><strong>Unpacking UPX-packed Malware</strong></blockquote><p>During static analysis, we may come across malware that has been <strong>packed</strong> — a method of compressing or hiding the original code. <strong>Packing</strong> is commonly used by malware authors for several reasons:</p><p>To <strong>hide the real code</strong>, making it harder to understand what the malware does</p><p>To <strong>reduce the file size</strong>, allowing it to be transferred faster or look less suspicious</p><p>To <strong>frustrate analysts</strong>, making reverse engineering more difficult</p><p>We can unpack the malware using the UPX tool with the following command:</p><p>You can use the following command to test if the file is UPX-packed</p><pre>upx -t C:\Samples\malware.exe</pre><p>If it returns something like File is packed with UPX , unpack the file:</p><pre>upx -d C:\Samples\malware.exe</pre><p>This will <strong>decompress</strong> the file and restore it to its original state so you can analyze it.</p><p>Note: We can also use PEID, DIE (Detect It Easy) to detect packed files.</p><p><strong><em>Conclusion</em></strong>: In this guide, we explored various techniques like identifying file types, calculating cryptographic hashes, analyzing import tables, string extraction, detecting packers like UPX, and comparing similarities using fuzzy hashing and section hashing.</p><p>While static analysis doesn’t always reveal everything (especially when code is obfuscated or packed), it lays the groundwork for deeper dynamic analysis and helps analysts classify and triage malware samples faster.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=566e8a256ada" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Splunk Boss of the SOC- Corelight trickbot ctf]]></title>
            <link>https://medium.com/@fvliyeva465/splunk-boss-of-the-soc-corelight-trickbot-ctf-e23e959112a4?source=rss-9d24db282be4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e23e959112a4</guid>
            <dc:creator><![CDATA[Fidan Valieva]]></dc:creator>
            <pubDate>Sun, 11 May 2025 09:00:23 GMT</pubDate>
            <atom:updated>2025-05-11T09:00:23.627Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/379/1*6Mk6lLSzvNBgCP3QO45cEA.png" /></figure><p><em>This report documents the investigation and analysis conducted during the Splunk Capture The Flag (CTF) challenge, specifically focusing on the detection and interpretation of suspicious activity using Corelight data.</em></p><p>No tricks here, just good old network sleuthing! This scenario teaches you how to use Corelight’s insight in Splunk to track down the attack chain of a Trickbot infection. You’ll pivot from Suricata alerts to Zeek evidence, finding indicators of C2 beaconing, lateral movement, and data exfiltration along the way. Plus, you’ll see how valuable our HTTP, DNS, SSL, and x509 logs (and more) are for common incident response and threat hunting tasks.</p><blockquote><strong>101. How many total Suricata alerts were generated in this index?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*eqIl1qdu5v1jgvLMibYcUQ.png" /></figure><p><strong>Breakdown of the query:</strong></p><ul><li>index=&quot;corelight&quot;: This specifies the Splunk index where Corelight (Zeek/Bro and Suricata) logs are stored.</li><li>suricata: A keyword filter to ensure the events are related to Suricata (a popular IDS/IPS engine).</li><li>sourcetype=corelight_suricata_corelight: This refines the search to only those logs ingested from Suricata via the Corelight integration.</li></ul><p><strong><em>Answer: 47</em></strong></p><blockquote><strong>102. Most of the alerts are being generated by a single source host. What is its IP address?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*VL7WBIFCNpPR7Q0BAeUZLg.png" /></figure><p><strong>Explanation:</strong></p><ul><li>| stats count by src_ip: Groups all matching Suricata events by their source IP address and counts how many alerts each IP generated.</li><li>| sort -count: Sorts the result in descending order based on the count, so the IP address at the top is the one generating the most alerts.</li></ul><p>This allowed me to easily pinpoint the <strong>top offending IP address</strong> by looking at the first result — the src_ip with the highest alert count.</p><p><strong><em>Answer: 10.0.0.31</em></strong></p><blockquote><strong>103. What’s the name of the malware family identified by these alerts?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFKjxwMHhQX4h12pAjdE0Q.png" /></figure><p>To identify the <strong>malware family</strong> associated with the Suricata alerts, I examined the alert.signature field directly. This field contains descriptive rule names from the IDS that triggered each alert.</p><p>While reviewing the signatures, I quickly noticed multiple entries referencing <strong>TrickBot</strong> — a well-known banking Trojan and malware loader. The repeated presence of the name across signatures made it immediately clear that the alerts were tied to the <strong>TrickBot malware family</strong>, even without needing to aggregate or count them.</p><p>This kind of visual pattern recognition is often enough when analyzing IDS logs, especially when a particular threat family dominates the alert landscape.</p><p><strong><em>Answer: Trickbot</em></strong></p><blockquote><strong>104.Let’s take a closer look at the “ET MALWARE Win32/Trickbot Data Exfiltration” alerts. You’ll notice that three of the alerts share a single UID, meaning they all occured on a single TCP stream. What is that UID?</strong></blockquote><p>While investigating the <strong>“ET MALWARE Win32/Trickbot Data Exfiltration”</strong> alerts, I noticed that <strong>three alerts shared the same </strong><strong>uid</strong>, indicating they were part of a <strong>single TCP session</strong>. The uid field helps correlate related events, and in this case, it clearly showed that multiple stages of the TrickBot activity occurred within one connection. This highlights how Suricata can generate layered alerts tied to a single malicious session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wYEB4PEkcdLqUmuatH6f4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*k11yL9QufrRu7doNIdl6fw.png" /></figure><p><strong><em>Answer:CAoNRI62m9CRqS0R2</em></strong></p><p>Note: A <strong>UID (Unique Identifier)</strong> is typically assigned to each network connection or session by tools like <strong>Zeek</strong>. It uniquely identifies a specific TCP (or UDP) stream.</p><p>If three alerts share the same UID, then:They are <strong>part of the same TCP session</strong>.It’s <strong>likely one malicious behavior triggered multiple detection rules</strong>.</p><blockquote><strong>105. What is the IP address of the malicious server involved in the alerts for this stream?</strong></blockquote><p>To identify the <strong>malicious server’s IP address</strong> involved in the TrickBot exfiltration alerts, I filtered the logs using the known uid from the earlier step and focused specifically on the <strong>alert signature</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ew_VI2NLb8JR683B7lu1dA.png" /></figure><p>By reviewing the output, the <strong>destination IP (</strong><strong>dest)</strong> field pointed directly to the <strong>malicious server</strong> involved in the data exfiltration attempt.</p><p><strong><em>Answer: 103.16.104.8</em></strong></p><blockquote>106. What layer 7 protocol is the traffic in the previous question flowing over that generates the alerts?</blockquote><p>By checking the destination port, we can determine protocol which is <strong>443</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ldqq350sg54OQ0LObw29bA.png" /></figure><p><strong><em>Answer: http</em></strong></p><blockquote><strong>107.Taking the UID mentioned in the previous question and searching for it across the index, we see that a corelight_notice log was also generated. What is the number of the MITRE ATT&amp;CK TTP referenced in the notice?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*IaAf4sfxg1ZTyjyOklaLAw.png" /></figure><p>To find the MITRE ATT&amp;CK TTP number, I searched for the uid from the previous question in the Corelight logs using the query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*bJmSSCkzU1OfuYfDwKpUGA.png" /></figure><p>This returned a corelight_notice log associated with that session. In the resulting log, I examined the msg field .</p><p><strong><em>Answer: S0266</em></strong></p><blockquote><strong>108. What User-Agent string was sent as part of the Trickbot HTTP requests?</strong></blockquote><p>To find the User-Agent string used in the Trickbot HTTP requests, I ran the following query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*rnRsCb-tqJX0xH4IDJi0lQ.png" /></figure><p>This filtered the HTTP logs for the specific session. I then inspected the user_agent field in the results, which revealed the User-Agent string sent by Trickbot.</p><p><strong><em>Answer: Ghost</em></strong></p><blockquote><strong>109. What is a process name that is repeated within the POST body of these HTTP requests?</strong></blockquote><p>By looking post_body field I noticed that svchost.exe repeated multiple times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*OHc_Ozr_3U8-ZyBPXrWzIQ.png" /></figure><p><strong><em>Answer: svchost.exe</em></strong></p><blockquote><strong>110. Let’s look at what happened after the malware was dropped. Looking at Suricata alerts following the Trickbot alert, a popular scanning tool appears to have been used for reconnaissance. What is the name of that tool?</strong></blockquote><p>To identify all the unique Suricata alerts triggered in the Corelight logs, I used the following query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*fdtl_XkWfVQQzvnkKBFTbg.png" /></figure><p>This query pulls data from Suricata alerts integrated with Corelight and returns all the unique values of the alert.signature field, which describe each detected threat or suspicious behavior.</p><p>You can see nessus in the results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*H9su08vMcxh5Cl4Fz4YjHQ.png" /></figure><p><strong><em>Answer: Nessus</em></strong></p><blockquote><strong>111. One of the alerts generated by our infected host could result in command execution on a wireless access point. Looking at the response from the remote system, however, it’s pretty clear that the attack failed. How many bytes did the target send back to the attacker on this connection?</strong></blockquote><p>First I have checked alert.signatures and found alert.signature”=”ETPRO EXPLOIT Possible Asus WRT LAN Backdoor Command Execution, then queried the following :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cj4agZS8dMtPQX6h30FzPg.png" /></figure><p>As a result I got one UID and used it in the follwoing query within sourcetype=<strong>corelight_conn:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*fMGdSybpWmhxnLz-npTFBw.png" /></figure><p>By checking resp_ip_field we can see it is 0:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*cmSDvN9gJCTvwD7sH2pt6w.png" /></figure><p><strong><em>Answer: 0</em></strong></p><blockquote><strong>112.Looking at the layer 7 services used by the infected host after the Trickbot alerts above, we see an SSH connection made to an internal host. What is the IP address of that host?</strong></blockquote><p>To identify the internal host the infected machine connected to over SSH, I ran the following query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*DsejUoYoZjvJ6DXeGlCw2A.png" /></figure><p>This searched for SSH connections initiated by the infected host (10.0.0.31). The results showed two destination IPs. Since we’re specifically looking for an <strong>internal</strong> host, I selected the IP <strong>10.0.0.72.</strong></p><p><strong><em>Answer:10.0.0.72</em></strong></p><blockquote><strong>113.What is the PCR (producer/consumer ratio) of that SSH session?</strong></blockquote><p>To find the <strong>PCR (Producer/Consumer Ratio)</strong> of the SSH session, I first identified the session’s UID from the previous query — in this case: CLn5mqsd7SVfTn10g. Then, I ran the following query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*3_3nsYCZmHTiIfJKpRkEbA.png" /></figure><p>In the results, I searched for the pcr field, which showed the value <strong>-0.9959339475461754</strong>. According to the answer guidance, I rounded this to <strong>five decimal places</strong>, giving a final answer of: <strong><em>-0.99593</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*0CfUWAm6M7bn1LIZqFa-ew.png" /></figure><p><strong><em>Answer: -0.99593</em></strong></p><p>Note: PCR is a calculated value in Zeek/Corelight logs that helps identify which side of a connection is <strong>producing more data</strong> (i.e., sending more bytes) and which side is consuming it.</p><ul><li>It ranges from <strong>-1.0 to 1.0</strong>.</li><li>A value <strong>close to -1.0</strong> means the <strong>originator</strong> of the connection (e.g., the client) sent most of the data.</li><li>A value <strong>close to 1.0</strong> means the <strong>responder</strong> (e.g., the server) sent most of the data.</li><li>A value <strong>near 0</strong> indicates relatively balanced communication.</li></ul><p>So, in this case, a PCR of <strong>-0.99593</strong> means the <strong>originator (10.0.0.31)</strong> sent nearly all the data in the SSH session — suggesting possible data exfiltration or command execution activity.</p><blockquote><strong>114. Examining the inferences section of the SSH log associated with that session, one code indicates a behavior that explains the PCR we just observed. Which code is it?</strong></blockquote><p>To identify the behavior that explains the PCR value observed in the SSH session, I ran the following query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*cYzpEPli1lGLMURInhjYSQ.png" /></figure><p>This filtered for successful SSH connections to the internal host (10.0.0.72). In the results, I examined the inference field, which contained three codes describing observed behaviors during the session. Among them, the code <strong>Large File Download</strong> stood out as the one that best explains the highly negative PCR value (-0.99593) — indicating that the originator (infected host) received a significant amount of data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*bghbF6VZ03bX1xapQ20-bw.png" /></figure><p><strong><em>Answer: LFD</em></strong></p><blockquote><strong>115.The owner of the infected workstation had no credentials to log into 10.0.0.72 over SSH. However, there was another connection between those hosts over HTTP. What attack type was sent over that connection?</strong></blockquote><p>To identify the type of attack sent over the HTTP connection between the infected host and the internal server, I used the query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*XImJGQ5YchFE4mzVmXMc9A.png" /></figure><p>This returned HTTP traffic logs between the two hosts. By examining the uri field in the results, I observed patterns characteristic of <strong>SQL injection (SQLi)</strong> attacks .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*bI46ZjP1bWkmY9xCPgnwLg.png" /></figure><p><strong><em>Answer: SQL injection</em></strong></p><blockquote><strong>116. What parameter of the index.php script did the infected system attempt to use for SQL injection?</strong></blockquote><p>The uri showed a request to index.php with parameters, and I observed suspicious input passed to the <strong>username</strong> parameter.</p><p><strong><em>Answer: username</em></strong></p><blockquote><strong>117.What was the HTTP status code from the targeted server?\</strong></blockquote><p>To find the HTTP status code returned by the targeted server (10.0.0.72), I checked status_code field and it was 200.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*Hrur_OISt3Ltg6Y2vTZp3Q.png" /></figure><blockquote><strong>118. Did this SQL injection attack generate any Suricata alerts?</strong></blockquote><p>There was no Suricata alerts within sourcetype=”corelight_suricata_corelight”</p><p><strong><em>Answer: 0</em></strong></p><blockquote><strong>119.Returning to SSH connections made by our infected host, we see a second one being made to a country the organization has no business relationship with. What country is that connection going to?</strong></blockquote><p>Based on previous query that I was used to find ssh connections from infected host to internal ip, there was 2 ip one of them to internal ip, other one to the external ip address:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*DsejUoYoZjvJ6DXeGlCw2A.png" /></figure><p>And I used <a href="https://whatismyipaddress.com/">https://whatismyipaddress.com/</a> to find which country belongs ip address : 171.103.187.218</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*xEdvfejDgdJX0BXSVWk7dA.png" /></figure><p>And you can see: it belongs Thailand</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*VmFte_DfRD9IaoZ2sHq99Q.png" /></figure><p><strong><em>Answer: Thailand</em></strong></p><blockquote><strong>120.Judging by the PCR (producer/consumer ratio) of this connection, data was definitely exfiltrated to this external system. What is the SSH host key of that system?</strong></blockquote><p>The UID is related connection between infected host and remote host:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*eVrYvuhlkKIZJL5qdq7oVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*lDwrki1DbsJRRDPq_wBgrw.png" /></figure><p><strong><em>Answer: 1c:6e:58:a2:57:98:33:f4:53:e8:63:46:df:a2:31:ef</em></strong></p><blockquote><strong>121.How many payload bytes were sent over that connection?</strong></blockquote><p>To find answer for this question we need check corelight_conn logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*IM52hl7k8qt1Q6QHHNi6iQ.png" /></figure><p>Based on the above query check orig_bytes field:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*HLZ9vIW7tvT23TUaAuH39A.png" /></figure><p><strong><em>Answer: 128105745</em></strong></p><p><strong><em>122. The challenge author’s favorite SSL certificate organization name — a default out of many certificate generation tools — is present in this index, highlighted by a Suricata alert. What is that organization name?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*6XW7fELxIUrG4jnpSTPJjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*1fG0GvlphDJAWNYIMdxb5g.png" /></figure><p><strong><em>Conculsion : </em></strong>After diving deep into logs, decoding SQLi attempts, tracking Trickbot traffic, and calculating PCR values like a cyber forensics ninja, we’ve reached the end of the investigation. The infected host has been profiled, the alerts explained, and the attacker’s every move traced — all with the help of Splunk and plenty of index= magic.</p><pre>When you finally track down the attacker and realize they used &#39; OR &#39;1&#39;=&#39;1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MYu6JAKsJzb5IUff" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e23e959112a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>