Monday, March 9, 2015

Sublime Text 3. Great code editor.

Download from here:
http://www.sublimetext.com/3

View/Edit code:
1. Just drag and drop file to the Sublime icon. And sublime will open it.

To Install package:
1. Install Package Control, go to:
https://packagecontrol.io/installation
2. Copy code, now open 'Sublime' go to 'View' -> 'Show Console', paste code and enter. Done.
3. Cmd+ Shift + P , type "Install Package"
4. For ex: Dayle Rees (to add color schemes)

Some cool packages to install:
-predwan (nicer tabs)
-Dayle Rees (color scheme)
-Brackethighlighter (highlights brackets)
-SideBarEnhancement (more sideBar options)
-sublimecodeIntel (code completion)
more.....

To Remove package:
1. Cmd+ Shift + P , type "Remove Package"
2. Select package to remove



Reference:
https://www.youtube.com/watch?v=zVLJfrIwEP8

You can google and find different plugins for Sublime. I highly recommended :)

Friday, March 6, 2015

Reverse Engineer Android App. Decompile with dex2jar(using Mac)

Work in progress....

Setup:
1. First download dex2jar fille from:
http://karanbalkar.com/2014/05/convert-apk-file-to-jar-using-dex2jar/

2. Download JD-GUI:
http://jd.benow.ca/

3. Pull apk from device to machine.


How to use:
1. Now run Dex2jar, drag and drop file "MyApp.apk" to the dex2jar directory(terminal)
Command:
/Dex2-jar/dex2jar-0.0.9.15$ sh d2j-dex2jar.sh '/home/andsand/Desktop/dex2jar_Dir/apk_location/MyApp.apk'

Output:
dex2jar /home/andsand/Desktop/dex2jar_Dir/apk_location/MyApp-1.apk -> MyApp-1-dex2jar.jar


6. Output will generate a jar file in the dex2jar directory...
In this case is name: MyApp-1-dex2jar.jar


Next step:
1. open MyApp-1-dex2jar.jar with JD-GUI  to see code.
2. Click on icon  JD-GUI
3. Now select and open the MyApp-1-dex2jar.jar file, you can  see the code. You can drag and drop jar file to JD-GUI.
4. File -> Save all Sources (this will create a zip file with all the source code)
5. PS. You can open the source code file with sublime or any other code editor, to analyze the code.

And done now you can analyze the code of the app, make changes, compile and sign manually the app.


Thursday, March 5, 2015

Activator



Start:
Andress-MBP:~ andres$ cd /Users/andres/Development/Activator/activator-1.2.12/

Andress-MBP:activator-1.2.12 andres$ ./activator new

Fetching the latest list of templates...

Browse the list of templates: http://typesafe.com/activator/templates
Choose from these featured templates or enter a template name:
  1) minimal-akka-java-seed
  2) minimal-akka-scala-seed
  3) minimal-java
  4) minimal-scala
  5) play-java
  6) play-scala
(hit tab to see a list of all templates)



refrence:
https://www.youtube.com/watch?v=eNCerkVyQdc

Add "adb" to your PATH (using a Mac)

ADB- Android Debug Bridge

1. Find the path to your Android/sdk/platform-tools
$pwd to get the full location path
Location: Users/android/Library/Android/sdk/platform-tools

2. Now open bash_profile,
$vi ~/.bash_profile
enter: export PATH=${PATH}:/((pathToyour_AndroidSDK))

export PATH=${PATH}:/Users/android/Library/Android/sdk/platform-tools

and save.

3. Quit terminal and Done. Now when you type $adb, the tool will work from any /dir in your mac



Reference:
adb:
http://developer.android.com/tools/help/adb.html
https://seo-michael.co.uk/how-to-setup-adb-on-os-x/

Install Android Studio:
https://developer.android.com/sdk/installing/index.html?pkg=studio

Install Java JDK, if not installed, check with $jave -version
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Add adb to path:
http://www.android.gs/install-set-up-adb-mac-os-x-linux/

Monday, February 23, 2015

