<?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 Sathinsha on Medium]]></title>
        <description><![CDATA[Stories by Sathinsha on Medium]]></description>
        <link>https://medium.com/@sathinsha?source=rss-746b89857544------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Cv79BjLWcnGzJQbD6-yoqg.jpeg</url>
            <title>Stories by Sathinsha on Medium</title>
            <link>https://medium.com/@sathinsha?source=rss-746b89857544------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 15:33:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sathinsha/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[Detecting Encoded PowerShell Commands with Sysmon — Lab]]></title>
            <link>https://medium.com/@sathinsha/detecting-encoded-powershell-commands-with-sysmon-lab-517249ad9fa5?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/517249ad9fa5</guid>
            <category><![CDATA[windows-logs]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[log-analysis]]></category>
            <category><![CDATA[sysmon]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Tue, 02 Dec 2025 08:37:48 GMT</pubDate>
            <atom:updated>2025-12-02T08:38:58.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>Detecting Encoded PowerShell Commands with Sysmon — Lab</h3><blockquote>This lab demonstrates how Sysmon detects encoded PowerShell commands on a Windows machine. Attackers commonly use encoded commands to hide their activity, so understanding how Sysmon logs this behaviour is an important skill for anyone learning SOC, Blue Team, or threat detection.<br><strong> </strong>A harmless encoded command was used, but it behaves exactly like the techniques seen in real attacks. This makes it easy to observe how Sysmon records events such as FileCreate (Event ID 11) and CreateRemoteThread (Event ID 8) during execution.<br> The entire process is explained in simple, beginner-friendly language so anyone can follow along and clearly understand how Sysmon helps identify suspicious PowerShell activity.</blockquote><h3>Why This Lab?</h3><p>I wanted to answer one question:</p><p>If someone runs an encoded PowerShell command on a Windows machine, can Sysmon detect it?</p><p>Even though the command I used was not harmful, it behaves the same way attackers often do.<br>So this is a safe way to practice real SOC detection skills.</p><h3>Tools I Used</h3><ul><li>Sysmon — a Windows monitoring tool that logs detailed system activity</li><li>Sysmon Modular / SwiftOnSecurity Config — a configuration file that decides what Sysmon should log</li><li>PowerShell — where I executed the encoded command</li><li>Event Viewer — where I read and analyzed the logs</li></ul><h3>Step 1 — Installing Sysmon</h3><p>I installed Sysmon using a pre-made configuration file. This file controls what events Sysmon records.</p><p><a href="https://download.sysinternals.com/files/Sysmon.zip">Download Sysmon</a></p><p><a href="https://github.com/SwiftOnSecurity/sysmon-config/blob/master/sysmonconfig-export.xml">Download Configuration File</a></p><p>Open Command Prompt as Administrator, then run</p><pre>sysmon.exe -i sysmonconfig.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vNWrUaY-0SIMaJAg2QFkzA.png" /></figure><p>Some configs don’t log “Process Creation” (Event ID 1) because it can create a lot of noise, but they DO log other important behaviors.</p><p>After installing, Sysmon logs started appearing under:</p><pre>Event Viewer → Applications and Services Logs → Microsoft → Windows → Sysmon → Operational</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*OSQUkegJcgz-lPmJ0xWmxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcRe0ZlF-BI6a6gLmZNEgw.png" /></figure><h3>Step 2 — Running the Encoded PowerShell Command</h3><p>I executed this command:</p><pre>powershell.exe -enc VwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAiAEgARQBMAEwATwAgAFcATwBSAEwARAAiAA==</pre><p>When decoded, it simply prints:</p><pre>HELLO WORLD</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*mYvu6cEmMe6UJ-8wVWhWEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*gvoJVvXUEf4wo5tcNCBFkw.png" /></figure><p>Even though it’s harmless, it is the same technique attackers use to hide scripts. That’s why it’s important for Sysmon to detect it.</p><h3>Step 3 — What Sysmon Logged</h3><p>I expected Sysmon to log <strong>Event ID 1</strong> (process creation), but because of the configuration I used, Sysmon captured the activity in a different way.</p><p>Instead, I saw:</p><h4>✔ Event ID 8 — CreateRemoteThread</h4><h4>✔ Event ID 11 — FileCreate</h4><p>This is actually still very useful, and also more realistic.</p><h3>Event ID 11 — FileCreate</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6l8BVdR8VlY_UwuOSuCFBQ.png" /></figure><p>Sysmon showed that PowerShell created a temporary script file:</p><pre>__PSScriptPolicyTest_i5fil5iq.j3o.ps1</pre><p>This file is normal behavior. PowerShell often creates temporary files in the background when running certain commands.</p><p>But in security, this is important because:</p><ul><li>Malware often drops temporary files</li><li>Suspicious scripts usually get created in Temp folders</li><li>Encoded commands often trigger hidden file operations</li></ul><p>So even though nothing malicious happened, <strong>Sysmon successfully showed us that PowerShell created a file</strong>, which is a good detection point.</p><h3>Event ID 8 — CreateRemoteThread</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cXZKcFLz9SnCwdQQg3RbTw.png" /></figure><p>Event ID 8 means a process created a thread inside another process.</p><p>Here’s the simple explanation:</p><ul><li>PowerShell sometimes loads code into memory</li><li>When it does that, it creates or interacts with threads</li><li>Sysmon detects this behavior because malware also uses the same technique</li></ul><p>This doesn’t mean anything dangerous happened.<br> It simply means <strong>PowerShell executed code in a way that Sysmon considers “interesting.”</strong></p><p>For SOC analysts, this is gold.</p><p>Many attacks use thread injection — even ransomware — so Event ID 8 is often a strong signal.</p><h3>What I Learned</h3><p>Here’s what I took away from this lab:</p><h4>✔ 1. Sysmon can detect encoded PowerShell even without Event ID 1</h4><p>Even though process creation wasn’t logged, Sysmon still caught the behavior.</p><h4>✔ 2. Encoded commands always leave traces</h4><p>They usually trigger file creation or thread activity.</p><h4>✔ 3. Behavioral detection is more important than signature detection</h4><p>We didn’t catch the command directly…<br>but we caught <strong>what the command caused Windows to do</strong>.</p><p>And <strong>that</strong> is how real SOC detection works.</p><h4>✔ 4. Sysmon configuration matters</h4><p>Different Sysmon configs capture different events, and understanding this is important for real detection engineering.</p><h3>Why This Lab Is Useful for SOC</h3><p>If you plan to work in a SOC, you must understand how to spot:</p><ul><li>Suspicious PowerShell usage</li><li>Encoded commands</li><li>Thread injection</li><li>Temporary script creation</li><li>Fileless execution techniques</li></ul><p>This lab covers all of that in a very simple way.</p><p>Even a harmless command like “HELLO WORLD” still generates useful security events, and as SOC analysts, we learn to connect the dots.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=517249ad9fa5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Splunk Lab  — HTTP Log Analysis]]></title>
            <link>https://medium.com/@sathinsha/splunk-lab-http-log-analysis-ba19b027f45d?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba19b027f45d</guid>
            <category><![CDATA[splunk-enterprise]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[splunk-lab]]></category>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 11:33:35 GMT</pubDate>
            <atom:updated>2025-11-24T11:33:35.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>Splunk Lab — HTTP Log Analysis</h3><blockquote>This lab demonstrates HTTP log analysis using Splunk to monitor web activity and uncover security insights.<br> The goal is to detect client and server errors, identify large file transfers, and spot suspicious HTTP requests, including potential scripted attacks.</blockquote><blockquote>These exercises are part of an ongoing Blue Team and SOC analyst learning series, designed to enhance practical cybersecurity monitoring and incident detection skills.</blockquote><h3>Objective</h3><p>By completing this lab, the following skills will be demonstrated:</p><ul><li>Ingesting and indexing Zeek-style HTTP logs in Splunk</li><li>Running SPL queries to identify top web traffic sources</li><li>Detecting server errors (5xx) and anomalous HTTP activity</li><li>Identifying suspicious User-Agents and potential scripted attacks</li><li>Discovering large file transfers and unusual URI access patterns</li></ul><h3>Environment Setup</h3><ul><li><strong>OS:</strong> Windows 10</li><li><strong>Tool:</strong> Splunk Enterprise (Free Version)</li><li><strong>Dataset:</strong> Zeek-style HTTP logs (http_logs.json)</li><li><strong>Index:</strong> http_lab</li><li><strong>Sourcetype:</strong> json</li></ul><h3>Data Ingestion Steps</h3><ul><li>Open <strong>Splunk</strong></li><li>Navigate to <strong>Settings → Add Data</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-mhGGrNpQcrjE_Xt1WtHw.png" /></figure><ul><li>Choose <strong>Upload</strong> and select http_logs.json</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zquH_l_gMWPErzOTIAL2A.png" /></figure><ul><li>Set <strong>Sourcetype</strong> → json (or create custom)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9aXVc5r_dtRwTgljGlgDA.png" /></figure><ul><li>Choose <strong>Index</strong> → http_lab</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2twICGQtPKk1hmsyi4HVQ.png" /></figure><ul><li>Confirm that events are indexed correctly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2KC4JTm-YZKApFK-1MOYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTvAJdoFBDQoRT0AjKRSug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyCQFUydlvFE3a3gmbwUug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*72fIKv87RWu-gQSDF_LNxQ.png" /></figure><h3>Lab Tasks &amp; Analysis</h3><h3>Task 1: Top 10 Endpoints Generating Web Traffic</h3><h3>✔️ SPL Query</h3><pre>index=http_lab sourcetype=&quot;json&quot;<br>| stats count by id.orig_h<br>| sort -count<br>| head 10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhzqjEzbJomRR8U5lZBU3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEeBvvRoieJIAOfpjFP_kw.png" /></figure><h3>Explanation</h3><ul><li><strong>stats count by id.orig_h</strong>: Counts the number of HTTP requests per source IP.</li><li><strong>sort -count</strong>: Sorts results in descending order to highlight the most active clients.</li><li><strong>head 10</strong>: Shows only the top 10 endpoints generating the most traffic.</li></ul><h3>Analysis</h3><p>This query identifies the most active clients on the network.<br> High traffic may indicate legitimate heavy users, automated scripts, or reconnaissance attempts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvDGxfHMi23XPzv3dfBvsg.png" /></figure><h3>Task 2: Count of Server Errors (5xx)</h3><h3>✔️ SPL Query</h3><pre>index=http_lab sourcetype=&quot;json&quot; status_code=&quot;5*&quot;<br>| stats count as server_errors</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtVI6nLfz3UBeYAv9To-vw.png" /></figure><h3>Explanation</h3><ul><li>Filters events where status_code indicates a <strong>server-side error (5**)</strong>.</li><li>Counts all such events and renames the output column as server_errors.</li></ul><h3>Analysis</h3><p>High numbers of server errors may reveal:</p><ul><li>Misconfigured web servers</li><li>Potential exploitation attempts</li><li>Unstable web applications needing investigation</li></ul><h3>Task 3: Suspicious User-Agents</h3><h3>✔️ What are User-Agents?</h3><p>User-Agent strings identify the software or tool used to access the web server, e.g., browsers, scripts, or bots.<br>Suspicious User-Agents often indicate automated attacks or reconnaissance, such as sqlmap, curl, python-requests, or botnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVURqzf_33h1rmdnmz2Xmw.png" /></figure><h3>✔️ SPL Query</h3><pre>index=http_lab sourcetype=&quot;json&quot; user_agent IN (&quot;sqlmap/1.5.1&quot;, &quot;curl/7.68.0&quot;, &quot;python-requests/2.25.1&quot;, &quot;botnet-checker/1.0&quot;)<br>| stats count by user_agent</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nY15DX-R0BZ438hi84KDYQ.png" /></figure><h3>Explanation</h3><ul><li>Filters logs for User-Agents commonly associated with <strong>automated attacks</strong>.</li><li>Counts occurrences per User-Agent to identify potential threats.</li></ul><h3>Analysis</h3><p>Suspicious User-Agents may indicate:</p><ul><li>Automated scanning (e.g., sqlmap, curl)</li><li>Botnets or attack scripts</li><li>Possible intrusion attempts requiring further investigation</li></ul><h3>Task 4: Large File Transfers (&gt;500 KB)</h3><h3>✔️ SPL Query</h3><pre>index=http_lab sourcetype=&quot;json&quot; resp_body_len&gt;500000<br>| table ts id.orig_h id.resp_h uri resp_body_len<br>| sort -resp_body_len</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38HxysTpzXnX2n-TsD_cuQ.png" /></figure><h3>Explanation</h3><ul><li>Filters HTTP requests with response size greater than 500 KB.</li><li>Displays timestamp, source/destination IPs, URI, and response size.</li><li>Sorts results to highlight the largest transfers first.</li></ul><h3>Analysis</h3><p>Large file transfers may indicate:</p><ul><li>Legitimate downloads (e.g., media, updates)</li><li>Potential data exfiltration</li><li>Suspicious activity when unusual sources are involved</li></ul><h3>Security Findings (SOC Analyst Perspective)</h3><ul><li>Top endpoints reveal high-traffic sources or possible reconnaissance.</li><li>Server errors (5xx) may indicate misconfigurations or exploitation attempts.</li><li>Suspicious User-Agents suggest automated attacks or scanning activity.</li><li>Large file transfers could point to exfiltration or abnormal downloads.</li></ul><h3>Conclusion</h3><p>This lab demonstrates how Splunk can effectively analyze HTTP logs to detect anomalies, server errors, suspicious clients, and unusual activity.<br> Understanding these patterns is critical for SOC analysts and Blue Team professionals monitoring web traffic for security threats.</p><h3>Next Steps</h3><p>Future labs will focus on analyzing DNS, SSH, and network flow logs to detect anomalies, intrusions, and malicious behavior in a SOC environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba19b027f45d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Splunk Lab— SSH Log Analysis]]></title>
            <link>https://medium.com/@sathinsha/splunk-lab-ssh-log-analysis-77d36dc56b2e?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/77d36dc56b2e</guid>
            <category><![CDATA[splunk-enterprise]]></category>
            <category><![CDATA[splunk-administration]]></category>
            <category><![CDATA[splunk-lab]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 10:19:01 GMT</pubDate>
            <atom:updated>2025-11-24T10:20:46.366Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><blockquote>This lab focuses on SSH log analysis using Splunk to monitor and investigate SSH authentication activity. The goal is to detect failed logins, successful logins, and suspicious SSH behavior, including potential brute-force attacks. This hands-on exercise is part of an ongoing Blue Team and SOC analyst learning journey, designed to enhance practical cybersecurity monitoring and incident detection skills.</blockquote><blockquote>Sathinsha Semasinghe</blockquote><h3>Objective</h3><p>By the end of the lab, will be able to:</p><ul><li>Ingest and index Zeek-style SSH logs in Splunk</li><li>Run SPL queries to analyze SSH activity</li><li>Identify failed attempts, successful logins, and event types</li><li>Detect malicious or abnormal SSH patterns</li><li>Interpret the results from a SOC analyst perspective</li></ul><h3>Environment Setup</h3><ul><li><strong>OS:</strong> Windows 10</li><li><strong>Tool:</strong> Splunk Enterprise (Free)</li><li><strong>Dataset:</strong> Zeek-style SSH logs (ssh_logs.json)</li><li><strong>Index:</strong> ssh_lab</li><li><strong>Sourcetype:</strong> json</li></ul><h3>Data Ingestion Steps</h3><ul><li>Open <strong>Splunk</strong></li><li>Navigate to: <strong>Settings → Add Data</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fEGsmTo2N4Ovm5tDxpv5rA.png" /></figure><ul><li>Choose <strong>Upload</strong>, then select ssh_logs.json</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6o-8kAx-ZVilvDgk9aztg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M-NrOnhk8j-CrBm8w44cdg.png" /></figure><ul><li>Set Sourcetype → json (or custom)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9pq7QPVK-EKOBUwKFNvoA.png" /></figure><ul><li>Choose index → ssh_lab</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bXEeFCDVAzB8qTufuxDhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSduVQPP_Kr89xmix05qkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GvlerYPW-c2L-zyJkYuJJA.png" /></figure><ul><li>Verify that events appear in the index</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjKBFwzYVA0p6PmWv7nG5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tok4OT8R8FJPdkMuPRi4-Q.png" /></figure><h3>Lab Tasks &amp; Analysis</h3><h4>Task 1: Top 10 Endpoints with Failed SSH Login Attempts</h4><h3>✔️ First Query (Finding total failed attempts)</h3><pre>index=&quot;ssh_lab&quot; sourcetype=&quot;_json&quot; auth_success=&quot;false&quot;</pre><p>Using this, I found <strong>608 failed login attempts</strong> in total.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_g_veEwng6zyTw8WHHHWA.png" /></figure><h3>✔️ Top 10 failed endpoints</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfX1Apqt9Osct6_sjl5oNQ.png" /></figure><pre>index=&quot;ssh_lab&quot; sourcetype=&quot;_json&quot; auth_success=&quot;false&quot;<br>| stats count by id.orig_h<br>| sort -count<br>| head 10</pre><h3>Explanation</h3><ul><li><strong>stats count by id.orig_h</strong><br> Groups events by source IP (id.orig_h) and counts how many failed attempts each IP generated.</li><li><strong>sort -count</strong><br> Sorts the results by the count column in descending order (highest failures first).</li><li><strong>head 10</strong><br> Displays only the top 10 IP addresses with the most failed login attempts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qy23aixRBbURUl3__OmGOQ.png" /></figure><h3>Interpretation</h3><p>This query identifies IP addresses with the highest number of failed SSH authentication attempts.</p><p>High counts usually indicate:</p><ul><li>Possible brute-force attempts</li><li>Misconfigured systems repeatedly trying incorrect credentials</li><li>Unauthorized access attempts from suspicious endpoints</li></ul><h3>Task 2: Total SSH Connections</h3><h3>✔️ SPL Query</h3><pre>index=ssh_lab sourcetype=&quot;json&quot;<br>| stats count as total_ssh_connections</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofnvMlmAyUGOOA_BptOSqA.png" /></figure><h3>Explanation</h3><ul><li>This dataset contains only SSH logs, so counting all events is valid.</li><li>The count function simply counts all events.</li><li>as total_ssh_connections renames the output column to a readable name.</li></ul><h3>Interpretation</h3><p>This gives the total number of SSH-related events in the log file.<br>It helps establish a baseline of how much SSH activity occurred.</p><h3>Task 3: Count of SSH Event Types</h3><h3>✔️ SPL Query</h3><pre>index=ssh_lab sourcetype=&quot;json&quot;<br>| stats count by event_type</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v81DLDk5AjOlemvqc1yUdw.png" /></figure><h3>Explanation</h3><p>The field event_type appears as an <em>Interesting Field</em> in Splunk.<br>Running this query groups all SSH events by their type and counts them.</p><p>My dataset returned <strong>four event types</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*0CkZUwwhNl6ugFfbE482OA.png" /></figure><h3>Interpretation</h3><p>Splunk groups all SSH events by their event_type, helping us identify patterns such as:</p><ul><li>Many repeated failures → brute-forcing</li><li>Successful logins after failures → suspicious</li><li>High “no-auth” connections → scanning or enumeration</li></ul><h3>Security Findings (SOC Analyst Perspective)</h3><ul><li>Large numbers of failed authentication attempts may indicate brute-force activity.</li><li>A successful login after multiple failures could point to compromised credentials.</li><li>Source IPs with high failure counts should be checked for malicious behaviour.</li><li>Event type distribution helps understand overall SSH login patterns and detect anomalies.</li></ul><h3>Conclusion</h3><p>This SSH log analysis lab demonstrates how Splunk can quickly highlight authentication anomalies and suspicious behavior through SPL queries.<br>These are essential skills for SOC analysts monitoring real-world SSH environments.</p><h3>What’s Next</h3><p>I will continue this SOC challenge series by analyzing other datasets such as DNS, HTTP, network flows, and anomaly detection logs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77d36dc56b2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detecting a Brute-Force Attack on Wazuh — Lab]]></title>
            <link>https://medium.com/@sathinsha/detecting-a-brute-force-attack-on-wazuh-lab-49b2e3834141?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/49b2e3834141</guid>
            <category><![CDATA[wazuh-lab]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[wazuh-manager]]></category>
            <category><![CDATA[hydra]]></category>
            <category><![CDATA[brute-force]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Tue, 28 Oct 2025 17:18:57 GMT</pubDate>
            <atom:updated>2025-10-28T17:18:57.289Z</atom:updated>
            <content:encoded><![CDATA[<h3>Detecting a Brute-Force Attack on Wazuh — Lab</h3><blockquote>This Wazuh lab demonstrates how to identify repeated failed login attempts on Windows systems using the Wazuh SIEM platform. By integrating log collection, rule-based correlation, and real-time alerting, Wazuh can automatically detect patterns of unauthorized access such as RDP or SSH brute-force attempts. This step-by-step setup helps security analysts, SOC learners, and blue-team enthusiasts understand how endpoint events are analyzed, how correlation rules work, and how Wazuh can be used to strengthen intrusion detection and threat-hunting capabilities in enterprise or lab environments.</blockquote><p>Environment: Windows 10 VM, Kali Linux attacker VM, Wazuh full-server VM (all VMs in the same lab network). Both agents (Windows and Kali) are already connected to the Wazuh manager and visible in the dashboard. Screenshots collected during the lab are included below.</p><p>By — <a href="https://www.linkedin.com/in/sathinsha-semasinghe/"><em>Sathinsha Semasinghe</em></a></p><h3>Preliminaries — verify baseline logging and agent connectivity</h3><h3>Verify recent Security events on Windows</h3><p>Command used (PowerShell, run as Administrator):</p><pre>Get-WinEvent -LogName Security -MaxEvents 10 | Format-List -Property TimeCreated,Id,Message</pre><p>Purpose / explanation:</p><ul><li>This lists the most recent Security events including Event ID and full message. Successful visibility of Security events confirms the system is producing audit data that Wazuh can collect.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*J9OccgAffN8nCXqkBMjZsQ.png" /><figcaption><strong>Screenshot 1</strong></figcaption></figure><p><strong>Screenshot 1</strong> shows the Get-WinEvent output used to confirm Security logs are being generated.</p><h3>Ensure Windows produces failed logon events (Event ID 4625)</h3><h4>Enable auditing for logon events</h4><p>Commands used (PowerShell, run as Administrator):</p><pre># enable success &amp; failure for Logon events<br>auditpol /set /subcategory:&quot;Logon&quot; /success:enable /failure:enable</pre><pre># verify settings<br>auditpol /get /subcategory:&quot;Logon&quot;</pre><p>Purpose / explanation:</p><ul><li>If logon auditing is not enabled, failed logons will not be recorded and Wazuh cannot detect brute-force attempts. Enabling both success and failure ensures both accepted and rejected logons are written to the Security channel.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*JumE4ZoEhEmzUpbN2Eib-Q.png" /><figcaption><strong>Screenshot 2</strong></figcaption></figure><p><strong>Screenshot 2</strong> shows the auditpol commands and their verification output.</p><h3>Confirm Wazuh agent is collecting Windows Security events</h3><h4>Check agent configuration on Windows (ossec.conf)</h4><p>Snippet expected in ossec.conf:</p><pre>&lt;localfile&gt;<br>  &lt;location&gt;Security&lt;/location&gt;<br>  &lt;log_format&gt;eventchannel&lt;/log_format&gt;<br>&lt;/localfile&gt;</pre><p>Purpose / explanation:</p><ul><li>This instructs the Wazuh agent to read the Windows Security event channel and forward it to the manager.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ebDM-fjkwsagIpFB2PHaCw.png" /><figcaption><strong>Screenshot 3</strong></figcaption></figure><p><strong>Screenshot 3</strong> shows the ossec.conf excerpt confirming Security event channel monitoring.</p><h3>Enable Remote Desktop (lab only) and confirm reachability</h3><h4>Enable RDP and open firewall</h4><p>Commands used (PowerShell, run as Administrator):</p><pre># enable RDP<br>Set-ItemProperty -Path &quot;HKLM:\System\CurrentControlSet\Control\Terminal Server&quot; -Name &quot;fDenyTSConnections&quot; -Value 0</pre><pre># allow RDP in local firewall (lab)<br>Enable-NetFirewallRule -DisplayGroup &quot;Remote Desktop&quot;</pre><p>Purpose / explanation:</p><ul><li>RDP must be enabled and reachable so Hydra can attempt remote logins that generate failed authentication events.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*bWXiuPK9OfnKuM5Z_vEVOw.png" /><figcaption><strong>Screenshot 4</strong></figcaption></figure><ul><li>Use nmap or nc from Kali to confirm RDP is listening and reachable on port 3389. Example commands shown in Screenshot 5:</li></ul><pre>nmap -Pn -p 3389 WIN_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*rlRmsA1Q439-GJu5QS7pMQ.png" /><figcaption><strong>Screenshot 5</strong></figcaption></figure><p><strong>Screenshot 4</strong> shows the PowerShell commands enabling RDP; <strong>Screenshot 5</strong> shows the reachability checks from Kali.</p><h3>Prepare attacker tools and wordlists on Kali</h3><h4>Create username and password lists</h4><p>Commands used on Kali:</p><pre>cat &gt; userlist.txt &lt;&lt;EOF<br>Administrator<br>TestUser<br>badguy<br>EOF</pre><pre>cat &gt; passwd_list.txt &lt;&lt;EOF<br>password1<br>password2<br>123456<br>admin<br>test<br>qwerty<br>letmein<br>welcome<br>monkey<br>password123<br>EOF</pre><p>Purpose / explanation:</p><ul><li>Small, controlled lists are used for the lab so attempts are limited and easy to inspect. These files become input for Hydra.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*s1jUwfNz4Skhft4MHnmFCg.png" /><figcaption><strong>Screenshot 6</strong></figcaption></figure><p><strong>Screenshot 6</strong> shows the created userlist.txt and passwd_list.txt.</p><h3>Install Hydra (if not present)</h3><p>Commands used on Kali:</p><pre>sudo apt update<br>sudo apt install -y hydra</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KVzufwGp6eXCcguFDLvQXw.png" /><figcaption><strong>Screenshot 7</strong></figcaption></figure><p><strong>Screenshot 7</strong> shows the package installation output.</p><h3>Wazuh detection tuning — correlation rule creation</h3><h4>Find the base rule SID that fires for a single failed Windows logon</h4><ul><li>The built-in Wazuh rule that matches each failed Windows logon in this lab is <strong>60112</strong> (confirmed by inspecting Wazuh alerts). That base rule must be referenced by the correlation rule so Wazuh can count repeated matches.</li><li>Do not assume a fixed SID — always verify the actual rule.id from an alert containing the Event ID 4625. Use the alerts view in the Wazuh dashboard or inspect /var/ossec/logs/alerts/alerts.json.</li></ul><h4>Add the custom correlation rule</h4><p>Place the following block into /var/ossec/etc/rules/local_rules.xml on the Wazuh manager:</p><pre>&lt;group name=&quot;windows,bruteforce&quot;&gt;<br>  &lt;!-- Correlation rule: triggers when rule 60112 has matched 5 times within 60 seconds --&gt;<br>  &lt;rule id=&quot;100100&quot; level=&quot;10&quot; frequency=&quot;5&quot; timeframe=&quot;60&quot;&gt;<br>    &lt;if_matched_sid&gt;60112&lt;/if_matched_sid&gt;<br>    &lt;description&gt;Custom: 5 Windows failed logons within 60 seconds — Possible brute-force attack&lt;/description&gt;<br>  &lt;/rule&gt;<br>&lt;/group&gt;</pre><p>Explanation of fields:</p><ul><li>id=&quot;100100&quot;: a unique custom rule id (choose an id that does not collide with built-in rules).</li><li>frequency=&quot;5&quot; timeframe=&quot;60&quot;: triggers when the referenced base rule (60112) matches 5 times in 60 seconds. These are attributes on &lt;rule&gt;they must be attributes, not child elements. If used incorrectly the manager will fail to start with an XML parsing error.</li><li>&lt;if_matched_sid&gt;60112&lt;/if_matched_sid&gt;: reference to the base rule SID that matches a single failed logon event.</li><li>&lt;group&gt;bruteforce,windows&lt;/group&gt;: labels attached to generated alerts so hunts and filters are simpler.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*2C90MGHreBIU-9KcRLz4OQ.png" /><figcaption><strong>Screenshot 8</strong></figcaption></figure><p><strong>Screenshot 8</strong> shows the custom rule block as inserted into local_rules.xml.</p><h4>Restart Wazuh manager and verify no rule parser errors</h4><p>Commands on the manager:</p><pre>sudo systemctl restart wazuh-manager<br>sudo systemctl status wazuh-manager -l<br>sudo tail -n 200 /var/ossec/logs/ossec.log</pre><ul><li>If errors like Invalid option &#39;frequency&#39; appear, ensure the frequency and timeframe are attributes on the &lt;rule&gt; element (not child tags), and check for any other &lt;frequency&gt; occurrences in other rules. Fix any syntax issues and restart.</li><li>After successful restart, the manager will load the local rules and accept the new correlation rule.</li></ul><h3>Simulate a controlled RDP brute-force attack (Kali → Windows)</h3><h4>Launch Hydra against RDP</h4><p>From Kali, run:</p><pre>sudo hydra -t 4 -V -L userlist.txt -P passwd_list.txt rdp://WIN_IP</pre><p>Notes and safety:</p><ul><li>-t 4 limits parallel threads so the attack is controlled and easier to observe. Lower thread count if necessary.</li><li>Stop the run with Ctrl+C once enough failed attempts have been generated for the correlation rule to trigger.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gLm3aYXBkDXCGvPjjcjQSg.png" /><figcaption><strong>Screenshot 9</strong></figcaption></figure><p><strong>Screenshot 9</strong> shows the Hydra execution command.</p><h3>Verify detection in Wazuh</h3><h4>Inspect alerts in manager logs or dashboard</h4><ul><li>Tail alerts on manager:</li></ul><pre>sudo tail -f /var/ossec/logs/alerts/alerts.json</pre><ul><li>Use the Wazuh Dashboard → Threat hunting → Security events to search for alerts. Filter by:</li><li>rule.id:100100 (the custom correlation rule), or</li><li>the group tag: bruteforce, or</li><li>Event ID: win.system.eventID:4625 to view raw failures.</li></ul><p>Expected result:</p><ul><li>The custom correlation rule (100100) should generate a high-level alert when five failed logons (rule 60112) occur within 60 seconds. The dashboard will show the alert details, attempted usernames, and source IP.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1fSJ-AdeurZdbB-D5KUA5w.png" /><figcaption><strong>Screenshot 10</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FS4NUjepPcFEzvr4jWw5eA.png" /><figcaption><strong>Screenshot 11</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*v0rVnvDw6JpVy22yn96YHw.png" /><figcaption><strong>Screenshot 12</strong></figcaption></figure><p><strong>Screenshot 10</strong> shows the dashboard, and <strong>Screenshot 11 and Screenshot 12 </strong>displays the resulting detection alert.</p><h3>Troubleshooting common issues &amp; how they were resolved in the lab</h3><ol><li><strong>Manager fails to start after adding rule</strong></li></ol><ul><li>Symptom: Invalid option &#39;frequency&#39; in logs.</li><li>Root cause: frequency/timeframe were placed as child tags instead of attributes or used with &lt;if_sid&gt; instead of &lt;if_matched_sid&gt;.</li><li>Fix applied: Move frequency and timeframe into rule attributes and use &lt;if_matched_sid&gt;60112&lt;/if_matched_sid&gt;. Restart manager and recheck logs.</li></ul><ol><li><strong>Custom rule never fires even though base alerts exist</strong></li></ol><ul><li>Symptom: Repeated 4625 base alerts appear (rule 60112) but correlation rule 100100 never shows.</li><li>Check: Confirm if_matched_sid references the correct base SID (60112). Confirm frequency and timeframe match the test. Confirm manager loaded the rule (no parse errors). Generate at least frequency base events within timeframe. Use wazuh-logtest with a sample raw event to see which base rule matches a single event.</li></ul><ol><li><strong>No 4625 events visible in manager</strong></li></ol><ul><li>Check Windows auditing (auditpol) and Wazuh agent ossec.conf monitoring the Security channel. Verify agent connectivity in the Wazuh dashboard and confirm events are forwarded (/var/ossec/logs/archives/* on manager will contain the raw forwarded events).</li></ul><h3>Final detection notes &amp; recommendations</h3><ul><li>Always verify the base rule SID that corresponds to the raw event before creating correlation rules. In this lab the base rule is 60112.</li><li>Use conservative thresholds for production; for testing, low thresholds help validate detection logic. Example: frequency=5 timeframe=60 is suitable for a lab; production environments may need higher values to avoid false positives.</li><li>Label rules with groups (ex: bruteforce,windows) They simplify searches and dashboards.</li><li>Consider active response carefully: blocking IPs automatically can be useful but must be tested to avoid blocking legitimate users. Test blocks in a controlled environment first.</li><li>Keep the agent config and auditing settings documented so detection remains reliable after system changes.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49b2e3834141" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File Integrity Monitoring Using Wazuh — Lab]]></title>
            <link>https://medium.com/@sathinsha/file-integrity-monitoring-using-wazuh-lab-a4f6a48e95cb?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4f6a48e95cb</guid>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[file-integrity-monitoring]]></category>
            <category><![CDATA[wazuh-fim]]></category>
            <category><![CDATA[wazuh-lab]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Mon, 27 Oct 2025 16:03:55 GMT</pubDate>
            <atom:updated>2025-10-27T16:03:55.624Z</atom:updated>
            <content:encoded><![CDATA[<h3>File Integrity Monitoring Using Wazuh — Lab</h3><blockquote>This step-by-step guide explains how to configure and test File Integrity Monitoring (FIM) using Wazuh on both Windows and Linux systems. The lab demonstrates how security teams can detect file changes, unauthorized modifications, and deletions in real time through the Wazuh dashboard. Designed for SOC analysts, cybersecurity students, and blue-team professionals, this tutorial covers everything from agent configuration to alert analysis. Learn how to set up a complete Wazuh FIM lab environment in VMware using Windows 10 and Kali Linux, and understand how file monitoring helps improve system security, threat detection, and compliance visibility.</blockquote><p>By — <a href="https://www.linkedin.com/in/sathinsha-semasinghe/"><em>Sathinsha Semasinghe</em></a></p><h3>Introduction</h3><p>File Integrity Monitoring (FIM) is a key security capability that detects unauthorized changes to critical files or directories. It helps security teams identify malicious activities, insider threats, and configuration tampering in real time.<br>Wazuh, an open-source Security Information and Event Management (SIEM) platform, provides a powerful built-in FIM module that can monitor both Linux and Windows systems.</p><p>This walkthrough demonstrates how Wazuh can be used to monitor file changes across a Windows 10 host system and a Kali Linux virtual machine, both connected to a central Wazuh server running in another virtual machine.</p><h3>Lab Setup</h3><p>The lab environment consists of the following components</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*L-1Nv5XWafaCUEpwpaeGbA.png" /></figure><p>Both the Windows 10 system and Kali Linux VM have Wazuh agents installed and connected to the Wazuh server. Communication between the server and agents occurs over the default port 1514 .</p><h3>Objective</h3><p>The goal of this lab is to</p><ol><li>Configure Wazuh to monitor specific folders on both Windows 10 and Kali Linux.</li><li>Detect and log file additions, modifications, and deletions in real time.</li><li>Observe and analyze the alerts generated in the Wazuh dashboard.</li></ol><h3>Step 1: Creating Folders to Monitor</h3><h4>On Windows 10</h4><p>A folder was created on the desktop to be monitored by Wazuh:</p><pre>C:\Users\sathi\Desktop\FIM Example\TEST FILE</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Y4pY_REnTcSKfQSv27U3cA.png" /></figure><h4>On Kali Linux</h4><p>A similar folder was created in the home directory:</p><pre>mkdir -p /home/kali/Wazuh_FIM/KaluFolder</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XLwSJ8oa77-k6mp5IGgkWA.png" /></figure><p>These two folders serve as test directories for generating file activity that will later be detected by the Wazuh server.</p><h3>Step 2: Configuring File Integrity Monitoring</h3><h4>On the Kali Linux Agent</h4><p>The agent configuration file was edited using a text editor:</p><pre>sudo nano /var/ossec/etc/ossec.conf</pre><pre><br>  &lt;directories check_all=&quot;yes&quot; realtime=&quot;yes&quot;&gt;/home/kali/Wazuh-FIM/KaliFolder&lt;/directories&gt;<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*t2Gh9H3LCnSTNfHGxZpQ1g.png" /></figure><ul><li>disabled=no activates the FIM module.</li><li>realtime=yes enables real-time monitoring using the Linux inotify mechanism.</li></ul><p>The Wazuh agent was then restarted to apply the changes:</p><pre>sudo systemctl restart wazuh-agent</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*N8nGDwvRspTe4q8IPs7ocw.png" /></figure><h4>On the Windows 10 Agent</h4><p>The Windows agent configuration was also updated to monitor the chosen folder.<br> The ossec.conf file is located in:</p><pre>notepad &quot;C:\Program Files (x86)\ossec-agent\ossec.conf&quot;</pre><pre>&lt;directories check_all=&quot;yes&quot; realtime=&quot;yes&quot;&gt;C:\Users\&lt;username&gt;\Desktop\FIM Example\TEST FILE&lt;/directories&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*zRUHbMQ7uqA37cz50fhqdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Q2iazmVZuSHj4OfwFjSnuw.png" /></figure><p>After saving the file, the Windows agent service was restarted from using PowerShell</p><pre>Restart-Service wazuh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oZjFuEETbleIxfD6llVx-w.png" /></figure><h3>Step 3: Generating File Events</h3><p>To test the configuration, several file operations were performed inside both monitored folders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wtQ9kIXkZEx-Dbtoqz91zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*vf9pl5knuawVzTU9uXViYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JiiqMErL4i5GUPgeduUgwA.png" /></figure><h4>On Kali Linux</h4><pre># Create new file<br>echo &quot;this is new file&quot; &gt; newfile.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*fLvZHfYTRdaPVgFbfyLqDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*rpF3wVOlg2QWbUjyOhtQXw.png" /></figure><h4>On Windows 10</h4><p>A text file named “This is new text file<strong>.</strong>txt” was created inside the monitored folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*U5O--zR1EbqX5v6bHMqPnA.png" /></figure><p>Open Wazuh and Navigate to FIM for Windows Agent</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*S04F3-h_WhgLDOnReOUolQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*rhKATfJKiov2DIWG57iq_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XZddEd4QvaVAvTQlVKr-4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8i8FZzwoTm9mdxik0yF67Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*IEa8GrE0ppAz8iDR3He1SA.png" /></figure><p>Open Hello.txt File</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*0foq_dW3P1_RgVw7D-SI_A.png" /></figure><p>Change the text and Save</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gCtyZ_i_IUIsGbWgfdkpgg.png" /></figure><p>Monitor on Wazuh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*C5XRidqCDSAH1NWAsAKVAg.png" /></figure><p>See the diffrence between Old and Modified file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*aGd2E7fMqVIuWcq9mNE55g.png" /></figure><p>These actions were designed to simulate typical file events that FIM should detect creation, modification.</p><h3>Conclusion</h3><p>This lab successfully demonstrated how Wazuh File Integrity Monitoring can track file changes on both Linux and Windows systems in real time.</p><p>Through this setup</p><ul><li>Folders on both operating systems were continuously monitored.</li><li>File additions, modifications, and deletions were detected and logged.</li><li>The alerts were visible in the Wazuh dashboard with detailed metadata.</li></ul><p>File Integrity Monitoring is an essential defense mechanism in any organization. It plays a critical role in detecting unauthorized system changes, protecting configuration integrity, and supporting compliance requirements such as PCI DSS, HIPAA, and ISO 27001.</p><p>By implementing FIM with Wazuh, organizations can maintain visibility over file-level activities across all endpoints, strengthening their overall security posture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4f6a48e95cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detect and Block a Known Malicious Actor — Wazuh Lab]]></title>
            <link>https://medium.com/@sathinsha/detect-and-block-a-known-malicious-actor-wazuh-lab-c897167a1706?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/c897167a1706</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wazuh]]></category>
            <category><![CDATA[wazuh-active-response]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Sun, 26 Oct 2025 23:52:21 GMT</pubDate>
            <atom:updated>2025-10-26T23:52:21.994Z</atom:updated>
            <content:encoded><![CDATA[<h3>Detect and Block a Known Malicious Actor — Wazuh Lab</h3><blockquote>This lab demonstrates how to configure Wazuh to detect a known malicious IP accessing a Windows web server (Apache/XAMPP) and automatically block the IP using active response. The lab is designed for a private VMware Host‑Only network and is suitable for students or security professionals learning intrusion detection and response.</blockquote><blockquote><strong>Target audience:</strong> Beginner to intermediate learners in cybersecurity and SIEM systems.<br><strong>Difficulty:</strong> Beginner–Intermediate</blockquote><p>By — <a href="https://www.linkedin.com/in/sathinsha-semasinghe/"><em>Sathinsha Semasinghe</em></a></p><h3>Lab topology and IP addressing</h3><ul><li>Windows Host (Victim, Apache/XAMPP + Wazuh agent) — Host IP for VMware Host‑Only network: 192.168.149.1.</li><li>Wazuh Manager — IP: 192.168.149.129.</li><li>Kali VM (Attacker) — IP: 192.168.149.128.</li></ul><blockquote><em>All machines are on a private Host‑Only VMware network to isolate lab traffic from production networks.</em></blockquote><blockquote>The topology and IP assignments below represent the lab’s default configuration; however, VMware or the host system may automatically assign different IPs in other environments, so don’t worry if your addresses aren’t exactly the same.</blockquote><h3>Lab objectives</h3><ol><li>Install and configure Apache (or XAMPP) on the Windows host.</li><li>Configure the Wazuh agent on Windows to forward Apache access logs to the manager.</li><li>Download and process a threat intelligence list (AlienVault), append a test attacker IP, and convert it to a CDB file for fast lookup.</li><li>Create a custom detection rule in Wazuh that links web logs to the blacklist.</li><li>Configure active response to block the malicious IP automatically on Windows.</li><li>Simulate a web request from Kali and verify the block and alert in the Wazuh Dashboard.</li></ol><h3>Part A — Windows Web Server Configuration</h3><h4><strong>A1 — Apache vs XAMPP</strong></h4><ul><li>Apache is a web server software that records HTTP requests in access logs.</li><li>XAMPP is a Windows-friendly package that bundles Apache, MySQL, and other components for easy deployment.</li><li>XAMPP is recommended for this lab due to its simplicity and integrated control panel</li></ul><h4>A2 — Installing XAMPP (Windows Host)</h4><ol><li>Download XAMPP from <a href="https://www.apachefriends.org/">https://www.apachefriends.org</a>.</li><li>Install with default settings. Allow Apache to run when prompted.</li><li>Verify Apache is running by navigating to http://192.168.149.1 in a browser. The XAMPP page or “It works!” page should appear.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*aIoiHgy5liD1welI6KhYgg.png" /></figure><h4>A3— Wazuh Agent configuration (Windows)</h4><p>Open the agent configuration file:</p><pre>C:\Program Files (x86)\ossec-agent\ossec.conf</pre><p>Add the following &lt;localfile&gt; entry to monitor Apache access logs:</p><pre>&lt;localfile&gt;<br>  &lt;log_format&gt;syslog&lt;/log_format&gt;<br>  &lt;location&gt;C:\xampp\apache\logs\access.log&lt;/location&gt;<br>&lt;/localfile&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_QJ4SM5VYfy4agBwweBXA.png" /></figure><p>Save and restart the agent (PowerShell as Administrator):</p><pre>Restart-Service -Name wazuh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*RhX-6vsY7DHMqi5enY8bpg.png" /></figure><h3>Part B — Wazuh Manager Threat List</h3><h4>B1 — Download AlienVault list and append attacker IP</h4><p>Commands executed on Wazuh Manager (Ubuntu):</p><pre># Download the threat intelligence feed<br>sudo wget <a href="https://reputation.alienvault.com/reputation.generic">https://reputation.alienvault.com/reputation.generic</a> -O /var/ossec/etc/lists/alienvault_reputation.ipset</pre><pre># Append Kali attacker IP for testing<br>echo &quot;192.168.149.128&quot; | sudo tee -a /var/ossec/etc/lists/alienvault_reputation.ipset</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xtS_BtjLRcmhlevZEce74Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SEVzHuObSYngxplVdS67nA.png" /></figure><h4>B2 — Convert the list to CDB format</h4><p>Purpose: Wazuh uses the CDB format for fast IP lookups instead of plain text files.</p><pre>sudo wget https://wazuh.com/resources/iplist-to-cdblist.py -O /tmp/iplist-to-cdblist.py<br>sudo /var/ossec/framework/python/bin/python3 /tmp/iplist-to-cdblist.py /var/ossec/etc/lists/alienvault_reputation.ipset /var/ossec/etc/lists/blacklist-alienvault</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*TVSq8ZYVy1U51DowdlRuFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_HVbB0bKfxViYmEPb_meUw.png" /></figure><h4>B3 — Clean up and permissions</h4><pre>sudo rm -f /var/ossec/etc/lists/alienvault_reputation.ipset /tmp/iplist-to-cdblist.py<br>sudo chown wazuh:wazuh /var/ossec/etc/lists/blacklist-alienvault</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*UXZUvzh9f4V5nqTWrcH8TQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*7k32xs3aEwmjQfzE7J7gDQ.png" /></figure><h3>Part C — Detection Rule and Active Response</h3><h4>C1 — Add detection rule</h4><p>Edit /var/ossec/etc/rules/local_rules.xml and insert:</p><pre>&lt;group name=&quot;attack,&quot;&gt;<br>  &lt;rule id=&quot;100100&quot; level=&quot;10&quot;&gt;<br>    &lt;if_group&gt;web|attack|attacks&lt;/if_group&gt;<br>    &lt;list field=&quot;srcip&quot; lookup=&quot;address_match_key&quot;&gt;etc/lists/blacklist-alienvault&lt;/list&gt;<br>    &lt;description&gt;IP address found in AlienVault reputation database.&lt;/description&gt;<br>  &lt;/rule&gt;<br>&lt;/group&gt;</pre><ul><li>Rule ID 100100 triggers a critical alert if a web log entry matches the blacklist CDB.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LEyuQ1iDnVSyom9yk_3TxQ.png" /></figure><h4>C2 — Load list in ruleset</h4><p>Edit /var/ossec/etc/ossec.conf — inside &lt;ruleset&gt; section:</p><pre>&lt;list&gt;etc/lists/blacklist-alienvault&lt;/list&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kb-1m7B1J1bMKukp7SQ1QQ.png" /></figure><h4>C3 — Configure active response</h4><p>Edit /var/ossec/etc/ossec.conf — add &lt;active-response&gt; section:</p><pre>&lt;active-response&gt;<br>  &lt;command&gt;netsh&lt;/command&gt;<br>  &lt;location&gt;local&lt;/location&gt;<br>  &lt;rules_id&gt;100100&lt;/rules_id&gt;<br>  &lt;timeout&gt;60&lt;/timeout&gt;<br>&lt;/active-response&gt;</pre><ul><li>When rule 100100 fires, the Windows agent blocks the IP for 60 seconds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*zXBLYlhtK70mNObH3UnYPQ.png" /></figure><h4>C4 — Restart Wazuh Manager</h4><pre>sudo systemctl restart wazuh-manager<br>sudo systemctl status wazuh-manager --no-pager</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*d_DlHBTtQjdcvSvtzS_hPw.png" /></figure><h3>Part D — Attack Simulation and Verification</h3><h4>D1 — Generate request from Kali</h4><pre>curl -v http://192.168.149.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3sGxfITzlAt3EKQnEbEYWg.png" /></figure><h4>D2 — Verify Apache logs (Windows host)</h4><ul><li>Open C:\xampp\apache\logs\access.log.</li><li>The log should contain 192.168.149.128 (Kali IP) for the HTTP request.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*yiGz1iTHn5Dy-I_6NPvC2g.png" /></figure><h4>D3 — Verify alert in Wazuh Dashboard</h4><ul><li>Navigate to Threat Hunting or Alerts, filter by rule.id:100100 or attacker IP.</li><li>Confirm alert shows AlienVault match and that active response executed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EiTYwAAsrtiEugQcDQvhEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzQmhkIrKFRqw0mrpnOtjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*SkmR8gkYWIC_y9aJfVMhBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Th-Grz2SCkZE0qv3EAsraQ.png" /></figure><h3>Troubleshooting</h3><ul><li>Apache logs do not show Kali IP: verify Listen directive, Host‑Only adapter, and network configuration.</li><li>Active response does not run: confirm agent privileges and check /var/ossec/logs/ossec.log (manager) and C:\Program Files (x86)\ossec-agent\ossec.log (Windows).</li><li>Firewall permissions: agent must run as Administrator.</li><li>False positives: only use controlled lab IPs for testing.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c897167a1706" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireshark Lab : ICMP v8.0]]></title>
            <link>https://medium.com/@sathinsha/wireshark-lab-icmp-v8-0-d513dd18df37?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/d513dd18df37</guid>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[wireshark-labs]]></category>
            <category><![CDATA[wireshark-tutorial]]></category>
            <category><![CDATA[wireshark-icmp-lab]]></category>
            <category><![CDATA[wireshark-training]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Sat, 25 Oct 2025 14:06:43 GMT</pubDate>
            <atom:updated>2025-10-25T14:08:37.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>Wireshark Lab : ICMP v8.0</h3><blockquote><em>Sathinsha Semasinghe</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*aEQpV-EdW8nteBFHaCDx-g.png" /></figure><blockquote>In this lab, we’ll explore how ICMP works using Wireshark.<br>You’ll capture packets for both <strong>Ping</strong> and <strong>Traceroute (Tracert)</strong> commands and analyze them to understand how data travels through the network.</blockquote><p><a href="https://www-net.cs.umass.edu/wireshark-labs/Wireshark_ICMP_v8.0.doc">Lab Sheet</a></p><p>Before You Start</p><h3>You’ll Need:</h3><ul><li>Wireshark installed</li><li>Command Prompt (Windows) or Terminal (Linux/Mac)</li><li>Internet connection</li></ul><h3>Steps:</h3><ol><li>Open Wireshark and start capturing on your active network interface.</li><li>Keep Command Prompt open so you can run Ping and Tracert commands while capturing.</li><li>Stop the capture after each test and save it as ping.pcapng and tracert.pcapng.</li></ol><h3>Part 1 — ICMP and Ping</h3><h4>(Ping to <a href="http://www.cuhk.edu.hk)/">www.cuhk.edu.hk)</a></h4><p>In this part, we use the ping command to send packets to the Chinese University of Hong Kong website.<br>Ping sends ICMP Echo Request packets and receives Echo Reply packets these help test connectivity and round-trip time.</p><h4>Command used:</h4><pre>ping www.cuhk.edu.hk</pre><p>Wireshark captures these ICMP packets so we can study how ping works at the packet level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*haRXCrfhaYs3NI8yb1AEgg.png" /></figure><h3>1. What is the IP address of your host? What is the IP address of the destination host?</h3><ul><li>Apply filter: icmp</li><li>Select any Echo (ping) Request packet</li><li>Expand the Internet Protocol header</li><li>You’ll see Source (your IP) and Destination (the remote IP)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4O368QgycehOWdMRFbT4Ww.png" /></figure><p><strong>Answer:</strong></p><ul><li>Source IP: 192.168.8.119</li><li>Destination IP: 143.89.206.9</li></ul><h3>2. Why is it that an ICMP packet does not have source and destination port numbers?</h3><p>Ports are used by TCP and UDP, which work at the transport layer.<br> ICMP works at the network layer and is used for control messages, not app-level communication.<br> So ICMP doesn’t need port numbers.</p><p><strong>Answer :</strong><br>ICMP works at the network layer and doesn’t deliver data to specific applications, so it doesn’t use ports.</p><h3>3. Examine one of the ping request packets sent by your host. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes are the checksum, sequence number, and identifier fields?</h3><ul><li>Filter icmp</li><li>Click on an Echo (ping) Request packet</li><li>Expand ICMP header</li><li>Check fields: Type, Code, Checksum, Identifier, Sequence number</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S8FSiOeOru9LD4QoLUHU4w.png" /></figure><p>Checksum: 0x6f7a [correct] (2 bytes)<br>Identifier (BE): 0x0100 (2 bytes)<br>Sequence number (BE): 0x0001 (2 bytes)</p><p><strong>Answer:</strong></p><ul><li>Type = 8 (Echo Request)</li><li>Code = 0</li><li>Other fields: Checksum, Identifier, Sequence number, Data</li><li>Each of these fields i<strong>s 2 </strong>bytes</li></ul><h3>4. Examine the corresponding ping reply packet. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes are the checksum, sequence number, and identifier fields?</h3><ul><li>Find the Echo Reply from the destination</li><li>Expand ICMP section and compare with the request</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBHH4aXfA_6342VT5RYMTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*Dz1rxbNVjKuDdqq6uO1IRg.png" /></figure><p><strong>Answer:</strong></p><ul><li>Type = 0 (Echo Reply)</li><li>Code = 0</li><li>Fields: Checksum, Identifier, Sequence number, Data</li><li>Each = 2 bytes</li></ul><h3>Part 2 — ICMP and Traceroute (Tracert)</h3><h4>(Traceroute to gaia.cs.umass.edu)</h4><p>Now we use Tracert, which helps us trace the path packets take to reach a destination.<br>It works by sending packets with gradually increasing TTL (Time To Live) values.<br>Each router that the packet passes through decreases the TTL.<br>When TTL becomes 0, the router sends back an ICMP Time Exceeded message — that’s how Traceroute discovers the route.</p><h4>Command used:</h4><pre>tracert -d gaia.cs.umass.edu</pre><p>Wireshark will capture both Echo Request/Reply and Time Exceeded ICMP packets, showing every hop along the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*ZuYfjezTQkutERJzj8YkEA.png" /></figure><h3>5. What is the IP address of your host? What is the IP address of the target destination host?</h3><ul><li>Filter icmp</li><li>Select the first Echo Request or Time Exceeded packet</li><li>Expand Internet Protocol header</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*xKr1Fo9C-bfLeiwhe6AuHw.png" /></figure><p><strong>Answer:</strong></p><ul><li>Source IP: 192.168.8.119</li><li>Destination IP: 128.93.162.83</li></ul><h3>6. If ICMP sent UDP packets instead (as in Unix/Linux), would the IP protocol number still be 01 for the probe packets? If not, what would it be?</h3><p>Each protocol has a unique number in the IP header:</p><ul><li>ICMP = 1</li><li>UDP = 17<br> So if Traceroute used UDP, the IP protocol field would show 17 instead of 1.</li></ul><p><strong>Answer:</strong><br> No, it would be 17 (0x11) instead of 1.</p><h3>7. Examine the ICMP echo packet in your screenshot. Is this different from the ICMP ping query packets in the first half of this lab? If yes, how so?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4qZx8FuNPZCMoGxbntTFUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*GdwG-1Rhga-NaBEpzd0jvw.png" /></figure><p><strong>Answer:</strong><br>No. It’s basically the same.<br>Traceroute (in Windows) sends ICMP Echo Requests just like Ping does.<br>The only difference is TTL value — Traceroute changes TTL in each probe to make routers along the path reply.</p><h3>8. Examine the ICMP error packet in your screenshot. It has more fields than the ICMP echo packet. What is included in those fields?</h3><p>ICMP error messages (like <strong>Time Exceeded</strong>) include:</p><ul><li>The ICMP header (Type, Code, Checksum)</li><li>The original IP header and first 8 bytes of the packet that caused the error</li></ul><p>This helps the sender identify which packet triggered the error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMqB1OQrRNGN8XFI57Q2rA.png" /></figure><p><strong>Answer:</strong><br>It includes the ICMP header plus the original packet’s IP header and first 8 bytes.</p><h3>9. Examine the last three ICMP packets received by the source host. How are these packets different from the ICMP error packets? Why are they different?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jNzUb4qg5GtXs3aNLdrDkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*VxiKWvOeJnJpQ1UCWjSKgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*nQh__4s_kykVkHjA9ijAvQ.png" /></figure><p><strong>Answer:</strong><br>The last three packets are Echo Replies (Type 0) from the destination — they mean the probe reached the target.<br>ICMP error packets (Time Exceeded) come from intermediate routers when TTL expires.<br>So replies come from the final host, and errors come from routers in between.</p><h3>10. Within the tracert measurements, is there a link whose delay is significantly longer than others? Refer to the screenshot in Figure 4, is there a link whose delay is significantly longer than others? On the basis of the router names, can you guess the location of the two routers on the end of this link?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*ifxBQx3cW2FLdpLyVU0i1A.png" /></figure><p>When reading the traceroute results, each hop shows how long it takes for a packet to travel from your computer to that router and back.<br> The first few hops (1–9) show small delays (around 10–25 ms), which means they’re local or regional routers.<br> But between hop 9 and hop 10, the delay suddenly jumps to around 100 ms — this is a clear sign of a long-distance connection.</p><p>Looking at the router names:</p><ul><li>Hop 9: att-gw.nyc.opentransit.net → “nyc” means New York (USA)</li><li>Hop 10: P4-0.PASCR1.Pastourelle.opentransit.net → part of Opentransit network in France</li></ul><p>So the delay increase between these two hops shows the transatlantic link — the connection crossing the ocean from New York to France.</p><p><strong>Answer:</strong><br>Yes. The large delay occurs between hop 9 (att-gw.nyc.opentransit.net) and hop 10 (P4-0.PASCR1.Pastourelle.opentransit.net).<br>This represents the transatlantic link between New York and France, which naturally has higher latency due to the long distance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d513dd18df37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireshark Lab : TCP v8.0]]></title>
            <link>https://medium.com/@sathinsha/wireshark-lab-tcp-v8-0-344aaed0669c?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/344aaed0669c</guid>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wireshark-lab]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[wireshark-tcp-lab]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Fri, 24 Oct 2025 17:57:33 GMT</pubDate>
            <atom:updated>2025-10-26T23:55:50.347Z</atom:updated>
            <content:encoded><![CDATA[<h3>Wireshark Lab : TCP v8.0</h3><blockquote>Sathinsha Semasinghe</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*z4wQ97PAIBtXL7Au_zEruQ.png" /></figure><p><a href="https://www-net.cs.umass.edu/wireshark-labs/Wireshark_TCP_v8.0.doc">Lab Sheet</a></p><h3>👉 “Please download the PCAP file to complete the questions.”</h3><p><a href="https://drive.google.com/file/d/16dIRjhDPquNs5-IzvWHlpAoFhbEsdzHk/view?usp=sharing">Click here to download</a></p><h3>1. What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.edu?</h3><ul><li>In Wireshark, set the <strong>display filter</strong> to tcp.</li><li>Find the <strong>HTTP POST</strong> packet — this is the packet where your computer uploads the file to the server.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*qeLrVcTRhJrnR6m-f6Q6yQ.png" /></figure><ul><li>Click on that packet and expand the <strong>Internet Protocol</strong> and <strong>Transmission Control Protocol (TCP)</strong> sections.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*4PGwml4hJsctQnUZPsjb5Q.png" /></figure><ul><li>The <strong>Source IP</strong> is your computer’s address, and the <strong>Source Port</strong> is the port your computer used to send the file.</li></ul><p><strong>Answer:</strong></p><ul><li>Source IP: 192.168.1.102</li><li>Source Port: 1161</li></ul><h3><strong>2. What is the IP address of gaia.cs.umass.edu? On what port number is it sending and receiving TCP segments for this connection?</strong></h3><ul><li>Select the same HTTP POST packet in Wireshark.</li><li>Look at the <strong>Destination IP</strong> and <strong>Destination Port</strong> fields under the TCP section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*TXCco5_teEGVi2kAsstsQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*ji3etk52lFAjkVGqrYZ0Fw.png" /></figure><ul><li>This will show the server’s address and the port number it uses for web communication (HTTP).</li></ul><p><strong>Answer:</strong></p><ul><li>Destination IP: 128.119.245.12</li><li>Destination Port: 80</li></ul><blockquote>3. What is the IP address and TCP port number used by your client computer (source) to transfer the file to gaia.cs.umass.edu?</blockquote><blockquote><strong>Answer:</strong><br> Do this on your own and drop a comment with your result!</blockquote><h3>4. What is the sequence number of the TCP SYN segment that is used to initiate the TCP connection between the client computer and gaia.cs.umass.edu? What is it in the segment that identifies the segment as a SYN segment?</h3><ul><li>Use the tcp filter and find the <strong>first SYN packet</strong> in the TCP handshake.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skDywd3BFymxF0BmLR0U1A.png" /></figure><ul><li>Click on it and expand the <strong>TCP section</strong>.</li><li>You’ll see the <strong>Sequence Number</strong> (usually starts at 0 in relative view).</li><li>The <strong>Flags</strong> field will have <strong>SYN</strong> checked — that identifies it as a SYN segment.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*aQ9zuBhl9dQcjFSL3uqS8g.png" /></figure><p><strong>Answer:</strong></p><ul><li>Sequence Number: 0</li><li>Flags: 0x002 (SYN)</li></ul><h3>5. What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client computer in reply to the SYN? What is the value of the Acknowledgement field in the SYNACK segment? How did gaia.cs.umass.edu determine that value? What is it in the segment that identifies the segment as a SYNACK segment?</h3><ul><li>Find the <strong>second packet</strong> in the TCP handshake — it’s the <strong>SYN+ACK</strong> packet.</li><li><em>In the TCP section, look for </em><strong><em>Sequence Number, Acknowledgment Number, </em>Flags</strong> field (it should show <strong>SYN, ACK</strong>)</li><li>The server sets the <strong>Acknowledgment Number</strong> to the client’s sequence number + 1 (confirming it received the SYN).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*ktgosfTX2UuiN9gcNuCpCg.png" /></figure><p><strong>Answer:</strong></p><ul><li>Sequence Number: 0 (relative)</li><li>Acknowledgment Number: 1</li><li>Flags: 0x012 (SYN, ACK)</li></ul><h3>6. What is the sequence number of the TCP segment containing the HTTP POST command?</h3><ul><li>Look for the packet that contains <strong>HTTP POST</strong> inside the <strong>data field</strong> (not the HTTP layer).</li><li>The POST message itself is carried <strong>inside a TCP segment</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GO1abpKztoHxkcEfADcHrg.png" /></figure><ul><li>Click that packet (e.g., Packet 4 in the trace) and expand the TCP header.</li><li>The <strong>Sequence Number</strong> tells you where that segment starts in the data stream.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*vnmfihPoM3yS0HgRelMiWg.png" /></figure><ul><li>You can then follow the next sequence numbers (like 566, 2026, 3486, etc.) to see the next packets in the transfer.</li></ul><p><strong>Answer:</strong></p><ul><li>Packet 4: Seq = 1</li><li>Packet 5: Seq = 566</li><li>Packet 7: Seq = 2026</li><li>Packet 8: Seq = 3486</li><li>Packet 10: Seq = 4946</li><li>Packet 11: Seq = 6406</li></ul><h3>7. Consider the TCP segment containing the HTTP POST as the first segment in the TCP connection. What are the sequence numbers of the first six segments in the TCP connection (including the segment containing the HTTP POST)? At what time was each segment sent? When was the ACK for each segment received? Given the difference between when each TCP segment was sent, and when its acknowledgement was received, what is the RTT value for each of the six segments? What is the EstimatedRTT value (see Section 3.5.3, page 242 in text) after the receipt of each ACK?</h3><ul><li>Change the Wireshark time format:</li><li>Go to <strong>View → Time Display Format → Seconds since beginning of capture.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TFytHoOKSG9EyR395KrPA.png" /></figure><ul><li>Find each data segment and note: <strong>Time sent and Sequence number</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*l1M_taI-PZO7ztl4GlchSA.png" /></figure><ul><li>Then find the <strong>ACK packet</strong> that acknowledges that sequence number.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1pYHB_I8A5ytlg6KkRakcw.png" /></figure><ul><li>Subtract the two times → that gives you the <strong>Round-Trip Time (RTT)</strong>.</li></ul><p><strong>Answer:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*dysXmPpWMPjnPMnBG75kmQ.png" /></figure><h3>8. What is the length of each of the first six TCP segments?</h3><ul><li>Look at the <strong>Length</strong> column in the packet list, or expand the Frame section in the packet details.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*rOayIQGiSWq2pZlj6cQGpQ.png" /></figure><ul><li>Each entry shows the <strong>size of the TCP segment</strong>, including the payload.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVz5UKixQc_aOtjdWV_mjw.png" /></figure><p><strong>Answer:</strong></p><ul><li>Packet 4 = 619 bytes</li><li>Packet 5 = 1514 bytes</li><li>Packet 7 = 1514 bytes</li><li>Packet 8 = 1514 bytes</li><li>Packet 10 = 1514 bytes</li><li>Packet 11 = 1514 bytes</li></ul><h3>9. What is the minimum amount of available buffer space advertised at the receiver for the entire trace? Does the lack of receiver buffer space ever throttle the sender?</h3><ul><li>Select any <strong>ACK packet</strong> sent by the receiver (server).</li><li>In the <strong>TCP header</strong>, look at the <strong>Window Size</strong> field . Tthis is the advertised buffer space.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*T4g8z3OG_cMMt1kD310KGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*9LeddbHQjGxQJRl9IvEhpA.png" /></figure><ul><li>The smaller the window, the less space is available for incoming data.</li><li>If this window reaches zero, the sender must pause. This is called <strong>flow control</strong>.</li></ul><p><strong>Answer:</strong></p><ul><li>Minimum Window Size: <strong>6780 bytes</strong></li><li>The buffer did <strong>not</strong> throttle the sender. The window kept increasing as data was acknowledged.</li></ul><h3>10. Are there any retransmitted segments in the trace file? What did you check for (in the trace) in order to answer this question?</h3><ul><li>In Wireshark, look at the <strong>Info</strong> column for lines that say <strong>[TCP Retransmission]</strong>.</li><li>You can also use the filter:</li></ul><pre>tcp.analysis.retransmission</pre><ul><li>If no packets appear, then there are no retransmissions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ro5tlSwVTwQW6BvvvP-jA.png" /></figure><ul><li>You can confirm using the <strong>TCP Stream Graph → Time-Sequence-Graph (Stevens)</strong> — retransmissions would appear as backward steps.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17Pg2IUMACdmkT-vmA33qA.png" /></figure><p><strong>Answer:</strong></p><ul><li>No retransmitted segments.</li><li>The graph shows continuous forward progress with no repeat transmissions.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=344aaed0669c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireshark Lab : DNS v8.1]]></title>
            <link>https://medium.com/@sathinsha/wireshark-lab-dns-v8-1-27a47db703af?source=rss-746b89857544------2</link>
            <guid isPermaLink="false">https://medium.com/p/27a47db703af</guid>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[sathinsha]]></category>
            <category><![CDATA[wireshark-dns]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[wireshark-labs]]></category>
            <dc:creator><![CDATA[Sathinsha]]></dc:creator>
            <pubDate>Fri, 24 Oct 2025 13:54:25 GMT</pubDate>
            <atom:updated>2025-10-24T13:54:25.450Z</atom:updated>
            <content:encoded><![CDATA[<h3>Wireshark Lab : DNS v8.1</h3><blockquote>Sathinsha Semasinghe</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*WzPiejgR087PlDQfeAVY4w.png" /></figure><p><a href="https://www-net.cs.umass.edu/wireshark-labs/Wireshark_DNS_v8.1.doc">Lab Sheet</a></p><h3>1. Run nslookup to obtain the IP address of the web server for the Indian Institute of Technology in Bombay, India: www.iitb.ac.in. What is the IP address of <a href="http://www.iitb.ac.in/">www.iitb.ac.in</a></h3><p>We use the nslookup command to find the IP address for the hostname <a href="http://www.iitb.ac.in./">www.iitb.ac.in.</a></p><p>Open Command Prompt (Windows) or Terminal (Linux/macOS), then type: <em>nslookup </em><a href="http://www.iitb.ac.in/"><em>www.iitb.ac.in</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*9Hgk1WNFTTDXPmTLw_2A4w.png" /></figure><p>The output shows both the DNS server used and the resolved IP address.</p><p><strong>Answer:</strong><br> 103.21.124.133</p><h3>2. What is the IP address of the DNS server that provided the answer to your nslookup command in question 1 above?</h3><p>In the same nslookup output, the “Server” and “Address” lines show which DNS server provided the response.This is usually your system’s <strong>default local DNS server</strong> (either your ISP’s or router’s).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*E_IhV4YzoqtWpyeamv0_jQ.png" /></figure><p><strong>Answer:</strong><br> 2402:4000::1</p><h3>3. Did the answer to your nslookup command in question 1 above come from an authoritative or non-authoritative server?</h3><p>Look at the first few lines of the nslookup output.If it says <strong>“Non-authoritative answer”</strong>, that means the DNS server provided the answer from its <strong>cache</strong>, not directly from the authoritative DNS server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*DVhT_wiFOUoihxp6kyrfww.png" /></figure><p><strong>Answer:</strong><br>Non-authoritative.<br>The response came from a cached record in the local DNS server, not from the authoritative DNS for iitb.ac.in.</p><h3>4. Use the nslookup command to determine the name of the authoritative name server for the iit.ac.in domain. What is that name? (If there are more than one authoritative servers, what is the name of the first authoritative server returned by nslookup)? If you had to find the IP address of that authoritative name server, how would you do so?</h3><p>Use the -type=NS option with nslookup to find <strong>name servers</strong> (NS records) for a domain.<br> Command: nslookup -type=NS iith.ac.in</p><p>The output lists all authoritative DNS servers for that domain.<br>To find the IP address of any of them, run nslookup &lt;server_name&gt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*PGUYmFv0XQwxgNaUc_3zgg.png" /></figure><p><strong>Answer:</strong><br> Authoritative Name Servers:</p><ul><li>dns1.iith.ac.in</li><li>dns2.iith.ac.in</li></ul><p>To find their IP addresses : nslookup dns1.iith.ac.in</p><h3>👉 <strong>“Please download the 1st PCAP file to complete the next set of questions.”</strong></h3><p><a href="https://drive.google.com/file/d/12TCbZOBYmtS36aYewVqP9HOAQEaqgVKj/view?usp=sharing">Click here to download</a></p><h3>5. Locate the first DNS query message resolving the name gaia.cs.umass.edu. What is the packet number in the trace for the DNS query message? Is this query message sent over UDP or TCP?</h3><p>In Wireshark:</p><ul><li>Use filter: dns</li><li>Find the first <strong>Standard query</strong> for gaia.cs.umass.edu</li><li>Check its <strong>No.</strong> column for the packet number</li><li>Look at the packet details(it should show UDP)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_UKLlCZ-hyTIe7QujoGDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FAXc9ZLzrjr6GlY5oKh7UQ.png" /></figure><p><strong>Answer:</strong></p><ul><li>Packet number: <strong>15</strong></li><li>Protocol: <strong>UDP</strong></li></ul><h3>6. Now locate the corresponding DNS response to the initial DNS query. What is the packet number in the trace for the DNS response message? Is this response message received via UDP or TCP?</h3><p>Still under the dns filter, find the DNS <strong>response</strong> matching the earlier query (it will have the same Transaction ID).<br> Check its packet number and protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zshe5NfIc2zwdXr5rl_XJA.png" /></figure><p><strong>Answer:</strong></p><ul><li>Packet number: <strong>17</strong></li><li>Protocol: <strong>UDP</strong></li></ul><h3>7. What is the destination port for the DNS query message? What is the source port of the DNS response message?</h3><p>Select the DNS query packet and expand the <strong>UDP header</strong> section in Wireshark.<br>DNS queries are sent to port <strong>53</strong> (destination- use query packet), and <strong>responses</strong> come <strong>from port 53</strong> ( responce packet - not query packet).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*sroPNlBDtTvyqVlXt9TBcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*c3g0y49YIWG05haN_SkyUg.png" /></figure><p><strong>Answer:</strong></p><ul><li>Destination port: <strong>53</strong></li><li>Source port: <strong>53</strong></li></ul><h3>8. To what IP address is the DNS query message sent?</h3><p>In the packet details, check the <strong>Destination IP</strong> under the IP header.<br>This is your local DNS server’s IP — for example, your ISP’s DNS (like Comcast).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*xm0CCjQEEv2vz4pisJmVRw.png" /></figure><p><strong>Answer:</strong><br> 75.75.75.75 — this is a Comcast DNS server.</p><h3>9. Examine the DNS query message. How many “questions” does this DNS message contain? How many “answers” does it contain?</h3><p>Expand the DNS section in Wireshark.</p><ul><li>“Questions” shows how many queries are being made</li><li>“Answers” shows how many answers are present<br> For a standard DNS query, it will have <strong>1 question</strong> and <strong>0 answers</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*jZoRnI4Oxu2AZiR8YjPuig.png" /></figure><p><strong>Answer:</strong></p><ul><li>Questions: <strong>1</strong></li><li>Answers: <strong>0</strong> (because this is a query — no response yet)</li></ul><h3>10. Examine the DNS response message to the initial query message. How many “questions” does this DNS message contain? How many “answers” does it contain?</h3><p>In the DNS <strong>response</strong> packet, expand the DNS layer.<br> You’ll see the original question echoed back plus the answer record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*2-hwSSWNbd2VSRVs-J0AsQ.png" /></figure><p><strong>Answer:</strong></p><ul><li>Questions: <strong>1</strong></li><li>Answers: <strong>1</strong></li></ul><h3>11. The web page for the base file http://gaia.cs.umass.edu/kurose_ross/ references the image object http://gaia.cs.umass.edu/kurose_ross/header_graphic_book_8E_2.jpg , which, like the base webpage, is on gaia.cs.umass.edu. What is the packet number in the trace for the initial HTTP GET request for the base file http://gaia.cs.umass.edu/kurose_ross/? What is the packet number in the trace of the DNS query made to resolve gaia.cs.umass.edu so that this initial HTTP request can be sent to the gaia.cs.umass.edu IP address? What is the packet number in the trace of the received DNS response? What is the packet number in the trace for the HTTP GET request for the image object http://gaia.cs.umass.edu/kurose_ross/header_graphic_book_8E2.jpg? What is the packet number in the DNS query made to resolve gaia.cs.umass.edu so that this second HTTP request can be sent to the gaia.cs.umass.edu IP address? Discuss how DNS caching affects the answer to this last question.</h3><p>Apply the <strong>filter</strong> http in Wireshark to locate the HTTP GET requests for the base webpage and the image.Note the packet numbers for both GET requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsuuphYenm6Cb86gkiAG5w.png" /></figure><p>Then, switch to the <strong>filter</strong> dns to find the DNS query and response packets for gaia.cs.umass.edu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DAWdlA2KkFs0KaGT0qQg7w.png" /></figure><p>Compare how the second HTTP request behaves — since the DNS result for that domain is already cached, no new DNS query is made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tW19zUC47HLk0I9y1SitRw.png" /></figure><p><strong>Answer:</strong></p><ul><li>Initial HTTP GET request (base page): <strong>Packet 22</strong></li><li>DNS query for gaia.cs.umass.edu: <strong>Packet 15</strong></li><li>DNS response: <strong>Packet 17</strong></li><li>HTTP GET for image: <strong>Packet 205</strong></li><li>Second DNS query: Not present (cached)</li></ul><p>When the first DNS query resolved gaia.cs.umass.edu, the IP address was stored in the local DNS cache. So, when the browser requested another object (like the image) from the same domain, it used the cached address instead of performing another DNS lookup.</p><h3>👉 “Please download the 2nd PCAP file to complete the next set of questions.”</h3><p><a href="https://drive.google.com/file/d/1eu2Syf1s0VFlTCV-iCLvspmzISxm9fZ4/view?usp=sharing">Click here to download</a></p><h3>12. What is the destination port for the DNS query message? What is the source port of the DNS response message?</h3><p>Open the DNS query and response packets in Wireshark.<br>Under the <strong>UDP layer</strong>, check both <strong>Source Port</strong> and <strong>Destination Port</strong>.<br>DNS queries always go <strong>to port 53</strong>, and responses come <strong>from port 53</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*j8E6zVP4xj_ox5RhrNgj3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*ldOEZ9MktFBWj2NJWgndNA.png" /></figure><p><strong>Answer:</strong></p><ul><li>Destination port: <strong>53</strong></li><li>Source port: <strong>53</strong></li></ul><h3>13. To what IP address is the DNS query message sent? Is this the IP address of your default local DNS server?</h3><p>Look under the <strong>Internet Protocol (IP)</strong> section of the DNS query packet.<br>The <strong>Destination IP address</strong> shown is the address of the DNS server your machine is using (usually your ISP’s or router’s DNS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*kKShRPoJpTq_h4LWeDKRFQ.png" /></figure><p><strong>Answer:</strong></p><ul><li>Destination IP: 8.8.8.8</li><li>Yes, it’s the local DNS server (Comcast DNS).</li></ul><h3>14. Examine the DNS query message. What “Type” of DNS query is it? Does the query message contain any “answers”?</h3><p>Expand the <strong>Flags</strong> field in the DNS query. You’ll see something like:<br>Flags: 0x0100 Standard query.<br>The query type will usually be <strong>Type A</strong>, meaning it requests the IPv4 address of the hostname.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*RBxHxDA1_MSk5M6pozu-bw.png" /></figure><p><strong>Answer:</strong></p><ul><li>Type: <strong>0x0100 Standard query</strong> (Type A)</li><li>Answers: <strong>0</strong> — because it’s a question message only.</li></ul><h3>15. Examine the DNS response message to the query message. How many “questions” does this DNS response message contain? How many “answers”?</h3><p>In the DNS <strong>response</strong>, you’ll see the original question repeated along with the answer section containing the resolved IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*zH7sxF1-i5nVgdETutjiwQ.png" /></figure><p><strong>Answer:</strong></p><ul><li>Questions: <strong>1</strong></li><li>Answers: <strong>1</strong></li></ul><h3>👉 “Please download the 3rd PCAP file to complete the next set of questions.”</h3><p><a href="https://drive.google.com/file/d/1MdLgRZe7pZCUrfbJbaPZxSLKulEamyGm/view?usp=sharing">Click here to download</a></p><h3>16. To what IP address is the DNS query message sent? Is this the IP address of your default local DNS server?</h3><p>Again, check the <strong>Destination IP</strong> of the DNS query packet.<br> This should be the same DNS server IP used in previous queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOdQrj6vx-EYjm-N9Xs7bw.png" /></figure><p><strong>Answer:</strong></p><ul><li>Destination IP: <strong>75.75.75.75</strong></li><li>Yes, this is the default local DNS server.</li></ul><h3>17. Examine the DNS query message. How many questions does the query have? Does the query message contain any “answers”?</h3><p>In the DNS section, look for:</p><ul><li><strong>Questions:</strong> should be 1</li><li><strong>Answer RRs:</strong> should be 0</li></ul><p>This is a typical behavior for all DNS queries before receiving a response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*0JlbP0sBqiwrnkSgUodceQ.png" /></figure><p><strong>Answer:</strong></p><ul><li>Questions: <strong>1</strong></li><li>Answers: <strong>0</strong></li></ul><h3>18. Examine the DNS response message (in particular the DNS response message that has type “NS”). How many answers does the response have? What information is contained in the answers? How many additional resource records are returned? What additional information is included in these additional resource records (if additional information is returned)?</h3><p>Use nslookup –type=NS umass.edu and capture packets in Wireshark.<br> In the <strong>DNS response</strong>, check:</p><ul><li><strong>Answers section:</strong> should contain multiple NS records (name servers).</li><li><strong>Additional section:</strong> may include the IP addresses (A records) of those name servers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*kD7BRwfM2qh4rlDdChxVow.png" /></figure><p><strong>Answer:</strong></p><ul><li>Answers: <strong>3</strong> (contains NS records for the domain)</li><li>Information: Names of the authoritative name servers</li><li>Additional Records: <strong>3 more</strong>, showing the <strong>IP addresses</strong> of those servers</li></ul><p>We got 3 answers because this time we didn’t ask for one website’s IP.<br>We used -type=NS, which asks for the <strong>name servers</strong> of the domain.<br>A domain usually has <strong>more than one name server</strong>, so we got 3.<br>The 3 additional records show the <strong>IP addresses</strong> of those name servers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27a47db703af" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>