<?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 Yano. on Medium]]></title>
        <description><![CDATA[Stories by Yano. on Medium]]></description>
        <link>https://medium.com/@frankyyano?source=rss-72d705183371------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OYAaYcWxRFeI0M9rAg2zIA.jpeg</url>
            <title>Stories by Yano. on Medium</title>
            <link>https://medium.com/@frankyyano?source=rss-72d705183371------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:59:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frankyyano/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[Dario Amodei Was Wrong About GPT-2. That Doesn’t Mean He’s Wrong Now.]]></title>
            <link>https://medium.com/@frankyyano/dario-amodei-was-wrong-about-gpt-2-that-doesnt-mean-he-s-wrong-now-a710a90e8c28?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/a710a90e8c28</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[dario-amodei]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 17:14:05 GMT</pubDate>
            <atom:updated>2026-09-15T17:32:28.514Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0_74qnz48NAF4WCE01YUA@2x.jpeg" /></figure><p><em>The instinct behind &quot;pacing the frontier&quot; is sound. The machinery he proposes to do it with is not.</em></p><p>I recently read &quot;that&quot; oped by Anthropic’s Dario Amodei and I was left with quite a lot on my mind. So in this post, I write my thoughts based on his oped. These are my personal opinions, debating public policy, democracy and AI safety in response to Dario Amodei’s blogpost.</p><p>In February 2019, OpenAI <a href="https://naokishibuya.github.io/blog/2022-12-30-gpt-2-2019/">withheld the full GPT-2 weights</a> over fears of impersonation and synthetic propaganda at scale. <a href="https://www.explainx.ai/blog/dario-amodei-gpt2-openai-open-source-ai-controversy-2026">Dario Amodei was VP of Research</a>. Outsiders replicated the model within weeks, the full release shipped in November, and the predicted flood never came.</p><p>Seven years on, he <a href="https://darioamodei.com/post/we-must-pace-the-frontier">wants the industry to slow down again</a>. Same man, same mistake?</p><p>Probably not. He answers the charge himself: slowing down in 2023 would have been like studying human psychology by experimenting on bacteria. GPT-2 could barely hold a paragraph. A swarm of agents that attacks targets nobody assigned it and then <a href="https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/">tries to compromise its own grader</a> is a different animal. Early isn’t wrong.</p><p>But 2019 taught one durable lesson, and it has nothing to do with text generators. It’s about who pays for caution. When Anthropic’s founder was wrong then, the cost was a bad news cycle. If he’s wrong now and pacing binds, the bill lands on the hospital that deploys diagnostics two years late and the startup that can’t afford an embedded audit team. Those costs never testify.</p><h4>The weakest part is the part he’s surest about</h4><p>Embedded evaluators carry the whole plan: desks, badges, laptops, employee-like access, and the right to publish without editorial control, subject to redaction of anything security-sensitive, legally privileged, commercially sensitive or third-party confidential. That last clause is wide enough to drive a data centre through. “We can’t redact findings just because they’re unfavourable” has no adjudicator, no penalty and no appeal.</p><p>His analogy is bank supervision. But a supervisor has statutory authority and subpoena power. A reviewer with a badge and a blog has neither. One is oversight; the other is a well-informed guest.</p><p><a href="https://metr.org/">METR</a> is named directly, and its independence is <a href="https://officechai.com/ai/metrs-independence-questioned-after-x-user-highlights-financial-links-between-company-and-anthropic/">already contested in Washington</a> over funding and social proximity to Anthropic, with nothing yet showing capture rather than adjacency in a small field. Both readings can stand. That’s the problem: a pacing regime can’t rest on an argument that unsettled, and <a href="https://www.axios.com/2026/09/15/ai-trust-safety-anthropic-openai">very few people currently trust AI companies to referee themselves</a>.</p><p>The checkpoint design has a deeper flaw, and he writes it down himself. Capable models get better at deceiving evaluations. So the trigger for slowing down depends on the instrument that slowing down is supposed to repair. Compute limits are measurable but, in his words, gameable. What we can measure is crude; what matters can’t be measured yet.</p><p>The clock fails too. He warns an internet-scale swarm could be 6–12 months out. Step two needs an antitrust waiver and legislation; step three needs an arms-control deal with Beijing. Every binding element arrives after the window closes.</p><h4>“Democratic coordination” is doing a lot of work</h4><p>Step two asks frontier labs in democratic countries to coordinate on common standards, with a government antitrust waiver to make it legal. Strip the vocabulary and it is a request to legalise price-fixing on the pace of progress among the four or five firms already in the lead. If it works, the speed of the most consequential technology of the century gets set by the people whose valuations depend on where it’s set. Cartels are easy to authorize and almost impossible to dissolve.</p><p>The word “democratic” also flatters the arrangement. <em>Democracies are, in practice, majority rule with rights at the edges, and on questions like this they don’t even manage the majority part.</em> Nobody in Lagos, Jakarta or Nairobi voted on American frontier-lab checkpoints, and no American voted on them either. A committee of US labs plus the Commerce Department deciding the world’s capability ceiling is a dictatorship over everybody who isn’t in the room. It may still be the least bad option available. It should not be sold as consent.</p><p>Which brings us to export controls, where the safety argument and the commercial argument have been holding hands for so long it’s hard to tell whose hand is whose. The US restricted Nvidia’s H20, then licensed it back with 15% of China-derived revenue remitted to the Treasury. A national-security instrument became a revenue instrument. That is not a subtle tell.</p><p>The results are worse than the framing. Epoch AI estimates somewhere between 290,000 and 1.6 million H100-equivalents reached China through 2025; the FT reported over $1bn in smuggled chips in a four-month stretch. NIST’s CAISI put DeepSeek V4 Pro about eight months behind the frontier in May 2026 and judged GLM-5.2 comparable to a US model six months its senior. Chinese models now account for roughly 61% of tokens on OpenRouter. Qwen has passed a billion downloads. The gap is months, not years, and it closed while the controls were tightening. Meanwhile Beijing is reportedly drafting its own export controls on Qwen and DeepSeek weights, after Commerce ordered Anthropic’s own Fable 5 and Mythos 5 pulled from global access in June. Everyone has learned to say “national security” and mean “market share.”</p><p>This matters for pacing specifically, because Amodei concedes that the amount democracies can slow down is capped by their lead over China. Take him at his word and Anthropic’s safety ceiling is set in Beijing. That is a strange place to leave your deepest commitment.</p><h4>The duality is real &amp; it doesn’t resolve cleanly</h4><p>Overregulation does slow progress, without a shadow of a doubt. Europe has spent a decade proving you can regulate your way out of a technology sector while importing it anyway.</p><p>Amodei’s best argument is his aviation analogy, and it cuts against his own proposal. Commercial flight got safe through mandatory non-punitive incident reporting, a crash investigator with subpoena power, and liability that made carelessness expensive. It did not get safe because Boeing invited a reviewer to sit near the engineers. If aviation is the model, the answer is statute, not commitments.</p><p>So the duality resolves into a preference for <em>kinds</em> of rules rather than <em>amounts</em>. Rules that specify outcomes and disclosure age well. Rules that specify techniques and thresholds harden fast and rot faster. Mandatory incident reporting, legal protection and standing for external evaluators, real liability for deployed harms, and forced publication of safety cases all scale with capability without requiring a regulator to correctly guess what a model can do. A legislated compute cap or a cartel of incumbents does neither.</p><h4>Bottom line</h4><p>AI is going to be very good for us, and I want the drugs and the tutors sooner than the cautious timeline allows. Amodei is right that none of it is guaranteed, and right that a swarm hacking its own grader is a warning rather than a curiosity.</p><p>He’s wrong that voluntary access, industry coordination and a trade war wearing a safety badge can hold it. Promises aren’t guardrails. Statute, liability and enforceable disclosure are boring, slow, and the only kind that has ever worked.</p><p>Should we worry about what the labs are building? Yes. But the sharper worry is structural: right now, the only people who can see the swarm coming are the ones selling tickets.</p><p><em>Thinking out loud about </em><a href="https://darioamodei.com/post/we-must-pace-the-frontier"><em>Dario Amodei, “We Must Pace the Frontier”</em></a><em> (September 2026).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a710a90e8c28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The GOAT: AWS CloudTrail.]]></title>
            <link>https://medium.com/@frankyyano/the-goat-aws-cloudtrail-4b8693ef3ab7?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b8693ef3ab7</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloudtrail]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 17:04:22 GMT</pubDate>
            <atom:updated>2024-12-02T17:04:22.184Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YVphulvs386TZYkE.png" /><figcaption>credits: <a href="https://www.workfall.com/learning/blog/wp-content/uploads/2021/11/Cover-Images_Part2-1-1160x628.png">https://www.workfall.com</a></figcaption></figure><p>AWS CloudTrail is a pivotal service within the Amazon Web Services (AWS) ecosystem, designed to enhance security, compliance, and governance through comprehensive logging of user activity and API usage across AWS environments. This blog delves into the technical aspects of CloudTrail, its functionalities, best practices for implementation, and the latest updates that enhance its capabilities.</p><h3>What is AWS CloudTrail?</h3><p>AWS CloudTrail is a logging service that records account activity across your AWS environment. It captures actions taken by users, roles, or AWS services as events, which are then stored in log files. These logs can be accessed via the CloudTrail console or delivered to an Amazon S3 bucket for long-term storage and analysis. By default, CloudTrail retains logs for 90 days unless configured otherwise</p><h3>Key Features of AWS CloudTrail</h3><ol><li><strong>Event Logging:</strong> Captures three types of events:</li></ol><ul><li>Management Events: Actions that manage resources (e.g., creating or deleting an S3 bucket).</li><li>Data Events: Operations on resource data (e.g., object-level operations in S3).</li><li>CloudTrail Insights: Identifies unusual API activity that may indicate operational issues or security threats</li></ul><p>2. <strong>Multi-Region Support: </strong>Enables logging across all regions, ensuring comprehensive monitoring of activities regardless of where they occur</p><p>3. <strong>Log File Integrity Validation:</strong> Ensures the authenticity of log files through cryptographic hashing</p><p>4. <strong>Integration with Other AWS Services</strong>: Works seamlessly with AWS CloudWatch for monitoring and alerting based on logged events</p><p>5. <strong>Custom Trails:</strong> Users can create custom trails to define specific logging requirements and store logs in designated S3 buckets for longer retention</p><h4>What are some of the recent updates to this service?</h4><p>AWS continuously enhances CloudTrail with new features and capabilities. Some notable recent updates include:</p><ul><li><strong>AWS CloudTrail Lake:</strong> Launched in early 2023, this feature allows users to ingest activity events from non-AWS sources into a managed data lake. This centralizes user and API activity for easier auditing and analysis across hybrid environments.</li><li><strong>Enhanced Insights Capabilities:</strong> The latest updates to CloudTrail Insights provide organizations with better tools for identifying unusual operational activities, such as spikes in resource provisioning or IAM actions that deviate from established patterns.</li><li><strong>Improved Integration with Lake Formation</strong>: Enhancements allow secure sharing of CloudTrail Lake logs across multiple accounts without data replication, streamlining access control and data management across large enterprises.</li><li><strong>Support for Generative AI Workloads:</strong> New capabilities have been introduced to audit generative AI services within AWS, ensuring compliance and security in environments utilizing advanced AI technologies.</li></ul><p>AWS CloudTrail is an essential tool for organizations leveraging cloud infrastructure, providing critical visibility into user actions and API interactions. So what are some of the best practices to consider when working with CloudTrail?</p><ul><li>Create a Trail: Establish a custom trail to capture all relevant events beyond the default 90-day retention period. This ensures compliance and long-term auditing capabilities.</li><li>Enable Multi-Region Logging: Activate logging for all regions to avoid missing critical events that may occur outside your primary region.</li><li>Integrate with CloudWatch: Set up integration with AWS CloudWatch to visualize logs and create actionable alerts based on specific events.</li><li>Define Retention Policies: Use Amazon S3 lifecycle policies to manage log retention according to your organization’s compliance requirements.</li><li>Regularly Review Logs: Conduct periodic audits of your logs to identify unauthorized access or anomalous behavior that could indicate security breaches.</li></ul><p>More reading here:</p><p><a href="https://aws.amazon.com/blogs/mt/category/management-tools/aws-cloudtrail/">https://aws.amazon.com/blogs/mt/category/management-tools/aws-cloudtrail</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b8693ef3ab7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should you be worried about AI?]]></title>
            <link>https://medium.com/@frankyyano/should-you-be-worried-about-ai-e9086fcd6605?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9086fcd6605</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[gpt]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Tue, 29 Oct 2024 13:12:54 GMT</pubDate>
            <atom:updated>2024-10-29T13:12:54.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/0*A6qB91Xt0hnYkcVr.jpg" /></figure><p>What comes to your mind when you hear the term AI? For most people, it would be Chat GPT, OpenAI or Nvidia. However, before all these, there was one British man named Alan Turing. Turing gave quite possibly the earliest public lecture in London in 1947 to mention computer intelligence. He was of the idea that, “What we want is a machine that can learn from experience…” and that the “possibility of letting the machine alter its own instructions provides the mechanism for this.” In 1948 he introduced many of the central concepts of AI in a report entitled “Intelligent Machinery.” However, Turing did not publish this paper, and many of his ideas were later reinvented by others. This was one of the earliest mentions and possibly the idea of intelligent machines, what we today know as Artificial Intelligence.</p><h4>What is Artificial Intelligence (AI)?</h4><p>According to Google Cloud, Artificial intelligence is a field of science concerned with building computers and machines that can reason, learn, and act in such a way that would normally require human intelligence or that involves data whose scale exceeds what humans can analyze.<br>It is also worth mentioning that AI is a broad field that combines many different disciplines, including computer science, data analytics and statistics, hardware and software engineering, linguistics, neuroscience, and even philosophy and psychology.</p><ul><li>Importantly, the core principle that powers AI systems is data, lots and lots of it. AI systems learn and improve through exposure to vast amounts of data, identifying patterns and relationships that humans may miss.</li><li>This learning process often involves algorithms, which are sets of rules or instructions that guide the AI’s analysis and decision-making.</li><li>In machine learning, a popular subset of AI, algorithms are trained on labeled or unlabeled data to make predictions or categorize information.</li></ul><h4>What then are GPTs, LLMs and AGI?</h4><ul><li><strong>Generative Pre-training Transformer (GPT) — </strong>A GPT is a type of AI program that’s recently gained popularity for its ability to generate and respond to text that mimics human conversation. GPTs are trained on enormous quantities of information, including online content and the detailed structure of human speech. GPTs understand and generate natural language text; when you ask a GPT to perform a task, it provides a contextually accurate response in conversational language.</li><li><strong>Large Language Model (LLM) — </strong>Large language models (LLMs) are a category of foundation models trained on immense amounts of data making them capable of understanding and generating natural language and other types of content to perform a wide range of tasks.<br>The underlying transformer is a set of neural networks that consist of an encoder and a decoder with self-attention capabilities. The encoder and decoder extract meanings from a sequence of text and understand the relationships between words and phrases in it.</li><li><strong>Artificial general intelligence (AGI) — </strong>Often used to refer to the hypothetical intelligence of a machine that possesses the ability to understand or learn any intellectual task that a human being can. It is a type of artificial intelligence (AI) that aims to mimic the cognitive abilities of the human brain.<br>AGI is a more complex form of AI, one that is still under active research. Some researchers and industry figures already claim that early forms of AGI may already exist. AGI is expected to be a huge game changer, and time will tell.</li></ul><h4>So, what’s to worry about AI?</h4><p>Concerns about artificial intelligence (AI) have intensified as its capabilities and applications expand into our every day lives. Many people are skeptical and worried about AI taking over their jobs for instance. But is this a valid concern really? I am of the contrasting opinion on this matter, AI should augment our day today tasks and make us more productive, not completely write us off.<br>This, however, is not to say that AI does not pose threats to us as humans, quite the opposite actually. This, however, I will delve into on my next piece discussing responsible AI.<br>Here’s something to think about though:</p><ol><li>What is your take on AI systems and copyright? Is it okay for AI systems to be trained on any and all data including copyrighted content? I recently discovered a GPT whose whole purpose is to bypass paywalled content, all you have to do is supply the URL and it’ll provide you with the intended content. What’s your opinion about that?</li><li>There is a lot of AI generated content flooding the internet. One of my favorite social media platforms has been pintrest, for a long time. Lately though, whenever I search for images and ideas on the platform, I am mostly disappointed. A lot of the content is AI generated and simply unrealistic. This is becoming a trend on most social media platforms. What do you make of this?</li><li>Where is the line drawn when it comes to privacy? A lot of AI systems are trained on huge datasets. The one upsetting trend lately has been most social media platform stealthily updating their terms of us and opting in all users so their data can be used to train AI — recently witnessed with LinkedIn and X (to train grok). Where is the line? And what next stunt should we expect as consumers?</li></ol><p>There are a lot of good things that AI promise to bring to us, especially in the fields of medicine, computing and transportation. Companies like NVIDIA continue to develop GPUs that are crucial for the next generation computing, research and development. I am optimistic about the future of AI, but that also means that we have to continuously learn and adapt to the changing times. While AI will potentially render some jobs redundant, it will likely also create thousands more. It is thus, crucial to remain dynamic and agile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9086fcd6605" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Kerberos Works.]]></title>
            <link>https://medium.com/@frankyyano/how-kerberos-works-d310753b611f?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/d310753b611f</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[kerberos]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Tue, 20 Aug 2024 14:53:48 GMT</pubDate>
            <atom:updated>2024-08-20T14:53:48.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*GgZOHIJadyVHmK0X.gif" /></figure><p>Simply put, Kerberos is a single sign on (SSO) network authentication protocol. It employs the use of ticketing schemes to allow authenticated users to access services within a network.</p><p><strong><em>Fun Fact:</em></strong><em> The term kerberos comes from a mythological three headed dog that restricted people from accessing an area.</em></p><p>Likewise, kerberos authentication contains three key components:</p><ul><li><strong>Client:</strong> The user or system that wants to authenticate and access a network service.</li><li><strong>Application Server (AS):</strong> The server that provides the requested network service.</li><li><strong>Key Distribution Center (KDC):</strong> The trusted third-party that issues tickets for authentication and authorization. The KDC consists of two services:<br> - Authentication Service (AS)<br> - Ticket Granting Service (TGS)</li></ul><p>The Kerberos authentication process involves several steps, as shown in the diagram below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bP7Foq3TB7BAJhxL.png" /><figcaption>courtesy:<a href="https://www.techtarget.com/">https://www.techtarget.com/</a></figcaption></figure><p>Kerberos Authentication Flow can be simplified as follows:</p><ol><li><strong>Client Authentication Request:</strong> The client sends an authentication request to the AS, encrypted with the user’s password hash.</li><li><strong>Ticket Granting Ticket (TGT):</strong> If the client is authenticated successfully, the AS issues a Ticket Granting Ticket (TGT) and a session key. The TGT is encrypted with the KDC’s secret key.</li><li><strong>TGT Request:</strong> The client sends the TGT to the TGS to request access to a specific service.</li><li><strong>Service Ticket:</strong> If the TGT is valid, the TGS issues a service ticket and a session key for the requested service. The service ticket is encrypted with the service’s secret key.</li><li><strong>Service Request:</strong> The client sends the service ticket to the application server along with an authenticator (encrypted with the session key) to prove its identity.</li><li><strong>Service Access:</strong> If the service ticket and authenticator are valid, the application server grants access to the requested service.</li></ol><p>Kerberos uses two types of tickets for authentication and authorization:</p><ul><li><strong>Ticket Granting Ticket (TGT):</strong> Issued by the AS after the initial authentication, the TGT allows the client to request service tickets from the TGS. It is encrypted with the KDC’s secret key.</li><li><strong>Service Ticket:</strong> Issued by the TGS for a specific service, the service ticket allows the client to authenticate to the application server. It is encrypted with the service’s secret key.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d310753b611f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Security Short Series — CSRF.]]></title>
            <link>https://medium.com/@frankyyano/web-security-short-series-csrf-4cdf6f936773?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cdf6f936773</guid>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Fri, 29 Mar 2024 13:31:34 GMT</pubDate>
            <atom:updated>2024-03-29T13:31:34.244Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Security Short Series — CSRF.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dbqv0855KZ-lSS3wspW7qg.jpeg" /><figcaption>copyright:<a href="https://securityzines.com/zines/csrf.html">https://securityzines.com/zines/csrf.html</a></figcaption></figure><p><strong>Fun Fact</strong> — This is one of the most asked about questions in Appsec Interviews!</p><p>CSRF (XSRF) allows an attacker to trick a user’s browser into performing unauthorized actions on a trusted website, all without the user’s knowledge or consent.</p><p><strong>How Does CSRF arise in Applications?</strong></p><p>Consider a banking application that transfers money upon receiving a POST request with the recipient’s account number and amount, of course to complete this attack, the victim must be authenticated.<br>An attacker could embed a form on their malicious site that when submitted, sends a POST request to the bank’s transfer endpoint with the attacker’s desired malicious payload to conduct the fraudulent transaction. If the user is logged in to their bank account while visiting the attacker’s site, the bank might process the transfer due to the user’s valid cookies, even though the user never intended to make the transaction. <br>Essentially, CSRF allows an attacker to partly bypass the same origin policy (SOP), which is designed to prevent different websites from interfering with each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*OHGFa5I66Bgx2FMBM_0csA.png" /><figcaption>copyright:<a href="https://portswigger.net/web-security/csrf">https://portswigger.net/web-security/csrf</a></figcaption></figure><p>Below is another simple illustration of a CSRF attack vector, as demonstrated by Rana Khalil.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*_Mj73F3VhsMX4XM8fzTG5g.png" /><figcaption>copyright: <a href="https://www.youtube.com/watch?app=desktop&amp;v=7bTNMSqCMI0">Rana Khalil</a></figcaption></figure><p>What makes CSRF attacks possible?</p><ul><li><strong>Cookie-based session handling. </strong>The target application should only be tracking user requests based only on session cookies. There are no other mechanisms in place to track subsequent requests made to the application. This is where CSRF Tokens would come in handy. Consider the below request:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*polaqqvRn1QvglFCDkn_jg.png" /></figure><ul><li>The application uses a session cookie to identify which user issued the request. There are no other tokens or mechanisms in place to track sessions and subsequent requests.</li><li>If the values of the request parameters that are needed to perform the action can be easily predicted by an attacker, then based on these conditions, an attacker could craft a malicious payload.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*OXnGGYgFQo06qWSBdp0MlA.png" /></figure><p>If a victim user visits the attacker’s web page, that’s end game! First, the attacker’s page will trigger a HTTP request to the vulnerable website. If the victim has an authenticated session on the vulnerable website, their browser will automatically include their session cookie in the request. The caveat to this is that SameSite cookies should not be in use.<br>Because no other mechanisms exist to verify subsequent requests, the vulnerable application will process the request, as though it was made by the victim user.</p><p><strong>Defending Against CSRF.</strong></p><ul><li><strong>SameSite Cookie Attribute</strong>: Setting the SameSite attribute of cookies to Strict or Lax helps mitigate CSRF attacks by restricting how cookies are sent in cross-site requests.</li><li><strong>CSRF Tokens</strong>: Random tokens generated server-side by the application and shared with the clients especially for critical actions and include them as hidden form fields or request parameters.</li></ul><p>More reading and Labs:</p><ul><li><a href="https://portswigger.net/web-security/csrf">Cross-site request forgery (CSRF)</a></li><li><a href="https://book.hacktricks.xyz/pentesting-web/csrf-cross-site-request-forgery">CSRF (Cross Site Request Forgery) | HackTricks</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7bTNMSqCMI0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7bTNMSqCMI0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7bTNMSqCMI0%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/aea82545f53fb3676a2d7e5236cd583b/href">https://medium.com/media/aea82545f53fb3676a2d7e5236cd583b/href</a></iframe><p>I hope you enjoy this piece!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cdf6f936773" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Security Short Series — XXE]]></title>
            <link>https://medium.com/@frankyyano/web-security-short-series-xxe-64492ed1d893?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/64492ed1d893</guid>
            <category><![CDATA[xxe]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[appsec]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Sat, 23 Mar 2024 18:32:29 GMT</pubDate>
            <atom:updated>2024-03-23T18:32:29.668Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Security Short Series — XXE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*YJlz77KYsajTeA8SWB5bxQ.png" /><figcaption>copyriight:<a href="https://securityzines.com/flyers/xxe.html">https://securityzines.com/flyers/xxe.html</a></figcaption></figure><p><strong>XXE is the attack to XML</strong> parser where weakly configured XML parser, trusts the XML input coming from the client and parses the external entities back to the response. Which may lead to exfiltration of data.</p><p>XXE can also lead to SSRF in poorly configured web application servers.</p><p>XML external entity injection (XXE) basically allows an attacker to interfere with an application’s processing of XML data.</p><p>An attacker could essentially be able to view files on the application server filesystem, and even interact with any back-end or other connected external systems.</p><p>All an attacker has to do is inject a system command within the vulnerable XML code block.</p><p>In some situations, with the correct payload, an attacker can upload a malicious reverse shell payload on the target, and obtain a system level shell, creating persistence on the server.</p><p>The below illustration shows an XXE attack flow to read files on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*9-zULBZ6ObtcFAPb3yGFyA.png" /><figcaption>copyright:<a href="https://portswigger.net/web-security/xxe">https://portswigger.net</a></figcaption></figure><p><strong>What are the types of XXE attacks?</strong></p><ol><li><strong>Exploiting XXE to retrieve files</strong> — Files are displayed in an application’s response. The below payload would retrieve the /etc/passwd file from the server.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*wm8QZw-iMuUwAVxwVRbtMQ.png" /></figure><p>2. <strong>Exploiting XXE to perform SSRF attacks</strong>.<br>3. <strong>Exploiting blind XXE exfiltrate data out-of-band</strong>. Since external entities can reference resources on other servers, we can use entities to access other servers in a <em>server-side request forgery</em> (SSRF) attack or as a means to exfiltrate data back to a server we control.<br>When an application parses this type of external entity, it will send a GET request to the specified URL. This is typically how SSRF works, and can give an attacker access to private enpoints in the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*HPUIsA_GP_HOw6dtIjJCJA.png" /></figure><p>4. <strong>Exploiting blind XXE to retrieve data via error messages</strong>. An attacker can trigger a parsing error message containing sensitive data.</p><p>More reading and Labs:</p><ul><li><a href="https://portswigger.net/web-security/xxe">XML external entity (XXE) injection</a></li><li><a href="https://www.hackerone.com/knowledge-center/xxe-complete-guide-impact-examples-and-prevention">XXE Complete Guide: Impact, Examples, and Prevention</a></li><li><a href="https://www.imperva.com/learn/application-security/xxe-xml-external-entity/">What is XXE (XML External Entity) | Examples &amp; Prevention | Imperva</a></li></ul><p>I hope you enjoy this piece!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64492ed1d893" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Security Short Series — SQLi.]]></title>
            <link>https://medium.com/@frankyyano/web-security-short-series-sqli-f222f04431a6?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/f222f04431a6</guid>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[sqli]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 15:45:04 GMT</pubDate>
            <atom:updated>2024-03-18T15:45:04.929Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Security Short Series — SQLi.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FeINf3_ISaASL_efRt_b8A.jpeg" /><figcaption>copyright sec_r0:<a href="https://securityzines.com/zines/sqli.html">https://securityzines.com</a></figcaption></figure><ul><li><strong>SQL injection</strong> is the server-side vulnerability that can lead to DB content exfiltration due to the absence of proper user input validation.</li><li>Essentially, this vulnerability inteferes with the SQL queries an application makes to its database.</li><li>The attacker can then craft malicious queries, and pass them on to the database instead of the queries that an application would typically send to the DB.</li><li>This is as bad as it sounds. An attacker can dump an entire database with the correct queries and payloads.</li><li>Likewise, an attacker can leverage an SQL injection attack to compromise the underlying server or other back-end infrastructure and obtain a shell, this is often the goal for most attackers.</li><li>Consider the below simple payload, that when injected in a vulnerable field, will drop a php webshell on the target server web root. An attacker can then use the webshell to run other system level commands.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*ILj0dBWuJJybBsv591iI3g.png" /></figure><p>Consider the below illustration how an attacker would typically conduct and SQL injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*0pxkbQXYymVqASogYlUhxA.png" /><figcaption>copyright:<a href="https://portswigger.net/web-security/sql-injection">https://portswigger.net/web-security/sql-injection</a></figcaption></figure><p>So, what do security engineers and developers do to mitigate this vulnerability in their applications?</p><ul><li><strong>Validate user inputs:</strong> User input should never be trusted. Checks should be put in place to ensure that all user input data is validated and sanitized before being passed on for processing.</li><li><strong>Use prepared statements:</strong> These pre-defined SQL statements prevent unexpected code from being injected.</li><li><strong>Use whitelists, not blacklists</strong>: Blacklists can easily be bypassed through many ways including encoding of all malicious payloads. Whenever necessary, verify and filter user input using strict whitelists only.</li></ul><p>More reading and Labs:</p><ul><li><a href="https://portswigger.net/web-security/sql-injection">What is SQL Injection? Tutorial &amp; Examples | Web Security Academy</a></li><li><a href="https://book.hacktricks.xyz/pentesting-web/sql-injection">HackTricks</a></li></ul><p>I hope you enjoy this piece!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f222f04431a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Formula 1, The absolutes.]]></title>
            <link>https://medium.com/@frankyyano/formula-1-the-absolutes-7d57246da94?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d57246da94</guid>
            <category><![CDATA[f1]]></category>
            <category><![CDATA[grand-prix]]></category>
            <category><![CDATA[mercedes]]></category>
            <category><![CDATA[formula-1]]></category>
            <category><![CDATA[aerodynamics]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 19:12:30 GMT</pubDate>
            <atom:updated>2023-07-10T15:51:28.877Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a different blog post, it is not the usual tech stuff. Well, it is about tech, but this takes a different turn today. In this post, I will provide you with all the information you need to know about FIA Formula 1.</p><p>Back in Campus, I pursued a degree in Electrical and electronics engineering. Part of the package was getting to study Thermodynamics and Aerodynamics. Between trying to make sense of the four laws of thermodynamics and using the Reynolds number in every aerodynamics question, it’s no secret I loved the topics quite less! But at some point, I took this huge interest in airplanes and performance cars, specifically the FIA Formula 1 motorsport. As I geeked more about planes are F1 cars, I got to understand just how important aerodynamics is! This post though is not about aero, this is about all you need to know about F1 motorsport.</p><p>Cleo Abram, in her <a href="https://www.youtube.com/watch?v=SSdsncLXLYs">Youtube </a>post, says that F1 is not just a car race, it is a science experiment. I agree with this statement wholeheartedly, in fact, I believe this is a major understatement on her part.</p><ul><li>Each team races two cars at each Grand Prix. Traditionally, a grand prix event takes place over three days and includes practice on Friday, qualifying on Saturday, and the actual Race on Sundays.</li><li>The order in which drivers go the fastest on qualifying day determines the grid lineup on Sunday. The fastest driver in qualifying starts in the pole position. This is a big deal because overtaking on the track is not easy. In some tracks like Monaco, it’s almost impossible to make positions through overtaking.</li><li>The drivers who finish in the top 10 positions on race day are awarded points, the winner gets 25 points, and the final driver at position 10 gets 1 point. Any driver outside the top ten is not awarded any points.</li><li>At the end of the season, the driver with the highest points wins the <strong>Drivers’ Championship</strong>, while the team with the highest points with the <strong>Constructors’ Championship</strong>.</li><li>Every Team gets to design and manufacture their own cars. This is a crazy expensive endeavor, and the governing body, FIA has implemented budget caps to prevent teams from overspending on R&amp;D. In fact, in the 2022 season, Redbull Racing was fined for breaching this FIA guideline. Interestingly though, the teams are allowed to improve the cars between each race.</li></ul><h4>The Aerodynamics of the F1 Car.</h4><p>This is where the engineering marvel comes in. The perfect intersection between material science, aero, and sheer human brilliance. <br>The all important factor is <strong>Downforce</strong>. The car has to stay on the ground. The F1 car actually has wings specifically designed to produce the opposite effect of what airplane wings do. A High pressure region is created on top of the car, while a low pressure region is created underneath the car due to the oncoming airstream as the car moves. This essentially ensures that the car stick to the ground. If this sounds familiar, then you probably still remember your high school physics — <strong>Bernoulli’s Principle</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*MUHiKL4DF7B1Ol6k.png" /><figcaption>credit: <a href="https://www.gpfans.com/en/f1-news">https://www.gpfans.com/en/f1-news</a></figcaption></figure><p>This is a really high level design, that barely scratches the surface. We could be here for days talking about aero in F1 cars and how the whole thing is just one huge air bender! The above image is from the <strong>old design</strong> and created what is known as “Dirty Air”, making close racing and overtaking to be quite difficult. This has since changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*unKXfmAbnYcYykSyKYmxdg.png" /><figcaption>credits: Cleo Abram</figcaption></figure><p>My absolute favorite — The Drag Reduction System (DRS). The rear wing of the car opens up (to a limited degree, FIA has strict guidelines on this) generating less rear downforce but allowing higher overall speed. Drivers often use this to perform overtakes on track.</p><h4>Safety Systems.</h4><p>F1 can be an extremely dangerous sport. The car moves extremely fast — The former Mercedes AMG driver, Bottas, once clocked a staggering 231 Miles per hour! The sport is often surrounded by scary crashes, take for instance what we witnessed at the Italian GP, where the Redbull Racing driver, Max ended up on top of Mercedes AMG Lewis Hamilton’s car! In the 2022 season, we saw a nasty collision between George Russel and Zhou Guanyu at the Silverstone GP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_YptPY0B9uDWzMUR.jpg" /><figcaption>credits:<a href="https://www.independent.co.uk/f1">https://www.independent.co.uk/f1</a></figcaption></figure><p>In 2020, in Bahrain, we held our breath as the Haas car burst into Flames with <strong>Romain Grosjean</strong> trapped in it! He was indeed lucky to escape with some burns. In my time following the sport, I have never been so freaked out! The car itself actually got sliced into two halves! So what makes these cars so safe?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KqL71l82mzyI73tw" /><figcaption>credits:<a href="https://wwos.nine.com.a/">https://wwos.nine.com.a</a>u</figcaption></figure><p>It is safe to say that the car has quite some robust safety systems! Let’s have a look at some of the systems that keep the drivers safe.</p><ul><li><strong>Rear Crash Structure</strong>: Located at the rear end of the car, these systems protect the car and its occupant from rear collisions. The car also has concealed side crash structures, protecting drivers from side crashes.</li><li><strong>Front Nose</strong>: This removable front section handles front Impacts.</li><li><strong>Monocoque: </strong>This is a protective cocoon that surrounds the driver as they sit and drive the car.</li><li><strong>Roll Hoop</strong>: Protects the drivers’ heads in the event of a rollover.</li><li><strong>Halo</strong>: The story of the Halo is quite intriguing. When it was first introduced in 2018, many teams were opposed to this system. However, it would turn out to be one of the most critical safety inventions in Formula 1. Made from lightweight titanium tubing and attached to the monocoque, it prevents large objects and debris from entering the cockpit. Many analysts have praised the Halo in the recent past for saving both Lewis Hamilton and Zhou’s lives.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IXuyp6-dSRvut017.jpg" /><figcaption>credit: <a href="https://www.driving.co.uk/news/motor-sport/f1-halo-explained/">https://www.driving.co.uk/news/motor-sport/f1-halo-explained/</a></figcaption></figure><p>Long Live the Halo!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*JneG6Cc5vLRxVv6raLjoVg.png" /></figure><p>That aside, the car itself is riddled with a plethora of sensors! Data in F1 is gold and the only way to know remotely what is happening to the car is through the sensors! Pretty fancy, right?</p><p>That’s it folks, I hope you enjoyed this post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d57246da94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Tried Harder & Passed my OSCP!]]></title>
            <link>https://medium.com/@frankyyano/i-tried-harder-passed-my-oscp-38f442542464?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/38f442542464</guid>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 09:23:12 GMT</pubDate>
            <atom:updated>2023-04-17T09:24:16.559Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*A0WW4lTBNN8ovWv9IQOnLA.png" /></figure><p>In my previous <a href="https://medium.com/@frankyyano/i-failed-my-oscp-exam-803f5fef30bb"><strong>post</strong></a>, I narrated how disappointed I was after receiving that mail from Offsec that I did not pass my exam. I had almost passed, but I did not. That hurt. Anyways, I took a hiatus, traveled to Vegas for AWS re:Invent 2022, and proceeded for a holiday back home over December Holidays. This was much needed, I cleared my head and relaxed. The experiences leading to my certification are arduous, to say the least, I will not bore you with the mundane specific details.</p><h4>What did I do after failing the first time?</h4><ul><li><strong>Active Directory</strong>: This was my major undoing the first time around. To try and get level, I went through the offsec material with a fresh look again. I did the labs once more. I also did the Proving grounds practice boxes like <strong>Hutch, Vault, Heist, </strong>and <strong>Access</strong>. With one day to the exam, I had a look at the new PEN 200 2023 labs and was able to comfortably do the labs in the OSCP A, B, and C AD set challenges. I felt confident this time with AD. I topped up everything by watching these good AD walkthroughs by Offsec:</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fx5qREhf5lgA%3Fstart%3D4617%26feature%3Doembed%26start%3D4617&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dx5qREhf5lgA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fx5qREhf5lgA%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/39adfab487f7e275a8b8cd3c8cc61730/href">https://medium.com/media/39adfab487f7e275a8b8cd3c8cc61730/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2NLi4wzAvTw%3Fstart%3D10395%26feature%3Doembed%26start%3D10395&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2NLi4wzAvTw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2NLi4wzAvTw%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/bb7f6ab1ae8a83ef37d7d4c7e06ee829/href">https://medium.com/media/bb7f6ab1ae8a83ef37d7d4c7e06ee829/href</a></iframe><ul><li>The other thing I did was get comfortable with privilege Escalation, especially in Windows environments. I realized from the previous attempt that I had seriously struggled with Windows PrivEsc. When I reviewed my terminal outputs later, I realized that I had missed some obvious and simple escalation vectors. So I did more challenges on Windows boxes from PG practice and a little on HTP from TJ NUll’s list. I wasn’t taking chances this time and purchased <a href="https://www.udemy.com/course/windows-privilege-escalation/learn/lecture/18153180#overview"><strong>Tib3rius</strong></a>’ Udemy courses on Privilege Escalation. I will publish some of the stuff I learned during this journey on this blog in the weeks to come. I also redid the privesc rooms on THM.</li></ul><ul><li><a href="https://tryhackme.com/room/windows10privesc">TryHackMe | Windows PrivEsc</a></li><li><a href="https://tryhackme.com/room/windowsprivescarena">TryHackMe | Windows PrivEsc Arena</a></li></ul><ul><li>To keep things interesting, I also completed the Linux challenge modules.</li></ul><h4>The Exam Day.</h4><p>I scheduled my exam for the Easter weekend, I was supposed to being my exam at 2100 CET. Having been through this process before, I was able to connect way ahead of time and spent about 5 minutes waiting for 2100 hours for my VPN pack to be released. At exactly 2100 hours CET, I was connected to the exam environment. I set up the environment how I am used to doing it, setting environment variables, and naming my workspaces and terminal tabs to avoid confusion during the exam. I set up NMAP scans for the stand-alone machines and went over to check out the AD environment. Again, how the IPs were set up, I quickly knew that some pivoting and tunneling would be required for this challenge.</p><p>I proceeded to read the Exam Objectives. I <strong>must </strong>state that reading the exam objectives is <strong>critical</strong>! For the AD set, it could potentially point you toward which host you should begin within the AD chain. It also tells you which boxes in the AD set have local flags and which ones do not. I spent some time looking for the local flags, only to realize that only one of the boxes had a local flag. This was clearly stated in the exam objectives, which I had skipped over. To complete the enumeration phase, I set up the environment variables here as well and began to scan the publicly accessible client in the AD chain. Below are some of the environments I set for each host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*RvnkhcuXph6A2jikfwj78g.png" /><figcaption>setting environment variables.</figcaption></figure><p>Over the next four hours, I successfully compromised and pwned two stand-alone machines. That was good news. My plan was to pwn three standalone machines so that I could have some breathing space. After two hours, however, of trying to poke at the third box, I did not make any headway. I decided to turn to the AD set. In the next couple of hours, I gained an initial foothold and managed to elevate my privileges. I was quite elated at this point, the remaining two machines in this set fell like dominos soon after. At around the 9th-hour mark into my exam, I had the Domain Admin privilege on the domain controller. This was the endgame, at this point, I had 90 points.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FmQG644PY8O7rG%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMjdhMDg1ZDYwMTdiMWNkY2RlNDQ5YTU1ZDU1ZDA2NTcwY2ZlOTVhOSZjdD1n%2FmQG644PY8O7rG%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FmQG644PY8O7rG%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9c45c5f93bbf16b89edb768c973dbf8/href">https://medium.com/media/e9c45c5f93bbf16b89edb768c973dbf8/href</a></iframe><p>Feeling happy about my imminent success, I decided to take a long break. I went to watch Mr. Robot Season 4 and managed to catch episode 9, which to me is the best episode of the entire show. I later retired to sleep and set my alarm to wake up after about four hours.</p><p>In the end, I was not able to figure out the third standalone box. I tried to poke at it some more with the remaining time but I did not make any progress. As I already had attained the passing score, I decided to take all the necessary screenshots and made a skeleton report on the reporting template I had. With a few hours left on my VPN session, I decided to end the exam after triple checking and ensuring that I had everything necessary for the report. I later submitted my report and waited anxiously for the results for five days. I did check from time to time on the Offsec portal to check if it had been updated.</p><h4>What next?</h4><p>My final words, keep trying harder, work smarter, and keep hacking. This was my experience, hope you enjoyed reading it!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ft-bgRQfeW64%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dt-bgRQfeW64&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ft-bgRQfeW64%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/6f371ea75443415ae8b20080cf053e61/href">https://medium.com/media/6f371ea75443415ae8b20080cf053e61/href</a></iframe><p>The OSCP journey has been brutal for me, albeit full of meaning and huge learning opportunities. I have had to put in a lot of hours while also working. I think I will continue to play HTB and more CTFs. I was also fascinated by the client-side attacks, so I think I will go back to that part and just see what else I can learn. I will most definitely explore and learn how to leverage C2 frameworks. As for offsec training, I will turn my attention to Web Application Exploitation and probably pursue the <strong>OSWA </strong>and <strong>OSWE</strong>.</p><p>Till next time folks! Keep watching this space, over the coming weeks I will publish most of the notes I took during my OSCP. Feel free to ping me for a chat.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38f442542464" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pivoting & Tunneling for OSCP and Beyond!]]></title>
            <link>https://medium.com/@frankyyano/pivoting-tunneling-for-oscp-and-beyond-33a57dd6dc69?source=rss-72d705183371------2</link>
            <guid isPermaLink="false">https://medium.com/p/33a57dd6dc69</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Yano.]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 20:16:04 GMT</pubDate>
            <atom:updated>2023-04-12T20:34:17.816Z</atom:updated>
            <content:encoded><![CDATA[<p>You’ve got to agree, offsec has made this a huge topic in the PEN 200. It might be a daunting topic at first glance, but it really isn’t. So what exactly is this topic about? More importantly, why do we need to learn about this seemingly important practice as offensive security and penetration testing professionals?</p><p>As a good practice, most networks employ segmented architecture. Unlike flat networks, segmented networks have restrictions regarding how devices communicate within the network. A big network is broken down into tiny subnets and at times, communication between subnets is prohibited. More importantly, though, specific systems must not be available over the public internet. Think of having your domain controller open to the public, yeah, that’s not a good idea. With segmented networks, such infrastructure can be safely put behind private networks, only available internally within the private network that is not routable on the internet. In fact, it is widely believed that the infamous <a href="https://www.zdnet.com/article/anatomy-of-the-target-data-breach-missed-opportunities-and-lessons-learned/"><strong>Target </strong></a>breach was made possible largely because the network was flat.</p><p>Consider the below simple architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*qC9uNyMHUViNjEvv" /><figcaption>Simple DMZ architecture.</figcaption></figure><p>In this configuration, the firewalls could potentially be configured to drop any connection to the backend servers based on certain predefined rules. From an attacker’s perspective, if we cannot directly connect to the backend servers from the internet, we could compromise the DMZ server, and use it to access the internal systems, essentially pivoting into that protected zone. Sounds cool, right? In this article, we shall discuss SSH Tunneling as a means of pivoting and port forwarding, and redirection.</p><h4>SSH Local Port Forwarding</h4><p>SSH Local Port Forwarding is a technique that allows one to forward traffic <strong>from a local</strong> port to a <strong>remote server</strong> securely over an SSH connection. This technique can be used to access services that are not directly accessible from your local machine. For instance, you can use SSH Local Port Forwarding to access a database server running on a remote machine that is not directly accessible from your local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/0*GumfkRP4VryCzW70.png" /><figcaption><a href="https://www.francescochiriaco.it/ssh-port-forwarding/">https://www.francescochiriaco.it</a></figcaption></figure><p>Here’s an example of how to use SSH Local Port Forwarding:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*j0KNPq9zEiEH2Oayvky-Rw.png" /><figcaption>Local Port forwarding.</figcaption></figure><p>If port 66732 was locally available on the victim machine, by running this command, we essentially make this port available on our attack machine on. We can then proceed to interact with this service running on this port.</p><h4>SSH Dynamic Port Forwarding</h4><p>The limitation of Local Port forwarding is that it allows only for one socket connection per SSH connection. This is especially not useful if we compromise a host and would like to interact locally with 5 or more services running internally on that victim machine. This is where Dynamic port forwarding comes in.</p><p>SSH Dynamic Port Forwarding allows us to create a SOCKS proxy server on your local machine that routes traffic through an SSH connection to a remote server. This technique can be used to bypass firewalls and access resources that are not directly accessible from your local machine. SSH Dynamic port forwarding is quite a powerful technique.</p><p>To use SSH Dynamic Port Forwarding, you need to have an SSH client installed on your local machine and an SSH server running on the remote machine. Once you have established an SSH connection between your local machine and the remote machine, you can use the -D option to specify the local port that you want to use for the SOCKS proxy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*YNi4xIetLqYsprfXDF1LTA.png" /></figure><p>For this case, we want it to listen on all interfaces on port <strong>9001</strong>. We don’t have to specify a socket address to forward to. We can also pass the <strong>-N</strong> flag to prevent a shell from being spawned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*LGdpsHgsCahLcM_KZQh0ug.png" /></figure><p>To access these services, proxychains need to be properly configured on the attack machine. Sometimes if things don’t work, consider doing a <strong>systemctl start tor</strong> and ensure <strong>the tor</strong> service is running on the attack machine. Also, edit the proxychains4.conf file. In Our case, this is how it will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*LoaiWVVuciauseCn-xrqeg.png" /><figcaption>/etc/proxychains4.conf file</figcaption></figure><p>Remember to use proxychains to access the services, for instance: proxychains -q nmap Victim Machine.</p><h4>SSH Remote Port Forwarding.</h4><p>SSH Remote Port Forwarding allows you to forward traffic from a port on a remote server to a port on your local machine securely over an SSH connection. This technique can be used to access services that are not directly accessible from your local machine.</p><p>To use SSH Remote Port Forwarding, you need to have an SSH client installed on your local machine and an SSH server running on the remote machine. Once you have established an SSH connection between your local machine and the remote machine, you can use the -R option to specify the remote port and the local host and port that you want to forward traffic to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*535yK7z-Gb4E04lSb9RE0w.png" /><figcaption>Remote Port Forwarding.</figcaption></figure><ul><li>This command forwards traffic from port 80 on the remote server to port 8080 on your local machine.</li><li>You can then access the web server running on the remote machine by opening a web browser and navigating to <a href="http://localhost:8080.">http://localhost:8080.</a></li></ul><p>Other utilities such as shuttle and plink can also be used to achieve this task.</p><h4>HTTP Tunneling with Chisel</h4><p>Chisel allows you to create a TCP/UDP tunnel over HTTP and secure it via SSH. It employs the client-server architecture for its operation. This technique can be used to bypass firewalls and access resources that are not directly accessible from your local machine. In my view, I like to think of chisel as Dynamic port forwarding on steroids! The good thing about Chisel is that it works seamlessly with both Windows and Linux systems. You can get chisel from the below repo:</p><p><a href="https://github.com/jpillora/chisel">GitHub - jpillora/chisel: A fast TCP/UDP tunnel over HTTP</a></p><p><strong>Server set up.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*m9pO8DpfCwLlYqRX" /></figure><p><strong>Setting up the client.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*nkCBQYSBgL6CGa0MsBCxBA.png" /></figure><p>If you see this on your attack machine, you are all set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6TOZ5HUYazavHbxy" /></figure><p>Happy Hacking! If you found this helpful, leave a clap for me. Cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33a57dd6dc69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>