marginaldeer

char nick[4] = "marg";

char full_nick[12] = "marginaldeer";

printf("https://github.com/%s\n",full_nick);

printf("%s\x40marginaldeer\x2ecom\n",nick);

puts("63DD 76E6 3428 1285 CD8B E3F5 7509 1985 DF70 E945");

Android Pentest Lab Build

Nov 21, 2018 • android,linux,lab,pentest

This post will discuss the steps necessary to setup an Android lab environment where APKs can be loaded and played with.

The first step is to install Android Studio. I am using Arch Linux as my base OS for this lab. With the right know how these installation steps can be adapted to any OS you’d like.

Make sure you have an AUR package manager such as ‘yay’ installed if you’re building this on Arch!

yay -S android-studio android-emulator

Screenshot

These installation packages are large and may take some time to complete the installation process on your system.

We will test that our PATH variable is setup correctly by running:

adb --help

You should see something like this:

Screenshot

Since yay installs Android Studio as root into /opt/android-sdk/ we need to modify some permissions on the directory. We create a new group sdkusers and assign our non-root user as a member then change the group that owns the files to the group. Obviously, change the username from marg to your username. The last command will make our current terminal session aware of the new group.

groupadd sdkusers
gpasswd -a marg sdkusers
chown -R :sdkusers /opt/android-sdk/
chmod -R g+w /opt/android-sdk/
newgrp sdkusers

Let’s now launch Anrdoid Studio as our non-root user and run through the initial configuration.

android-studio

Below are the options I selected for my initial configuration. Feel free to modify however you prefer.

Screenshot Screenshot Screenshot Screenshot

Setup will download and update all the necessary componenets which may take some time to complete. Once it completes you can finally click finish. If all goes well you should be presented with this screen:

Screenshot

Go ahead and create a project selecting whatever options you’d like. It doesn’t really matter what we choose because we just want to get to the Android Virtual Device Manager.

Once your project is loaded up into the IDE environment, click the AVD Manager icon located in the upper right corner.

Screenshot

Click Create Virtual Device...

This is where the fun begins and you can make selections on the deivce you want to emulate. For my situation I selected Pixel.

Screenshot

Next, we need to select an image that we will download and run on the emulated phone. For my purposes I selected a 7.1.1 build and clicked Download to the right of the release name.

Screenshot

I accepted all the default options in the Download diaglog that appeared. This step may take some time since we’re downloading a large system image. Click finish and you should be presented with the same screen as before. Click Next to continue.

On the last screen of the new device wizard I made no changes, but I incourage you to mess around with the options available to you. Finally, select Finish.

Screenshot

With the setup and installation of the emulated device complete let’s go ahead and give it a test run. In the AVD Manager click the play button in the actions column.

Screenshot

If everything has gone successfully, you will be presented with an emulation of an android device!

Screenshot

I will be following up this walkthrough with more articles on how we can take advantage of this emulated device.

If you enjoyed this post please consider subscribing to the feed!