<?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 MouhibMahadbi on Medium]]></title>
        <description><![CDATA[Stories by MouhibMahadbi on Medium]]></description>
        <link>https://medium.com/@mouhibmh?source=rss-1eb030be208b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SiKxUZMPn2AP4FzTZ4A1bw@2x.jpeg</url>
            <title>Stories by MouhibMahadbi on Medium</title>
            <link>https://medium.com/@mouhibmh?source=rss-1eb030be208b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:14:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mouhibmh/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[A Photo Is Not Just a Picture: Understanding Image Metadata and Privacy Risks]]></title>
            <link>https://medium.com/@mouhibmh/a-photo-is-not-just-a-picture-understanding-image-metadata-and-privacy-risks-b1c6f41a18c1?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1c6f41a18c1</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[osint]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 15:17:21 GMT</pubDate>
            <atom:updated>2026-07-13T15:17:21.601Z</atom:updated>
            <content:encoded><![CDATA[<p>You take a photo of your coffee, your workspace, your house, or a trip. You see only the image. A collection of pixels representing a moment.But the file itself may contain another layer of information that you never intentionally shared.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWiEkwFwTadxlAEJJtHEOg.png" /><figcaption>None of this information required breaking into the device or using advanced techniques. The information was already included in the file.</figcaption></figure><h3>A Photo Is Not Just Pixels</h3><p>When you look at a digital photograph, you see a moment frozen in time — a clean grid of colored pixels. But underneath those colors lies a hidden data stream you were never meant to see.</p><p>Every time you snap a photo, your device quietly appends an invisible digital ledger directly into the file’s code. This ledger is metadata (EXIF, IPTC, and XMP data). It acts as a highly accurate digital footprint, documenting exactly how, when, and where the image was produced.Inside a Real Image File</p><p>Take a look at this raw technical extraction from a standard JPEG image file using <strong>Exiftool</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XkCr33K_p1ChZALLoUtX_Q.png" /><figcaption>Here is what a real image file can contain</figcaption></figure><p>None of this data requires a forensics degree or advanced hacking tools to uncover. It is baked directly into the file structure itself, exposed to anyone who drops the image into a standard file viewer.</p><h3>Deep Dive: How Your Metadata Is Weaponized</h3><p>To understand how this file structure can be turned against you, we have to look past the technical labels and look at how each category is actively exploited in the wild.</p><h4>1. Camera Metadata</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctBPeh9a9JtpAavGDTQMaA.png" /></figure><p>This block tracks the physical hardware DNA of your device: the manufacturer, exact model (e.g., SONY ILCE-7M3), lens profiles, exposure settings, and unique internal serial numbers.</p><ul><li><strong>The Exploit:</strong> Camera serial numbers act like a fingerprint. If you run multiple anonymous accounts across different platforms or forums over several years, a basic script can scrape your images, match the identical serial numbers hidden in the background, and instantly link your completely separate online identities to the exact same physical camera body.</li></ul><h4>2. Time Metadata</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PdCWAfGc72pnWADTf5MKtw.png" /></figure><p>Your files log timelines with second-level precision, tracking Date/Time Original (2020:05:20 08:37:07), Create Date, and the exact moment of any structural edit (Modify Date).</p><ul><li><strong>The Exploit:</strong> Timestamps are anchor points for physical correlation. If an incident occurs, a leak happens, or a sensitive document is photographed, your timestamp provides undeniable placement on a timeline. Correlating this precise second against public security cameras, corporate network logs, or building badge-in systems strips away your anonymity completely.</li></ul><h4>3. Software Metadata</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1iETK5qmTwjIHD78zOoUQ.png" /></figure><p>This explicitly names the digital environment where the image was processed (e.g., Adobe Photoshop Lightroom Classic 10.0 (Macintosh)).</p><ul><li><strong>The Exploit:</strong> This is open-source intelligence (OSINT) handed to an attacker on a silver platter. By broadcasting the exact software version and operating system platform you use, you map out your digital infrastructure. An attacker targeting your network can look for unpatched, known security vulnerabilities matching that specific software version to build a targeted exploit.</li></ul><h4>4. Editing History</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X9t57oCz8D3Bwvg3t5qDNg.png" /></figure><p>Professional editing suites append structural histories, tracking crops, exposure shifts, and export pipelines.</p><ul><li><strong>The Exploit:</strong> This is where the most severe structural leak occurs: <strong>embedded thumbnails</strong>. When you use a software tool to crop out a face, a home address, a license plate, or a document from a photo, the software frequently leaves the original, uncropped image inside the embedded preview thumbnail metadata. Anyone pulling the metadata can extract that hidden thumbnail and view the exact data you intentionally tried to slice away.</li></ul><h3>The Operational Pipeline: Where the Leak Begins</h3><p>A dangerous misconception is assuming that standard web platforms automatically protect you. The reality of how your data is handled depends entirely on the type of system receiving your file:</p><h4>The Big Social Media Loophole (Stripped for Viewers, Kept for Tracking)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*vkDu207l8HTZH2iOx-AWow.png" /></figure><p>When you upload an image to mainstream social networks (like Meta platforms or X), the platform compresses the file and strips the EXIF data <em>before showing it to the public</em>. A casual user downloading your photo from your profile won’t see your data.</p><p>But make no mistake: <strong>the platform retains the original, raw metadata on its backend servers.</strong> That ingested metadata — containing your exact location coordinates, device profiles, and historical timelines — is fed straight into aggressive AI profiling engines. These systems map your real-world routines, track your social connections based on matching background locations, and optimize ad-targeting algorithms to hyper-segment commercial campaigns directly at you. You aren’t protected; your data is just privatized for corporate use.</p><h4>The Raw-Form Threat (The Open Web)</h4><p>The immediate, exposed threat happens when you upload files to systems that do not run aggressive re-compression pipelines:</p><ul><li><strong>Forums, Personal Blogs, and Classifieds:</strong> Standard WordPress sites, local listing boards, and independent forums almost always store and serve your image files exactly as you upload them — completely raw.</li><li><strong>Messaging Apps &amp; Email:</strong> Sharing a photo as a “Document” on Telegram, sending a file via iMessage, or attaching it to a standard email client does absolutely zero stripping.</li></ul><p>When you post a photo of an item for sale on a local board or email a picture to a stranger, your exact GPS coordinates, hardware signatures, and creation times are publicly downloadable by anyone clicking “Save Image As.”</p><h3>Stop the Leak Before It Leaves Your Device</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSq01IdwVJrxwNcitDtccw.png" /></figure><p>To stop corporate data hoarding and public tracking, you have to wipe these embedded blocks completely <em>before</em> your files ever touch a network.</p><p>You can scrub this information instantly using <a href="https://metadataremover.site/">Metadata Remover</a>.</p><p>Unlike traditional online tools that force you to upload your files to their servers — which forces you to trust an unknown third party with your raw files — this utility runs entirely as a <strong>static, client-side web application</strong>.</p><p>Your images never leave your local machine. The parsing, stripping, and rewriting processes execute strictly within your local browser sandbox. Your camera profiles, editing history, and location details remain entirely under your own control, exactly where they belong.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1c6f41a18c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackme Walkthorugh :Detection Rules Development Link:https://tryhackme.com/room/detectionrulesdev]]></title>
            <link>https://medium.com/@mouhibmh/tryhackme-walkthorugh-detection-rules-development-link-https-tryhackme-com-room-detectionrulesdev-b33e698e282e?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b33e698e282e</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 13:19:43 GMT</pubDate>
            <atom:updated>2026-06-17T13:19:43.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackme Walkthorugh :Detection Rules Development Link:<a href="https://tryhackme.com/room/detectionrulesdevelopment">https://tryhackme.com/room/detectionrulesdevelopment</a></h3><p>Explore the types of detection, how to use them in Elastic, and the process behind effective rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CdZX-jeY_lafI37tdPCDfA.png" /></figure><h3><strong>Task1:Introduction</strong></h3><p>In the <a href="https://tryhackme.com/room/introtodetectioneng">Intro to Detection Engineering</a> room, you explored the Detection Engineering process and mindset by understanding where alerts originate, who decides what gets detected, and how to identify gaps in detection coverage. With that foundation in place, this room shifts from theory to practice.</p><p>You will follow a structured detection research process and build detection rules against a real attack chain, working through the core rule types used in modern SOC environments. Beyond writing rules, you will learn how to implement them on a SIEM and tune to reduce false positives without sacrificing coverage.</p><h3>Learning Objectives</h3><p>By the end of this room, you will be able to:</p><ul><li>Understand what detection rules are and the role they play in a SOC workflow.</li><li>Apply a structured detection research process to investigate attacker behavior before writing rules.</li><li>Differentiate between atomic, stateful, correlation-based, and anomaly detection types, and select the appropriate type for a given scenario.</li><li>Perform basic detection tuning to reduce false positives while preserving true positive coverage.</li></ul><h3>Prerequisites</h3><p>Before starting this room, ensure you have completed:</p><ul><li><a href="https://tryhackme.com/room/introtodetectioneng">Intro to Detection Engineering</a></li><li><a href="https://tryhackme.com/room/advancedelkqueries">Elastic: Query Languages</a></li><li><a href="https://tryhackme.com/module/windows-security-monitoring">Windows Security Monitoring module</a></li></ul><p><strong>Answer the questions below</strong></p><p>Ready for developing detections!</p><p>no Answer need it</p><h3>Task2 : What Is a Detection Rule?</h3><p>A detection rule is not simply an alert. It is a piece of logic that encodes an analyst’s understanding of what malicious or suspicious behavior looks like in log data. It translates threat intelligence, attack research, and operational experience into a structured query that runs continuously against incoming telemetry. When that logic matches the data, the SIEM generates an alert for an analyst to triage.</p><p>Think of it this way: Without detection rules, your SIEM ingests logs but produces nothing actionable. An alert is the output, and the detection rule is the logic that produces it. The quality, accuracy, and coverage of your detection rules directly determine whether the SOC is responding to real threats or drowning in noise.</p><h3>Anatomy of a Detection Rule</h3><p>Regardless of the SIEM platform you work with, every detection rule contains the same fundamental components. Understanding these components is essential before you begin writing rules of your own. The table below breaks down each component and maps it to a practical example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LT3QnjbINkxCIUPqNdVuJw.png" /></figure><p>Each component serves a distinct purpose. Remove the data source, and the rule has nothing to query. Remove the detection logic, and it cannot identify the attack pattern. A well-constructed detection rule addresses all five components.</p><h3>Detection Rules in the SIEM Workflow</h3><p>As a SOC analyst, you are probably already familiar with the end-to-end pipeline that turns raw telemetry into incident response actions. After a detection is deployed into the SIEM, which is the step 5 (Deployment Phase) in the Detection Engineering Life Cycle, it occupies a specific and critical position in the SIEM pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIlZM6U8RED5yZcjHAlVEw.png" /></figure><h3>Detection Query Languages</h3><p>Different SIEM platforms use different query languages to express detection logic. The core concepts remain the same across platforms, but the syntax varies. Below are the most common languages you will encounter:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*f-BNCz-gxQOo2QYiNXrXYw.png" /></figure><p>In this room, the lab environment uses <strong>Elastic Security</strong>, so the detection rules you build will be written in <strong>KQL</strong> and <strong>EQL</strong>. The concepts and methodology you learn here are transferable to any platform; only the query syntax changes.</p><p>Answer the questions below</p><p>Ready for exploring Elastic detection rules!</p><p><strong>No Answer need it here</strong></p><h3><strong>Task3:Research Before Queries</strong></h3><p>A common pitfall in detection engineering is jumping straight to writing queries. Without structured research, the resulting rule will either be too broad, flooding the SOC with false positives, or too narrow, missing real attacks entirely. Both outcomes erode trust in detection capability and waste analyst time. <strong>Writing a query is the final step, not the first.</strong></p><blockquote><em>Identifying and prioritizing which threats to research is a strategic process in itself and outside the scope of this module. Here, the focus is on what happens once a detection lead has already been selected.</em></blockquote><h3>The Scenario: A Pentest Attack Chain</h3><p>To ground this process in a realistic situation, consider the following: your organization recently had a pentest conducted, and no detections were triggered. The report documents a four-stage attack chain used to compromise a Windows domain environment:</p><ol><li><strong>RDP Brute-Force:</strong> Credential brute-force against a jump server that has an internet-facing RDP service targeting multiple users.</li><li><strong>Internal Reconnaissance:</strong> Classic Windows commands to enumerate users and the environment.</li><li><strong>Credential Dumping (LSASS):</strong> Credentials extracted from the LSASS process memory.</li><li><strong>Lateral Movement via PsExec:</strong> Lateral movement to a domain-joined server using stolen credentials.</li></ol><p>Your goal is to build detection rules for each stage. In this task, you will walk through the research process for the first technique: <strong>RDP Brute-Force</strong>. Later tasks apply the same methodology to other stages.</p><p>Start the lab by clicking the <strong>Start Machine</strong> button below. Please wait 2–3 minutes for the Elastic instance to launch.<br>To access Elastic, wait for the VM to start and follow this link:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Sgdt-ZUf3X-NCedylrYuA.png" /></figure><h3>The Research Process</h3><p>The diagram below shows a repeatable approach to researching a threat before writing detection logic. Note that the research process is iterative and involves walking through three steps of the detection life cycle: Threat Research (Step 1), Data Review (Step 2), and the initial part of Detection Design (Step 3).</p><p>Detection research is not an exact science, and every detection engineer adapts the process to their context, but most approaches share these common phases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4c9W8No94AKptMqtMHKVZQ.png" /></figure><h3>Research Loop</h3><p>The key insight in this entire research process is in the middle three activities, the <strong>Research Loop</strong>. It’s called a loop because, in real research, you rarely move through these steps in a clean, ordered sequence. You may not find the right log source on the first try. You may not even fully grasp the threat after a first read of the documentation, realizing what matters only once you start examining real events. That’s why detection research is iterative: each phase informs the others, and you go back and forth between them as your understanding deepens.</p><p>From the pentest report, the first attack stage is an RDP brute-force targeting multiple users. With the threat identified, you enter the iterative research loop.</p><p><strong>Understand the Technique</strong></p><p>You cannot build a reliable detection for something you don’t fully understand. Key questions: What is the attack goal? Why does it work? At what attack phase is it used? What does the attacker need? Does it work in our environment?</p><p>RDP password spraying targets the <strong>Initial Access</strong> phase. Instead of exhausting passwords against a single account, the attacker tries a small set of common passwords across many usernames, bypassing lockout policies in the process. The attack targets TCP port 3389 and relies on weak or reused passwords.</p><p>This means that RDP password spraying has the following patterns:</p><ul><li>All the behavior happens in Windows authentication.</li><li>The attacker is testing multiple users. The tested users may or may not exist in your environment.</li><li>An increase in volume of failed authentications in a short period of time.</li></ul><p><strong>Identify Log Sources</strong></p><p>Knowing how an attack works means nothing if you can’t observe it. This step ensures the telemetry you need actually exists in your environment. Key questions: Which logs capture this behavior? Which steps of the attack are visible in telemetry? Does this telemetry exist in our organization?</p><p>A successful RDP password spray generates authentication events in the Windows Security Event Log:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fCjyaSe9dhsU1jmeq1dWKA.png" /></figure><p>Considering your understanding of the attack and the necessary log sources, you can observe the attacker’s behavior in your environment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVunh7xSpL7gx3JcrgW6-Q.png" /></figure><p><strong>Baseline Normal Behavior</strong></p><p>Understanding normal is arguably the most overlooked part of detection engineering, but it’s what separates a useful rule from a noisy one. Key questions: How is this service normally used? Is the exploited feature needed in the enterprise? Who uses it, and from where?</p><p>RDP is a legitimate tool used daily by IT staff. A few failed logons are expected, since users mistype passwords. Legitimate admin access typically originates from <strong>known IPs</strong>, involves a <strong>small number of accounts</strong>, and rarely produces sustained failure patterns.</p><p>What is not normal: failed logons across <strong>many accounts</strong> from an <strong>external IP</strong> in a short time window. This distinction is what your detection logic will target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hLiJD9doNtWojKUC6UPM_Q.png" /></figure><p><strong>Match the Malicious Behavior</strong></p><p>With research complete, you can now define the specific pattern that separates malicious activity from noise. Key questions: Is this a rare event on its own? Is there a suspicious sequence or combination of events? Can statistics help distinguish malicious from benign?</p><p>A single failed logon (4625) is not suspicious in itself. The spray pattern stands out because failed logons are distributed across <strong>multiple distinct accounts</strong> from the <strong>same external source IP</strong> within a short time window. Unlike a classic brute-force (many passwords against one account), the volume per account is low, and the signal lives in the <strong>account diversity</strong>. A subsequent successful logon (4624, Logon Type 10) from the same IP further strengthens the case.</p><p>Based on this analysis, the detection concept is around:</p><ul><li><em>Alert when a single source IP generates failed RDP logons against N or more distinct accounts within a defined time window, especially if followed by a successful logon.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8Ocm5O8fuufo1yBINIIXQ.png" /></figure><p><strong>Identify Bypasses</strong></p><p>Another phase during the Match Malicious Behavior step is to understand <strong>how an attacker could break this detection without changing the technique itself.</strong> This is the core idea of Adversarial Detection Engineering (ADE), a framework that proactively reasons about how detection logic can fail, instead of waiting for real-world false negatives to teach you the hard way.</p><p>For example, a rule matching process.name: &quot;psexec.exe&quot; is defeated the moment an attacker renames the binary to svchost.exe. The technique is unchanged, but the detection misses it entirely. A more durable rule would target behavioral indicators that survive renaming, such as the command-line arguments, parent-process patterns, original file name, or service creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifzaMBMjAbsbFX6c3li9gQ.png" /></figure><p>Identifying bypasses does not mean every rule must be bypass-proof, since this is often impossible. The goal is to make the rule’s limitations visible so they can be tracked, layered with other detections, incorporated into threat-hunting routines, or accepted as known gaps. There are multiple ways to apply bypassing techniques that are out of scope for this room, but you can deep-dive into them at the <a href="https://adeframework.org/">ADE Framework(opens in new tab)</a>, maintained by Nikolas Bielski and Daniel Koifman.</p><p><strong>Analyze Prevention</strong></p><p>Detection is a reaction; prevention stops the attack before it succeeds. If a control can eliminate the threat entirely, the detection may not be needed. At a minimum, prevention reduces the attack surface. It’s not ideal to have RDP directly exposed to the internet. It’s recommended to restrict access to VPNs only, complemented by account lockout policies and MFA, if possible.</p><p>A detection rule here acts as a safety net not just against attackers, but against future mistakes like this one. Keep in mind that this type of recommendation may be part of a detection engineer’s role, as daily log review can yield valuable insights for network or security architecture teams.</p><h3>Practice: Researching Internal Reconnaissance</h3><p>Now, it’s time for you to apply the same methodology to the <strong>second stage</strong> of the attack chain: <strong>Internal Reconnaissance</strong>. To help with your first independent research, here are starting points for the research loop:</p><ul><li><strong>Technique:</strong> After gaining initial access, attackers run built-in Windows commands to map the compromised environment, identify the current user, enumerate local and domain accounts, and gather network configuration. These are legitimate system utilities, which means the signal is not in the command itself but in the context: who ran it, when, and how many in sequence. Common commands include whoami, net user, net group, ipconfig, and systeminfo.</li><li><strong>Log Sources:</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNeiwDAYyZz9Nd3gE7W2Qw.png" /></figure><ul><li>Sysmon Event ID 1 is the preferred source because it logs the <strong>parent process</strong> and <strong>full command line arguments</strong>, giving you the context needed to distinguish an admin running ipconfig from an attacker chaining five recon commands in 30 seconds.</li><li><strong>Starting Query</strong>: Run this in <strong>Discover</strong> using KQL to filter all process creation logs related to common Windows tools:</li></ul><pre>event.code: 1 AND (winlog.event_data.Image:*whoami* OR *net* OR *ipconfig* OR *systeminfo*)</pre><p>Examine the results: identify <strong>which user</strong> executed the commands, the <strong>parent process</strong> that spawned them, the <strong>host</strong> where they ran, and whether multiple commands were executed in a <strong>short time window</strong>.</p><p><strong>Answer the questions below</strong></p><p><strong>What user executed the recon commands?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsFeQSyeoxbwej0lH5df5w.png" /></figure><p><strong>Answer Format: domain.thm\user</strong></p><pre>tryhatme.thm\sysadmin</pre><p><strong>What is the Image of a false-positive identified in the results of the suggested query?<br>Answer Format: Paste the full path, such as “C:\Windows\System32\net1.exe”</strong></p><pre>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngentask.exe</pre><p>What is the executable name of the recon tool used by the attacker that is missing in the suggested query?<br>Answer Format: The exact executable name, such as “whoami.exe”</p><pre>nltest.exe</pre><h3>Task 4:Atomic Detection</h3><p>In the previous task, you learned through detection research how to identify attack patterns to develop a solid detection. Now, the question becomes: <strong>how do you translate that research into detection rules that fire reliably and with minimal false positives?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*55gyCbDiB2YT1jqgeU03Gg.png" /></figure><p>The answer depends on the <strong>detection type</strong> you choose. Not all detections work the same way. Some trigger on a single event, others require counting events over time, and others correlate entire sequences of activity. Each type has distinct strengths, weaknesses, and use cases for which it is better suited.</p><p>The following tasks cover four detection types, starting with the most popular and basic type: <strong>atomic detections</strong>.</p><h3>Atomic Detections Overview</h3><p>An atomic detection triggers on a <strong>single event</strong> that is independently suspicious or malicious. There is no aggregation, no correlation across multiple events, and no time-based windowing. If the event matches the rule’s query, an alert fires with one event, one signal.</p><p>Atomic detections are the simplest and fastest to build. They work best when a single log entry contains enough context to indicate malicious behavior on its own: the execution of a known offensive tool, the creation of a suspicious scheduled task, or the execution of commands commonly used by attackers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v2OFoPY6KSo2yDHOUW94ww.png" /></figure><p>Atomic detections are appropriate when:</p><ul><li>A single event is inherently suspicious regardless of the surrounding context (e.g., mimikatz.exe executable in a process creation log).</li><li>The detection logic does not depend on event volume, frequency, or event sequencing.</li><li>Speed matters. For example, you want the lowest possible detection latency with no dependency on event accumulation.</li></ul><p>The trade-off: atomic detections are prone to <strong>false positives</strong> when the targeted behavior also occurs during legitimate operations. A sysadmin running whoami is not an attacker, but your rule does not know that without additional context. That&#39;s when the research process you learned previously became a core step before deploying atomic detections.</p><h3>Building an Atomic Detection with Elastic</h3><p>In the attack chain, after the attacker gained initial access via RDP brute-force, the first post-exploitation action was <strong>host reconnaissance</strong>. The attacker executed a series of built-in Windows commands to map the compromised environment, such as:</p><ul><li>whoami: Identify the current user and privilege level</li><li>net user: Enumerate local user accounts</li><li>net group &quot;Domain Admins&quot; /domain: Identify domain administrator accounts</li><li>ipconfig: Map network interfaces and IP configuration</li></ul><p>Each of these commands generates a <strong>process creation event</strong> (Sysmon Event ID 1 or Windows Security Event ID 4688) that is logged independently.</p><p>Keep in mind that atomic detections can generate multiple false positives, so pick the right reconnaissance command that is more uncommon or unique within the environment before creating the detection rule.</p><h3>Step 1: Create a Custom Query Rule</h3><ul><li>Navigate to <strong>Elastic Security → Rules → Detection Rules (SIEM) → Create new rule</strong>. Select <strong>Custom query</strong> as the rule type.<br><em>Click on the image below to zoom in.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r1VJG3dfSPOyypdm5KDdOg.png" /></figure><ul><li>Now, refine the query you previously used in the research task and define the KQL query in the <strong>custom query</strong> field. Avoid the false positives you’ve identified, and ensure to cover all recon commands performed by the attacker.</li><li>Click <strong>Continue</strong>.</li></ul><h3>Step 2: Configure Rule Metadata</h3><p>Each company uses its own rule metadata standard, but below is a common reference. Use it for building your own:</p><ul><li><strong>Name:</strong> T1059.001 — Suspicious Reconnaissance Command Execution</li><li><strong>Description:</strong> Detects execution of an uncommon Windows reconnaissance command that is commonly used during post-exploitation host enumeration. These commands are built-in Windows utilities and can generate false positives from system administrators and automated tools. Investigate the parent process, user context, and timing to determine legitimacy.</li><li><strong>Severity:</strong> Low</li><li><strong>Risk score:</strong> 21</li><li><strong>MITRE ATT&amp;CK:</strong> Tactic → Discovery, Technique → System Information Discovery (T1082) and Account Discovery (T1087)</li></ul><p>The severity is set to Low because these commands are legitimate system utilities. The detection&#39;s value lies in being a building block, individually low-confidence but critical when correlated with other attack chain events in later tasks.</p><h3>Step 3: Configure Scheduling</h3><ul><li><strong>Runs every:</strong> 5 minutes</li><li><strong>Additional look-back time:</strong> 1 minute</li></ul><p>A 5-minute interval balances detection speed against the SIEM performance. Shorter intervals (e.g., 1 minute) reduce latency but multiply query load, which matters when running hundreds of rules in production. For a low-severity reconnaissance detection, 5 minutes is a reasonable default; higher-priority rules may justify tighter intervals at the cost of additional resources.</p><p>Scheduling terminology varies across SIEM platforms: Elastic uses “interval” and “additional look-back time”, Splunk uses “cron schedule” with “earliest/latest time modifiers”, and Microsoft Sentinel uses “query frequency” and “lookup period”. The underlying concept is the same, but configuration fields and performance implications differ.</p><h3>Step 4: Testing and Deploying</h3><p>Before creating and enabling the detection, it’s always important to test the rule. Elastic provides a feature, the Rule Preview, that enables a detection engineer to test the detection using historical data before deployment.</p><p>On the right side of your screen, set <strong>Apr 28, 2026 @ 14:00:00.000 -&gt; Apr 28, 2026 @ 18:00:00.000</strong> as the timeframe of your rule test.</p><p><strong>Considering that 1 alert was generated for each recon command performed by the attacker, how many alerts were generated?</strong></p><pre>22</pre><p>What is the name of the detection rule type responsible for creating atomic detections on Elastic?</p><pre>Custom Query</pre><h3><strong>Task4</strong>:Stateful Detection</h3><p>You learned that atomic detections work well when a single event is enough to raise suspicion, but what about attack behaviors that only become visible through <strong>volume</strong>? A single failed logon tells you nothing. Hundreds of failed logons from the same IP in under a minute tell you everything.</p><p>Attacks like brute-force, credential spraying, and port scanning are not defined by any one event; they are defined by the same event happening <strong>far too many times, far too quickly</strong>. This is where stateful detection comes in.</p><h3>What Is a Stateful Detection?</h3><p>A stateful detection triggers when events <strong>accumulate past a defined threshold</strong> within a time window. Where an atomic detection asks “Did this event happen?”, a stateful detection asks “Did this event happen <strong>enough times</strong> to be suspicious?”</p><p>Stateful detections are the primary tool for identifying patterns that are normal in isolation but malicious at scale: a single failed logon is routine, but 50 failed logons from the same source IP in 2 minutes is a strong indicator of a brute-force attack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*PbOuUsmm2pqW1GBbJC7PBw.png" /></figure><p>Stateful detections are appropriate when:</p><ul><li>The individual events are benign or ambiguous on their own (failed logons, DNS queries, process starts).</li><li>Malicious intent only becomes apparent through <strong>repetition</strong>, <strong>velocity</strong>, or <strong>cardinality</strong>. Targeting many accounts from one source, for example.</li></ul><p>The trade-off: stateful detections introduce <strong>detection latency</strong> proportional to the time window required for event accumulation. An attacker who brute-forces slowly (one attempt per minute over hours) may stay below a threshold designed for rapid attacks.</p><p>Refer to this <a href="http://blog.ecapuano.com/p/atomic-and-stateful-detection-rules">article(opens in new tab)</a> if you want to further explore the key differences between atomic and stateful detections and when to use each.</p><h3>Threshold Rules in Elastic Security</h3><p>The attacker’s initial access vector was a <strong>c</strong>redential brute-force attack against an internet-facing RDP service, targeting <strong>multiple user accounts</strong> from a <strong>single external IP address</strong> and generating a high volume of <strong>failed logon events</strong> in a short time window before eventually authenticating successfully via RDP.</p><p>This is the textbook use case for stateful detection: individual failed logons are not malicious, but the volume and velocity from a single source clearly indicate an automated attack. Elastic Security’s <strong>Threshold</strong> rule type is purpose-built for stateful detections. It executes a KQL query, groups the results by one or more fields, counts the events per group, and fires an alert only when the count exceeds the configured threshold.</p><p>Key concepts of a stateful detection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9hv_tQRFPaEhjH-gQcRGfA.png" /></figure><p><strong>Cardinality</strong> deserves special attention because it changes what you are detecting. Without cardinality, the threshold rule counts raw failed logons per source IP, where an attacker hammers a single account with many password attempts. With a cardinality condition on user.name (e.g., at least 5 distinct usernames per source.ip), the rule shifts to detecting <strong>password spraying</strong>, where an attacker tries a small number of passwords across many accounts to avoid lockout thresholds. Same rule structure, same KQL query, but the cardinality parameter changes the technique you are targeting.</p><h3>Step 1: Create a Threshold Rule and Define the Query</h3><p>In the same <strong>Create new rule</strong> tab you previously used, select <strong>Threshold</strong> as the rule type.<br><em>Click the image below to zoom in.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qf-o7VJimgCe3cJLNIf4zQ.png" /></figure><p>Now, fill the required fields to properly detect the password spraying behavior:</p><ul><li><strong>Custom Query:</strong> Your custom query should aim for the failed login events you observed during the research phase. Use the following query as a starting point:</li><li>event.code: &quot;4625&quot; AND winlog.event_data.LogonType: &quot;3&quot;</li><li><strong>Group by:</strong> source.ip</li><li><strong>Threshold:</strong> 10</li><li><strong>Count:</strong> user.name</li><li><strong>Unique values:</strong> 5</li></ul><p>Click <strong>Continue</strong>.</p><p>Grouping by source.ip ensures each attacker is tracked independently. If you grouped by user.name instead, a targeted attack against a single account would trigger, but a spray across many accounts from the same IP (which is the pattern in this attack chain) might not, because each username would be counted separately.</p><p>However, no single group-by field covers every attack scenario. An attacker who rotates across multiple source IPs (e.g., using a botnet or VPN pool) would distribute failed logons across many groups, keeping each IP below the threshold, causing a false negative.</p><p>This is where <strong>layering multiple detections with different scopes</strong> becomes critical. A complementary rule grouped by host.name instead of source.ip would detect an abnormal spike in total failed logon volume on the target host, regardless of the number of IPs or usernames involved. Each rule has a blind spot; deploying rules with different group-by perspectives ensures that what one misses, another catches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*RDb61ZkAJI2Y7EhcZeZKGg.png" /></figure><h3>Step 2: Configure Rule Metadata</h3><p>Add the following data to the rule metadata:</p><ul><li><strong>Name:</strong> T1110.001 — RDP Brute Force: Password Guessing</li><li><strong>Description:</strong> Detects 10 or more failed logon attempts from a single source IP within the scheduled time window. This pattern indicates automated credential password-spraying activity. Known false positives: misconfigured service accounts performing repeated authentication, network scanners, and vulnerability assessment tools.</li><li><strong>Severity:</strong> Medium</li><li><strong>Risk score:</strong> 47</li><li><strong>MITRE ATT&amp;CK:</strong> Tactic → Credential Access, Technique → Brute Force: Password Guessing (T1110.001)</li></ul><p>Click <strong>Continue</strong>.</p><h3>Step 3: Configure Scheduling</h3><ul><li><strong>Runs every:</strong> 5 minutes</li><li><strong>Additional look-back time:</strong> 1 minute</li></ul><p>You should understand how scheduling directly impacts detection latency for stateful rules. If a brute-force attack begins at <strong>12:00:00</strong> and the rule is scheduled to run every 5 minutes, the earliest the rule can detect it is during its next execution, potentially <strong>12:05:00</strong>. The actual detection time depends on when in the interval the attack occurs relative to the rule’s schedule. In the worst case, an attack will have nearly 5 minutes of latency.</p><p>Click <strong>Continue</strong>.</p><h3>Step 4: Testing and Deploying</h3><p>Now, you should perform the same Rule Preview testing as you did in the previous task by setting the timeframe on the right side of your screen with <strong>Apr 28, 2026 @ 14:00:00.000 -&gt; Apr 28, 2026 @ 18:00:00.000</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*am1XnDoleJDw_XXVoq4AwA.png" /></figure><p>Review the triggered alerts to confirm your detection is working properly, then click <strong>Create &amp; enable rule</strong>. Now that you’ve created your first stateful detection rule, answer the following questions before moving to the next task!</p><p><strong>How many alerts were generated related to a password spraying pattern?</strong></p><pre>1</pre><p><strong>What is the attack IP, and how many total failure attempts did the attacker IP have?<br>Answer Format: “IP, Failures”, such as “192.168.1.1, 78”</strong></p><pre>5.62.18.132, 50</pre><p><strong>How many usernames did the attacker test?</strong></p><pre>10</pre><h3>Task6:Correlation-Based Detection</h3><p>You now understand atomic and stateful detections, but you’ve probably noticed the problem: an admin whoami execution or a legitimate login failure due to an account being locked may trigger the detection rules too often for non-malicious activity.</p><p>The real question is: how can we add some trust to these low-confidence alerts? That’s when a correlation-based approach helps detection engineers.</p><h3>What Is a Correlation-Based Detection?</h3><p>A correlation-based detection identifies <strong>ordered sequences of events</strong> that, taken together, represent a multi-step attack pattern. No single event in the sequence is necessarily malicious; the detection logic depends on specific events happening <strong>in a defined order</strong>, often joined by a common entity (host, user, process) and constrained by a <strong>time window</strong>.</p><p>Consider the attack chain in this room. The attacker IP generated 50 failed logon attempts across multiple accounts against an internet-exposed device, but that does not mean a SOC analyst should investigate every single password spray attempt; they should prioritize the ones followed by a successful authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*YxwiVX4OlcvDd-63ETWBtA.png" /></figure><p>Correlation-based detections are appropriate when:</p><ul><li>The individual events in the sequence are benign or low-confidence on their own, but the <strong>combination in order</strong> is high-confidence malicious.</li><li>The attack involves multiple distinct phases that produce different event types (process creation, authentication, network connection).</li><li>You need to reduce false positives by requiring multiple conditions to be met sequentially, rather than alerting on any single condition.</li></ul><p>The trade-off: correlation rules are more complex to write, test, and maintain. They also require that <strong>all events in the sequence are logged and ingested</strong>. If one step in the chain is not captured, the sequence breaks and the detection fails silently.</p><h3>EQL: The Language for Correlation Rules</h3><p><strong>EQL (Event Query Language)</strong> is Elastic’s purpose-built language for expressing event sequences with temporal constraints. Where KQL matches individual documents, EQL matches <strong>ordered patterns across multiple logics</strong>.</p><p>Core EQL syntax for sequences:</p><pre>sequence by &lt;join_field&gt; with maxspan=&lt;duration&gt;<br>  [&lt;event_category&gt; where &lt;condition&gt;] with runs = N   <br>  [&lt;event_category&gt; where &lt;condition&gt;]<br>  [&lt;event_category&gt; where &lt;condition&gt;]</pre><ul><li><strong>sequence:</strong> Declares an ordered sequence of events.</li><li><strong>by &lt;join_field&gt;:</strong> All events in the sequence must share the same value for this field (e.g., host.name means all events occurred on the same host).</li><li><strong>with maxspan=&lt;duration&gt;:</strong> The entire sequence must complete within this time window (e.g., 15m).</li><li><strong>with runs=N:</strong> Applied to a sequence step, this requires the step to match at least N times before the sequence progresses. This is how you express &quot;5 or more failures&quot; without listing each one explicitly.</li><li><strong>Bracket </strong><strong>[ ]:</strong> Each one defines one step in the sequence, specifying an event type and conditions.</li></ul><p>Below is a sample ready to deploy EQL logic:</p><pre>sequence by user.name with maxspan=5m<br>  [process where process.name == &quot;cmd.exe&quot;] with runs=3<br>  [file where file.extension == &quot;exe&quot; and file.path like &quot;*\\Temp\\*&quot;]<br>  [network where destination.port == &quot;443&quot;]</pre><p>Events must match <strong>in order</strong>. For example, if the successful logon occurs before the failed attempts in the logs, the sequence does not match.</p><h3>Building the Event Correlation Rule in Elastic</h3><p>In the attack chain logs, the attacker performed a password spray against the RDP service on jmp-01. The sequence unfolded as follows:</p><ul><li>50 failed logon attempts across multiple account names, all originating from the attacker&#39;s external IP.</li><li>A successful RDP logon (Event ID 4624, LogonType 10), from the same source IP.</li></ul><p>The failed attempts alone triggered the threshold rule from Task 5. But that alert tells the SOC: &quot;someone is spraying.&quot; It does not tell them: &quot;someone got in.&quot; The correlation rule in this task answers that second, more urgent question.</p><h3>Step 1: Create an Event Correlation Rule</h3><p>In the same <strong>Create new rule</strong> tab you previously used, select <strong>Event Correlation</strong> as the rule type.<br><em>Click the image below to zoom in.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IF1ayUa_i3-fEG7B5YRjPQ.png" /></figure><p>Your EQL query should cover the two steps introduced before: “<em>multiple failed logons from the same source IP, followed by a successful authentication.”</em></p><p>Use the EQL query below as your rule query:</p><pre>sequence by source.ip with maxspan=5m<br>  [authentication where event.code == 4625 and <br>      winlog.event_data.LogonType == 3] with runs = 10<br>  [authentication where event.code == 4624 and <br>      winlog.event_data.LogonType == 10]</pre><p>Click <strong>Continue</strong> when you have finished with your detection logic.</p><h3>Step 2: Configure Rule Metadata</h3><p>Add the following data to the rule metadata:</p><ul><li><strong>Name:</strong> T1110.003 — RDP Password Spray: Successful Logon Following Multiple Failures</li><li><strong>Description:</strong> Detects a sequence where a single source IP generates 10 or more failed network logon attempts followed by a successful RDP logon from the same IP within 5 minutes. This pattern indicates a successful credential access following a password spray or brute-force attack against an RDP service. Known false positives: automated monitoring tools that perform repeated authentication checks and then establish a legitimate session; misconfigured service accounts that cycle through credential failures before succeeding.</li><li><strong>Severity:</strong> High</li><li><strong>Risk score:</strong> 73</li><li><strong>MITRE ATT&amp;CK:</strong> Tactic → Credential Access, Technique → OS Credential Dumping: LSASS Memory (T1003.001)</li></ul><p>Note the severity increase from Task 5. The threshold rule in Task 5 fired on the spray attempt and warranted a Medium severity, as spraying alone does not indicate access was achieved. This correlation rule fires only when access is confirmed, which changes the risk profile significantly. A successful logon following a spray is a high-confidence initial access.</p><h3>Step 3: Configure Scheduling</h3><ul><li><strong>Runs every:</strong> 5 minutes</li><li><strong>Additional look-back time:</strong> 1 minute</li></ul><p>For EQL sequence rules, the maxspan in the EQL query and the rule schedule&#39;s time window serve different purposes. The <strong>maxspan</strong> constrains how far apart events in the sequence can be. The <strong>schedule window</strong> (interval + look-back) determines which events are visible to the rule on each execution. The schedule window must be <strong>at least as large</strong> as the maxspan. A rule that runs every 5 minutes with a 1-minute look-back queries a 6-minute window, which covers the 5-minute maxspan on every execution.</p><h3>Step 4: Create, Enable, and Verify</h3><p>Now, you should perform the same Rule Preview testing as you did in the previous task by setting the timeframe on the right side of your screen with <strong>Apr 28, 2026 @ 14:00:00.000 -&gt; Apr 28, 2026 @ 18:00:00.000</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KFjYVDaTtz9iA9aM1IGVg.png" /></figure><p>You may have noticed that multiple alerts were generated when only one was expected. This happens because with runs=10 means &quot;at least 10 matches&quot; rather than &quot;exactly 10.&quot; If your logs contain 50 failed logons from the same IP, EQL finds multiple valid sequence instances, each starting at a different failure event, that all satisfy the threshold and are each followed by the same successful logon, producing one alert per match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBf5jmG_e5nG5S6Hg0WY7Q.png" /></figure><p>The intended fix is <strong>alert suppression</strong>, a rule-level setting that deduplicates alerts sharing the same field value within a defined time window. Configured with a common value in the alert’s suppression field, Elastic would fire only the first alert and fold all subsequent matches into it.</p><p>Review the triggered alerts, then click <strong>Create &amp; enable rule</strong>. Now that you’ve created your first correlation-based detection rule, answer the following questions before moving to the next task!</p><p><strong>What field would be the best to be configured as a suppression field for your detection?</strong></p><pre>source.ip</pre><p><strong>Removing the </strong><strong>with runs condition from the EQL sequence would reduce the number of duplicate alerts. What type of alerts would your detection be more susceptible to generating with that change?<br>Answer Format: True Positive</strong></p><pre>False Positive</pre><h3><strong>Task7:Anomaly Detection</strong></h3><p>Across the previous tasks, every rule you wrote defined exactly what to look for: a specific process name, a count threshold, an ordered sequence of events. But what about the attacks you cannot define in advance? An insider using valid credentials, a tool you have never seen before, or a service account behaving slightly outside its normal pattern? Anomaly detection flips the approach: instead of defining what is malicious, you define what is <strong>normal</strong> and alert on deviations.</p><h3>What Is Anomaly Detection?</h3><p>Anomaly detection identifies data points or patterns that deviate significantly from an established baseline. It is the primary implementation of <strong>behavioral detection</strong> in modern SIEM platforms.</p><p>To understand what anomaly detection looks for, run the following query in <strong>Discover</strong>:</p><pre>event.code: &quot;4625&quot;</pre><p>As you can see in the image below, there is a clear spike in failed logons during the attack window, a volume that sharply deviates from the flat baselines before and after. That spike is what an anomaly detection model would score and automatically alert on, without you having to define a threshold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ug7oYWOqa7jg1uY3dlcXpQ.png" /></figure><p>The example above is known as a <strong>Global Anomaly</strong>, but there are three main types of anomalies you should be familiar with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJGVOdLQ9NOEVZfN9qAmtg.png" /></figure><h3>How Anomaly Detection Works</h3><p>The lifecycle has four phases:</p><ul><li><strong>Step 1 — Training Window</strong>: The model ingests historical data and learns what “normal” looks like. For authentication, this includes typical login times, source IPs, and session frequency per user over a training period (typically 2–4 weeks minimum).</li><li><strong>Step 2 — Baseline Definition</strong>: The model sets upper and lower bounds around the baseline. A user averaging 10 logons/day might legitimately range between 5 and 18. Anything beyond those limits is flagged.</li><li><strong>Step 3 — Real-Time Scoring</strong>: Incoming events are scored from 0 to 100 based on how far they deviate from the baseline. A score of 15 is minor variance; a score of 85 is a significant deviation that triggers an alert.</li><li><strong>Step 4 — Continuous Learning</strong>: Baselines update as new data arrives, adapting to legitimate changes (role changes, new projects) while retaining sensitivity to genuine deviations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQsYJwahFgC4kNhpazhePw.png" /></figure><h3>Machine Learning Rules in Elastic Security</h3><p>Elastic Security includes a <strong>Machine Learning rule type</strong> that consumes the output of pre-built ML anomaly detection jobs, covering use cases like unusual process execution per host, rare destination countries, anomalous authentication, and uncommon service installations. An ML rule references a job, sets an <strong>anomaly score threshold</strong> (typically 75), and triggers when the score exceeds it. You can also create your own anomaly detections and define the threshold score you want.</p><p>ML features in Elastic Security require a Platinum or Enterprise license. Unfortunately, this room runs on a basic license, so you will not be able to create an ML rule directly. That said, the concept of anomaly detection can still be demonstrated in Discover. <strong>[REVIEWER Note: What about removing this paragraph? This doesn’t position us in a good situation, but it would be strange if we didn’t give an explanation on why we are not creating an ML rule.}</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*0xfkhytooCGelxmCkU16DA.png" /></figure><p>The PsExec lateral movement step in the attack chain is a perfect candidate for anomaly-based thinking. If you filter for service creation events in your environment, you will observe that service creation is not a common behavior on app-01 outside the attack window. When one suddenly appears, that single event is a strong anomaly signal on its own.</p><p>In Elastic, open <strong>Discover</strong> and select the logs-* index pattern. Set the time range to <strong>April 27, 2026</strong>, and apply this KQL filter:</p><pre>event.code: &quot;7045&quot; and host.name: &quot;app-01&quot;</pre><p>In the <strong>time histogram</strong>, you should observe that service installation events are rare, with no events at all. This is your environment baseline.</p><p>Now narrow the time range to <strong>April 28, 2026</strong>. You can also observe the spike during the attack window. The service installation that occurred on app-01 stands out as a clear deviation from the surrounding baseline. This is exactly what an ML model would flag automatically: a service installation on a host that rarely sees them, by an account that does not normally install services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7e1hiviH06203Z_MAie3LA.png" /></figure><p>The combination of fields tells the story that an ML model would otherwise score numerically: a service that has never been installed on this host before, with an executable in a non-standard path, installed during a window where service installations are statistically rare. That convergence of signals is the anomaly.</p><h3>Anomaly Detection vs Other Detection Types</h3><p>In a production environment, ML jobs would complement the rules from earlier tasks. An anomalous service installation job would catch the PSEXESVC install regardless of the tool name. An attacker can use the -r flag and change the service name created in the target machine:</p><pre>psexec \\RemoteComputer -r MyService cmd.exe</pre><p>The table below explains how anomaly detection can avoid this bypass compared to an atomic detection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a3JkQOWapxPCtrggZMtWhg.png" /></figure><p>None of these signals requires knowing that PsExec was used. The detection is based on accounts and hosts deviating from their baselines, not on the specific technique employed. This is the core advantage of anomaly detection: technique-agnostic coverage that complements your signature-based and correlation-based rules.</p><p><strong>What Elastic rule type uses anomaly detection jobs and statistical baselines to identify deviations from normal activity?</strong></p><pre>Machine learning </pre><p>A user who normally logs in between 08:00 and 18:00 authenticates at 03:00. This data point is only abnormal because of the timing context. What type of anomaly is this?</p><pre>Contextual</pre><p><strong>Task8:Detections Tuning</strong></p><p>You have now explored four types of detection you can implement in a company’s environment. But running detections is only half the job. The other half is making sure your alerts are useful, which most of the time doesn’t happen on the first attempt. Welcome to detection tuning!</p><h3>Why Detections Need Tuning</h3><p>In some cases, a detection, whether new or old, doesn’t behave exactly as expected during the deployment. The first time you enable a rule against real production traffic, one of three things may happen:</p><ul><li><strong>Too many alerts</strong>: the rule fires on legitimate activity that resembles the malicious pattern. Analysts experience alert fatigue and start ignoring or auto-closing alerts, sometimes including the real ones.</li><li><strong>Too few alerts</strong>: the rule is so narrow that real attacks evade it. False negatives are silent failures: nothing tells you the rule missed something until the incident comes up.</li><li><strong>Right number, wrong context</strong>: alerts fire on the right behavior but lack enough information for an analyst to act on them quickly, slowing down triage.</li></ul><p>Detection tuning is the iterative process of adjusting rules to maximize <strong>true positive coverage</strong> while minimizing <strong>false positives</strong>, keeping alerts actionable and severity calibrated to actual risk.</p><p>The image below is the Detection Tuning Trade-off Matrix. Each ball represents a detection rule plotted by its true positive rate (how many real attacks it catches) against its false positive rate (how many benign events it flags). The goal of tuning is to move every rule toward the top-left quadrant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*2gp5vQXzIjZDzwUP2MAl-g.png" /></figure><h3>Basic Tuning Strategies</h3><p>There are four core tuning techniques every detection engineer uses to bring a rule under control, and you should be aware of:</p><ul><li><strong>Allowlisting / Exclusions:</strong> Exclude known-good processes, service accounts, or expected IPs. If your vulnerability scanner generates 1,000 failed logons every Monday, exclude its source IP rather than letting it drown out real spray attempts.</li><li><strong>Threshold Adjustment:</strong> Change the count, time window, or sensitivity. Firing on every failed logon is noise; firing on 15 failures in 5 minutes is a signal.</li><li><strong>Field Enrichment:</strong> Add context fields to reduce ambiguity. A whoami.exe alert is low-confidence on its own, but enriched with parent process, logon ID, and source IP, it becomes triageable.</li><li><strong>Full Rework:</strong> A rule was designed for a purpose that no longer holds, and incremental adjustments cannot fix it. The detection logic, scope, or rule type itself needs to be rebuilt from scratch with a new context and design. This is the practical example you will walk through next.</li></ul><h3>Tuning the Atomic Recon Rule</h3><p>The atomic recon detection you built in Task 4 fires whenever whoami.exe, net.exe, ipconfig.exe, nltest.exe, or systeminfo.exe is executed. The problem: System administrators run these commands constantly during legitimate troubleshooting. After enabling the rule, the SOC may be flooded with low-confidence alerts, many of which are benign.</p><p>The behavior that is malicious in your attack chain is not “an admin ran whoami once&quot;, it is &quot;<strong><em>an attacker ran multiple recon commands back-to-back in under a minute.</em></strong>&quot; That is the pattern your rule needs to match to avoid multiple false positives.</p><p><strong>Step 1: Convert the Atomic Rule to a Threshold Rule</strong></p><p>Navigate to <strong>Elastic Security → Detect → Rules → Create new Rule</strong> and select <strong>Threshold</strong>.<br>Keep the same KQL filter:</p><pre>event.code: &quot;1&quot; AND (winlog.event_data.Image:&quot;*whoami.exe*&quot; OR &quot;*net.exe*&quot; OR &quot;*nltest.exe*&quot; OR &quot;*ipconfig.exe*&quot; OR &quot;*systeminfo.exe*&quot;)</pre><p><strong>Step 2: Configure the Threshold</strong></p><p>This is where the tuning happens. Set the following:</p><ul><li><strong>Group by:</strong> host.name and winlog.event_data.LogonId</li><li><strong>Threshold:</strong> &gt;= 3</li></ul><p>The combined host.name + LogonId grouping is critical. It ties the alert to a specific logon session rather than just the host. If an attacker and an admin are active at the same time, their activities remain separate. The LogonId from a successful brute-force logon becomes the unique identifier that links all recon commands back to that single intrusion.</p><p>The threshold of 3 means the rule fires only when 3 or more distinct recon commands execute within the same logon session. A single admin running ipconfig during troubleshooting will never reach this threshold; an attacker running whoami, net user, and systeminfo in quick succession will.</p><p><strong>Step 3: Adjust the Time Window and Severity</strong></p><p>Keep the default scheduling settings (the same as previous tasks). Run the <strong>Rule Preview</strong> with Apr 28, 2026, as the test date and a 3-hour timestamp around the attack window, the same approach you used for the threshold and correlation rules in Tasks 5 and 6.</p><p>You should observe <strong>one alert</strong> firing, instead of the dozens that the original atomic rule produced:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BnZHmxDijdFOH8CaZHATaA.png" /></figure><p>Detection tuning is a never-ending task. Environments change, and new applications are deployed, employees change roles, scheduled tasks are added, and rules that were perfectly tuned six months ago will drift back into noise or silence. Effective detection programs include a regular review cycle where rules are evaluated against recent alert outcomes and adjusted accordingly.</p><p>The four techniques in this task are the building blocks. The work of detection engineering is applying them iteratively, every week, for as long as the detection runs.</p><p><strong>What is the attacker’s </strong><strong>LogonId?</strong></p><pre>0x557e9</pre><p><strong>What type of tuning strategy did you apply in this task?</strong></p><pre>Full Rework</pre><p><strong>Task9: conclusion</strong></p><p>Detection rule authoring is the craft that turns threat knowledge into the alerts your <strong>SOC</strong> relies on every day. Throughout this room, you explored the four detection types every engineer should know, walked through a structured research process to take a threat from intelligence to a working rule, and built four real detections (atomic, stateful, correlation-based, and anomaly) against a complete attack chain spanning recon, brute-force, credential dumping, and lateral movement. You also closed the loop with tuning, learning that a rule that fires is not the same as a useful rule. Before moving on, make sure you are comfortable with the following:</p><ul><li><strong>Detection types are tools, not labels:</strong> Atomic, stateful, correlation, and anomaly each fit a different kind of attacker behavior. Picking the wrong one means either missing the activity entirely or drowning your analysts in noise.</li><li><strong>Research before rule, always:</strong> A detection without research is a guess. The research process, including understanding the threat, the data sources, and the environment, is what separates rules that protect from rules that frustrate.</li><li><strong>Tuning is not optional:</strong> Every rule degrades the moment it touches production traffic. False positives, false negatives, and shifting environments mean tuning is part of the job, not an afterthought.</li></ul><p>You now have the foundation to author detections end-to-end. But the rules you’ve built so far speak only Elastic’s language, and great detections shouldn’t be locked to a single platform. Head over to the Sigma Language room (coming soon) to learn how to express the same logic in a vendor-agnostic format that travels across Splunk, Elastic, Sentinel, and beyond!</p><p><strong>NO answer need it</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b33e698e282e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Would You Notice If Your Machine Was Compromised?]]></title>
            <link>https://medium.com/@mouhibmh/would-you-notice-if-your-machine-was-compromised-7d64f7b189c5?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d64f7b189c5</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 14:13:37 GMT</pubDate>
            <atom:updated>2026-06-15T14:13:37.858Z</atom:updated>
            <content:encoded><![CDATA[<p>A defensive walkthrough of suspicious traffic patterns, timelines, and the questions I would ask during analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nha8lw6GDV-zllhZ6Jr5EA.png" /><figcaption>A controlled Windows 10 lab: the machine looks normal on the desktop, but the operator side shows active remote-control sessions. The real question is what Windows reveals if we inspect it properly.</figcaption></figure><h3>Pause Here for a Second:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fIdZxl4QwvCVDeswBkEXg.png" /></figure><p>Pause here for a second.</p><p>Look at this screen.</p><p>There is nothing strange here.<br>No warning.<br>No broken window.<br>No app opening by itself.<br>No keyboard typing alone.<br>No clear sign that something is wrong.</p><p>And that is exactly the point.</p><p>Most people imagine a compromised machine through the Hollywood version of hacking. A glitchy screen, flashing windows, random commands, files moving alone, and a victim who instantly knows they lost control.</p><p>But real compromise does not need to look like that.</p><p>A machine can look normal while something inside it has already changed.</p><p>The desktop is only the surface.<br>It tells us what the user can see, not what the system is doing.</p><p>So before we talk about malware, tools, or network traffic, we need to answer a simpler question:</p><p>What does “compromised” actually mean?</p><h3>What Does “Compromised” Mean?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*-LtJ40eDMSM9Ax6Ijwsczw.png" /></figure><p>A compromised machine is not defined by how it looks.</p><p>It is defined by control.</p><p>When we say a machine is compromised, we mean that something inside the system is no longer acting only for the user. Some process, session, script, binary, or access path is giving another side influence over the machine.</p><p>That influence can be small at first.</p><p>Maybe the attacker can run one command.<br>Maybe they can read a file.<br>Maybe they stole a session token.<br>Maybe they executed a payload once.<br>Maybe they gained a shell inside the machine.</p><p>But the important idea is the same:</p><p>the machine has started doing something the user did not intend.</p><p>Of course, an attacker does not magically “receive” your computer. There has to be a path.</p><p>A user opens a malicious file.<br>A fake installer runs.<br>A cracked program is trusted.<br>A password is stolen.<br>A vulnerable service is abused.<br>A script executes where it should not.</p><p>That first step is called initial access.</p><p>But initial access alone is not enough for real control. If the attacker wants to keep interacting with the machine, they need a way for that machine to communicate back, receive instructions, and stay reachable.</p><p>This is where the next question appears:</p><p>If the attacker has some access, how does that access become control?</p><p>That question leads us to C2.</p><h3>So, What Is C2?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2-smR7LLJlHjy75B_n9jg.png" /></figure><p>If compromise means that something inside the machine is no longer acting only for the user, then the next question is simple:</p><p>how does that control continue?</p><p>An attacker does not want a random one-time moment inside the system. A single command or a single mistake is not enough if there is no way to keep interacting with the machine.</p><p>There needs to be a channel.</p><p>That channel is what we call C2.</p><p>C2 stands for Command and Control. In simple words, it is the communication path between the compromised machine and the side controlling it.</p><p>The machine may check in.<br>The operator may send an instruction.<br>The machine may return output.<br>Then it may wait again.</p><p>From the outside, this can look very small. Maybe just a process making a network connection. Maybe a repeated request. Maybe DNS traffic. Maybe an HTTPS connection that does not look strange at first glance.</p><p>That is why C2 is interesting from a defender’s perspective.</p><p>It is not only about “a hacker controlling a computer.”<br>It is about the traces left by that control.</p><p>What process made the connection?<br>Where did it connect?<br>How often did it call back?<br>Did the behavior match the role of the program?<br>Did anything else happen before or after that connection?</p><p>This is the part we want to observe in the lab.</p><p>For this article, we are going to use <strong>Sliver</strong> as the C2 framework for our controlled environment.</p><p>Not because it is the only C2 framework, and not because this article is about teaching offensive usage.</p><p>We use it because it is open source, free to study, clear enough for lab work, actively documented, and reliable for building a defensive learning environment. It gives us a realistic way to observe the kind of behavior we want to investigate: a machine communicating back, receiving tasks, and leaving traces we can inspect with monitoring tools.</p><p>There are other C2 frameworks that appear often in red-team and adversary-emulation discussions, such as Cobalt Strike, Metasploit/Meterpreter, Mythic, Havoc, and others. Each one has its own design, ecosystem, and use cases.</p><p>But the framework is not the main point here.</p><p>The main point is the behavior.</p><p>We are not trying to celebrate the tool.<br>We are trying to create a controlled situation where we can ask better defensive questions:</p><p>What does the machine do when a C2 channel exists?<br>What can Windows tools show us?<br>What does the network reveal?<br>What does the process tree reveal?<br>What changes if persistence is added?<br>And which small patterns tell us that the machine is no longer acting only for its user?</p><p>For reference, the Sliver project can be found on GitHub under:</p><p><a href="https://github.com/bishopfox/sliver">GitHub - BishopFox/sliver: Adversary Emulation Framework</a></p><p>BishopFox/sliver</p><p>Its official documentation is available through:</p><p><a href="https://sliver.sh/docs/">https://sliver.sh/docs/</a></p><p>From here, we can move from definition to observation.</p><p>The next step is to build a safe lab where this behavior can be watched without risking a real system.</p><h3>Same Event, Two Perspectives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OcgFHDAvsWnB0lDVS01S_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XP8uhIFl25-SJyR5sG4MDQ.png" /><figcaption>Attacker And Defender</figcaption></figure><p>At this point, we have cleared the basic idea.</p><p>A compromised machine is not defined by how the desktop looks.<br>It is defined by control.</p><p>And C2 is the channel that allows that control to continue.</p><p>But to really understand what is happening, we need to look at the same moment from two different sides.</p><p>The offensive side and the defensive side.</p><p>On the offensive side, the event may look simple. A terminal is open. A C2 server is running. A session appears. The operator can see that a machine has connected back.</p><p>From that view, the question is usually direct:</p><p>Do we have access?</p><p>But on the defensive side, the same moment looks different.</p><p>Windows does not say, “someone has access now.”</p><p>It shows traces.</p><p>A process started.<br>A connection was opened.<br>A parent process launched something.<br>A path appeared.<br>A privilege context existed.<br>A network pattern began.<br>Maybe later, something tried to stay after reboot.</p><p>That is why the defensive side is more interesting for this article.</p><p>The attacker sees the result.</p><p>The defender has to reconstruct the story.</p><h3>Offensive View: The Operator Side</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g_Id4otGMqzwkUgfl0XGFw.png" /></figure><p>This is the shorter side of the story.</p><p>Here we are looking from Kali Linux, inside a CLI environment, through the Sliver C2 server used in our controlled lab.</p><p>From this view, we can see that a Windows machine has checked in and that an active session exists. The operator side can see information about the target context, and in this case the session also indicates elevated privileges.</p><p>That detail matters.</p><p>Access as a normal user is one thing.<br>Access with administrative privileges is another.</p><p>Higher privileges usually mean the operator has more visibility and more possible actions inside the target environment. It can affect what can be queried, what can be changed, and how realistic persistence becomes later in the investigation.</p><p>But we are not staying on this side for long.</p><p>The offensive view only tells us that access exists.</p><p>It does not explain what Windows had to do for that access to appear. It does not show us which process created the connection, what path it came from, what network traffic was generated, or what traces were left behind.</p><p>That is why this view is only the beginning.</p><p>The real investigation starts when we turn around and look at the same moment from the Windows side.</p><h3>Defensive View : Now We Start Looking for Traces</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nmdq7upjCqWkbvVByEragQ.png" /></figure><p>This is the point where the article becomes more important.</p><p>Until now, we explained what compromise means, what C2 is, and how the same moment can look different from the operator side and the defender side.</p><p>But the real question is not:</p><p>“Can someone get access?”</p><p>The real question is:</p><p>“How would we know that access happened?”</p><p>A Windows desktop will not always answer that for us.<br>The screen may stay normal.<br>The user may keep working.<br>Nothing obvious may appear.</p><p>So we have to stop looking at the surface and start looking at what changed inside the system.</p><p>But before we do that, we need visibility.</p><p>We are not going to investigate this only by looking at the desktop, and we are not going to depend on guesswork. The normal Windows interface can show us open apps, notifications, and some running programs, but it does not show the full story of what is happening inside the machine.</p><p>If something suspicious is running quietly, we need tools that let us see deeper.</p><p>We need to know which processes are active.<br>We need to know who launched them.<br>We need to see where they are running from.<br>We need to watch network connections.<br>We need to inspect file activity, registry changes, startup entries, and timing.</p><p>For that, we use tools like <a href="https://learn.microsoft.com/en-us/sysinternals/"><strong>Sysinternals</strong></a> and <a href="https://learn.microsoft.com/en-us/sysinternals/"><strong>Wireshark</strong></a>.</p><p>links:</p><ul><li><a href="https://learn.microsoft.com/en-us/sysinternals/">Sysinternals - Sysinternals</a></li><li><a href="https://www.wireshark.org/">Wireshark * Go Deep</a></li></ul><p>Sysinternals helps us understand what Windows is doing internally. It gives us a better view of processes, parent-child relationships, command lines, file activity, registry activity, startup entries, and persistence points.</p><p>Wireshark helps us understand the network side. It lets us see traffic moving in and out of the machine, which is important when we are dealing with C2 behavior.</p><p>Because C2 is not only a process problem.</p><p>It is also a communication problem.</p><p>A machine that is under control usually needs some kind of channel. That channel may create connections, repeated traffic, DNS requests, or patterns that do not match normal user behavior.</p><p>So before we ask whether the machine is compromised, we need tools that let us see enough of the machine to ask better questions.</p><p>We are not using these tools to get a magic answer.</p><p>We are using them to collect pieces of the story.</p><p>This is the defensive part of the investigation.</p><p>We are not trying to prove compromise from one sign.<br>A single process is not enough.<br>A single connection is not enough.<br>A single file touch is not enough.</p><p>What we are looking for is a chain.</p><p>A process started.<br>It came from a certain path.<br>It opened a connection.<br>It repeated that connection.<br>It touched something it should not touch.<br>It tried to stay available.</p><p>One sign can be noise.</p><p>A sequence of signs becomes a story.</p><p>That is why we will split the investigation into clear sections.</p><p>First, we look at the process side:</p><pre>Which process appeared?<br>Where did it run from?<br>Who launched it?<br>Does its parent process make sense?<br>Is it running with normal user rights or elevated privileges?</pre><p>Then we look at the network side:</p><pre>Did that process open a connection?<br>Where did it connect?<br>Was the connection repeated?<br>Does the timing look like beaconing?<br>Does the network behavior fit the program&#39;s role?</pre><p>Then we look at file and system activity:</p><pre>What did the process touch?<br>Did it read user files?<br>Did it access sensitive paths?<br>Did it write somewhere unusual?<br>Did it interact with registry keys or startup locations?</pre><p>After that, we look at persistence:</p><pre>Did anything try to survive reboot?<br>Was a startup entry created?<br>Was a scheduled task added?<br>Was a service changed?<br>Did the same behavior come back after restart?</pre><p>Finally, we connect everything together.</p><p>This is where the offensive and defensive views meet.</p><p>From the operator side, the story may look simple: access appeared, a session checked in, and commands could be sent.</p><p>From the Windows side, that same story must be reconstructed from traces:</p><pre>process<br>path<br>parent<br>privilege<br>connection<br>timing<br>file activity<br>persistence</pre><p>That is the structure we will follow.</p><p>We will not jump randomly between tools.<br>We will not repeat the same idea under different names.<br>Each section has one job.</p><p>Process tells us what ran.<br>Network tells us where it talked.<br>File and registry activity tell us what it touched.<br>Persistence tells us whether it tried to remain.<br>Timeline connects the pieces.</p><p>Only after that can we return to the attacker’s mechanism and explain, at a high level, how the access path we used in the lab created these traces.</p><p>And at the end, we can briefly mention other ways attackers may try to keep access, not as a guide to abuse, but as a defensive map of what investigators should know to look for.</p><h3>Process View: What Ran?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*TARFLp_s3qM2OJvu.jpg" /></figure><p>The first tool I used on the Windows side was <strong>Process Explorer</strong> from Sysinternals.</p><p>The goal was simple:</p><p>find the process that deserves to be followed.</p><p>Not the process that “looks scary.”<br>Not the process with a dramatic name.<br>The process whose context does not fully explain itself.</p><h3><strong>Full Process List</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OengD-851deEe9an5dWiow.png" /></figure><p>At first, the process list looks noisy.</p><p>There are Windows services, browser processes, security components, Sysinternals tools that I opened myself, and normal background activity.</p><p>So I did not start by judging names.</p><p>I started by looking at context.</p><p>In Process Explorer, the useful fields here were:</p><p>Process<br>PID<br>Description<br>Company Name<br>CPU<br>Private Bytes<br>Working Set</p><p>From the full view, most Windows processes had a normal description and a clear company name, usually Microsoft Corporation.</p><p>That does not make them impossible to abuse, but it gives us a baseline.</p><p>Then one process became worth checking:</p><p>update.exe</p><p>The name is generic.<br>The company information is not clearly trusted like the surrounding Microsoft processes.<br>And it sits in the process tree as something that needs more context.</p><p>At this point, update.exe is not proof.</p><p>It is only the first lead.</p><h3>Reducing the View</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DponFrdCgUf4_67V10FX5g.png" /></figure><p>After spotting it in the full list, the next step was to reduce the view around that process.</p><p>In Process Explorer, I searched for:</p><p>update.exe</p><p>This is important because once a process becomes a lead, I do not want to keep staring at the full process list. The full list creates noise.</p><p>Now the question becomes narrower:</p><p>What exactly is this process?</p><p>For this process, I wanted to check:</p><p>PID<br>Parent process<br>Image path<br>Command line<br>User<br>Integrity level<br>Verified signer</p><p>The process name alone was not enough.</p><p>A fake-looking name can be harmless.<br>A normal-looking name can be suspicious.</p><p>So the name only opened the door.</p><p>The details decide whether we keep following it.</p><h3>Process Properties: Image Tab</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tm6QKbcA3K_xt3tbZ8993g.png" /></figure><p>After isolating update.exe, the next step was to open its properties inside Process Explorer.</p><p>This is where the process stopped being just a name in the list.</p><p>In the <strong>Image</strong> tab, three details immediately mattered.</p><p>First, the path:</p><p>C:\Users\Admin\Desktop\New folder\update.exe</p><p>That path does not look like a normal Windows update component. A real Windows updater should not normally live inside a user desktop folder called New folder.</p><p>Second, the command line points to the same executable:</p><p>&quot;C:\Users\Admin\Desktop\New folder\update.exe&quot;</p><p>So this is not just a random label in the process list. This is the actual binary that was executed from that location.</p><p>Third, Process Explorer shows an autostart location:</p><p>HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\MediaUpdateTask</p><p>This is the most important detail in the screenshot.</p><p>Now the process is no longer only “something running now.”</p><p>It has a persistence clue.</p><p>A Run key under HKCU means Windows can start this entry again when that user logs in. The name MediaUpdateTask also tries to look normal, but the target behind it points back to the same suspicious update.exe.</p><p>This gives us a much stronger lead:</p><p>a generic updater name,<br>running from a user-controlled folder,<br>with no clear trusted identity in the visible metadata,<br>and linked to a registry autostart location.</p><p>At this point, the investigation becomes more focused.</p><p>We are not asking “is there anything suspicious somewhere in the system?” anymore.</p><p>We now have a concrete object to follow:</p><p>C:\Users\Admin\Desktop\New folder\update.exe</p><p>The next questions become technical:</p><p>What does this executable do?<br>Does it open a network connection?<br>Does it communicate with the C2 side?<br>What files or registry keys does it touch?<br>Does the autostart entry really bring it back after login or reboot?<br>Does its behavior match the access we saw from the operator side?</p><p>This screenshot does not finish the investigation.</p><p>But it tells us we are looking in the right place.</p><p>The process view gave us the file.<br>The Image tab gave us the path.<br>The autostart field gave us the persistence clue.</p><p>Now we can move from identity to behavior.</p><h3>Strings Tab: Reading Static Clues</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-L7DCWtd649bLhOFs1g6g.png" /><figcaption>The Strings tab does not prove behavior alone, but it gives strong leads. Here, `update.exe` exposes a COM-related registry path (`CLSID\…\InprocServer32`) and MinGW/GCC toolchain artifacts, which gives us clear targets to verify later with Process Monitor.</figcaption></figure><p>After checking the path and autostart location, I moved to the <strong>Strings</strong> tab inside Process Explorer.</p><p>This tab does not prove the full behavior of the program.</p><p>But it gives hints about what the binary may contain, what it may reference, and what we should verify next with dynamic tools.</p><p>In this screenshot, a few strings are important.</p><p>The first one is a registry-looking path:</p><p>Software\Classes\CLSID\{...}\InprocServer32</p><p>This is not a random string to ignore.</p><p>InprocServer32 is commonly associated with COM registration, where Windows loads a DLL or component through a registry-defined path. Seeing this kind of registry path inside a suspicious process does not prove abuse by itself, but it gives us a very specific direction:</p><p>we need to check whether update.exe reads, writes, or depends on registry keys related to CLSID or InprocServer32.</p><p>The second interesting part is the compiler/runtime artifacts.</p><p>The strings show C++ standard library references and paths such as:</p><p>/usr/lib/gcc/x86_64-w64-mingw32/...</p><p>This suggests that the binary was likely built with a <strong>MinGW-w64 / GCC toolchain</strong>, or at least contains artifacts from that toolchain.</p><p>That matters because it does not look like a normal Microsoft-signed Windows component.</p><p>Again, this is not final proof.</p><p>But it adds context.</p><p>So now the process has multiple weak signals pointing in the same direction:</p><p>generic name: update.exe<br>user-controlled path: Desktop\New folder<br>registry autostart location: CurrentVersion\Run\MediaUpdateTask<br>registry-related string: CLSID\...\InprocServer32<br>compiler artifacts linked to MinGW/GCC</p><p>This is how the pattern becomes stronger.</p><p>The Strings tab also helps us avoid guessing.</p><p>Instead of saying “this is malicious” too early, we extract questions:</p><p>Why does this executable contain a COM-related registry path?<br>Does it actually read that path during runtime?<br>Does it create or modify registry values?<br>Does it load something from that registry location?<br>Does it connect outside after reading those values?<br>Is it only a visible loader for something stored elsewhere?</p><p>At this stage, we still do not explain the full mechanism.</p><p>We only build the next step of the investigation.</p><p>The string gives us a target.</p><p>Now we need to verify it with runtime evidence.</p><p>That means moving to <strong>Process Monitor</strong> and filtering on the same process:</p><p>Process Name is update.exe</p><p>Then we look for registry activity:</p><p>RegOpenKey<br>RegQueryValue<br>RegSetValue<br>RegCreateKey</p><p>And we pay special attention to paths containing:</p><p>CurrentVersion\Run<br>MediaUpdateTask<br>Software\Classes\CLSID<br>InprocServer32</p><p>This is where the investigation becomes more precise.</p><p>The Strings tab gave us clues.</p><p>Process Monitor will tell us whether those clues are actually used while the process is running.</p><h3>Registry Activity: Did update.exe Use Those Keys?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQimiLgwHtAJor7urIQOLg.png" /><figcaption>Procmon shows `update.exe` repeatedly using `RegEnumValue` against `HKCU\Software\Classes\CLSID\…` with `SUCCESS` results. This does not prove registry writing. It proves runtime registry enumeration: the process is reading through values under that key, which confirms that the registry path seen earlier in Strings is actually used during execution.</figcaption></figure><p>The Strings tab gave us a registry clue.</p><p>It showed a path related to:</p><p>Software\Classes\CLSID\...\InprocServer32</p><p>But a string inside a binary is only a hint.</p><p>To know whether the process actually touched that area of the registry, I moved to <strong>Process Monitor</strong>.</p><p>The filter was kept narrow:</p><p>Process Name is update.exe Include</p><p>Then I focused on registry operations:</p><p>Operation begins with Reg Include</p><p>This removed most of the Windows noise and kept the view focused on what update.exe was doing inside the registry.</p><p>In the screenshot, the important operation is:</p><p>RegEnumValue</p><p>This matters.</p><p>RegEnumValue does not mean the process is writing to the registry.</p><p>It means the process is enumerating values under a registry key. In simpler words, it is asking Windows:</p><p>“What values exist here?”</p><p>The path shown in Procmon points to:</p><p>HKCU\Software\Classes\CLSID\{...}</p><p>And the result is repeatedly:</p><p>SUCCESS</p><p>That tells us the process was not just carrying a registry string inside the binary. It was actively walking through that registry location at runtime.</p><p>The Detail column also shows repeated index values, such as:</p><p>Index: 318<br>Index: 319<br>Index: 320<br>and so on.</p><p>That pattern is important.</p><p>It suggests that update.exe is not checking one single value and stopping. It is enumerating through many values under the same registry branch.</p><p>So the correct interpretation here is:</p><p>update.exe is collecting or reading registry data from the CLSID area.</p><p>Not writing yet.<br>Not proving modification by this screenshot alone.<br>But clearly reading through that registry space.</p><p>This is why the Process Monitor evidence is useful.</p><p>From Process Explorer, we already had:</p><p>update.exe running from a user-controlled path<br>an autostart location connected to the process<br>registry-related strings inside the binary</p><p>Now Procmon adds runtime behavior:</p><p>update.exe is actively enumerating registry values under HKCU\Software\Classes\CLSID\...</p><p>That makes the earlier Strings clue stronger.</p><p>The string was not random.</p><p>The process actually went there.</p><p>At this point, the investigation becomes more focused.</p><p>The question is no longer:</p><p>“Does this binary contain registry-looking text?”</p><p>The question becomes:</p><p>“Why is this process reading through this registry branch, and what data is it trying to recover from it?”</p><p>That is where the next step comes in.</p><p>If a process is reading many registry values, especially under a path we already saw in its strings, we need to check whether this registry data is only configuration, a COM-related lookup, or part of a staged execution chain.</p><p>The key point is this:</p><p>we do not jump directly to the final mechanism.</p><p>We follow the evidence.</p><p>Strings gave us the target.<br>Procmon confirmed registry enumeration.<br>Now we need to understand what happens after those reads.</p><p>Does the process open files?<br>Does it allocate memory?<br>Does it create another process?<br>Does it start network communication?<br>Does the timing match the C2 session seen from the offensive side?</p><p>This is how the story becomes technical without guessing.</p><p>The registry activity tells us that update.exe is not idle.</p><p>It is reading from a specific registry area.</p><p>Now we follow what it does next.</p><h3>Registry Activity: What Did update.exe Read?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRxy3Nci-AVZEPHj-jAuZg.png" /><figcaption>Procmon shows `update.exe` repeatedly using `RegEnumValue` against `HKCU\Software\Classes\CLSID\…` with `SUCCESS` results. This confirms runtime registry enumeration, not registry writing.</figcaption></figure><p>After the Strings tab showed a registry-related path, I needed to verify whether this was only a static string inside the binary or something the process actually used while running.</p><p>For that, I used <strong>Process Monitor</strong>.</p><p>The filter was kept narrow:</p><p>Process Name is update.exe Include</p><p>Then I focused only on registry activity:</p><p>Operation begins with Reg Include</p><p>This removes most of the noise and keeps the view focused on what update.exe is doing inside the registry.</p><p><strong>[Image — Procmon showing </strong><strong>update.exe enumerating CLSID registry values]</strong></p><p>In this capture, the important operation is:</p><p>RegEnumValue</p><p>The path points to:</p><p>HKCU\Software\Classes\CLSID\...</p><p>And the result is repeatedly:</p><p>SUCCESS</p><p>This does not mean update.exe is writing to the registry.</p><p>It means the process is enumerating values under that registry key. In other words, it is walking through that registry location and asking Windows what values exist there.</p><p>The repeated index numbers in the Detail column make the pattern clearer:</p><p>Index: 318<br>Index: 319<br>Index: 320<br>Index: 321<br>and so on.</p><p>That is not a single random lookup.</p><p>It is a repeated registry enumeration pattern.</p><p>This matters because we already saw a CLSID / InprocServer32-related clue in the Strings tab. Now Procmon shows that update.exe actually touches that registry area during runtime.</p><p>So the chain becomes stronger:</p><p>update.exe contains registry-related strings<br>→ Procmon shows update.exe reading through the same registry area<br>→ the registry is not just a static clue<br>→ it is part of the process behavior</p><p>At this stage, I am still not jumping to the final mechanism.</p><p>But now we know something important:</p><p>update.exe is not just running from an unusual path.</p><p>It is actively collecting or reading data from the registry.</p><p>The next question becomes:</p><p>what happens after this registry enumeration?</p><p>Does it open a file?<br>Does it load something?<br>Does it create another execution event?<br>Does it move into network communication?</p><p>That next action is what will tell us what role the registry data plays in the full behavior chain.</p><h3>Network Activity: Did update.exe Call Back?</h3><p>After the registry view, we had a stronger lead.</p><p>update.exe was not only running.</p><p>It was reading through registry values under:</p><p>HKCU\Software\Classes\CLSID\...</p><p>That matters, but it is still not the full story.</p><p>A process can read the registry for many reasons.</p><p>So the next question was:</p><p><strong>after this registry activity, did the same process communicate outside the machine?</strong></p><p>This is where I stayed focused on the same object.</p><p>Not all network traffic.<br>Not the whole Windows machine.<br>Only update.exe.</p><p>The PID from the Procmon view gave us a useful pivot:</p><p>update.exe<br>PID: 4840</p><p>So the next step was to check whether this same process had an active connection.</p><p>First, I checked the <strong>TCP/IP</strong> tab inside Process Explorer.</p><p>The fields that matter here are:</p><p>Local Address<br>Local Port<br>Remote Address<br>Remote Port<br>State</p><p>If the same process that reads registry values also opens a connection to a remote address, the chain becomes much stronger.</p><p>Then I used <strong>TCPView</strong> to confirm it from a network-focused Sysinternals view.</p><p>The filter was simple:</p><p>update.exe</p><p>or by PID:</p><p>4840</p><p>This is important because the goal is not to say:</p><p>“Windows has network traffic.”</p><p>Windows always has network traffic.</p><p>The goal is to say:</p><p>update.exe, the same process we already marked as suspicious, is the one talking outside.</p><p>That gives us a cleaner chain:</p><p>process found<br>→ unusual path<br>→ autostart clue<br>→ registry enumeration<br>→ network connection</p><p>At this point, the investigation is no longer built on one weak indicator.</p><p>It is built on behavior that keeps connecting back to the same process.</p><p>If TCPView or the TCP/IP tab shows an established remote connection, the next step is to take that remote IP and port into Wireshark.</p><p>Not to capture everything.</p><p>Only to answer one question:</p><p><strong>what does the traffic from </strong><strong>update.exe look like?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s7ROntIAnvjC02b9F7X1Hw.png" /><figcaption>The same process is checked for active remote connections. The important point is process-to-connection mapping.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4EtAGUwkYqKJPeP96s7SEA.png" /><figcaption>TCPView confirms whether the lead process is responsible for outbound traffic.</figcaption></figure><p>This is the important part of the network check.</p><p>The connection is not being treated as random Windows traffic. It is tied back to the same process we have been following from the beginning:</p><p>update.exe</p><p>That matters because the investigation is now connected across categories.</p><p>The process view gave us the executable.<br>The Image tab gave us the path and autostart clue.<br>Procmon showed registry enumeration.<br>Now the network view shows that the same process is also involved in external communication.</p><p>At this point, the question becomes more precise.</p><p>Not:</p><p>“Does this Windows machine have network traffic?”</p><p>But:</p><p>“Why is this specific process, running from this specific path, after reading this registry area, opening this specific connection?”</p><p>That is the difference between noise and investigation.</p><p>Now we have enough to move into Wireshark.</p><p>Not to inspect every packet.</p><p>Only to look at the traffic shape created around this connection.</p><h3>Wireshark View: What Does the Traffic Look Like?</h3><p>At the end of the previous section, we already had the important pivot:</p><p>update.exe was tied to a remote connection.</p><p>That means we do not open Wireshark blindly.</p><p>We already know what we are looking for:</p><p>traffic leaving the Windows machine toward the same remote side connected to update.exe.</p><h3>1. Filtering the Outbound Side</h3><p>The first filter I used was:</p><p>ip.dst == &lt;REMOTE_IP&gt;</p><p>I used ip.dst here because I wanted to focus on packets going <strong>to</strong> the remote side.</p><p>This is different from:</p><p>ip.addr == &lt;REMOTE_IP&gt;</p><p>ip.addr shows both directions.<br>ip.dst shows only traffic where the remote host is the destination.</p><p>At this stage, I cared about the outbound side because I wanted to see what the Windows machine was trying to reach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4NnPOCTYvDFX-tMG8dLUww.png" /><figcaption>Wireshark was filtered with `ip.dst == &lt;REMOTE_IP&gt;` to focus on traffic leaving the Windows machine toward the remote side. The TLS Client Hello exposed an SNI value, giving us the domain name used by the connection without needing to decrypt the payload.</figcaption></figure><h3>2. Isolating the TLS Handshake</h3><p>After seeing the outbound traffic, the next filter was more specific:</p><p>tls.handshake.type == 1 &amp;&amp; tls.handshake.extensions_server_name</p><p>This focuses on TLS Client Hello packets where the SNI value can appear.</p><p>If needed, it can be combined with the destination filter:</p><p>ip.dst == &lt;REMOTE_IP&gt; &amp;&amp; tls.handshake.type == 1 &amp;&amp; tls.handshake.extensions_server_name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0a2AKv5qlVEYK1iloxUSEw.png" /></figure><h3>3. Reading the Traffic Pattern</h3><p>After getting the destination and SNI, I moved from identity to pattern.</p><p>The next question was:</p><p>was this one request, or repeated communication?</p><p>For that, I looked at the packet list with columns like:</p><p>Time<br>Source<br>Destination<br>Protocol<br>Length<br>Info</p><p>Here, the useful filter can be broader:</p><p>ip.addr == &lt;REMOTE_IP&gt;</p><p>This shows both directions between the Windows machine and the remote host.</p><p>If I want only outbound packets again, I go back to:</p><p>ip.dst == &lt;REMOTE_IP&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckhEgZH0U6eDqKHQJNvrfg.png" /></figure><h3>4. Summarizing the Conversation</h3><p>Packet lists can become noisy, so I also checked:</p><p>Statistics → Conversations</p><p>This view summarizes the communication instead of forcing us to read every packet.</p><p>It shows:</p><p>which hosts talked,<br>how many packets were exchanged,<br>how many bytes moved,<br>and how long the conversation lasted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BoC8aefN39yYBd-9Y-SyvQ.png" /></figure><h3>What This Adds</h3><p>Wireshark does not prove the whole case alone.</p><p>Encrypted traffic is normal.<br>SNI is normal.<br>TLS Application Data is normal.</p><p>But the context is not normal.</p><p>The same process we followed from Process Explorer and Procmon now has a network story around it.</p><p>The chain is becoming clearer:</p><p>update.exe was found as a process<br>→ it ran from a user-controlled path<br>→ it had an autostart clue<br>→ its strings exposed registry-related clues<br>→ Procmon showed registry enumeration<br>→ network tools tied it to a remote side<br>→ Wireshark exposed the SNI domain<br>→ repeated TLS traffic showed ongoing communication</p><p>So the Wireshark section answers one question:</p><p>what did the connection look like on the wire?</p><p>The next step is to connect this network behavior back to Windows event logs.</p><p>For that, we move to Sysmon.</p><h3>What We Have Proven So Far</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ythMeHpxt-uHoPVORC99Vg.png" /></figure><p>Before mapping this behavior to any attack technique, it is worth stopping for a moment.</p><p>One screenshot alone would not be enough.</p><p>A strange process name alone is weak.<br>A registry read alone is weak.<br>Encrypted TLS traffic alone is normal.<br>Even an autostart clue alone does not explain the whole story.</p><p>But here, the evidence does not stand alone.</p><p>It connects.</p><p>Process Explorer showed us update.exe as the process worth following.</p><p>The Image tab showed that it was running from an unusual user-controlled path, and that it was linked to an autostart location.</p><p>The Strings tab gave us static clues: registry-related references and compiler/toolchain artifacts that did not look like a normal Microsoft Windows component.</p><p>Process Monitor then showed runtime behavior: update.exe was using RegEnumValue against the CLSID registry area, meaning it was reading through registry values while running.</p><p>Wireshark added the network side: outbound TLS traffic, a remote destination, and an SNI domain visible during the TLS handshake.</p><p>So the case is not built on one suspicious detail.</p><p>It is built on a chain:</p><p>update.exe runs<br>→ from an unusual path<br>→ with an autostart clue<br>→ contains registry-related strings<br>→ reads registry values at runtime<br>→ communicates with a remote side<br>→ exposes a domain through TLS SNI</p><p>That is the point where the behavior becomes clearer.</p><p>We are not saying “this is suspicious” because of one name.</p><p>We are saying the same process left traces in process inspection, registry activity, and network traffic.</p><p>That is what makes the investigation stronger.</p><p>Now we can move from raw evidence to classification:</p><p>which known attack techniques does this behavior resemble?</p><h3>Mapping the Behavior to MITRE ATT&amp;CK</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoFxJWUEr6qse-SXa0xghg.png" /></figure><p>Now that the evidence chain is clear, we can map what we saw to known attack behavior.</p><p>But this part needs to be careful.</p><p>MITRE ATT&amp;CK is not a magic verdict.</p><p>It does not say “this machine is hacked” by itself.<br>It gives us a language to describe behavior.</p><p>So instead of saying:</p><p>“this is technique X”</p><p>we ask:</p><p>“which technique does this behavior resemble, and how strong is our evidence?”</p><p>That difference matters.</p><h3>1. Persistence: Registry Run Key</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ef_1jWRiMgiERdixOy1fKQ.png" /></figure><p>The first clear behavior is persistence.</p><p>In Process Explorer, the Image tab showed an autostart location connected to update.exe:</p><p>HKCU\Software\Microsoft\Windows\CurrentVersion\Run\MediaUpdateTask</p><p>This matches the idea of using a Registry Run key to make something execute again when the user logs in.</p><p>So this maps strongly to:</p><p>T1547.001 — Registry Run Keys / Startup Folder</p><p>The important point is not only that a Run key exists.</p><p>The important point is what it points to.</p><p>In our case, the referenced executable was:</p><p>C:\Users\Admin\Desktop\New folder\update.exe</p><p>That path does not look like a normal Windows component or a trusted vendor updater path.</p><p>So the persistence clue is strong because it connects two things:</p><p>autostart location<br>→ unusual executable path</p><p>This tells us that update.exe was not only executed once.</p><p>It had a way to come back.</p><h3><strong>2. Discovery: Registry Enumeration</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVH25IOhgXMv6HC460gkbg.png" /></figure><p>The second behavior came from Process Monitor.</p><p>Procmon showed update.exe repeatedly using:</p><p>RegEnumValue</p><p>against:</p><p>HKCU\Software\Classes\CLSID\...</p><p>This does not mean the process wrote to the registry.</p><p>It means it was enumerating registry values.</p><p>So the clean mapping here is:</p><p>T1012 — Query Registry</p><p>This is not persistence by itself.</p><p>This is discovery or data collection from the registry.</p><p>The important part is that the registry path was not random. We had already seen related registry strings in the Process Explorer Strings tab.</p><p>So the chain is:</p><p>Strings showed a registry clue<br>→ Procmon confirmed runtime registry enumeration<br>→ the process was actually reading through that area</p><p>This makes the registry behavior real, not just a static artifact inside the binary.</p><h3>3. Command and Control: Web Protocols</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJH5SmDuwKAfjDWkjSRqfg.png" /></figure><p>The third behavior came from the network side.</p><p>Wireshark showed outbound TLS traffic to a remote side, and the TLS handshake exposed an SNI domain.</p><p>That gives us a possible C2 communication pattern.</p><p>The mapping here is:</p><p>T1071.001 — Application Layer Protocol: Web Protocols</p><p>But again, we should be precise.</p><p>TLS traffic alone is normal.</p><p>A browser uses TLS.<br>Windows services use TLS.<br>Many legitimate applications use TLS.</p><p>So the traffic becomes interesting only because it connects back to the same process chain:</p><p>update.exe<br>→ unusual path<br>→ autostart clue<br>→ registry enumeration<br>→ outbound TLS traffic<br>→ SNI domain</p><p>That is why we do not say:</p><p>“TLS means C2.”</p><p>We say:</p><p>“TLS communication from this process supports the C2 behavior we already observed from the lab side.”</p><p>The process context makes the network evidence meaningful.</p><h3>4. COM-Related Clue: Not Confirmed Yet</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJD6mEE5ABjppHXKwI566Q.png" /></figure><p>The Strings tab also showed a path related to:</p><p>Software\Classes\CLSID\...\InprocServer32</p><p>That is important, but we have to be honest about what it proves.</p><p>A CLSID or InprocServer32 reference can be related to COM behavior.</p><p>But at this point, we have not proven COM hijacking.</p><p>To claim something like:</p><p>T1546.015 — Component Object Model Hijacking</p><p>we would need stronger evidence.</p><p>For example:</p><p>a COM registry reference being modified,<br>a legitimate COM object being redirected,<br>a DLL or payload path replacing the original reference,<br>or execution triggered through that COM relationship.</p><p>Right now, what we have is weaker:</p><p>the binary contains a COM-related string,<br>and Procmon shows registry enumeration under the CLSID area.</p><p>That is enough to say:</p><p>“this is an area to investigate.”</p><p>It is not enough to say:</p><p>“COM hijacking happened.”</p><p>This is important because good analysis is not only about finding scary technique names.</p><p>Good analysis is knowing what you can prove and what you cannot prove yet.</p><h3>What We Can Say Confidently</h3><p>From the evidence we collected, we can say:</p><p>update.exe was running from an unusual user-controlled path.</p><p>It had an autostart clue under the current user Run key.</p><p>It contained registry-related strings.</p><p>It enumerated registry values at runtime.</p><p>It communicated with a remote side over TLS.</p><p>It exposed an SNI domain during the TLS handshake.</p><p>So the strongest MITRE mapping is:</p><p>T1547.001 for the Run key persistence behavior.</p><p>T1012 for the registry enumeration behavior.</p><p>T1071.001 for the web-protocol communication pattern.</p><p>And the COM-related registry path remains a lead, not a confirmed technique.</p><p>That is the cleanest way to classify what we saw.</p><p>Not by forcing the evidence into a dramatic attack name.</p><p>But by mapping each observed behavior to the closest defensive category.</p><h3>Why Some Attacks Are Harder to Spot</h3><p>The case we followed was useful because it gave us visible traces.</p><p>update.exe had a generic name.<br>It ran from a strange path.<br>It had an autostart clue.<br>It read from the registry.<br>It opened encrypted traffic to a remote side.</p><p>That made the investigation easier to follow.</p><p>But real attacks are not always this noisy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skjHxI4WSg9Ggz1WPxq_aQ.png" /></figure><p>This screenshot shows why looking only at the process list is not enough.</p><p>Here, we are not looking at a strange standalone executable like update.exe.</p><p>We are looking deeper, inside a normal Windows process, through Process Explorer’s DLL / handle search view.</p><p>A process like explorer.exe can load many DLLs during normal Windows activity. Most of them may come from expected locations such as:</p><p>C:\Windows\System32\...</p><p>That is normal.</p><p>But this is exactly why cleaner attacks are harder.</p><p>If suspicious code appears through a loaded DLL, injected code, or an unexpected module inside a trusted-looking process, the main process name may not look suspicious at all.</p><p>From the outside, the process list may look clean.</p><p>The suspicious part may be one layer deeper.</p><p>So the question changes.</p><p>We are no longer asking only:</p><p>“Is there a strange process?”</p><p>We also ask:</p><p>“Is a normal process loading something it should not load?”</p><p>That means checking:</p><p>module name,<br>DLL path,<br>company name,<br>verified signer,<br>load location,<br>and whether the module comes from a trusted system path or a user-writable folder.</p><p>A DLL loaded from C:\Windows\System32 may be normal.</p><p>A DLL loaded into a trusted process from AppData, Temp, Downloads, or a strange application folder deserves more attention.</p><p>The same idea applies to process injection.</p><p>A cleaner attack may not create an obvious process called update.exe. Instead, the activity may appear under a process that already exists. The process name looks normal, but its behavior changes.</p><p>That is harder to spot because the defender cannot rely on the name anymore.</p><p>The defender has to look at context:</p><p>What modules are loaded?<br>Where did they come from?<br>Are they signed?<br>Does the path make sense?<br>Did the process suddenly open a network connection?<br>Did it start after suspicious registry activity?<br>Did it begin behaving outside its normal role?</p><p>DLL side-loading and DLL hijacking can also make the picture less obvious.</p><p>Instead of launching a suspicious executable directly, a legitimate-looking program may load an unexpected DLL from a location it should not trust.</p><p>Living-off-the-land behavior can make things even more confusing. Tools already present on Windows, such as PowerShell, rundll32, regsvr32, mshta, wscript, or scheduled tasks, can be abused in ways that look less obvious than a random file sitting on the desktop.</p><p>Persistence can also be quieter.</p><p>A simple Run key is easy to notice.</p><p>But persistence may appear through scheduled tasks, services, WMI event subscriptions, startup folders, COM-related paths, DLL loading behavior, or other mechanisms that do not immediately look suspicious in a quick check.</p><p>Network traffic can be cleaner too.</p><p>In our case, Wireshark showed TLS traffic and an SNI domain. That gave us something to follow.</p><p>But many legitimate applications use TLS.</p><p>So the question is not:</p><p>“Is the traffic encrypted?”</p><p>Encrypted traffic is normal.</p><p>The real questions are:</p><p>Which process created it?<br>Where did it connect?<br>How often did it happen?<br>Did the timing look automated?<br>Does the destination make sense for that process?<br>Did this happen after suspicious registry, DLL, or process activity?</p><p>This is why harder attacks are not necessarily invisible.</p><p>They are just less direct.</p><p>The trace may not appear as one obvious file.</p><p>It may be split across:</p><p>a trusted process,<br>an unexpected DLL,<br>registry access,<br>scheduled execution,<br>network metadata,<br>and timing.</p><p>That is why one artifact is not enough.</p><p>A clean-looking process name may hide abnormal behavior.<br>A trusted binary may be used in an unexpected way.<br>A normal protocol may carry suspicious communication.<br>A small registry change may explain why the activity returns later.</p><p>The defender’s job is not to panic over one sign.</p><p>The defender’s job is to connect signs that should not belong together.</p><p>In our lab, update.exe was noisy enough to make the chain easy to see.</p><p>In a cleaner case, the same chain may be harder:</p><p>a trusted process starts,<br>an unexpected DLL loads,<br>code runs inside another process,<br>a registry key stores configuration,<br>a scheduled task brings it back,<br>and HTTPS traffic blends into normal network activity.</p><p>Harder to spot does not mean impossible to investigate.</p><p>It only means the defender needs structure.</p><p>Process.<br>Parent.<br>Path.<br>Command line.<br>Signer.<br>Loaded modules.<br>Registry activity.<br>Persistence points.<br>Network destination.<br>Timing.</p><p>The process name may lie.</p><p>The chain usually does not.</p><p>DLL side-loading and DLL hijacking can also make the picture less obvious.</p><p>Instead of launching a suspicious executable directly, a legitimate-looking program may load an unexpected DLL from a location it should not trust.</p><p>For readers who want a deeper explanation of DLL hijacking itself, Okta has a useful article that explains the idea, how DLL search order can be abused, and why tools like Process Explorer can help reveal suspicious DLL loading behavior:</p><p><a href="https://www.okta.com/identity-101/dll-hijacking/">DLL Hijacking Definition Tutorial &amp; Prevention | Okta</a></p><h3>Defensive Structure: How to Search Without Getting Lost</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVMKn5FVonHykUcNqpeGhg.png" /></figure><p>The biggest mistake in this kind of investigation is jumping too fast.</p><p>You see a strange process, so you call it malware.<br>You see encrypted traffic, so you call it C2.<br>You see a registry key, so you call it persistence.</p><p>That is not enough.</p><p>One artifact can mislead you.</p><p>The better way is to move through the system in a fixed order and let each layer answer one question.</p><p>Start with the process.</p><p>What ran?<br>Where did it run from?<br>Who launched it?<br>What command line started it?<br>Is it signed?<br>Does the path make sense?<br>Is it running with normal user rights or elevated privileges?</p><p>Then move to registry and file activity.</p><p>What did the process read?<br>What did it write?<br>Did it touch startup locations?<br>Did it enumerate registry keys?<br>Did it interact with paths that match what we saw in strings or process properties?</p><p>Then move to the network.</p><p>Did the same process talk outside?<br>What destination did it reach?<br>What port was used?<br>Was TLS involved?<br>Was an SNI domain visible?<br>Was the traffic repeated?<br>Did the timing look like user activity or a quiet check-in?</p><p>Then check persistence.</p><p>Does the behavior return after reboot?<br>Is there a Run key?<br>A scheduled task?<br>A service?<br>A startup folder entry?<br>A COM-related path?<br>A DLL loading behavior that does not fit?</p><p>Finally, connect the timeline.</p><p>This is where the investigation becomes strong.</p><p>Not:</p><p>update.exe looks strange.</p><p>But:</p><p>update.exe ran from an unusual path<br>→ had an autostart clue<br>→ exposed registry-related strings<br>→ enumerated CLSID registry values<br>→ communicated to a remote side<br>→ exposed a domain through TLS SNI<br>→ matched known behavior categories in MITRE ATT&amp;CK</p><p>That is the difference between guessing and analysis.</p><p>A defender should not depend on one tool giving a final answer.</p><p>Process Explorer gives process context.<br>Strings give static clues.<br>Procmon shows runtime behavior.<br>Wireshark shows network shape.<br>Sysmon can preserve events for timeline analysis.<br>MITRE gives language to classify what was observed.</p><p>None of them alone is the full truth.</p><p>Together, they let the machine explain itself.</p><p>And that is the main point of this article.</p><p>A compromised machine does not always look compromised.</p><p>The desktop may stay clean.<br>The user may see nothing.<br>Windows Defender may not raise a clear alert at the moment you expect.</p><p>But underneath the surface, behavior still has to happen somewhere.</p><p>Something runs.<br>Something reads.<br>Something connects.<br>Something persists.<br>Something leaves timing behind.</p><p>The job is not to look for Hollywood signs.</p><p>The job is to follow the chain.</p><p>Process.<br>Path.<br>Parent.<br>Privilege.<br>Registry.<br>Network.<br>Persistence.<br>Timeline.</p><p>That structure will not catch everything.</p><p>No structure does.</p><p>But it gives you a way to think when the screen looks normal and the system is not.</p><h3>Lab Shape: What We Tried to Simulate</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ammdnNe1obFzN9JLnMSLdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eTj5Ha5E-6puFGD1TqReHg.png" /></figure><h3>Lab Shape: What We Tried to Simulate</h3><p>Before going into the Windows evidence, it is important to clarify the shape of the lab.</p><p>The goal was not to create a perfect real-world attack.</p><p>The goal was to make the behavior realistic enough to investigate.</p><p>On one side, we had a <strong>Kali Linux</strong> machine acting as the operator side, running the controlled C2 environment.</p><p>On the other side, we had a <strong>Windows 10</strong> machine acting as the target system.</p><p>Windows 10 was used because it still represents a very common desktop environment, and it gives us the kind of Windows behavior we want to observe: processes, registry keys, startup locations, Defender, network traffic, and user-level activity.</p><p>The C2 side was not treated as a simple local-only connection.</p><p>Instead of relying only on a raw local IP, the connection was made through a domain/tunnel-style setup to better mimic how real C2 traffic may appear from the defender’s view: a Windows process communicating outward to a remote-looking destination over normal-looking encrypted traffic.</p><p>That matters because real-world C2 rarely looks like a clean lab label saying:</p><p>“this is the attacker machine.”</p><p>It may look like:</p><p>a domain,<br>TLS traffic,<br>an external destination,<br>a normal port,<br>and a process that quietly checks in.</p><p>This is why the lab was useful.</p><p>It gave us a controlled place to observe the same kind of traces a defender would care about:</p><p>which process ran,<br>where it ran from,<br>what registry areas it touched,<br>whether it had persistence,<br>where it connected,<br>what domain appeared in SNI,<br>and whether the traffic repeated.</p><p>Windows Defender was left as part of the environment, but the investigation did not depend on it.</p><p>In this case, Defender did not give us the clear warning that a normal user might expect.</p><p>That does not mean the behavior was safe.</p><p>It means we needed to look deeper.</p><p>No alert is not the same as no compromise.</p><p>So the lab was built around telemetry, not trust.</p><p>Process Explorer showed what was running.<br>Process Monitor showed what was touched.<br>Wireshark showed the traffic shape.<br>Sysmon could help preserve the same behavior as events.</p><p>That is the setup behind the investigation.</p><p>A controlled Kali side.<br>A Windows 10 target.<br>A domain/tunnel-style C2 path.<br>Real Windows telemetry.<br>And a defensive goal: understand what changes when access exists.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d64f7b189c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Could Not Get Lock /var/lib/dpkg/lock-frontend: Don’t Delete It First]]></title>
            <link>https://medium.com/@mouhibmh/could-not-get-lock-var-lib-dpkg-lock-frontend-dont-delete-it-first-886eaacfa04b?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/886eaacfa04b</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 11:22:39 GMT</pubDate>
            <atom:updated>2026-06-09T11:22:39.793Z</atom:updated>
            <content:encoded><![CDATA[<p>A common apt error, and the safe order I use before touching the lock file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nyEUvW_5nVlfuk80mXm8VQ.png" /></figure><p>I was trying to install a small package with apt:</p><pre>sudo apt install sl</pre><p>Nothing special. Just a normal install command.</p><p>Then the terminal stopped here:</p><pre>Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend</pre><p>If you are new to Linux, this kind of message feels more serious than it really is.</p><p>You see /var/lib/dpkg/lock-frontend, you see the word lock, and the first thought is usually:</p><p>“Something is broken.”</p><p>But before we fix anything, we need to slow down and read what the system is actually saying.</p><p>The important part is not only the lock file path.</p><p>The important part is this idea:</p><pre>apt is waiting because another package process may already be using the system.</pre><p>So the lock is not always the problem.</p><p>Sometimes the lock is just Linux saying:</p><p>“Wait. I am already doing package work somewhere else.”</p><p>That could be another terminal running apt update.<br>It could be a system updater in the background.<br>It could be a previous install that is still finishing.<br>Or it could be a stuck process.</p><p>This is why I do not like deleting the lock file as the first move.</p><p>Because if another process is really using apt or dpkg, deleting the lock is like removing a warning sign while the problem is still there.</p><p>The safer question is not:</p><p>“How do I delete this file?”</p><p>The safer question is:</p><p>“What is holding the lock?”</p><h3>First, check what is holding the lock</h3><h3>First, check what is holding the lock</h3><p>At this point, I do not want to guess.</p><p>Maybe apt is really stuck.<br>Maybe another terminal is still installing something.<br>Maybe the system updater is running quietly in the background.</p><p>So before touching the lock file, I want to see if there is an actual process using apt or dpkg.</p><p>The quick check is:</p><pre>ps aux | grep -E &quot;apt|dpkg&quot;</pre><p>This is the moment where the error becomes less mysterious.</p><p>We are not fixing yet.<br>We are only asking the system:</p><p>“Who is using the package manager right now?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ZmVQYUO8hOiQjjaMGcxLw.png" /></figure><p>If you see an active apt or dpkg process, that explains the lock.</p><p>In that case, the safest move is usually to wait a little.</p><p>Not every lock means something is broken. Sometimes the system is simply still working.</p><p>But if the same process stays there for a long time and nothing changes, then it may be stuck. That is when I would start thinking about stopping the process carefully and repairing the package state.</p><p>The important part is the order:</p><pre>Check first.<br>Wait if it is active.<br>Only intervene if it is clearly stuck.</pre><p>That order matters more than memorizing one magic command.</p><h3>If something is still running, do not rush</h3><p>If the command shows an active apt or dpkg process, I do not kill it immediately.</p><p>This is the part where many people make the problem worse.</p><p>Sometimes the system is not broken.<br>It is just busy.</p><p>Maybe another terminal is finishing an install.<br>Maybe a background updater is still working.<br>Maybe dpkg is configuring packages after an upgrade.</p><p>So if I see a real process holding the lock, my first move is simple:</p><pre>wait a little</pre><p>Give it a minute or two, then check again:</p><pre>ps aux | grep -E &quot;apt|dpkg&quot;</pre><p>If the process disappears, the lock should be gone too.</p><p>Then I can run:</p><pre>sudo apt update</pre><p>and continue normally.</p><p>But if the same process stays there for a long time, and nothing seems to be changing, then I start treating it like a stuck process.</p><p>At that point, I would stop the process carefully:</p><pre>sudo kill &lt;PID&gt;</pre><p>Then I repair the package state:</p><pre>sudo dpkg --configure -a</pre><p>And after that:</p><pre>sudo apt update</pre><p>The important thing is not the command itself.</p><p>The important thing is the order:</p><pre>check first<br>wait if it is active<br>stop it only if it is stuck<br>repair dpkg after interruption</pre><p>That order is what keeps a small apt error from becoming a bigger package mess.</p><h3>When I would delete the lock file</h3><p>Deleting the lock file is not always wrong.</p><p>But I would not do it first.</p><p>I only think about it after checking that no apt or dpkg process is still running.</p><p>So the order in my mind is simple:</p><pre>1. Check what is holding the lock.<br>2. Wait if the process is still active.<br>3. Stop it only if it is clearly stuck.<br>4. Repair dpkg.<br>5. Only then think about the lock file.</pre><p>If no package process is running anymore, but the lock error is still there, then removing the stale lock file may make sense.</p><p>But if something is still using the package manager, deleting the lock file does not really fix the problem.</p><p>It only removes the warning.</p><p>Now when I see:</p><pre>Could not get lock /var/lib/dpkg/lock-frontend</pre><p>I do not start by deleting anything.</p><p>I start by asking:</p><pre>What is holding the lock?</pre><p>That small question usually saves more time than the fastest-looking fix.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=886eaacfa04b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Cost of Losing Is Not the Same for Everyone]]></title>
            <link>https://medium.com/@mouhibmh/the-cost-of-losing-is-not-the-same-for-everyone-bc5629215512?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc5629215512</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[world]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 11:35:57 GMT</pubDate>
            <atom:updated>2026-06-01T11:35:57.082Z</atom:updated>
            <content:encoded><![CDATA[<h4>A simple game of tokens reveals why some people can fail, recover, and keep playing — while others are eliminated after one mistake.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vsUy3XtLHskDMUoigplrkw.png" /></figure><p>Imagine a room with one hundred players.</p><p>In the center of the room, there is a long table.</p><p>Before the game begins, every player receives a number of tokens.</p><p>Some receive two.</p><p>Some receive ten.</p><p>Some receive one hundred.</p><p>A few receive so many that their stacks rise above the table.</p><p>The rules are simple:</p><p>Every round gives you a chance to win.Every mistake costs tokens.And when your tokens reach zero, you are out of the game forever.Now before anyone makes the first move, <strong>ask yourself</strong>:</p><p>Are these players really playing the same game?</p><p>At first, the rules look fair.</p><p>Everyone sits at the same table.</p><p>Everyone faces the same game.</p><p>Everyone is judged by the same outcome.</p><p>But something is already different before the first round begins.</p><p>Not the rules.</p><p>The consequences.</p><p>Losing one token does not mean the same thing to every player.</p><p>For the player with one hundred tokens, it is almost nothing.</p><p>For the player with two, it is half of everything.</p><p>The event is identical.</p><p>The damage is not.</p><h3>Section 1 : When Loss Changes Behavior</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwTk_lTkLoCcQ63_DlJhxQ.png" /></figure><p>There is a moment after losing when the game becomes quieter. Not outside, but inside you. The room may still have the same noise, the same rules, the same table, and the same next move waiting in front of you. But something has shifted.</p><p>Before the loss, the next move looked like a possibility. After the loss, it starts to look like a question: <strong>Can I afford this?</strong></p><p>That question is small when you have enough left behind you. It passes through the mind quickly, almost like a normal part of thinking. You lose once, but the loss does not reach the center of you. It stays on the surface. It becomes a mistake, a note, a reason to adjust.</p><p>You can tell yourself that failure is part of learning, and in that moment, the sentence is true. Because you still have enough room for learning to be safe. You can try again, change direction, take a different path, or even pretend the loss did not affect you much, because in a practical sense, it did not.</p><p>The game continues. Your body knows it. Your mind knows it. So the next move remains a move.</p><p>But when there is almost nothing left, the same loss travels deeper. It does not stay on the surface. It enters the body. It changes the breathing. It changes the hand before the hand even moves. It makes the next option feel heavier than it looked a moment ago.</p><p>The rule did not change. The opportunity did not disappear. The path may still be open. But now, every step has a shadow attached to it.</p><p><strong>What if I lose again? What if this is the mistake that ends everything? What if I do the right thing, but at the wrong time? What if the risk is reasonable for someone else, but fatal for me?</strong></p><p>This is where the difference begins. Not in intelligence. Not in desire. Not even always in courage. The difference begins in the amount of space a person has between one mistake and the end.</p><p>When that space is wide, the mind can move freely. It can imagine, test, and be wrong without collapsing. It can look at failure and say: this is feedback.</p><p>But when that space becomes thin, the mind stops treating decisions as experiments. It starts treating them as threats. And this changes everything.</p><p>A person does not become cautious only because he loves safety. Sometimes he becomes cautious because reality has trained him to count the cost of every wrong step. He does not look at risk as a motivational word. He feels it as weight.</p><p>He feels it in the pause before saying yes. He feels it in the second thought after the first idea. He feels it when an opportunity appears, and instead of excitement, the first emotion is calculation.</p><p>From the outside, this can look strange. Someone may ask: <strong>Why is he hesitating? Why does he not just move? Why does he think too much? Why is he afraid of a chance that could help him?</strong></p><p>But from the inside, hesitation may not feel like fear. It may feel like self-protection. It may feel like the last intelligent thing left to do. Because when you cannot afford to fall, even a small jump becomes serious.</p><p>And this is what people often miss. They judge the movement, but they do not see the remaining tokens.</p><p>They see one person stepping forward and call him brave. They see another standing still and call him weak. But they do not ask what each one would lose if the step went wrong.</p><p>For one person, the wrong move may become a story. For another, it may become a wound. For one person, failure may be delayed success. For another, failure may close the only door that was still open.</p><p>So of course their behavior will not be the same. One can be relaxed because the game has not become personal yet. The other is tense because the game has already reached his skin.</p><p>One can think about winning. The other must first think about surviving long enough to try.</p><p>And survival has a way of narrowing the mind. Not because the mind is weak, but because the mind is doing its job. It removes unnecessary dreams. It reduces movement. It asks for proof before trust. It turns every possible action into a calculation.</p><p>This can protect a person, but it can also trap him. Because after enough losses, the mind may begin to fear not only dangerous moves, but movement itself. It may start confusing safety with stillness. It may reject chances before understanding them. It may call hesitation wisdom, even when hesitation has become another form of loss.</p><p>This is the cruel part: the same caution that protects someone from falling can also prevent him from climbing.</p><p>And the same freedom that helps another person move forward may not come from a stronger soul, but from a softer landing.</p><p>Sometimes what looks like confidence is not confidence alone. Sometimes it is having enough room to be wrong. Sometimes what looks like fear is not fear alone. Sometimes it is knowing that one more mistake would not be small.</p><p>This is why loss changes behavior. It does not only take something from the hand. It changes the mind that must choose what the hand does next.</p><p>The player after the loss is not exactly the same player who existed before it. He may sit at the same table. He may face the same rules. He may still have a chance. But now, the chance carries a different weight.</p><p>And once the weight changes, the movement changes with it.</p><h3>Section2:Resources Do Not Only Buy Opportunities</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YVlheIa66UpnvPxA0fIg9Q.png" /></figure><p>Look at the image for a moment.</p><p>What do you see?</p><p>At first, it may look simple.</p><p>Two people.<br> Two open doors.<br> Two paths leading toward the same kind of light.</p><p>One person stands on a narrow path, almost alone above the darkness. The ground beneath him is thin, cracked, and unforgiving. There is a door in front of him, but reaching it seems to require a kind of precision that does not allow many mistakes.</p><p>On the other side, another person sits near a wider structure. The door in front of him is not very different. It is open too. The light is there too. But the ground around him is different. There are platforms, steps, extra space, side paths, and enough room to stop, adjust, or move again.</p><p>So from the first glance, the image may seem to say something obvious.</p><p>One path is harder.<br> One path is easier.<br> One person has less space.<br> The other has more.</p><p>And yes, that is true.</p><p>But in the context of this idea, the image is not only about two paths.</p><p>It is about what we usually fail to notice when we talk about opportunity.</p><p>Because when people speak about opportunity, they often imagine only the door.</p><p>If the door is open, they assume the chance exists. If the light is visible, they assume the person can move toward it. If the destination is there, they ask why someone is still standing.</p><p>But an opportunity is not only the door in front of you.</p><p>It is also the ground that allows you to reach it.</p><p>This is where the deeper meaning begins.</p><p>The two doors may look equal. The destination may look equal. The light may even look equal. But the experience of moving toward them is not equal, because the ground beneath each person is not the same.</p><p>For one person, the path is thin. A wrong step is not just a mistake. It may be the end of the path itself.</p><p>For another, the path is wide. A wrong step may hurt, but it does not remove him from the whole structure. He can stop. He can return. He can try a different angle. He can lose balance without disappearing.</p><p>This is the part that resources change.</p><p>Resources do not only buy opportunities.</p><p>They buy room for mistakes.</p><p>They buy the space between a wrong decision and total collapse. They buy time to choose badly and still recover. They buy the ability to misunderstand, fail, learn, and come back with a better strategy. They buy a second attempt that does not feel impossible.</p><p>And once you understand this, the image changes.</p><p>You no longer see only two people facing two doors.</p><p>You begin to see two different relationships with failure.</p><p>The person on the narrow path does not only have a harder road. He has a road that punishes error immediately. His opportunity exists, but it exists under pressure. Every step has to be measured. Every movement carries the question: what happens if I am wrong?</p><p>The person on the wider ground does not only have an easier road. He has a system around him that can absorb mistakes. He can move with less fear, not necessarily because he is braver, but because the ground beneath him is more forgiving.</p><p>This is why the same opportunity can feel completely different to two people.</p><p>From far away, both may appear to have access.</p><p>Both can see the door.<br> Both can name the goal.<br> Both can imagine what is behind it.</p><p>But one person approaches the opportunity as a possibility.</p><p>The other approaches it as a risk that could take everything left.</p><p>And this is where many judgments become unfair.</p><p>People may look at someone standing still and say, “Why does he not move?” They may see hesitation and think it is laziness. They may see caution and call it fear. They may see slow movement and assume the person does not want the opportunity badly enough.</p><p>But maybe he sees the path more clearly than they do.</p><p>Maybe he sees the open door, yes.<br> But he also sees the cracks under his feet.<br> He sees the darkness on both sides.<br> He sees how little space there is for correction.<br> He sees that one mistake would not simply delay him, but possibly remove him.</p><p>So his hesitation is not always the absence of ambition.</p><p>Sometimes it is the presence of consequence.</p><p>On the other side, movement may look like confidence. But confidence is easier when the floor is wide. It is easier to experiment when the cost of being wrong is survivable. It is easier to say “failure is part of learning” when failure does not destroy the conditions that allow you to learn.</p><p>This is why advice about risk often sounds incomplete.</p><p>People say, “Take the chance.”</p><p>They say, “You have to fail to grow.”</p><p>They say, “Do not fear mistakes.”</p><p>And sometimes they are right.</p><p>But before giving that advice, there is a question they often forget to ask:</p><p>Can you survive the mistake?</p><p>Because failure is not the same thing when there is a floor beneath it.</p><p>For one person, choosing wrong may become a story. For another, it may become debt, exhaustion, shame, lost time, or a door that may not open again.</p><p>For one person, a failed attempt is a lesson.</p><p>For another, it is a wound that makes the next attempt harder.</p><p>This does not mean that people with wider ground always succeed. They can waste their chances. They can make terrible decisions. They can fall even when the path is safe.</p><p>And it does not mean that people on narrow paths cannot succeed. Some do. Some cross with a level of discipline, patience, and control that others may never need to develop.</p><p>But the point is not destiny.</p><p>The point is margin.</p><p>The real difference is not only who sees the door. The real difference is who has enough ground to make a mistake on the way there.</p><p>That is what resources often buy.</p><p>Not just access.</p><p>Not just comfort.</p><p>Not just more doors.</p><p>They buy the ability to be wrong without being erased.</p><p>And once you see that, opportunity no longer looks like a simple open door.</p><p>It becomes something larger.</p><p>A door, yes.</p><p>But also the path.</p><p>The ground.</p><p>The space around your next mistake.</p><p>And the chance to keep moving after it.</p><h3><strong>Section3:</strong>But This Is Not the Whole Story</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PGIesA6fIdIl40MlDPeXCA.png" /></figure><p>Look at the image again.</p><p>At first, you may think you already understand it.</p><p>One person is walking on a narrow, cracked path. Another person is sitting on a wider ground. Two lights are waiting in the distance. Two possible endings. Two different conditions.</p><p>It may seem like the image is saying something simple: one path is hard, the other is easy.</p><p>But that would be too simple.</p><p>Because the person on the narrow path is still moving.</p><p>And the person on the wider ground is not.</p><p>This is where the story becomes more honest.</p><p>A narrow path does not make success impossible. And a wide path does not make success automatic.</p><p>You may have seen this in real life.</p><p>You may have seen someone start with very little and still move with a kind of discipline that makes every step count. Someone who cannot afford to waste energy, so he learns to control it. Someone who cannot afford too many mistakes, so he becomes careful, sharp, and patient in a way others may never need to become.</p><p>And you may have also seen the opposite.</p><p>Someone with more space, more chances, more support, and more time — but still standing still. Or distracted. Or careless. Or waiting so long that the open path in front of him slowly becomes useless.</p><p>This is why the idea cannot stop at resources.</p><p>Resources matter, but they are not the whole story.</p><p>The ground beneath you matters. The number of chances you have matters. The amount of damage you can survive matters. But what you do with the space you have still matters too.</p><p>A wide path can protect you from falling, but it cannot walk for you.</p><p>A narrow path can make every step more dangerous, but it does not always remove the possibility of moving.</p><p>This is where many people make the mistake of choosing one extreme.</p><p>Some people look only at the narrow path and say, “There was no chance.”</p><p>Others look only at the person who crossed it and say, “See? The path was never the problem.”</p><p>Both miss something.</p><p>The fact that someone crossed the narrow path does not mean the path was not narrow.</p><p>And the fact that someone failed on the wide path does not mean the wide ground was not an advantage.</p><p>You can admit that the structure is unequal without pretending that personal choices do not exist.</p><p>And you can admit that choices matter without pretending that all choices cost the same.</p><p>That is the balance most discussions lose.</p><p>Because real life is not clean enough to fit into one sentence.</p><p>Sometimes people fail because the path was too fragile.</p><p>Sometimes people fail because they wasted the room they had.</p><p>Sometimes people succeed because they had support.</p><p>Sometimes they succeed because they moved with unusual discipline through a place that would have broken many others.</p><p>And sometimes the truth is not one thing.</p><p>Sometimes it is all of them at once.</p><p>So the question is not only: <strong>Can a person succeed?</strong></p><p>Of course, sometimes he can.</p><p>The better question is: <strong>How many mistakes is he allowed to make while trying?</strong></p><p>Because that is where the difference hides.</p><p>One person may be allowed to learn slowly. Another may need to be almost correct from the beginning.</p><p>One person may fail three times and still be called persistent. Another may fail once and lose the only chance he had.</p><p>One person may take a risk and call it growth. Another may take the same risk and spend years repairing the damage.</p><p>So when you look at someone’s outcome, be careful.</p><p>You may be seeing the ending, but not the number of attempts that were available before it.</p><p>You may be seeing the success, but not the amount of pressure under each step.</p><p>You may be seeing the failure, but not the way the person had to calculate every move before making it.</p><p>This does not remove responsibility.</p><p>It only makes responsibility more honest.</p><p>Because responsibility without context becomes judgment.</p><p>And context without responsibility becomes an excuse.</p><p>The point is not to erase one with the other.</p><p>The point is to see both.</p><p>Yes, some people cross narrow paths.</p><p>Yes, some people waste wide ones.</p><p>But that does not make the paths equal.</p><p>It only means the ending is not written by the path alone.</p><p>The path shapes the journey.</p><p>The person still has to move.</p><p>And between those two things — the path you are given, and the way you move on it — most of life happens.</p><h3><strong>Section3</strong>:The Advantage of Remaining in the Game</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1CiwdDtpy8R5fLZiU_xNg.png" /></figure><p>Look at the final image.</p><p>Do not look for victory too quickly.</p><p>There is no trophy here. No crowd. No celebration. No perfect ending waiting to be announced. The room is almost empty. Chairs are scattered around. Tokens are left on the floor. The silence feels heavier than the light in the distance.</p><p>And in the middle of it, someone is still standing.</p><p>That may not look like success at first.</p><p>But maybe that is because we are used to recognizing success only when it becomes loud. We notice the winner after the game is over. We notice the person who reaches the light. We notice the final result, the clean story, the moment where everything makes sense.</p><p>But before any of that, there is something quieter.</p><p>There is the ability to remain.</p><p>To lose and still be there.</p><p>To take damage and not disappear.</p><p>To make a mistake and still have enough left to make another move.</p><p>Maybe this is the advantage we have been circling around from the beginning.</p><p>Not only having more tokens.</p><p>Not only having more doors.</p><p>Not only having a wider path.</p><p>But having enough left after loss to continue existing inside the game.</p><p>Because when we first imagined the players at the table, the rules looked simple. Everyone could play. Everyone could win. Everyone could lose. From the outside, it looked like one game.</p><p>But now the question feels different.</p><p>Were they really playing the same game if one player could lose ten times and continue, while another could be eliminated by one mistake?</p><p>Were they really facing the same risk if one person’s failure became feedback, while another person’s failure became the end of the path?</p><p>Were they really making the same decision if one person could be wrong and recover, while another had to be almost correct from the beginning?</p><p>This is why the cost of losing is not the same for everyone.</p><p>A loss is not only what disappears.</p><p>It is what happens after it disappears.</p><p>Does the person still have time?</p><p>Does he still have energy?</p><p>Does he still have trust?</p><p>Does he still have another chance?</p><p>Does he still have enough ground beneath him to stand, breathe, and choose again?</p><p>That is where the real difference often hides.</p><p>Some people do not win because they never lose. They win because losing does not remove them. They can absorb damage. They can survive a bad decision. They can learn slowly. They can fail in public and return later with a better version of themselves.</p><p>Others may have the same desire, the same intelligence, even the same willingness to move, but they are playing closer to the edge. For them, a mistake does not wait politely to become a lesson. It arrives with consequences attached. It takes time, money, confidence, safety, or the little space that was left.</p><p>So when you see someone still standing after many losses, do not reduce it to luck.</p><p>And when you see someone unable to continue after one loss, do not reduce it to weakness.</p><p>The truth is often more difficult than both.</p><p>Sometimes people survive because they are strong.</p><p>Sometimes they survive because the structure around them allowed survival.</p><p>Sometimes they fall because they were careless.</p><p>Sometimes they fall because the ground beneath them was too thin from the beginning.</p><p>And sometimes all of these things are mixed together in ways that are hard to separate.</p><p>That is why this is not an argument against responsibility.</p><p>It is an argument against shallow judgment.</p><p>Because responsibility is real. The way a person moves matters. Discipline matters. Patience matters. Courage matters. The decision to stand again matters.</p><p>But responsibility does not become more honest when we remove context from it.</p><p>It becomes blind.</p><p>And context does not become more compassionate when it removes responsibility.</p><p>It becomes an excuse.</p><p>The truth lives somewhere between them.</p><p>You are shaped by the path, but you still have to walk.</p><p>You are affected by the number of tokens you begin with, but you still decide how to spend what remains.</p><p>You may not control the whole game, but the next move still passes through your hand.</p><p>And maybe this is the most uncomfortable part.</p><p>Because it means we cannot explain everything with one clean answer.</p><p>We cannot say success is only personal strength.</p><p>We cannot say failure is only unfair structure.</p><p>We cannot say resources decide everything.</p><p>We cannot say they decide nothing.</p><p>What we can say is this:</p><p>The same loss does not enter every life with the same weight.</p><p>For one person, it may be a delay.</p><p>For another, it may be a collapse.</p><p>For one person, it may become experience.</p><p>For another, it may become silence.</p><p>For one person, it may be a chapter.</p><p>For another, it may close the book before the story has enough time to become visible.</p><p>So maybe the real advantage is not always winning early.</p><p>Maybe the real advantage is being able to lose and still remain in the game.</p><p>To still have one more attempt.</p><p>One more decision.</p><p>One more path.</p><p>One more small space between yourself and the end.</p><p>And if you look back at the room now, maybe the image changes.</p><p>The person standing there is not necessarily the winner.</p><p>Not yet.</p><p>Maybe he is only someone who survived long enough for the next move to still exist.</p><p>But sometimes, that is already more than it seems.</p><p>Because in a game where people are eliminated by different kinds of loss, remaining is not a small thing.</p><p>It is not the whole victory.</p><p>But it is the condition that makes victory possible.</p><p>In the end, the real advantage may not be having more tokens.</p><p>It may be having enough left after losing to still make one more move.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc5629215512" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ghost in the Machine: A Hunter’s Guide to Auditing Windows Malware with PowerShell]]></title>
            <link>https://medium.com/@mouhibmh/the-ghost-in-the-machine-a-hunters-guide-to-auditing-windows-malware-with-powershell-7be2f2125d01?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7be2f2125d01</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[powershell]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 14:41:29 GMT</pubDate>
            <atom:updated>2026-04-16T14:41:29.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/807/0*mUFzwwSpXn9sBMMm" /></figure><p>Windows is a fortress, but even fortresses have cracks. Learn to use the OS’s own engine to find what Antivirus might miss.</p><h3>Introduction: The Illusion of Total Security</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*X0tPy-Rfo-C20wpl.jpg" /></figure><p>Windows ships with solid baseline security now. <strong>Defender, Secure Boot, and automatic patching</strong> handle most threats before you even notice them. For the average user, that’s usually enough.</p><p>But baseline security isn’t foolproof. Modern malware rarely announces itself. It hides in scheduled tasks, masquerades as legitimate services, or lives entirely in memory. Antivirus software excels at catching known signatures, but it won’t always flag a custom script, a modified system DLL, or a tool that’s technically allowed but behaving abnormally.</p><p>When my machine starts acting up — unexplained network traffic, odd CPU spikes, or processes I don’t recognize — I don’t just run a full scan and hope for the best. I open an elevated PowerShell window and start looking under the hood.</p><h3>Step 1: Elevating to Administrator (Gaining Root Visibility)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XZ9jvrIGTtugK47S.png" /></figure><p>Before we run a single diagnostic, we have to address the most common point of failure: <strong>Permissions.</strong></p><p>Windows is designed to protect its core from the average user. If you run these commands in a standard PowerShell window, the system will hide the most sensitive processes and network connections from you to “protect” itself. To see the truth, you must act as the <strong>System Administrator.</strong></p><p><strong>How to do it properly:</strong></p><ul><li>Press the <strong>Windows Key</strong>.</li><li>Type PowerShell.</li><li>Do not just click it. Look for the option on the right that says <strong>“Run as Administrator.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*qMZ8eJQRV1z3vNDOEcp-UQ.png" /></figure><p><strong>Pro-Tip:</strong> You’ll know you’ve done it right if the title of your window starts with <strong>“Administrator: Windows PowerShell”</strong> and the path defaults to C:\Windows\System32&gt;. If you see C:\Users\YourName&gt;, you are in a &quot;Blind&quot; session and need to restart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jeVxXuCXtBLG9xuT2-mVNQ.png" /><figcaption>Like this</figcaption></figure><h3>Step 2: The Network Intercept — Cutting the Oxygen</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*LKG20BqfNx3HKehh.png" /></figure><p>Let’s be clear: <strong>90% of modern viruses are useless without an internet connection.</strong> Whether it is a <strong>Crypto-Miner</strong> stealing your GPU/CPU cycles to make money for someone else, a <strong>Botnet</strong> waiting for a command from a <strong>C2 (Command &amp; Control)</strong> server, or <strong>Spyware</strong> exfiltrating your private files, the virus <em>must</em> talk to the attacker. If the virus can’t “Home-Call,” it can’t do its job.</p><p>Our first mission is to intercept these “conversations.” We are looking for any <strong>Established Connection</strong> that doesn’t belong to a known service or a trusted IP.</p><p><strong>The Interrogation: Scanning Active Tunnels</strong></p><p>Open your Administrator PowerShell and run this command to force the system to reveal who it is talking to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yi0I9HvdxV_HwPc7PfALgw.png" /></figure><pre>Get-NetTCPConnection -State Established | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, OwningProcess | Out-GridView</pre><h4>Understanding the Variables: The “Who, Where, and How”</h4><p>To properly diagnose your PC, you must understand exactly what each variable in this command is reporting.</p><ul><li><strong>Get-NetTCPConnection</strong>: This is the core cmdlet that replaces the legacy netstat. It queries the Windows Network Stack to see every active &quot;Transmission Control Protocol&quot; (TCP) socket. In the world of malware, TCP is the standard for reliable communication back to an attacker.</li><li><strong>-State Established</strong>: This is your most important filter. A state of &quot;Established&quot; means the handshake is complete and data is actively flowing. While &quot;Listening&quot; ports are just waiting for a connection, an &quot;Established&quot; port is a live conversation. If a virus is currently stealing your data, the state <strong>must</strong> be Established.</li><li><strong>LocalAddress and </strong><strong>LocalPort</strong>: This represents your PC’s internal identity in the conversation. It tells you which internal &quot;door&quot; (port) the virus has opened on your machine to send data out.</li><li><strong>RemoteAddress and </strong><strong>RemotePort</strong>: This is the most critical piece of forensic evidence. It is the <strong>IP address and port of the attacker’s server</strong>. While your browser will talk to known IPs (like Google or Microsoft), a virus will often talk to random high-numbered ports or foreign IPs that have no business being connected to your system.</li><li><strong>OwningProcess</strong>: This is the <strong>PID (Process ID)</strong>. Every network connection is owned by a specific program running in your memory. This number is the link between the &quot;shady connection&quot; and the &quot;malicious file&quot; on your disk.</li></ul><h3>The Investigator’s Spirit — Spotting the Mismatch</h3><p>We’ve run the command, and you now have a window full of data. But here is the detail most guides miss: <strong>The data won’t tell you “I am a virus.” It only tells you “I am active.”</strong> This is where you need to switch gears. You aren’t just reading a table anymore; you are looking for a <strong>pattern mismatch</strong>. This is the part where you interact with your system like a detective.</p><h4>The “Pattern of Life” Check</h4><p>Look at your RemoteAddress and RemotePort columns. Ask yourself these questions:</p><ul><li><strong>The Geographic Logic:</strong> If you aren’t using a VPN and you don’t have a browser open, why is your PC talking to an IP address located halfway across the world? If you see an IP from a region where you have no accounts, no services, and no business — <strong>that is a lead.</strong></li><li><strong>The “Port” Personality:</strong> Most legitimate traffic lives on Port 443 (HTTPS) or 80 (HTTP). If you see an “Established” connection on a strange, high-numbered port like 49201 or 5555, and it&#39;s staying active for a long time, you are looking at a &quot;Home-Call.&quot;</li><li><strong>The Activity Audit:</strong> Are you sitting at your desk with all apps closed, yet your network list is scrolling with new established connections? That is the “Ghost” working while you are idle.</li></ul><h4>Identifying the “Stranger”</h4><p>Imagine you see a connection to an IP you don’t recognize. You see the OwningProcess is <strong>PID 6120</strong>. This number is your &quot;Suspect Number.&quot;</p><p>Now, we don’t just guess what 6120 is. We force the system to unmask it. This is the logical bridge to our next command. You are taking that PID and asking Windows: <em>“Who is holding this connection open, and where are they hiding on my hard drive?”</em></p><p><strong>The Unmasking — From PID to Physical Path</strong></p><p>Once you’ve spotted a suspicious “conversation” in the network list, you take the <strong>OwningProcess (PID)</strong> and run this to find the physical actor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJGvrKJ9rGJZdEUfumkp3g.png" /></figure><pre># Replace 6120 with the suspicious PID you found<br>Get-Process -Id 6120 | Select-Object Name, Path, Company, Description</pre><h4>How to Read the Lie</h4><p>Malware is a master of disguise. It will often name itself svchost.exe, lsass.exe, or SystemUpdate.exe. But while it can steal a <strong>Name</strong>, it has a much harder time stealing a <strong>Location</strong>.</p><ul><li><strong>The Rule of Thumb:</strong> A legitimate system process is almost always a “resident” of C:\Windows\System32.</li><li><strong>The Mismatch:</strong> If you see a process named svchost.exe but the Path shows it is running from your \Downloads folder or a hidden \AppData\Temp directory, <strong>you have found your virus.</strong> A core Windows service has no business living in your Temp folder. By connecting the <strong>Network IP</strong> to the <strong>Process ID</strong> and then to the <strong>Physical Path</strong>, you have followed the thread from the crime scene back to the intruder&#39;s hideout.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEE8Nzz8Zhs_H2AHxAs4gw.png" /></figure><p><strong>The Forensic Verdict — DNA Doesn’t Lie</strong></p><p>At this stage, you’ve found a file that looks suspicious. Maybe it’s named WinUpdate.exe, but it’s sitting in a random Temp folder. The &quot;Investigator&quot; in you knows something is wrong, but the &quot;Professional&quot; in you needs <strong>proof</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0rNFhbFd38S0jN9KdIl4A.png" /></figure><h4>The Execution: Extracting the Fingerprint</h4><p>We are going to take the physical path you found in the last step and extract its mathematical DNA. Run this command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocPar3UmzmeqUWZCmGrbbA.png" /></figure><pre># Copy the exact path you found in the &#39;Path&#39; column earlier<br>Get-FileHash &quot;C:\Users\Name\AppData\Local\Temp\suspicious_file.exe&quot; -Algorithm SHA25. If a hacker changes even one single bit of code inside a legitimate program to turn it into a virus, the hash changes completely. It is the only “ID Card” that a virus cannot fake.</pre><h4>The Forensic Pivot: Standardizing the Fingerprint</h4><p>Once PowerShell gives you that long string of characters (the SHA-256 Hash), you will notice it usually appears in all <strong>CAPITAL LETTERS</strong>. While VirusTotal is generally smart enough to handle this, many forensic databases and automated scripts prefer <strong>lowercase</strong> for consistency.</p><p><strong>The Investigator’s Pro-Tip:</strong> Before you paste your hash into the global jury, it’s good practice to “Standardize” your evidence. If you are copying a long string like A1B2C3D4..., just treat it as a lowercase string a1b2c3d4... when searching or documenting.</p><p>In the world of security, lowercase is the “universal language” of hashes. It makes the text easier for the human eye to scan and ensures that your search queries across different platforms — from GitHub to specialized malware repositories — don’t return “zero results” due to a simple case-sensitive mismatch.</p><h4>What is a Hash? (The Human Explanation)</h4><p>Think of this 64-character string of numbers and letters as a digital fingerprint. If a hacker changes even <strong>one single bit</strong> of code inside a legitimate program to turn it into a virus, the hash changes completely. It is the only “ID Card” that a virus cannot fake.</p><h4>The Global Jury: VirusTotal</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*CJMe33b4kfGprSUG.png" /></figure><p>Now, you take that hash and head over to <a href="https://www.virustotal.com/">VirusTotal</a>.</p><p>You don’t upload the file (which could be dangerous or slow); you just search for the <strong>Hash</strong>. VirusTotal will instantly cross-reference that DNA against over <strong>70 different antivirus engines</strong> (CrowdStrike, Kaspersky, Microsoft, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwAWltzjClsTiIX2sPWpwg.png" /></figure><ul><li><strong>The “Clean” Result:</strong> If the hash comes back with 0 detections, it might be a custom script you wrote or a very new, legitimate update.</li><li><strong>The “Conviction”:</strong> If you see a score like 25/70 in bright red, the hunt is over. You have mathematically proven that the process talking to that strange IP address is a confirmed threat.</li></ul><h3>Neutralizing the Threat — The “Kill Chain”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgUElNZN9rqTNY8j4MROsw.png" /></figure><p>Once you have a confirmed hit from VirusTotal, you cannot hesitate. Every second the process stays “Established,” more of your data could be leaving your machine. However, simply hitting “Delete” on the file usually won’t work because Windows protects files that are currently in use.</p><p>You have to break the virus’s heart before you can remove its body..</p><p><strong>Breaking the Execution</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lDlBRIMhWK-Y50Y2r0UKQ.png" /></figure><pre># Use the -Force flag to ensure the process doesn&#39;t ignore the kill signal<br>Stop-Process -Id [Your-Suspicious-PID] -Force</pre><h4>The Verification</h4><p>Immediately after running the kill command, run your network audit one more time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yo0gnb-JExBy2t4t2oh1VA.png" /></figure><p><strong>The Goal:</strong> That suspicious IP address and PID should no longer appear in the list. If it reappears instantly with a <em>new</em> PID, you are dealing with a <strong>Watchdog</strong> — a second hidden process that restarts the first one when it dies. If this happens, you must find and kill both simultaneously.</p><h4>Isolation (The “Quarantine” Move)</h4><p>Now that the process is stopped, navigate to the Path you discovered earlier. <strong>Do not just delete it yet.</strong> * <strong>Rename the file:</strong> Change the extension from .exe to .txt or .bak. This prevents the file from accidentally running again if the system reboots.</p><ul><li><strong>Move to a “Jail”:</strong> Move the file to an external, encrypted folder or a USB drive if you intend to analyze it later in a safe environment.</li></ul><h3>The Reality Check: When “Neutralize” Isn’t Enough</h3><p>As we discussed, you must understand that some malware is built like a hydra — cut off one head, and two more grow back.</p><ul><li><strong>The DLL Ghost:</strong> If the virus is hidden inside a legitimate Windows file like explorer.exe, you cannot &quot;Stop-Process&quot; without crashing your entire desktop interface. In this case, the &quot;Kill&quot; must happen from <strong>outside</strong> the running system (using a Bootable Anti-Virus USB).</li><li><strong>The Registry Key:</strong> Many viruses write a “re-birth” instruction in your Windows Registry. Even if you delete the file, the next time you turn on your PC, the Registry will tell Windows to download a new copy or run a hidden script.</li></ul><blockquote><strong><em>Hunter’s Warning:</em></strong><em> Neutralizing a process in PowerShell is a tactical victory, but it doesn’t always mean the war is won. If the file keeps coming back or if you found a DLL-based infection, your “Neutralization” strategy must shift from PowerShell to a </em><strong><em>Full System Format</em></strong><em> or an </em><strong><em>Offline Deep Scan</em></strong><em>.</em></blockquote><h3><strong>The Final Verdict: Why Your Antivirus Didn’t See It</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*oxgOvR5uE2RGAg4l" /></figure><p>You might be asking yourself: <em>“Why did I have to do all this work? Why didn’t the expensive antivirus subscription I pay for catch this ghost?”</em></p><p>To understand this, you have to understand how most modern security software actually works. Most Antivirus programs are <strong>Database-Driven</strong>.</p><h4>The “Static” Trap</h4><p>An Antivirus is essentially a giant library of “Bad DNA” (Hashes).</p><ul><li><strong>The Database Method:</strong> When a file lands on your PC, the AV looks at its hash and asks its database: <em>“Do I know this criminal?”</em> If the virus is brand new (a “Zero-Day”) or if the attacker slightly modified the code, the hash changes. The AV looks at the database, sees no match, and says, <strong>“This file is clean,”</strong> even while the file is actively stealing your data.</li><li><strong>The Pattern (Heuristics) Method:</strong> Some AVs look for “suspicious behavior,” but malware authors are smart. They program their viruses to act “human” — waiting for long periods of silence or moving very slowly to avoid triggering those automated alarms.</li></ul><h4>The Human Edge</h4><p>A high-end Antivirus is a great first line of defense, but it is often <strong>static</strong>. It follows rules written by someone else months ago.</p><p>Your manual audit, however, is <strong>dynamic</strong>. You aren’t looking for a “known” criminal; you are looking for <strong>anomalous behavior</strong>. A database might not know that a specific IP address is “bad,” but <em>you</em> know that your PC has no business talking to a server in a region you’ve never visited.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7be2f2125d01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write-up TryHackMe : Operation Slither]]></title>
            <link>https://medium.com/@mouhibmh/write-up-tryhackme-operation-slither-92a8219c5c9c?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/92a8219c5c9c</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 10:16:28 GMT</pubDate>
            <atom:updated>2026-02-01T10:16:28.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wQ0yd5dr8bHJtmRuPpsrg.png" /></figure><h3>Task1:The Leader</h3><p><strong><em>We got access to a hacker forum and found the info of our company on sale! All the info we have is in this post. Find any information related to the leader of the Sneaky Viper group.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wC_qsuRXFgOFnV0F.png" /></figure><pre>Full user database TryTelecomMe on sale!!!<br><br>As part of Operation Slither, we&#39;ve been hiding for weeks in their network and have now started to exfiltrate information. <br>This is just the beginning. We&#39;ll be releasing more data soon. Stay tuned!<br><br>@v3n0mbyt3_<br><br>---</pre><p><strong>Question1</strong>:Aside from Twitter / X, what other platform is used by v3n0mbyt3_? Answer in lowercase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SiPHuPnvA8XbRWxcMMalSw.png" /></figure><p><strong>Answer</strong>: Threads</p><p><strong>Question2</strong>:What is the value of the flag?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MeEvurujfakco83htF6sEw.png" /></figure><p><strong>Answer</strong>:VEhNe3NsMXRoM3J5X3R3MzN0el80bmRfbDM0a3lfcjNwbDEzcyF9(Base64 format just try to decode it ;) )</p><h3><strong>Task2</strong>:The Sidekick</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c91KhArWazZ_vmO5.png" /></figure><p><strong><em>A second message has been made public! Our accountt in their forum was deleted, so we couldn’t get the operator’s handle this time. Follow the crumbs from the first task and hunt any information related to the second operator of the group.</em></strong></p><pre>60GB of data owned by TryTelecomMe is now up for bidding!<br><br>Number of users: 64500000 Accepting all types of crypto<br>For takers, send your bid on Threads via this handle:<br><br>HIDDEN CONTENT <br>----------------------------------------------------------------------------------------------------- <br>You must register or log in to view this content</pre><p><strong>Question1</strong>:What is the username of the second operator talking to v3n0mbyt3 from the previous platform?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlpctP1Vo9LG3v0uW0kgwA.png" /></figure><p><strong>Answer</strong>: _myst1cv1x3n_</p><p><strong>Question2</strong>: What is the value of the flag?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TnW9gcf51qwN82WA9zkgA.png" /></figure><p><strong>Answer</strong>:VEhNe3MwY20xbnRfMDBwczNjX2Yxbmczcl9tMXNjbDFja30=(BASE64)</p><h3><strong>Task 3 : </strong>The Last Operator</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vV6ZArjfHVZsba0m.png" /></figure><p><strong><em>A new post is up. Hunt the third operator using past discoveries and find any details related to the infrastructure used for the attack.</em></strong></p><pre>FOR SALE<br><br>Advanced automation scripts for phishing and initial access!<br><br>Inclusions:<br>- Terraform scripts for a resilient phishing infrastructure <br>- Updated Google Phishlet (evilginx v3.0)<br>- GoPhish automation scripts<br>- Google MFA bypass script<br>- Google account enumerator<br>- Automated Google brute-forcing script<br>- Cobalt Strike aggressor scripts<br>- SentinelOne, CrowdStrike, Cortex XDR bypass payloads<br><br>PRICE: $1500<br>Accepting all types of crypto<br>Contact me on REDACTED@protonmail.com</pre><p><strong>Question1</strong>: What is the handle of the third operator?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wk_1gE-X0jUkMFWqWU6cgg.png" /></figure><p><strong>Answer</strong>:<a href="https://soundcloud.com/sh4d0wf4ng"><strong>sh4d0wF4NG</strong></a></p><p><strong>Question2</strong>:What other platform does the third operator use? Answer in lowercase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cY9aqBMwtKH3bRXODAV_Ag.png" /></figure><p><strong>Answer</strong>: Github</p><p><strong>Question3</strong>: What is the value of the flag?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aDEJPQ2zDtBkephO7oR0Ig.png" /></figure><p>Answer: VEhNe3NoNHJwX2Y0bmd6X2wzNGszZF9ibDAwZHlfcHd9(base64 )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92a8219c5c9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do We Really Understand What a Vulnerability Is?]]></title>
            <link>https://medium.com/@mouhibmh/do-we-really-understand-what-a-vulnerability-is-91f858d4aa91?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/91f858d4aa91</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[critical-thinking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 13:50:50 GMT</pubDate>
            <atom:updated>2026-01-12T13:50:50.421Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Do We Really Understand What a Vulnerability Is?<br> Or Are We Just Repeating the Word Without Meaning?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*gtM62oevArB7PyA09-spzQ.png" /></figure><p>The word <em>vulnerability</em> is used daily in cybersecurity.<br> We repeat it constantly, often with confidence, but rarely with reflection.<br> How often do we actually stop and ask:<br> What does a vulnerability truly mean?<br> What lies beneath the concept we assume we already understand?</p><p>The term is usually framed as a technical failure, a flaw in code, or a mistake made by a developer. At the same time, it is common to hear that <em>“humans are the weakest link in cybersecurity.”</em><br> Yet this statement is incomplete.<br> Humans are not simply the weakest link — they are both the strongest and the weakest element in the system.</p><p>The real weakness does not stem from emotions, carelessness, or lack of discipline, as is often claimed.<br> It comes from something far more subtle: <strong>assumption</strong>.</p><p>At the core of many security failures lies a silent belief — the assumption that another human, a user, or even another system will behave within a logical and expected context. Developers design systems around what <em>makes sense</em>, trusting that inputs, flows, and behaviors will remain within those boundaries.</p><p>But security breaks precisely when those boundaries are crossed.</p><p>A vulnerability, in its most fundamental form, is not a bug — <br> it is the moment where an assumption about “reasonable behavior” collapses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WKtF-onVT0WVAkF1.png" /></figure><h3>Assumptions Are Not Neutral</h3><p>An assumption is rarely stated.<br> That is what makes it dangerous.</p><p>When a system is built, there is always a silent agreement between the developer and the code:<br> <em>this will not happen</em>.</p><p>Not because it cannot happen — <br> but because it does not fit the mental model that existed at the time of writing.</p><p>This is where most discussions about vulnerabilities become shallow.<br> They point to the line of code that failed, not to the idea that made that line feel “safe”.</p><p>The system did exactly what it was told to do.<br> What failed was the boundary of imagination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*U73hswMUNA88lTyJ.jpg" /></figure><h3>The Human Factor Is Misunderstood</h3><p>It is common to say that “the human is the weakest link”.<br> That statement is lazy.</p><p>Humans are not weak because they are emotional.<br> They are “weak” because systems expect them to behave consistently.</p><p>A developer assumes:</p><ul><li>the user will follow the interface</li><li>the input will respect context</li><li>the action will remain inside the intended flow</li></ul><p>None of these assumptions are malicious.<br> They are practical.<br> They are necessary to ship anything.</p><p>But they are still assumptions.</p><p>The moment a system relies on <em>expected behavior</em> instead of <em>enforced constraints</em>,<br> it stops being deterministic and starts being optimistic.</p><h3>Where the Assumption Actually Lives</h3><p>The assumption is not in the code syntax.<br> It lives in the gaps.</p><p>In what was not checked because it felt redundant.<br> In what was not validated because “there is no reason for someone to do that”.</p><p>Most vulnerabilities are born here:<br> not from ignorance,<br> but from confidence.</p><p>Confidence that the system’s logic is shared by the outside world.</p><p>Reality does not share logic.<br> It only reacts.</p><h3>From Assumption to Surface</h3><p>Once an assumption is compiled into a system, it becomes real.<br> Not as a rule — but as an opening.</p><p>At that point, calling it a “bug” misses the point.<br> Nothing is broken.</p><p>The system is behaving exactly according to a model that was never questioned.</p><p>This is why many vulnerabilities feel strange when you first see them.<br> They don’t look clever.<br> They look <em>obvious in hindsight</em>.</p><p>Because the mistake was not technical — <br> it was conceptual.</p><h3>What We Usually Miss</h3><p>A vulnerability is not always something to be fixed.<br> Sometimes it is something to be understood.</p><p>When we reduce every failure to a technical flaw, we protect ourselves from a harder question:<br> <em>what did we assume about the world that turned out to be false?</em></p><p>This is uncomfortable because assumptions feel reasonable at the moment they are made.<br> They are often shared.<br> They are often invisible.</p><p>But systems do not fail when code is wrong.<br> They fail when reality refuses to stay inside the shape we designed for it.</p><p>That gap — between intention and behavior — is where most vulnerabilities actually live.</p><p>Not in the exploit.<br> Not in the payload.<br> But in the quiet confidence that something “would never happen”.</p><p>And usually, that is the only thing that needs to happen.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91f858d4aa91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Understanding Authentication & Authorization Architecture Is Essential Before Hunting Logic…]]></title>
            <link>https://medium.com/@mouhibmh/why-understanding-authentication-authorization-architecture-is-essential-before-hunting-logic-2d5e0a0cfd1e?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d5e0a0cfd1e</guid>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 12:58:05 GMT</pubDate>
            <atom:updated>2026-01-07T12:58:05.870Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Understanding Authentication &amp; Authorization Architecture Is Essential Before Hunting Logic Bugs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*UvBZMPcAhNk0--D-.png" /></figure><p>In recent years, <strong>bug bounty hunting</strong> has become increasingly attractive.<br> It is often presented as a path toward financial freedom and personal independence.</p><p>This perception is not entirely wrong — but it is incomplete.</p><p>Yes, vulnerability research <em>can</em> provide flexibility and income,<br> but only under strict conditions: <strong>deep learning, structural understanding, and a clearly defined research focus</strong>.</p><p>Among all vulnerability classes, <strong>logic bugs</strong> stand out as the most intellectually consistent and sustainable path.<br> Not because they are easy — but because they are not based on reusable payloads or obvious technical flaws.<br> They emerge from a misunderstanding of how a system is <em>supposed</em> to behave.</p><p>However, searching for logic bugs without understanding the system’s underlying logic is fundamentally flawed.</p><p>One of the most deceptively simple yet architecturally complex foundations of modern web systems is:</p><p><strong>Authentication and Authorization</strong></p><p>Understanding these concepts is not about memorizing definitions.<br> It is about understanding <strong>how trust is separated, delegated, and enforced across system boundaries</strong>.</p><h3>Authentication — A Simple but Precise Definition</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/0*FbL2zaAT7z23NQml" /></figure><p><strong>Authentication</strong> is the process of verifying <strong>who a user is</strong>.</p><p>In its simplest form, authentication answers one question:</p><blockquote>Are you who you claim to be?</blockquote><p>A useful way to visualize authentication is to imagine the <strong>front gate of a company</strong>.</p><p>At the entrance, there is a security guard.<br> Not everyone is allowed to enter — only individuals who can present a <strong>valid company badge</strong>.</p><p>The guard does not care <em>where</em> you want to go inside the building.<br> He only checks one thing:</p><ul><li>Is the badge authentic?</li><li>Does it belong to you?</li><li>Is it still valid?</li></ul><p>If the answer is yes, the gate opens.</p><p>That is authentication.</p><p>It does <strong>not</strong> grant access to internal rooms, departments, or sensitive areas.<br> It only establishes identity.</p><p>What happens <em>after</em> the gate is a different problem — and that problem is authorization.</p><h3><strong>Authorization — Why Identity Alone Is Not Enough</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*_xgldyLqC6FgsDkPAq2aeg.jpeg" /></figure><p>If authentication answers <strong>who you are</strong>,<br> <strong>authorization</strong> answers a different question:</p><blockquote>What are you allowed to access?</blockquote><p>Continuing the company analogy:</p><p>After you pass the front gate using a valid badge, you encounter a <strong>second guard inside the building</strong>.</p><p>This guard does <strong>not</strong> verify your identity again.<br> He assumes authentication has already been done.</p><p>His only responsibility is to determine:</p><ul><li>Which floors you are allowed to enter</li><li>Which rooms you can access</li><li>Which areas are restricted to you</li></ul><p>Based on your role, department, or clearance level, he <strong>directs you</strong> to the areas you are permitted to access — and blocks the rest.</p><p>Authorization does not care <em>who</em> you are beyond what has already been established.<br> It only enforces <strong>access rules</strong>.</p><p>You can think of authorization as an <strong>internal traffic controller</strong> inside the company — <br> it does not open the main gate, but it decides where you can go once you are inside.</p><h3>Why APIs Must Never Blindly Trust Authorization Decisions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*NNH0bxddpEvAHapG.png" /></figure><p>This is the point where <strong>security logic truly begins</strong>.</p><p>A common and dangerous assumption in system design is believing that once a request has passed an authorization layer, it can be treated as <em>trusted</em> by the API — even once.</p><p>This assumption is fundamentally wrong.</p><p>In cybersecurity, <strong>trust is never absolute</strong>.</p><h4>The Vault Analogy</h4><p>Think of the API as a <strong>worker standing in front of a vault full of valuable assets</strong>.</p><p>Now imagine this worker assumes:</p><blockquote><em>“Anyone who reaches me must have already passed security checks, so I don’t need to verify anything again.”</em></blockquote><p>This is a critical mistake.</p><p>Even if a person passed through previous checkpoints, that <strong>does not grant automatic or permanent access</strong> to sensitive resources.</p><p>Failing to re-validate access at the API level creates a weak security boundary and opens the door to logical vulnerabilities.</p><h4>The Core Security Principle: Zero Trust</h4><p>Modern security architectures are built on one core idea:</p><blockquote><strong><em>Never trust — always verify.</em></strong></blockquote><p>This principle applies everywhere, including APIs.</p><p>An API should <strong>never assume</strong> that:</p><ul><li>The request came from a trusted source</li><li>Authorization was correctly enforced upstream</li><li>Tokens, claims, or context have not been tampered with</li><li>The request is being used in its intended flow</li></ul><p>Instead, the API must:</p><ul><li>Re-validate access for <strong>every request</strong></li><li>Enforce authorization <strong>locally and explicitly</strong></li><li>Treat every request as potentially hostile</li></ul><h4>Why This Matters in Bug Hunting</h4><p>Many high-impact <strong>logic bugs</strong> exist precisely because APIs trust upstream authorization logic too much.</p><p>Examples include:</p><ul><li>APIs accepting requests based only on a token’s presence, not its claims</li><li>Missing checks on resource ownership</li><li>Assuming internal requests are safe</li><li>Relying on frontend or gateway enforcement</li></ul><p>These are not cryptographic failures — <br> they are <strong>architectural trust failures</strong>.</p><h4>Key Takeaway</h4><p>Authorization is not a one-time event.<br> It is a <strong>continuous verification process</strong>.</p><p>Any API that accepts a request as “trusted” simply because it passed a previous checkpoint is violating a fundamental security principle — and creating an attack surface.</p><h3>Where Do These Vulnerabilities Actually Begin?</h3><p>At this point, a natural question arises for the reader:</p><p><strong>Where exactly do these vulnerabilities emerge?</strong></p><p>They rarely appear at the extremes.</p><p>They do not usually exist purely inside authentication logic,<br> and they are not always found deep inside resource handling.</p><p>Instead, <strong>they emerge in the transition layer between two trust boundaries</strong>.</p><h3>The Most Dangerous Zone: Between Authorization and Resource Access</h3><p>The highest risk area lies <strong>between</strong>:</p><ul><li>The moment access is authorized</li><li>And the moment a resource is actually accessed inside an API</li></ul><p>This transition is where assumptions are made, shortcuts are taken, and trust is silently extended.</p><p>In many systems, the flow looks correct on paper:</p><ol><li>User authenticates</li><li>Authorization service approves access</li><li>API receives the request</li><li>Resource is returned</li></ol><p>The vulnerability appears when step <strong>4</strong> assumes that step <strong>2</strong> is still valid — without re-verification.</p><h3>How Critical Logic Bugs Are Born</h3><p>Here are common ways critical vulnerabilities emerge in this zone:</p><h4>1. Missing Resource Ownership Validation</h4><p>The API verifies that the user is authenticated but fails to verify <strong>ownership of the requested resource</strong>.</p><p>Result:<br> A user can access or modify resources belonging to others.</p><h4>2. Over-Trusting Token Claims</h4><p>The API trusts claims inside a token (such as role, region, or scope) without validating whether those claims are still valid for the requested action.</p><p>Result:<br> Authorization logic becomes static while system state is dynamic.</p><h4>3. Implicit Trust in Internal Requests</h4><p>Requests coming from internal services, gateways, or specific subdomains are treated as safe.</p><p>Result:<br> SSRF, request smuggling, or misrouted requests can bypass authorization logic.</p><h4>4. One-Time Authorization Assumptions</h4><p>Authorization is performed once during login or session creation, but never re-checked for sensitive operations.</p><p>Result:<br> Expired permissions continue to grant access.</p><h3>Why These Bugs Are Often Missed</h3><p>These vulnerabilities are difficult to detect because:</p><ul><li>The system appears secure during normal usage</li><li>No single component is “broken”</li><li>Cryptography works correctly</li><li>Authentication is solid</li></ul><p>The failure is <strong>logical</strong>, not technical.</p><h3>The Attacker’s Perspective</h3><p>From a bug hunter’s point of view, this boundary is gold.</p><p>Instead of asking:</p><blockquote><em>“Is authentication broken?”</em></blockquote><p>A better question is:</p><blockquote><em>“Where does the system stop verifying?”</em></blockquote><blockquote>This shift in perspective is what separates <strong>classic vulnerability hunting</strong> from <strong>logic-driven bug discovery</strong>.</blockquote><h3>Real-World Authorization Failures Hidden in Plain Sight</h3><p>Authorization bugs rarely look like “bugs” at first glance.<br> They often live quietly inside systems that appear mature, audited, and secure.</p><p>Here are real-world <strong>patterns</strong> that have caused serious incidents across large platforms.</p><h3>Example 1: Valid Token, Wrong Resource</h3><p>A user is authenticated and holds a valid JWT.</p><p>The API checks:</p><ul><li>Token signature ✔</li><li>Token expiration ✔</li><li>User role ✔</li></ul><p>Then the API accepts a request like:</p><pre>GET /api/orders/987654</pre><p>The mistake:<br> The API never verifies whether <strong>order 987654 actually belongs to the authenticated user</strong>.</p><p>Why this happens:<br> Developers assume that if the user reached this endpoint, authorization already happened earlier.</p><p>Impact:</p><ul><li>Horizontal privilege escalation</li><li>Full access to other users’ private data</li></ul><p>This is one of the most common high-severity logic bugs found in mature systems.</p><h3>Example 2: Gateway Authorization, Backend Trust</h3><p>An API Gateway performs authorization and forwards requests to internal services.</p><p>Internal services assume:</p><blockquote><em>“If the request reached us, it must be authorized.”</em></blockquote><p>An attacker finds a way to:</p><ul><li>Access the internal service directly</li><li>Or abuse a misconfigured internal route</li><li>Or exploit SSRF from another component</li></ul><p>Result:<br> The backend service processes requests <strong>without performing its own authorization checks</strong>.</p><p>Impact:</p><ul><li>Full bypass of access control</li><li>Internal APIs exposed unintentionally</li></ul><p>This exact trust model has caused breaches in cloud environments, fintech platforms, and enterprise systems.</p><h3>Example 3: Static Claims vs Dynamic Reality</h3><p>A JWT contains claims such as:</p><ul><li>role: admin</li><li>region: EU</li><li>subscription: premium</li></ul><p>The API trusts these claims for authorization.</p><p>But:</p><ul><li>The user’s role changes</li><li>The subscription expires</li><li>The account is restricted</li></ul><p>The token remains valid until expiration.</p><p>Impact:</p><ul><li>Users retain access they should no longer have</li><li>Revocation becomes ineffective</li></ul><p>The mistake is not using short-lived authorization decisions for high-risk actions.</p><h3>Example 4: “Safe” Internal Parameters</h3><p>An endpoint accepts parameters like:</p><pre>POST /api/export?format=csv</pre><p>Later it silently supports:</p><pre>format=internal<br>format=debug<br>format=full</pre><p>The authorization logic only checks:</p><ul><li>Is the user authenticated?</li></ul><p>It never checks:</p><ul><li>Is this user allowed to request <em>this mode</em>?</li></ul><p>Impact:</p><ul><li>Access to internal data exports</li><li>Exposure of sensitive system information</li></ul><p>These bugs often survive for years because no one thinks to question them.</p><h3>The Core Lesson</h3><p>Modern systems fail <strong>not because encryption is weak</strong>,<br> but because <strong>trust boundaries are misunderstood</strong>.</p><p>Authentication answers:</p><blockquote><em>“Who are you?”</em></blockquote><p>Authorization answers:</p><blockquote><em>“What are you allowed to do — right now, with this resource, in this context?”</em></blockquote><p>APIs must assume:</p><ul><li>Tokens can be replayed</li><li>Requests can be forged</li><li>Internal traffic can be abused</li><li>Previous checks may no longer be valid</li></ul><p><strong>Trust must be continuously re-earned.</strong></p><h3>Why This Matters for Bug Hunters</h3><p>If you search only for:</p><ul><li>XSS</li><li>SQLi</li><li>SSRF</li><li>JWT signature bypass</li></ul><p>You will miss some of the most impactful vulnerabilities.</p><p>But if you ask:</p><ul><li>Where does authorization stop?</li><li>Where is trust assumed?</li><li>Where is ownership implied but not enforced?</li></ul><p>You start seeing systems differently.</p><p>This mindset does not require luck.<br> It requires understanding.</p><h3>Final Thought</h3><p>Before hunting for bugs,<br> learn how trust is <em>supposed</em> to work.</p><p>Because the most valuable vulnerabilities appear<br> exactly where trust is misplaced — not where code is broken.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d5e0a0cfd1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Arch Linux Forces You to Learn]]></title>
            <link>https://medium.com/@mouhibmh/what-arch-linux-forces-you-to-learn-18050ada86f0?source=rss-1eb030be208b------2</link>
            <guid isPermaLink="false">https://medium.com/p/18050ada86f0</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[MouhibMahadbi]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 12:30:57 GMT</pubDate>
            <atom:updated>2025-12-31T15:03:20.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zzV7Y0uAT_PmgbFA.jpg" /></figure><p>At some point, “I use Arch Linux BTW !” became a trend.<br> If you posted it online, you were suddenly seen as someone who “knows Linux”.</p><p>Most of the time, that wasn’t true.</p><p>Installing Arch doesn’t make you an expert.<br> But it <strong>forces you to face parts of Linux that other distributions hide</strong>.</p><p>And that’s why the experience still matters.</p><h3>How Arch Linux Is Different</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*GOHQosfPWnO8I3ZT.jpg" /></figure><p>Most <strong>Linux </strong>distributions try to make things easier:</p><ul><li>graphical installers</li><li>automatic partitioning</li><li>preconfigured services</li></ul><p>This is not bad. It’s practical.</p><p>Arch <strong>Linux </strong>simply chooses a different approach.</p><p>It gives you a base system and nothing else.<br> No installer making decisions for you.<br> No defaults pretending to be “best practices”.</p><p>You decide:</p><ul><li>how the disk is structured</li><li>where the system is mounted</li><li>what starts at boot</li><li>what is installed, and what isn’t</li></ul><h3>Why Manual Installation Is Important</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*0KMSP5n_81ipLuIp.png" /></figure><p>During an <strong>Arch </strong>installation, every command has a purpose.</p><p>You don’t just type commands — you define:</p><ul><li>where <strong>Linux </strong>lives on your disk</li><li>how the filesystem is organized</li><li>how the system boots</li><li>how packages are managed</li></ul><p>This is the part most users never see.</p><p>On other distributions, these steps happen silently in the background.<br> On Arch, they happen in front of you.</p><p>That’s the real value.</p><h3>Understanding the Linux Hierarchy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*mx8inexHHjN8JL77" /></figure><p>Installing <strong>Arch </strong>makes the <strong>Linux </strong>filesystem stop looking random.</p><p>You start to understand:</p><ul><li>why /etc exists</li><li>what /boot actually does</li><li>why /usr and /var are separated</li><li>how /home fits into the system</li></ul><p>This knowledge transfers to <strong>every other Linux distribution</strong>.</p><p>Once you understand this, errors become readable instead of mysterious.</p><h3>If You’re New to Linux, Try It Once</h3><p>You don’t need to stay on Arch forever.<br> You don’t need to use it daily.</p><p>But installing it once is enough to:</p><ul><li>understand how Linux is structured</li><li>know what installers usually hide</li><li>stop treating the system like a black box</li></ul><p>You will break things.<br> That’s normal.</p><p>Fixing them is where the learning happens.</p><h3>Who Arch Linux Is Not For</h3><p>Arch is not a good choice if:</p><ul><li>you want a ready-to-use system</li><li>you don’t want to read documentation</li><li>you expect things to work automatically</li></ul><p>This isn’t elitism.<br> It’s just a different learning path.</p><h3>Part 2: Before Typing Any Command</h3><h4>What You’re Actually About to Build</h4><p>Before installing Arch Linux, it’s important to understand one thing:</p><p>You are not “installing an OS” in the traditional sense.<br> You are <strong>assembling a Linux system manually</strong>.</p><p>Nothing exists yet:</p><ul><li>no filesystem</li><li>no bootloader</li><li>no users</li><li>no services</li></ul><p>Just a live environment and a disk.</p><h3>The Environment You’re In</h3><p>When you boot the Arch ISO, you are dropped into:</p><ul><li>a minimal Linux environment</li><li>running entirely from RAM</li><li>with full root access</li></ul><p>This environment exists only to let you <strong>prepare the real system</strong>.</p><p>Nothing you do here is permanent unless you write it to disk.</p><blockquote><strong><em>Note:</em></strong><em> The installation in this guide is done inside a virtual machine using Oracle VirtualBox. This is intentional — it allows experimentation, mistakes, and learning without risk. The concepts remain identical on real hardware.</em></blockquote><p>Link A<strong>rch </strong>iso:</p><p><a href="https://archlinux.org/download/">Arch Linux</a></p><p>Link <strong>Orcale Virtualbox</strong>:</p><p><a href="https://www.virtualbox.org/">Oracle VirtualBox</a></p><p><strong>Step1: Create a New Virtual Machine:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__Sv7-1mpAeEbgom-xHFEw.png" /></figure><p>in the New icon in <strong>Oracle VirtualBox creat new </strong>VM by this :</p><ul><li><strong>Name:</strong> Arch Linux</li><li><strong>Type:</strong> Linux</li><li><strong>Version:</strong> Arch Linux (64-bit)</li><li><strong>Iso image: </strong>Path of the iso file</li></ul><p><strong>Note</strong>: Set the virtual hardware to the <strong>bare minimum required</strong>:</p><ul><li><strong>CPU:</strong> 2 cores</li><li><strong>RAM:</strong> 2 GB</li><li>Be sure the <strong>UEFI </strong>is unable</li></ul><p>More resources are unnecessary at this stage and don’t add anything to the learning process.</p><p><strong>Lunch the New virtual Machine:</strong></p><h4>Step 2: Booting the Arch VM and Getting Comfortable with the Terminal</h4><p>After launching the virtual machine, you’re greeted by a terminal.<br> At first, it might look confusing, but <strong>there’s nothing to be afraid of</strong>.</p><p>This is the Arch live environment:</p><ul><li>No system is installed yet</li><li>No data is at risk</li><li>Every command you type now <strong>defines your future system</strong></li></ul><p>Think of it as a blank canvas — empty, minimal, and entirely under your control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ugcg38nXzEIhvtoL4qtPAA.png" /></figure><h4>2.1 Verify the Environment</h4><pre>uname -r</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tpFWN7Xhn5PWgzmAqG-fYQ.png" /></figure><p>This shows the kernel version you’re running.</p><h4>2.2 Check Network Connectivity</h4><p>Make sure the VM has an internet connection.<br> For VirtualBox NAT, it usually works automatically.</p><pre>ping -c 3 archlinux.org </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8Eke6NHue4Ac89exwpx2Q.png" /></figure><p>If you get replies, the network is ready.</p><h4>2.3 Identify the Disk</h4><pre>lsblk</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4hlJNIlafDDMv6salMzJcA.png" /></figure><p>This lists all disks and current partitions (should be empty).<br>Take note of your target disk (/dev/sda, /dev/nvme0n1, etc.).<br>Choosing the wrong disk will destroy dat</p><h3>2.4 Partition the Disk</h3><p>we will use cfdisk for create partitions in the disk :</p><pre>cfdisk</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1_-zGJzkb_DxcNSUY5giA.png" /><figcaption>after you type <strong>cfdisk </strong>chose <strong>gpt</strong></figcaption></figure><p>Here we have the full disk in my case i have 12.6 G</p><p>600MB for UEFI</p><p>rest for the system 12G</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R8Rl9BhsTZZRm0nLY8Ekww.png" /></figure><p>by type we can identify part of the<strong> efi System</strong> and the <strong>linux filesystems</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZMOzaMwJly7_pe4Ua5JYcw.png" /></figure><p>After This we Type :</p><pre>lsblk</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_h63EniJCoixgkWVcZ501A.png" /></figure><p>and here we see the Partitions are ready</p><h4>2.5 Format the Partitions</h4><p>Partitions are just empty space. Formatting gives them a filesystem:</p><pre>mkfs.ext4 /dev/sda1    # root partition<br>mkfs.fat -F32 /dev/sda2  # EFI partition (if UEFI)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ASoyG2EYkewtud7jL4N1bQ.png" /></figure><h4>2.6 Mount the Root Partition</h4><p>Mount the root partition before installing packages:</p><pre>mount /dev/sda1 /mnt</pre><pre>mkdir -p /mnt/boot<br>mount /dev/sda1 /mnt/boot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQBzpPpLkFCW2Gi4BIwQfQ.png" /></figure><h3>Step 3: Installing the Base System and Preparing chroot</h3><p>At this point:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSlq6NA6NSij9mFoo0EgXw.png" /></figure><ul><li>Your partitions are created and formatted</li><li>Your root partition is mounted at /mnt</li><li>EFI partition (if UEFI) is mounted at /mnt/boot</li></ul><p>Now it’s time to <strong>install the minimal Arch system</strong>.</p><h4>3.1 Install the Base System</h4><p>Use pacstrap to install the base packages:</p><pre>pacstrap /mnt base linux linux-firmware</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*90PrvPiLLM60hVtgk-lAig.png" /></figure><p>What this does:</p><ul><li>base: installs essential Linux utilities and tools</li><li>linux: installs the kernel</li><li>linux-firmware: includes drivers for hardware support</li></ul><p>Nothing else is installed yet — no desktop, no users, no network configuration.<br> Just the <strong>foundation</strong>.</p><h4>3.2 Generate fstab</h4><p>Next, generate the filesystem table (fstab), which tells Linux where partitions are mounted:</p><pre>genfstab -U /mnt &gt;&gt; /mnt/etc/fstab</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*8Sg98DONhn3r0HpIT-GILQ.png" /></figure><p>Key points:</p><ul><li>-U: uses UUIDs (unique identifiers for each partition)</li><li>/mnt/etc/fstab: writes the configuration inside the new system</li></ul><p>This ensures the system knows how to mount partitions at boot.</p><h4>3.3 Enter the New System (chroot)</h4><p>Now we “change root” into the new system:</p><pre>arch-chroot /mnt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*gto3_u2Qx3acJ_8PB5knwQ.png" /></figure><p>What this means:</p><ul><li>You’re now <strong>inside the installed system</strong>, even though it’s on the disk, not running yet.</li><li>Commands now affect the new system, not the live environment.</li><li>From this point, the system behaves as if it had booted normally.</li></ul><h3>3.4 Why chroot Matters</h3><p>Without chroot, any configuration would affect only the live environment — not the system you just installed.</p><p>Think of it like stepping into the shell of your new system to finish building it properly.</p><h3>Step 4: Configuring the System and Installing the Bootloader</h3><h4>4.1 Set the Timezone</h4><p>Set your timezone according to your region. Example for New York:</p><pre>ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime<br>hwclock --systohc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*5x3um-1Wf2eCIvI_6B-p7g.png" /></figure><ul><li>ln -sf creates a symbolic link to the correct timezone file</li><li>hwclock --systohc sets the hardware clock to match system time</li></ul><h3>4.2 Configure Locale</h3><ol><li>Edit /etc/locale.gen and uncomment your preferred locale, e.g.:</li></ol><pre>en_US.UTF-8 UTF-8</pre><pre>locale-gen<br></pre><pre>echo &quot;LANG=en_US.UTF-8&quot; &gt; /etc/locale.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*eQNXsGoCGVU3nuVReDGXxQ.png" /></figure><h4>4.3 Set Hostname</h4><p>Choose a name for your system:</p><pre>echo &quot;arch-vm&quot; &gt; /etc/hostname</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*HArXS6_buS4xt1iXLyom6A.png" /></figure><p>Also update /etc/hosts:</p><pre>127.0.0.1   localhost<br>::1         localhost<br>127.0.1.1   arch-vm.localdomain arch-vm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*mAlynIgOesPN-hKN4NHvnA.png" /></figure><h4>4.4 Set Root Password</h4><pre>passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*rBkqFbQ53XV9qvvtEx55Gw.png" /></figure><p>Type a secure password — you will need it for administrative tasks.</p><h4>4.5 Create a User (Optional but Recommended)</h4><p>Add a normal user:</p><pre>useradd -m -G wheel -s /bin/bash yourusername<br>passwd yourusername</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*QWiF_7TgPU-YobUzTl_P0g.png" /></figure><p>-m: create home directory</p><p>-G wheel: add to sudo-capable group</p><ul><li>s /bin/bash: as sign shell</li></ul><p>install nano :</p><pre>pacman -S nano</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*U7QEmhEO95ESM4eqDM1xyQ.png" /></figure><p>Enable sudo for the user:</p><pre>pacman -S sudo<br>EDITOR=nano visudo</pre><p>Uncomment the line:</p><pre>%wheel ALL=(ALL) ALL</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*nWKJdhmmokuCk-8-CgfxcQ.png" /></figure><p>just remove the % and exit by ctrl + x to save</p><h3>4.6 Install essential package</h3><h3>Base network &amp; login tools</h3><pre>pacman -S networkmanager sudo vim bash-completion</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQ1ckh-bBU3rKqe1-NhTeQ.png" /></figure><h3>4.6 Install and Configure the Bootloader</h3><p>For UEFI systems:</p><pre>pacman -S grub efibootmgr<br>mkdir -p /boot/efi<br>grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB<br>grub-mkconfig -o /boot/grub/grub.cfg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gExPtO4jORJFR_67W926rQ.png" /></figure><p>This ensures your system can boot independently after reboot.</p><h4>Final Actions Before First Boot</h4><p>Exit the chroot environment:</p><pre>exit</pre><p>Unmount all mounted partitions:</p><pre>umount -R /mnt</pre><pre>reboot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IHlPNRCmlHE8tIwgYzkghw.png" /></figure><p>Make sure to remove the Arch ISO from the virtual machine before rebooting.</p><p>If everything was configured correctly, you will boot directly into your new Arch Linux system.</p><h3>And Here We Are</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VgfoRD7N3lXSLYNyKSz2BQ.png" /></figure><p>At this point, we’re finally here — inside our own Arch Linux machine.</p><p>The hardest part is done.<br> All the real work happened earlier: partitioning, mounting, installing the base system, and making the machine bootable.</p><p>What comes next is no longer foundational — it’s <strong>optional and personal</strong>.</p><p>before any we need to be sure that the networkmanager is work</p><pre>systemctl enable Networkmanager<br>systemctl start NetworkManager</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*larWcrJ1praQ6dAgjznFCQ.png" /></figure><h3>The Final Touch: Your Arch, Your Rules</h3><p>And here we are — your Arch Linux system is alive, fully functional, and waiting.</p><p>The hardest part is behind you. All the heavy lifting — partitioning, mounting, bootloader setup, and system base — is done. Now comes the fun part: <strong>making it yours</strong>.</p><p>Want a graphical environment? Easy. A minimal GNOME or a lightweight window manager — it’s your choice.</p><pre>pacman -S xorg gnome gnome-extra<br>systemctl enable gdm<br>systemctl start gdm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nGCBftnrqzkZFk6V41up7Q.png" /></figure><p>One command, and suddenly, your system transforms from a blank terminal into a <strong>full-fledged desktop</strong>, ready to explore.</p><blockquote><em>This is more than installing Linux. This is building a system you understand, piece by piece. Every decision, every command — </em><strong><em>it’s yours</em></strong><em>.</em></blockquote><p>Congratulations. You didn’t just follow a guide — you <strong>constructed an Arch system from scratch</strong>, and that’s a skill few truly master.</p><h3>Wrapping Up</h3><p>You’ve reached the finish line.</p><p>From zero to a fully bootable Arch system — with networking, essential tools, and an optional GUI — you’ve <strong>built a system you understand completely</strong>.</p><p>This isn’t just about Arch Linux. It’s about <strong>learning how a system works from the ground up</strong>, taking control of every step, and gaining skills that no pre-configured OS can teach.</p><p>Now it’s your turn: explore, tweak, break, and rebuild. Every experiment deepens your understanding.</p><blockquote><em>Arch is more than a system. It’s a playground for those who want to </em><strong><em>master their digital world</em></strong><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18050ada86f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>