<?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 Himanshu Goel on Medium]]></title>
        <description><![CDATA[Stories by Himanshu Goel on Medium]]></description>
        <link>https://medium.com/@thehimanshugoel?source=rss-4deac7f3abf8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*21XhtpYbbFGuJNFYTZHmzQ.jpeg</url>
            <title>Stories by Himanshu Goel on Medium</title>
            <link>https://medium.com/@thehimanshugoel?source=rss-4deac7f3abf8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:47:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thehimanshugoel/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[10 Best Security Practices In Android Applications That Every Developer Must Know]]></title>
            <link>https://medium.com/@thehimanshugoel/10-best-security-practices-in-android-applications-that-every-developer-must-know-99c8cd07c0bb?source=rss-4deac7f3abf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/99c8cd07c0bb</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Himanshu Goel]]></dc:creator>
            <pubDate>Mon, 11 May 2020 13:51:00 GMT</pubDate>
            <atom:updated>2020-05-11T13:51:00.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrvnLMa0cgGuozVrhW2qKg.jpeg" /></figure><p>In today’s world we hear almost everyday about some data breach or millions of user accounts sold on the dark web by the group of hackers so it becomes very necessary to implement the security features into an application</p><p>As we store all over sensitive information in the mobile devices it is very crucial to secure all the data .</p><p>Personal information, photos, passwords, credit card information, phone numbers, online transactions can become more vulnerable to the hackers if the application security is not implemented or having flaws.</p><p>Now a days many companies are investing their budget to keep the application secure as security becomes a very high priority thing.</p><h4>What is an Application Security?</h4><p>According to the <a href="https://en.wikipedia.org/wiki/Application_security">Wikipedia</a>, <strong>Application security</strong> encompasses measures taken to improve the security of an <a href="https://en.wikipedia.org/wiki/Application_software">application</a> often by finding, fixing and preventing security <a href="https://en.wikipedia.org/wiki/Vulnerability_(computer_science)">vulnerabilities</a>.</p><h4>Why security breaches happens in an application?</h4><ol><li>It is not a top priority for many organisations.</li><li>Lack of knowledge related to application security makes it more vulnerable to security breaches.</li><li>Apps not updated for security patches.</li></ol><blockquote><strong>Note</strong>: For an end user it is always important to download the app from the trusted download sources like <a href="https://www.apple.com/ios/app-store/">App Store</a> for iOS devices and <a href="https://play.google.com/store">Google Play</a> for Android devices.</blockquote><h4>Best security practices a mobile developer can implement to make application secure</h4><ol><li><strong>Add password checkers to check how strong the password is.</strong></li></ol><p>A good password must have the following qualities :</p><ul><li>It should be at least 8 characters long.</li><li>At least one numerical digit must be present in password.</li><li>Presence of one lower case character and one upper case character.</li><li>It should have at least one special character.</li></ul><p>In Android following code will help to check the strength of the password</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97c873d0a7286e60dc480774d2e66577/href">https://medium.com/media/97c873d0a7286e60dc480774d2e66577/href</a></iframe><p><strong>2. Make Inactive Session Expire .</strong></p><p>In some application which is having high level of security like Banking Apps, your session will be expired after certain period of time(5–15 minutes) if the user is not interacting with the app and will be redirected to the login page.</p><p><strong>3. Force Update The User App If There Is Any Security Vulnerability.</strong></p><p>An app new update depends on the priority of that update.</p><p>If the update PRIORITY is LOW, then it is all up to user choice whether he wants to update or not. Example minor design changes , minor bug fixes</p><p>If the update PRIORITY is HIGH, then user must install latest update before interacting with the app. In this case user can only interact with the app if he installed the latest HIGH priority update. Example security bug fixes, major bug fixes, some new important feature.</p><p><strong>4. Add Features Like 2-Step Verification(Two-Factor Authentication)</strong></p><p>A 2-Step Verification(also known as two-factor authentication), you add an extra layer of security to your account.</p><p>After you set it up, you’ll sign in to your account in two steps using:</p><ul><li>Something you know (your password)</li><li>Something you have (like your phone or a security key dongle)</li></ul><p>For example a user who already setup two-factor authentication during the login process use the USER ID and PASSWORD to login and in second step which is the One-Time Password (OTP). The OTP generated from a 2FA security token or delivered via SMS is typically a string of numbers (numeric) or a combination of alphabets and numbers (alphanumeric) characters. For security reasons, the OTP is designed and be valid only for a short period of time, after which user will have to obtain a new OTP.</p><p><strong>5. Biometric Authentication.</strong></p><p>Biometric authentication helps to identify the user using the unique biological traits.</p><p>Supported biometric types in mobile devices are</p><ul><li>Fingerprint Recognition</li><li>Facial Recognition</li><li>Iris Recognition</li><li>Voice Recognition</li></ul><p>The main advantages of Biometrics are :</p><ul><li>It makes the authentication easy and speedy. User no longer need to remember the passwords.</li><li>Biometrics increased the security. Passwords are easy to steal but biometrics are difficult to clone or hack.</li></ul><p><strong>6. Avoid Rooted Phones</strong></p><p>According to Wikipedia, <strong>Rooting</strong> is the process of allowing users of <a href="https://en.wikipedia.org/wiki/Smartphone">smartphones</a>, <a href="https://en.wikipedia.org/wiki/Tablet_computer">tablets</a> and other devices running the <a href="https://en.wikipedia.org/wiki/Android_(operating_system)">Android</a> <a href="https://en.wikipedia.org/wiki/Mobile_operating_system">mobile operating system</a> to attain <a href="https://en.wikipedia.org/wiki/Privilege_escalation">privileged control</a> (known as <a href="https://en.wikipedia.org/wiki/Root_access">root access</a>) over various Android subsystems. As Android uses the <a href="https://en.wikipedia.org/wiki/Linux_kernel">Linux kernel</a>, rooting an Android device gives similar access to administrative (<a href="https://en.wikipedia.org/wiki/Superuser">superuser</a>) permissions as on <a href="https://en.wikipedia.org/wiki/Linux">Linux</a> or any other <a href="https://en.wikipedia.org/wiki/Unix-like">Unix-like</a> operating system such as <a href="https://en.wikipedia.org/wiki/FreeBSD">FreeBSD</a> or <a href="https://en.wikipedia.org/wiki/MacOS">macOS</a>.</p><p>A developer must add a certain piece of functionality in the code that will check whether the end user device is rooted or not. If it is rooted then he must block the user from operating the App.</p><p>This checking feature is crucial in applications having the Payment Gateway System and Transactions because Rooted phones are more prone to the hacking as they give more power and control to the user or hackers.</p><p>In Android following Code will help to check whether device is rooted or not</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee96599d8ffabb800a3b202aee56d81b/href">https://medium.com/media/ee96599d8ffabb800a3b202aee56d81b/href</a></iframe><p><strong>7. Check For Malicious Apps</strong></p><p>A Malicious App is designed to cause damage to the system or intended to steal user information .</p><p>Four common type of Malicious Mobile Applications are</p><ul><li><strong>Spyware </strong>that tracks the user activities like emails, calls, location, contacts history, user keyboard strokes.</li><li><strong>Phishing Websites </strong>looks exactly the same like the legitimate website but are actually fake webpages intended to steal user credentials . Phishing is common in banking website and social logins.</li><li><strong>Trojans</strong> looks like a legitimate application but are actually malware that are deployed into the system to steal user sensitive data , modify data , delete data, illegal purchases.</li><li><strong>Hidden Processes</strong> that runs in the background and spying on the user behaviour like Payment transaction , online banking.</li></ul><p>A developer must add a piece of code in their Application to check whether the user has any Malicious App or Process running which is harmful for their Application.</p><p><strong>8. Security With HTTPS And SSL</strong></p><p>The most common client-server architecture for web services is REST based on HTTP Protocol and to provide security to this model is to use SSL/TLS standards.</p><p>HTTP combined with SSL creates an encrypted variant called as HTTPS. HTTPS make sure that the communication between client and server is secured and encrypted.</p><p>A developer make sure all the client-server communication in the app will take place over HTTPS connections. As this will provide encrypted and secure communication to the user.</p><p><strong>9. Application Hardening</strong></p><p>Application Hardening is a mechanism that makes a finished application difficult to attack, modify and reverse engineered.</p><p>The most common approach is to obfuscating the source code of the application specially the data and constants that is required to connect to the server.</p><p><strong>10. Penetration Testing</strong></p><p>Penetration testing is done to find the weakness in an app. In penetration testing a simulated environment is created to find the vulnerabilities that an attacker might use and compromise the security of the final application.</p><p>It involves checking weak passwords, unencrypted data, app permissions, protocols etc.</p><p>A developer must do the penetration testing regularly to find the weakness in an application.</p><h4>Bonus Security Tips</h4><p>Below are some bonus security tips I found it very useful in an Android Application</p><ul><li>If your app is based on client-server architecture and have a user login flow then during login process fetch these extra information from the user <strong>Current</strong> <strong>Time</strong>, <strong>UUID, Current Location, Device Type, Android Version. </strong>This will add some extra security to you app.</li><li>In Finance related application for every transaction like online payments, money transfer alert user about the transaction in the form of notifications, email or SMS.</li><li>When the user opens the app check whether user is having any malicious app installed in his system or any other app that you think is harmful for you app . Example a Fake GPS application installed by the user will provide the wrong information of the user location in your app .</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f286ab3456ab2efadc1f788aaa1b96ae/href">https://medium.com/media/f286ab3456ab2efadc1f788aaa1b96ae/href</a></iframe><ul><li>During development process of the app make sure to enable <a href="https://developer.android.com/studio/build/shrink-code">ProGuard</a> feature in <em>build.gradle</em> file of the app . ProGuard helps to obfuscates, shrink and optimize the code. ProGuard makes an application difficult to reverse engineer it.</li></ul><p>While using Android Studio , code optimization is not enabled by default. That is because these compile time optimization will increase the build time of the project . To enable shrinking, obfuscation, and optimization, include the following in your project-level build.gradle file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8267bd79ae12b5aa3c35aedcc82b6fca/href">https://medium.com/media/8267bd79ae12b5aa3c35aedcc82b6fca/href</a></iframe><ul><li>During registration process make sure to send the user data like username/ password on a secured server using SSL/TLS as a security protocol.</li><li>Don’t store any sensitive information like passwords on the client side.</li><li>Make sure server store the passwords in the form of hash instead of plain passwords.</li><li>Don’t store password hash on the app side, it should be on the server side only because if somehow an attacker steals the password hash from the client side then he can use the same hash to login into the server. For more information on this read <a href="https://security.stackexchange.com/a/53609">here</a>.</li><li>If you are sending a large file from app to server and you want to add extra security to it then you can check the integrity of the file by calculating the <a href="https://en.wikipedia.org/wiki/Checksum">checksum</a> on both client and server side. Server after receiving the file will calculate checksum and send checksum value back to the app and then app will calculate the checksum on app side and compare whether the checksum received is equal to the checksum calculated . If they are not equal that means the file is tempered by attacker in between communication.</li></ul><p>In Android following Code will help to check file checksum</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbe03475c19c13f1d98387278fe2d673/href">https://medium.com/media/fbe03475c19c13f1d98387278fe2d673/href</a></iframe><blockquote>For more security tips read <a href="https://developer.android.com/training/articles/security-tips">here</a>.</blockquote><p>Give claps if you enjoyed this one. Thank you</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99c8cd07c0bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>