<?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 Sudobro on Medium]]></title>
        <description><![CDATA[Stories by Sudobro on Medium]]></description>
        <link>https://medium.com/@sudobro?source=rss-4082f443a5e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fJsE9mCIQeD3nf-djw2v7g.jpeg</url>
            <title>Stories by Sudobro on Medium</title>
            <link>https://medium.com/@sudobro?source=rss-4082f443a5e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:01:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sudobro/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[Mastering the Art of Crafting and Utilizing Distinctive Passwords]]></title>
            <link>https://medium.com/@sudobro/mastering-the-art-of-crafting-and-utilizing-distinctive-passwords-23c628ce7f50?source=rss-4082f443a5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/23c628ce7f50</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[passwords]]></category>
            <category><![CDATA[identity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <dc:creator><![CDATA[Sudobro]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 14:04:04 GMT</pubDate>
            <atom:updated>2024-02-14T14:04:04.709Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvuPGjZlafgI3p2DdCvrdg.jpeg" /></figure><p>In an era dominated by digital connectivity, passwords serve as the guardians of our virtual lives. From email accounts to social media platforms, from work-related tools to online banking, passwords are the first line of defense against unauthorized access. However, the growing sophistication of cyber threats necessitates a proactive approach to password security. This blog post aims to guide you through the process of creating and using strong, unique passwords to fortify your digital presence.</p><blockquote><em>To begin, let’s establish the definition of a password.</em></blockquote><h3><strong>What is a Password?</strong></h3><p>A password, sometimes called a passcode, is a secret word or phrase that must be used to gain admission to a place or platform. It can also be used to confirm a user’s identity.</p><blockquote><em>Moving forward, let’s delve into the creation of robust passwords and explore the optimal practices associated with them.</em></blockquote><h3><strong>Tips and Usage of a Strong Password</strong></h3><ul><li><strong>Length</strong></li></ul><p>To ensure the strength of your password, aim for at least 12 characters. The longer your password, the more difficult it is to crack.</p><ul><li><strong>Avoid Personal Information</strong></li></ul><p>Avoid providing easily guessable information, such as your name, birthdate, school, location, occupation, or common words. Cybercriminals frequently utilize personal information to hack passwords.</p><ul><li><strong>Randomness Is Key</strong></li></ul><p>Create a password that looks to be random and does not follow any recognizable patterns. Avoid employing sequences or easily guessed combinations.</p><ul><li><strong>Mix It Up</strong></li></ul><p>Your password should contain uppercase and lowercase letters, numbers, and symbols (e.g. H$na!2Pd1). This variety makes it more resistant to both brute force attacks and dictionary-based hacking attempts.</p><ul><li><strong>Unique for Each Account</strong></li></ul><p>Avoid the temptation to reuse the same password for different accounts. If one account is compromised, employing separate passwords for each service ensures that your other accounts are still secure.</p><ul><li><strong>Update Regularly</strong></li></ul><p>Regularly update your passwords, especially for crucial accounts. This habit enhances security and reduces the likelihood of prolonged vulnerability.</p><p>In conclusion, by adhering to these guidelines and embracing sound password practices, you can establish a robust defense against cyber threats, guaranteeing the security of your personal and sensitive information.</p><blockquote><em>“Remember, in the digital realm, your password is the key to your kingdom. Guard it fiercely, let it be your shield against the unseen. Stay secure, stay savvy, and may your digital adventures always be password-protected. Until next time, lock on!”</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23c628ce7f50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diva Android App Walkthrough — Part 2]]></title>
            <link>https://medium.com/@sudobro/diva-android-app-walkthrough-part-2-fbb50473cfb2?source=rss-4082f443a5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbb50473cfb2</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Sudobro]]></dc:creator>
            <pubDate>Tue, 13 Jun 2023 08:54:43 GMT</pubDate>
            <atom:updated>2023-06-13T08:54:43.677Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diva Android App Walkthrough — Part 2</h3><p>In this article, I am going to complete the DIVA Android App Walkthrough. Check out <a href="https://medium.com/@thecyberprince/diva-beta-android-app-walkthrough-4b0f114aa74">part one</a> to see how to setup the application, and I have also solved some vulnerabilities. The DIVA Android app was developed by GitHub user <a href="https://github.com/payatu">payatu</a>. It was designed to assist developers and security enthusiasts in learning more about Android vulnerabilities by evaluating a deliberately vulnerable Android application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*D9-h_U5ICGJ8YmFMdn_yoA.png" /></figure><h4>9. ACCESS CONTROL ISSUES — PART 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*IoYh8AQIkvcO-nkhvBv-Zg.png" /></figure><p>Using <strong><em>Jadx-gui </em></strong>to read the source code of the application, I found the vulnerable code that shows the action to access the API credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*Zm1AUdrCC5ZYuYo2B3KOEg.png" /></figure><p>Let’s use PowerShell to start the activity to access the API credentials.</p><blockquote>First, run <strong>adb shell </strong>to get root access of the android device.</blockquote><blockquote>Next, run <strong>am start -a jakhar.aseem.diva.action.VIEW_CREDS<em> </em></strong>to start the activity to bypass the “VIEW API CREDENTIALS” button.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*OCt_oR4-OGAXtSE6gzVUJQ.png" /></figure><p>This is the result you will get after previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*LmGf8S4rUCL3e3jiut0bvA.png" /></figure><h4>10. ACCESS CONTROL ISSUES — PART 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*JxafpWxPrzdNdSKss62ZLg.png" /></figure><p>Using <strong><em>Jadx-gui </em></strong>to read the source code of the application, we can see the activity to view our Tveeter API credentials, but we need to bypass the activity that asks for the pin received from Tveeter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*YpDhE9j3BmOcPTvq3J475Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*sMADPNgeG3phaD7wzXFd5Q.png" /></figure><p>I used <strong><em>Jadx-gui </em></strong>to find the activity for “pin received from Tveeter”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*utRwD5ll3N5Yg-IJwg7WGg.png" /></figure><p>Now, we are going to use PowerShell to start the activity without using the application.</p><blockquote>Run <strong>adb shell</strong> to get root access to the Android device.</blockquote><blockquote>Next, run <strong>am start -n jakhar.aseem.diva/.APICreds2Activity -a jakhar.aseem.diva.action/.VIEW_CREDS2 — ez check_pin false</strong> to start the activity that will display the Tveeter API credentials.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*7hZ406uzfAyK-PGk43CLaQ.png" /></figure><p>If successful, you are going to get this result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*bHbg_QFnIC-PUnU83hHbqw.png" /></figure><h4>11. ACCESS CONTROL ISSUES — PART 3</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*EeUqDbwkKv4pKpDlCGFGog.png" /></figure><p>Using <strong><em>Jadx-gui </em></strong>to read the source code of the application, I found the location where the pin is stored.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*Sowp37KHmeP_nlWu2LbXNA.png" /></figure><blockquote>Run <strong>adb shell</strong> to get root access to the Android device.</blockquote><blockquote>Next, run <strong>cd data/data/jakhar.aseem.diva/shared_prefs/</strong> to access the shared preferences folder then <strong>ls<em> </em></strong>to list the items in the directory.</blockquote><blockquote>Run <strong>cat jakhar.aseem.diva_preferences.xml</strong> to read the xml file.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*WUiU2jtCPn1Qp0jWb4pdAw.png" /></figure><p>Use <strong><em>Jadx-gui </em></strong>to find the vulnerable code to access the private notes without using the pin created by the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*RYUN1zmp5STKDz7zfn8Xnw.png" /></figure><p>Using content query, let’s run the vulnerable code to get the private notes.</p><blockquote>Run <strong>content query --uri content://jakhar.aseem.diva.provider</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*VahszK52V42-Md7ulzZSuA.png" /></figure><h4>12. HARDCODING ISSUES — PART 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*PX5zlObCafU1aqPKvmwEug.png" /></figure><p>Use <strong><em>Jadx-gui</em></strong> to read the source code of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*gGjliLm-PvuOQYp9qE2jGg.png" /></figure><p>In the image above, we can see that it creates an instance called “private DivaJni”. Looking at the private DivaJni source code, it shows that it uses a soName, which is located in the system library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*gJ_8YtIVDSUx6UkfI2JApg.png" /></figure><p>To locate the soName file “divajni” in Jadx-gui, go to resources&gt;lib&gt;x86&gt;libdivajni.so</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*mEvtEO1HGp4Kw3CP2iIRyg.png" /></figure><p>To access the file from the device, we need to follow the following steps</p><blockquote>Run<strong><em> </em>adb shell</strong> to gain root access to the device.</blockquote><blockquote>Next, run <strong>cd/data/data/jakhar.aseem.diva</strong> to enter the directory then <strong>ls </strong>to list the items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*TX56BnUd0Vg07Db1Sj0GRw.png" /></figure><blockquote>Run <strong>cd lib</strong> to the enter the directory then <strong><em>ls</em></strong> to list the items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*PswjVtSXWAZ1o0doVRJ57w.png" /></figure><p>Using the <strong><em>strings</em></strong> command, we can read the information inside the file.</p><blockquote>Run <strong>strings libdivajni.so</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*NNt0OEO5CMCA6--IaOR5pg.png" /></figure><p>Now, we have different possible vendor keys in this file, and trying them one by one will take forever. So I did research on the Diva Android repository to see if the vendor key was embedded in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9Mzsp6r10_GeaudaLJVOmQ.png" /></figure><p>Using Google, search for “Diva” on Github, go to “<a href="https://github.com/payatu/diva-android">Payatu/diva-android</a>” then app/src/main/jni/divajini.c</p><p>If you read the source code, you will find the vendor key embedded in it. Now, we are going to try the key and see what response we get.</p><p>You will get this result if you use the vendor key that was embedded in the source code of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*RQx49-veqqPNFothyGHEYg.png" /></figure><h4>13. Input Validation Issues — Part 3</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*KI83Tgk6TcVVUQVyq2rKwg.png" /></figure><p>To cause a denial of service attack on this application, we have to run repeated random numbers as many times as we like. For example, if we try this once or twice, the application won’t crash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*6u0XMXfh8F5UBaHpbUFrbw.png" /></figure><p>Now, let’s increase the number of random numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*07yPpUI6mqB0t9i36Fwl7A.png" /></figure><p>Result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*BzTzS1tz_uyfjzDvawrDbA.png" /></figure><h4>Closing Remarks</h4><p>This finishes Part 2 of my guide for the DIVA Android app. Throughout this series of blogs, I have attempted to demonstrate the different vulnerabilities present in the application. Feel free to check out Part 1 if you have not already done so. Thank you for reading, and till next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbb50473cfb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diva Android App Walkthrough — Part 1]]></title>
            <link>https://medium.com/@sudobro/diva-beta-android-app-walkthrough-4b0f114aa74?source=rss-4082f443a5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b0f114aa74</guid>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Sudobro]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 20:23:16 GMT</pubDate>
            <atom:updated>2023-06-13T08:56:21.014Z</atom:updated>
            <content:encoded><![CDATA[<p>Diva Android App Walkthrough — Part 1</p><p>In this article, I’ll look at the DIVA Android app developed by Github user <a href="https://github.com/payatu">payatu</a>. It was designed to assist developers and security enthusiasts in learning more about Android vulnerabilities by evaluating a deliberately vulnerable Android application. There is a link to the application’s Github repository in the installation section of this write-up, which contains a list of vulnerabilities that are currently present in the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*D9-h_U5ICGJ8YmFMdn_yoA.png" /></figure><h4><strong>Disclaimer</strong></h4><p>I was motivated to write the article because I wanted to understand more about Android mobile application security. This article will obviously help you solve the vulnerabilities present in the DIVA Android application. I encourage readers to exploit as many vulnerabilities as they can and then come back later to read this article if you get stuck or want to see a potentially different approach to exploiting the vulnerabilities. Let’s get started on the installation right away.😁</p><h4><strong>Installation</strong></h4><p>This section involves all the applications I will be using to carry out the vulnerability testing.</p><ol><li>Android Studio</li></ol><blockquote>If you don’t have android studio installed, click <a href="https://developer.android.com/studio?gclid=CjwKCAjwvdajBhBEEiwAeMh1UzVkWmhVjY5bKIQN7ozx6n1jPLksknxhLXoPjczwU893f0VSBgyKaBoCon4QAvD_BwE&amp;gclsrc=aw.ds">here</a> to download it.</blockquote><p>2. SDK Platform Tools</p><blockquote>To download the SDK Platform Tools, click <a href="https://developer.android.com/tools/releases/platform-tools#downloads.html">here</a>.</blockquote><blockquote>Extract and Copy the downloaded platform tools to path in environment variables.</blockquote><p>3. DIVA apk</p><blockquote>To download the apk file, click <a href="https://github.com/payatu/diva-android/tree/master">here</a> to download it from GitHub.</blockquote><p>4. Jadx-gui</p><blockquote>To download jadx-gui, click <a href="https://github.com/skylot/jadx/releases/download/v1.4.7/jadx-gui-1.4.7-no-jre-win.exe">here</a>.</blockquote><p>5. Akptool</p><blockquote>We are going to download two different files. The first one will be apktool.jar; click <a href="https://github.com/iBotPeaches/Apktool/releases/download/v2.7.0/apktool_2.7.0.jar">here</a> to download it. The second one will be a zip file; click <a href="https://github.com/iBotPeaches/Apktool/archive/refs/tags/v2.7.0.zip">here</a> to download it.</blockquote><blockquote>Next, locate apktool.jar and copy it to windows.</blockquote><blockquote>Then locate <em>apktool.bat</em> in Apktool\scripts\windows and copy it to windows.</blockquote><blockquote>Copy the windows path to path in environment variables.</blockquote><p>6. Java runtime environment (optional)</p><blockquote>If you don’t have the JDK Development kit installed, apktool won’t work. To solve this issue, click <a href="https://download.oracle.com/java/20/latest/jdk-20_windows-x64_bin.exe">here</a>.</blockquote><blockquote>Copy the installed Java file path to path in environment variables</blockquote><h4><strong>How to install diva apk on the android device</strong></h4><p>Open <strong><em>powershell </em></strong>and run the following command.</p><p>I used <strong><em>Android Debug Bridge (adb)</em></strong> to verify my emulator is running and install my DIVA apk file.</p><p>N.B: <strong><em>Android Debug Bridge (adb)</em></strong> is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.</p><blockquote><strong>adb devices</strong></blockquote><p>This command will show us if the android device is running on the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19dH03kwqhSRUBmzN2gWRQ.png" /></figure><p>Using <strong><em>powershell, </em></strong>locate the diva apk</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*A_kL-H1TS9G2P_bk6CFR9g.png" /></figure><blockquote>run the following command, <strong><em>adb install diva-beta.apk</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*ao_UzDXexA4t1Ww0AP-o5Q.png" /></figure><p>After successfully installing it, you should be able to see it in your android device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*3wtbYxmBYZp5HL2cALiXkw.png" /></figure><p>Tap (Click) on the Diva app icon to launch the application.</p><h4><strong>1. INSECURE LOGGING</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*Pzg1VR88aSgzzPmE4Dz2RA.png" /></figure><p>First, I used<strong><em> Jadx-gui </em></strong>to read the source code to find the vulnerable code causing the insecure logging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*7jniM5d24GiEPZaqJ3HE_A.png" /></figure><p>From the image above, we can see that the insecure logging is happening in the public void section. When the user inputs their credentials, they are stored in <strong><em>diva-log</em></strong> and converted to strings, making them visible to plain eyes and anyone who gets access to <strong><em>diva-log</em></strong>.</p><blockquote>Then you run <strong>adb shell ps </strong>to see the process ID (PID).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*5N9xRpxjXYGMpqMumL8m5w.png" /></figure><blockquote>Using the shell permission, you run <strong>logcat | grep 6530, </strong>i.e., you want to get hold of the process involved when a user inserts their credentials in the input form provided.</blockquote><p>Note: 6530 is the process ID (PID).</p><p>Logcat is a command-line tool that dumps a log of system messages including messages that you have written from your app with the Log class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMJkhPFBz5CURgrpx5cXTA.png" /></figure><p>Conclusion: It shows that the logging of credentials or sensitive information is not secured, making it available to anyone going through the logs of the device.</p><h4>2. <strong>HARCODING ISSUES — PART 1</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*Zj3n-rP8I4UGPzUpIpmJyg.png" /></figure><p>First, you use<strong><em> Jadx-gui </em></strong>to find the location of the vulnerable code in the source code of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*cbmUi1oNrJbbxB-Twp31GQ.png" /></figure><p>From the image above, when a user inserts the vendor key, the user will get a response depending on the outcome of the vendor key. If the vendor is equal to <strong>vendorsecretkey</strong>, it will display <strong><em>Access granted! See you on the other side;</em></strong><em> </em>otherwise, it displays <strong><em>Access Denied! See you in hell!</em></strong></p><p>From this explanation, we can see that the developer made it easy for anyone who has access to the source code by leaving the correct vendor key in the source code of the application.</p><p>This is the feedback the user get when successfully logged in with the right vendor key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*iZ0W5Sqq4AiaRgKfyP5T-Q.png" /></figure><p>This is the feedback the user get when successfully logged in with the wrong vendor key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/1*_oC26ry9iNEkg7Rzoj9V0g.png" /></figure><h4>3. <strong>INSECURE DATA STORAGE — PART 1</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*YLQnubGCRapbcueeMOOGzw.png" /></figure><p>Using <strong><em>Jadx-gui</em></strong> to read the source code of the application, we can see the directory in which the user credentials are stored, and with our terminal, we can get root access and find the location of the directory on the Android device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*C2iLg4SlUO--OuInlgdZpw.png" /></figure><p>The image below shows the details provided by the user and the response received after clicking the save button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*sPbioc6a8QQ0KTvS0uV6iQ.png" /></figure><blockquote>Run <strong>adb shell </strong>to gain root access to the Android device and <strong>ls</strong> to list all the files in the directory.</blockquote><blockquote>Next, run <strong>cd data/data/ </strong>to enter the directory and <strong>ls</strong> to list all the files in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*72XyEbtOvJXNJAd2wrszvg.png" /></figure><blockquote>Run<strong> cd jakhar.aseem.diva</strong> to enter the directory and <strong>ls</strong> to list the files in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*J6V5WAo1hz55L-gyLQZpyw.png" /></figure><p>From the image above, we found the shared preferences directory</p><blockquote>To access the directory, run <strong>cd shared_prefs</strong> and <strong>ls </strong>to list the items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*MrfI3xilDTcwCglqppO8JA.png" /></figure><blockquote>Now, run <strong>cat jakhar.aseem.diva_preferences.xml </strong>to read the xml file.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*Cz6A-HCKJwn4fx586yhhtA.png" /></figure><p>Conclusion: Storing credentials in plain text is referred to as an insecure way of storing data.</p><h4>4. <strong>INSECURE DATA STORAGE — PART 2</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*7min6XHopymFa8TjscyinA.png" /></figure><p>First, we are going to use <strong><em>Jadx-gui</em></strong> to analyze the source code to find the vulnerability of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*E9wfmHBjJjwrcJYz39bj5A.png" /></figure><p>From the image above, we can see the location of the stored credentials and the way they are being stored, which is in a SQL database format. Now, we are going to gain root access on the Android device and locate the database where <strong>ids2 </strong>is stored to see if it is a directory or a readable file.</p><p>Before gaining root access on the device, we are going to insert user credentials to get something saved in the databases and then locate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*wyXUxX_E4376Xd18ttAbvw.png" /></figure><blockquote>First, gain root access to the device using the <strong>adb shell. </strong>Then, run <strong>cd data/data/jakhar.aseem.diva/databases/ </strong>to the directory and <strong>ls </strong>to list the items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*PWe-IXLQnmkWb_-Qnuikig.png" /></figure><blockquote>Run <strong>ls -la </strong>to list all the files and items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*HseNN-evaLtBV-ZAWIRw7Q.png" /></figure><p>To read the sql format in <strong>ids2</strong>, exit the root access to the android device and pull the file to your system.</p><blockquote>Run <strong>adb pull /data/data/jakhar.aseem.diva/databases/ids2</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*Zck0cV2Yek1gtHMBWcUtiw.png" /></figure><p>Let’s use sqlite viewer to read the <strong>ids2 </strong>file, click <a href="https://inloop.github.io/sqlite-viewer/">here</a> to go the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*WRT1xwIzpvvlay_PHN9Bgg.png" /></figure><p>Drag and drop the <strong>ids2 </strong>file, and change the <strong>android_metadata </strong>to <strong>myuser </strong>to view the credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*Lkl0MsM2h3R5PI-h5VLk7w.png" /></figure><h4>5. <strong>INSECURE DATA STORAGE — PART 3</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*zXaHmwVHlywzj1fuGjHINQ.png" /></figure><p>Using <strong><em>Jadx-gui </em></strong>read the source code to find the vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*YiHZQtdJqJsU84BBKN2u5A.png" /></figure><p>We found out that the application created a temp file named <strong>uinfo.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*6Fv_x7YGo_LA9HzH1YujMw.png" /></figure><blockquote>To access the stored credential, I used <strong><em>adb shell to </em></strong>gain root access of the android device.</blockquote><blockquote>Run <strong><em>cd data/data/jakhar.aseem.diva/ </em></strong>to enter the application directory and <strong><em>ls -la </em></strong>to list all the files and directories under the specified directory.</blockquote><blockquote>Next, use <strong><em>cat uinfo44475423tmp </em></strong>to print the file content to a standard output.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*Wydxd7fL89m7wYMTX3Om1Q.png" /></figure><p>Conclusion: From the image above, we can see the user credentials present in the location we got when using <strong><em>Jadx-gui.</em></strong></p><h4>6. INSECURE DATA STORAGE — PART 4</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/261/1*hRZgxTpXDsLkQHxDKQuxng.png" /></figure><p>Using <strong><em>Jadx-gui </em></strong>to read the source code of the application, I found out the location where the user credentials are being stored and the name of the file, which is on the external storage device on the Android phone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*lpRmpFQ9u-xyRpAoup4_Yg.png" /></figure><p>If you try to input any credential, you will get an error because the application has not been given the password to anything on the SD card.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*qI05n2WYIygw0JBI2CnBog.png" /></figure><p>Change the storage permission of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*bDimXPMgPc-kCwhNNsEq5Q.png" /></figure><blockquote>To begin, run <strong><em>adb shell </em></strong>to gain root access of the device and <strong><em>ls </em></strong>to list all the items in the directory</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*g4KElPmUtxDgLutIqYaVqQ.png" /></figure><blockquote>Run <strong><em>cd mnt </em></strong>to access the external storage on the Android device and <strong><em>ls </em></strong>to list the items in the directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*-T775xF5cL0VXlmDdL_yWw.png" /></figure><blockquote>Next, run <strong>cd sdcard<em> </em></strong>to enter the directory and <strong>ls -la<em> </em></strong>to list all the items in the directory.</blockquote><blockquote>Run <strong>cat uinfo.txt</strong> to print out the content of the file to a standard output.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*ueNIk6vduN-TVZmVtm_ocw.png" /></figure><p>Conclusion: You can see that if you use <strong><em>ls </em></strong>to list the items in the directory, you won’t see uinfo.txt. Therefore, it is advised to try both commands if you suspect the file is in that directory.</p><h4>7. INPUT VALIDATION ISSUES — PART 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*04jnrjqqqB8HLgH10FTXVg.png" /></figure><p>Using<strong><em> Jadx-gui </em></strong>to read the source code of the application, you will notice that this input validation is vulnerable to SQL injection. Also, you can see all three user credentials present in the database just by reading the source without digging deep, which is not a safe way to store credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*psNEc9ol5Se2OuVp1WmrCQ.png" /></figure><p>Let’s try a random user credential and see what response we get.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*1Ui00g1aCfiBG-bw9niwSg.png" /></figure><p>Now, let’s use SQL injection to bypass the search validation and get all three credentials in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*_n1phqwCb9MCbaiX23z1hQ.png" /></figure><h4>8. INPUT VALIDATION ISSUES — PART 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*1-iEKaAhNSdBhteGYVpvnQ.png" /></figure><p>This challenge is about accessing sensitive information using the file path of the sensitive information. Let’s try the file path from the previous challenge (vuln 6).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*y_LPUI0iUQdacGtjmfELxg.png" /></figure><h4>Closing Remarks</h4><p>This finishes Part 1 of my guide for the “DIVA” Android app. Part 2 will look into other vulnerabilities in the application and demonstrate how they can be exploited. Thank you for sticking with me until the finish; I’ll see you in Part 2!🖖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b0f114aa74" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>