• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2021
  • October
  • 31
  • Dockerized-Android – A Container-Based Framework To Enable The Integration Of Mobile Components In Security Training Platforms

Dockerized-Android – A Container-Based Framework To Enable The Integration Of Mobile Components In Security Training Platforms

October 31, 2021 Comments Off on Dockerized-Android – A Container-Based Framework To Enable The Integration Of Mobile Components In Security Training Platforms
Dockerized-Android - A Container-Based Framework To Enable The Integration Of Mobile Components In Security Training Platforms cybersecurity ethical hacking hack android hack app hack wordpress hacker news hacking hacking tools for windows keylogger kit kitploit password brute force penetration testing pentest pentest android pentest linux pentest toolkit pentest tools spy tool kit spyware tools

Dockerized Android is a container-based framework that allows to execute and Android Emulator inside Docker and control it through a browser. This project has been developed in order to provide a starting point for integrating mobile security components into Cyber Ranges but it can be used for any purpose. Anyway, for development and testing purposes the project suggested is docker-android.

Intro

As stated in the brief description above this project has been created in order to provide a starting point for the introduction of mobile security components into Cyber Ranges. For this reasons the features already developed and the ones that will be added in the feature will help the user to make easier to setup a realistic simulation (for example for security training). This README is quite long, maybe you just wanna skip to the “How to run” part.

  1. Features
  2. Architecture
  3. List of Docker Images
  4. How to run
  5. Configuration

Features

The following features are currently available:

  • Run an Android Emulator in Docker
  • Control the device through the web browser
  • Install applications
  • Enable port forwarding
  • Reboot the device
  • Emulate SMS
  • Use the terminal from the web browser
  • Attach also a physical device
  • Customize startup behaviour (see Configuration section)
  • Easily manage multiple instances
Initial setup Instance Manager Setup Manual Setup
initial-setup instance-manager-setup manual-setup
Toolbox features Instance Switch
toolbox instance-switch

Architecture

The project is composed by three main pieces:

  • Dockerized Android Core
  • Dockerized Android UI
  • Dockerized Android Instance Manager (optional) The following figure provides an overview of the actual architecture of the two mandatory components

Core Component

The Core component is the one that executes all the processes needed to run an Android Com-ponent (Emulated or Real) inside a Docker container, also ex-posing some features to the outside. It is with no doubt the most complex part becauseit has to manage different processes in order to provide a set of features. The above figure shows a clear distinction between long-lived processes,start processes and util scripts. Besides, this figure shows that there are 6 long-lived processes, this is a little inaccuracy added to provide a general overview of the Core component, in reality there are two different flavours of the Core component:

  • Core for Emulator
  • Core for Real Device The main architectural difference is the one regarding the long-lived processess: the Core for Emulator runs the long-lived emulator process while the Core for Real Device runs the long-lived scrcpy process to display and control the physical device. The other parts are quite similar with just some logic to follow a different behaviour based on the type of the Core component.

UI Component

The UI component provides a simple way to use all the features exposed by the backend and also adds the ability to display and control the device. The user has to manually insert the address of the Core component and the corresponding ports (the port exposed by the backend and the port exposed by websockify); through this manual setup it is possible to change the default ports (which are 4242 for the backend and 6080 for websockify).

Instance Manager Component

The Instance Manager component has the job to provide all the informations(i.e., addresses and ports) about the running Cores through a single REST API. This is done by writing a simple JSON configuration file that contains all the information about the Cores that are present into the docker-compose in order to avoid the painful job of manually adding one by one. The structure of the JSON configuration file is the following:

{
"instances": [
{
"name": [Generic string to identify the device],
"address": [Address of the component],
"core_port": [Port of the backend],
"vnc_port": [Port of VNC]
}
]
}

List of Docker images

Android Version API Image
5.0.1 21 secsi/dockerized-android-core-emulator-5.0.1
5.1.1 22 secsi/dockerized-android-core-emulator-5.1.1
6.0 23 secsi/dockerized-android-core-emulator-6.0
7.0 24 secsi/dockerized-android-core-emulator-7.0
7.1.1 25 secsi/dockerized-android-core-emulator-7.1.1
8.0 26 secsi/dockerized-android-core-emulator-8.0
8.1 27 secsi/dockerized-android-core-emulator-8.1
9.0 28 secsi/dockerized-android-core-emulator-9.0
10.0 29 secsi/dockerized-android-core-emulator-10.0
11.0 30 secsi/dockerized-android-core-emulator-11.0
– – secsi/dockerized-android-core-bare
– – secsi/docker-android-core-real-device

The secsi/dockerized-android-core-bare does not download any system image and you may mount the folder on your host machine where you have all the SDK folders

How to run