SCALA ANGULARJS PLAY MONGO

 How to run Typesafe activator ui from terminal:

This tutorial is mainly shortcuts :)

A. Start Acitvator UI
1. open terminal
2. $cd /Users/andres/Development/Activator/activator-1.2.12
3. $open activator
->Now activator ui running on http://127.0.0.1:8888/

B. Now start mongoDB
1. open terminal
2. $ sudo mongod
3. enter password
 http://docs.mongodb.org/manual/reference/program/mongod/#bin.mongod
-> Now mongodb is running locally

C. Play running: http://localhost:9000/#

Installations:
1. Install node $brew install node
2. Install bower $npm install -g bower
3. Install angular UI Bootstrap: $bower install angular-bootstrap


Reference:
https://typesafe.com/activator/template/modern-web-template

Good tutorial:
http://127.0.0.1:8888/app/modern-web-template/#tutorial/3

Sunday, February 22, 2015

intro to MongoDB





Installation
Update homebrew:
$brew update
Install MongoDB binaries:
$brew install mongodb
Run MongoDB
$sudo mkdir -p /data/db //enter password
Start:
$sudo mongod
Remove:
$brew uninstall mongodb

Start Mongo:
$mongo

$show dbs
http://docs.mongodb.org/manual/reference/mongo-shell/


Reference:
http://docs.mongodb.org/manual/reference/program/mongod/#bin.mongod
https://www.youtube.com/watch?v=_rAPWkRqOP4
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/

See Mongo data, insert, update, remove, find:
1. Open terminal and type below commands
$mongo
$shows dbs
$use NameOfDBs
$show collections
>users
$db.users.find()



Commands:

Query commands reference:
Examples:

Insert
> db.users.insert({"age" : "333", "firstName" : "iOS", "lastName" : "testing", "active" : true })

Update
> db.users.update({lastName: "Doe"})

Delete
> db.users.remove({lastName: "Doe"})

Find
> db.users.find({lastName: "11"})

> db.users.find({lastName: "11"})
{ "_id" : ObjectId("54ea92ce5d479d97c791df10"), "age" : 21, "firstName" : "Andres", "lastName" : "11", "active" : true }
{ "_id" : ObjectId("54ead8235d479d97c791df11"), "age" : 21, "firstName" : "Nico", "lastName" : "11", "active" : true }
{ "_id" : ObjectId("54efed3eb293b0b6d0aa208d"), "age" : 21, "firstName" : "Marco", "lastName" : "11", "active" : true }



Kill MongoDB:
1. Open terminal and type below commands
$pgrep mongo
584
$kill 584
Refrerence:
http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
Done :)

Tuesday, February 17, 2015

"Snoop-it" setup iOS Pentesting tool



Getting Started:
  1. Add the Cydia repository repo.nesolabs.de and install the provided Snoop-it package
    • Go to the "Manage" Tab in Cydia
    • Click the "Edit" button
    • Click the "Add" button
    • Enter the URL http://repo.nesolabs.de/ and click the "Add Source" button
    • After Cydia finished updating, click the "Return to Cydia" button
    • Choose the new repository "NESO Security Labs GmbH"
    • Choose "Snoop-it"
    • Click the "Install" button
    • Click the "Confirm" button
    • Now device will reboot
  2. Now the Snoop-it app will appear in your SpringBoard.
  3. Using the Snoop-it Configuration App, please select the Apps (System/Cydia/AppStore) to analyze
  4. Adjust some Snoop-it settings (like e.g. the listening port of the web interface, authentication, tracing etc.)
  5. Run the selected App & point your browser to the Snoop-it web interface.
Now you can see whats going on your app

How to use:
coming soon...

References:
https://www.youtube.com/watch?v=NEmV0J02O4k
https://code.google.com/p/snoop-it/wiki/GettingStarted
http://resources.infosecinstitute.com/ios-application-security-part-9-analyzing-security-of-ios-applications-using-snoop-it/
http://www.sectechno.com/snoop-it-tool-to-assist-security-assessments-and-dynamic-analysis-of-ios-apps/