Pages

Monday 4 November 2013

Install burp CA Certificate in iPhone Simulator

  1. You should have Mac machine with xcode(comes simulator) (either physical or virtual)
  2. To capture SSL traffic for hybrid apps (Native+web) you need to install the proxy certificate (here i am taking burp proxy and portSwiggerCA certificate file)
  3. You should install or Add the certificate in below location
    Library→Application Support→iPhone Simulator→Version(5.0)→Library→KeyChains→TrustStore.sqlite3 database file
  4. Download the iosCertTrustManager.py script from Github and use the below command to add the certificate in TrustStore database
    download the iosCertTrustManager.py script from Github
    Admins-iMac-2:burp admin$ python iosCertTrustManager.py -a PortSwiggerCA

  5. Certificate will be added or replaced successfully.

Tuesday 2 July 2013

Android DDMS File Explorer-Pull/Push file from/to Emulator


Android Emulator- Install Charles CA SSL Certificate in Android Emulator

  1. Open Charles Proxy
  2. Click on Help-->Install Charles CA SSL Certificate..
  3. Certificate will be opened
  4. Click on details tab
  5. Click on Copy file to File-->Next-->Next -->Browse the location to store the certificate
  6. Click on Next-->Finish
  7. Certificate will be created on the file system. 





Install the Certificate
  1.  Launch the Emulator
  2. Use the adb push command to place the certificate in sdcard as shown below.
  1.  Go to Android Emulator-->Settings-->Security
  2.  Click on Install from SD Card



Android Emulator-Intercept Requests/Responses in proxies(Burp Suite)

  1. Proxy should run in a port eg.8888 (localhost)
  2. Start Android Emulator
  3. Go to Settings-->More-->Mobile Networks-->Access Point Names
  4. Create New Access Point Name (APN) and Save that. Or Change the existing APN settings
  5. Select the particular APN as shown below.
    Open the Browser in Emulator and type any URL,observe Requests/Responses are intercept. 



Wednesday 5 June 2013

Android Reverse Engineering-APK Files


To Reverse Engineer apk file you need below softwares
  1. Java
  2. Dex2Jar
  3. JD-Gui (Java Decompiler)
  • Dex2Jar is used to convert .apk file to .jar file
  • jar Command is used to extract all .class files from the .jar file
  • JD-Gui tool is used to convert .class file to .java file
Step 1:














Step 2:























Step 3:
Open Java Decompiler










































Monday 13 May 2013

How to install/uninstall apk files in emulator using adb commands


Start Emulator from Command Line:
C:\Documents and Settings\koti>emulator -avd AVD_for_3_2in_QVGA_ADP2

Install apk file:
D:\Android App Security\APK files>adb install com.android.myproject.apk
287 KB/s (4076015 bytes in 13.859s)
        pkg: /data/local/tmp/com.android.myproject.apk
Success
Go to Shell:(Emulator should be enabled)


C:\Documents and Settings\koti>adb shell
root@android:/ # cd data
cd data
root@android:/data # cd data
cd data
root@android:/data/data # ls
ls
com.android.backupconfirm
com.android.browser
com.android.calculator2
com.android.calendar
com.android.camera
com.android.certinstaller
com.android.contacts
com.android.customlocale2
com.android.defcontainer
com.android.deskclock
com.android.development
com.android.development_settings
com.android.dreams.basic
com.android.dreams.phototable
com.android.emulator.connectivity.test
com.android.emulator.gps.test
com.android.exchange
com.android.fallback
com.android.gallery
com.android.gesture.builder
com.android.htmlviewer
....
....

Uninstalling the app:
root@android:/data/data # adb uninstall com.android.myproject
adb uninstall com.android.myproject
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
Success