In order to see a full example on how to run the platform you may watch the docker-compose available in the root directory. This setup contains two different cores and also the optional Instance Manager component. Once you understood how it works you may change it to satisfy any needs you have.

Prerequisites

Docker and Docker Compose have to be installed on your machine.

OS compatibility

This platform behaves in different ways based on the host OS, here is a table that summarizes the current compatibility:

Linux Windows OS X
Core for Emulator Full compatibility Not supported (yet) Not supported
Core for Real Device Full compatibility Full compatibility Workaround

For Windows and OS X you have to use a Linux VM with nested virtualization.

To check if your Linux machine supports nested virtualization you may run the following commands:

sudo apt install cpu-checker
kvm-ok

OS X Workaround for Real Device

To use the Core for Real Device on OS X you may:

  • Use the adb of the host
  • Use wireless connection

For the wireless connection Google provides a simple tutorial. To connect to the host adb from within the container you have to manually enter inside the container and run:

adb -H host.docker.internal devices

One line command to run

The command to start using the framework with two cores and a instance manager is simply:

docker-compose up

Build

You may also build the images yourself throught the scripts placed in the utils folder

Configuration

You may configure some features to customize the setup through ENV variables, the following table provides a list of all of them:

Component ENV Name Default value Description
Core TARGET_PORT 6080 Websockify port
Core CUSTOM_APP_DEFAULT_PORT 4242 Node.js backend port
Core DEVICEINFO Unset, but behaves like true Enables/Disables the device info feature
Core TERMINAL Unset, but behaves like true Enables/Disables the terminal feature
Core APK Unset, but behaves like true Enables/Disables the install APK feature
Core FORWARD Unset, but behaves like true Enables/Disables the port forward feature
Core SMS Unset, but behaves like true Enables/Disables the SMS emulation feature
Core REBOOT Unset, but behaves like true Enables/Disables the reboot feature
Core INSTALL_ON_STARTUP false Enables/Disables the feature that allows to install all the apks placed in the/root/dockerized-android/apk folde
Core ENABLE_UNKNOWN_SOURCES false Enables the install from unknown sources
Core REAL_DEVICE_SERIAL unset If there is more than one physical device connected this value must be set to the serial of the device that has to be controlled otherwise all the other features won’t work
Instance Manager DEFAULT_PORT 7373 Port of the REST API

The REAL_DEVICE_SERIAL variable is fundamental if there is more than one physical device attached because if missing nothing will work. Finally there is a list of exposed ports by each component:

Component Port # Description
Core 5555 ADB port
Core 4242 Node.js Backend
Core 6080 Websockify (for noVNC)
UI 80 Frontend
Instance Manager 7373 REST API
Download Dockerized-Android

Post navigation

GC2 – A Command And Control Application That Allows An Attacker To Execute Commands On The Target Machine Using Google Sheet And Exfiltrate Data Using Google Drive
Global cybersecurity spending is expected to reach $150 billion in 2021

Related Articles

PowerProxy - PowerShell SOCKS Proxy With Reverse Proxy Capabilities

PowerProxy – PowerShell SOCKS Proxy With Reverse Proxy Capabilities

- Hack Tools
May 19, 2022
Researchers created a PoC exploit for Safari CVE-2022-26717 bug

Researchers created a PoC exploit for Safari CVE-2022-26717 bug

- Hack Tools
May 19, 2022
logdata-anomaly-miner v2.5.1 releases: parses log data and allows to define analysis pipelines for anomaly detection

logdata-anomaly-miner v2.5.1 releases: parses log data and allows to define analysis pipelines for anomaly detection

- Hack Tools
May 19, 2022
hacker gadgets
hacker phone covers

Recent Posts

PowerProxy - PowerShell SOCKS Proxy With Reverse Proxy Capabilities

PowerProxy – PowerShell SOCKS Proxy With Reverse Proxy Capabilities

May 19, 2022
Researchers created a PoC exploit for Safari CVE-2022-26717 bug

Researchers created a PoC exploit for Safari CVE-2022-26717 bug

May 19, 2022
logdata-anomaly-miner v2.5.1 releases: parses log data and allows to define analysis pipelines for anomaly detection

logdata-anomaly-miner v2.5.1 releases: parses log data and allows to define analysis pipelines for anomaly detection

May 19, 2022
Paris: Versus Market Exploit “is Real”

Paris: Versus Market Exploit “is Real”

May 19, 2022
Cyph - Cryptographically Secure Messaging And Social Networking Service

Cyph – Cryptographically Secure Messaging And Social Networking Service

May 19, 2022
Australian Police Arrest Two Alleged Darkweb Vendors

Australian Police Arrest Two Alleged Darkweb Vendors

May 18, 2022

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs
ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW