Skip to main content

Posts

Damn Vulnerable Android Application by Security Compass - Lab 3 Insecure File Storage

Lab 3 Insecure File Storage Hi, Today we are gonna have a look on Insecure File Storage issue in this we will see the sensitive info of an app is stored in plaintext instead of using some encryption. First of all we login in to the app using default credentials We done some activity on the app like transfers, Statement generation etc. So after some activity in the app we tried to explore its file system using adb shell command we found this As you can see that financial info is present in a file that to in sdcard which is world readable and any app can read this info easily. Solution: Solution is having permission flags on sensitive files, but still this file is readable with root access (Attacker or Root granted permission to an app). Still normal app will not able to access this file outside of its sandbox. In the FilePermissionsSolution branch of the code repository, you will see that we save the file with the private mode set and no longer store...

Damn Vulnerable Android Application by Security Compass - Lab 2 Server Side Authorization Issue

 Lab 2 Server Side Authorization Issue Welcome back my friends now we are gonna have hands on on server side authorization issue in this lab we will use burp proxy try to manipulate the parameters and will see the impact. The server side authorization issue is in bank transfer function of an app as now a days some android apps rely on traditional architecture like REST interfaces to perform the functions. We can intercept the server client communication in 2 ways: 1) Go to settings -->more -->mobile networks --> Access point names create one new access point change proxy option to your proxy IP and change the port to port of proxy and save it. now your communication will be intercepted by proxy. 2)Another way is to start the emulator in proxy mode by giving below command emulator.exe @[AVD name] -http-proxy [proxy IP]:[proxy port] so now we are ready to intercept the communication. Lets launch the app Now as I said the server s...

Damn Vulnerable Android Application by Security Compass - Lab 1 Insecure Connection (Traffic over HTTP)

Lab 1 Insecure Connection (Traffic over HTTP) Here we are gonna do some andoroid app testing for Insecure Connection (Traffic over HTTP) as in previous post I have shown you from downloading the app, instaling it on emulator, setting-up of lab server, its dependencies installation and starting the server. The base (EMM.apk) application will be used throughout the app testing. In this we will sniff the mobile app and server traffic. Android Emmulator can sniff data from android apps and create a .pcap file for this give below command emulator.exe -avd testing -tcpdump testing.cap  Now all the traffic will be captured in testing.cap file Thats it now we are ready to start the server and launch our app. After launching the app it will ask for login credentials as this app is developed on the lines of banking app. Default login credentials: Username: jdoe passwd: password Setting-up Pin  After settin-up of pin we will be logged-in into the app l...

Android Damn Vulnerable App by Security Compass

Tutorial of Android Damn Vulnerable App by Security Compass Introduction: Hi folks, today I am gonna show you some hands on or tutorial of the android app testing which I done during my R&D of android app security testing. Here I will show you from scratch setting up of Lab Server to testing of application. In this you will learn on below topics: 1)Insecure Connection (Traffic over HTTP) 2)Server Side Authorization Issue 3)Insecure File Storage 4)Insecure Logging 5)Encryption of data on device 6)Memory Protection Setting-up of lab (App & Server) First of all you have to download the base app which is damn vulnerable from here . After downloading zip and extracting it you have to build it in .apk format using Eclipse IDE. Now you have to install the app in the emulator before that you have to make sure that you installed SDK and its packages. To install the app you have to start emulator using AVD and clicking on "Start" or by command line emul...

Drozer Commands - A Security & Attack Framework for Android

What is Drozer? Drozer is a Security & Attack Framework for Android Application Testing. Drozer is a tool that can be used for Mobile device review , Secure development of applications, BYOD approval and Mobile application testing. There are 2 Versions of Drozer an Open Source and other one Pro version having following features Gathering the information about the application Find the attack surface Test your Exposure to Public Exploits Execute dynamic code on a device, to avoid the need to compile and install small test scripts. Start Android emulators, provisioned with the drozer Agent and the app you want to investigate. Simulate sensor input, such as GPS, to emulators to test the full attack surface. View the attack surface as a graph. this will be helpful for the risk assessment reporting. Drozer is having agent & server architecture so to start with assessment we have to install the agent in the emulator or connected device. Command to install the Dr...

X-Frame-Options a countermeasure for Click-Jacking.

Introduction: What is Click-Jacking? Click-jacking, also known as a "UI redress attack", It is a malicious technique of tricking a web user into clicking on something different from what the user perceives they are clicking on.  What is an Impact? An attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the top level page. Thus, the attacker is "hijacking" clicks meant for their page and routing them to other another page, most likely owned by another application, domain, or both.Using a similar technique, keystrokes can also be hijacked. With a carefully crafted combination of style sheets, I-frames, and text boxes, a user can be led to believe they are typing in the password to their email or bank account, but are instead typing into an invisible frame controlled by the attacker. How can we Mitigate? We can mitigate the Click-Jacking with the help of...