Skip to content

Commit 7e2431d

Browse files
committed
Merge branch 'release/0.1.1'
2 parents 4ea504d + e8141ac commit 7e2431d

13 files changed

Lines changed: 83 additions & 354 deletions

File tree

.env.sample

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# Env variables that start with 'DG' are readable only by the server
2-
DG_APP_PACKAGE_NAME=com.droidground.hiddenactivity
3-
DG_ADB_HOST=localhost
4-
DG_ADB_PORT=5037
5-
DG_DEVICE_TYPE=usb # Either "usb" or "network" are accepted values. Invalid values fallback to "usb"
6-
DG_DEVICE_HOST=192.168.1.202 # The address or host name of the device. This field is only evaluated if "DG_DEVICE_TYPE" is set to "network"
7-
DG_DEVICE_PORT=1234 # The port of the device. This field is only evaluated if "DG_DEVICE_TYPE" is set to "network"
8-
DG_INIT_SCRIPTS_FOLDER=/init.d # The folder that contains the "setup.sh" and "reset.sh" scripts
9-
10-
# Env variables that start with 'DROIDGROUND' are readable by both client and server
1+
DROIDGROUND_APP_PACKAGE_NAME=com.droidground.hiddenactivity
2+
DROIDGROUND_ADB_HOST=localhost
3+
DROIDGROUND_ADB_PORT=5037
4+
DROIDGROUND_DEVICE_TYPE=usb # Either "usb" or "network" are accepted values. Invalid values fallback to "usb"
5+
DROIDGROUND_DEVICE_HOST=192.168.1.202 # The address or host name of the device. This field is only evaluated if "DROIDGROUND_DEVICE_TYPE" is set to "network"
6+
DROIDGROUND_DEVICE_PORT=1234 # The port of the device. This field is only evaluated if "DROIDGROUND_DEVICE_TYPE" is set to "network"
7+
DROIDGROUND_INIT_SCRIPTS_FOLDER=/init.d # The folder that contains the "setup.sh" and "reset.sh" scripts
118
DROIDGROUND_HOST=0.0.0.0
129
DROIDGROUND_PORT=4242
1310
DROIDGROUND_APP_MANAGER_DISABLED=false # Feature enabled by default if not set otherwise

README.md

Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -73,38 +73,31 @@ Almost all features are **modular** and defined via environment variables, ensur
7373

7474
## ⚙️ Configuration
7575

76-
The `.env.sample` file in the root directory is a good starting point.
77-
78-
Server-only (prefix `DG_`)
79-
80-
| Variable | Description | Default |
81-
| ------------------------ | -------------------------------------------------- | ----------- |
82-
| `DG_APP_PACKAGE_NAME` | Package name of target app | - |
83-
| `DG_ADB_HOST` | ADB host | `localhost` |
84-
| `DG_ADB_PORT` | ADB port | `5037` |
85-
| `DG_DEVICE_TYPE` | `usb` or `network` | `usb` |
86-
| `DG_DEVICE_HOST` | IP of Android device (`adb`) (network mode only) | - |
87-
| `DG_DEVICE_PORT` | port of Android device (`adb`) (network mode only) | - |
88-
| `DG_INIT_SCRIPTS_FOLDER` | Folder containing `setup.sh` and `reset.sh` | `/init.d` |
89-
90-
Server + Client (prefix `DROIDGROUND_`)
91-
92-
| Variable | Description | Default |
93-
| ------------------------------------- | --------------------- | --------- |
94-
| `DROIDGROUND_HOST` | Bind address | `0.0.0.0` |
95-
| `DROIDGROUND_PORT` | Bind port | `4242` |
96-
| `DROIDGROUND_APP_MANAGER_DISABLED` | Disable app manager | `false` |
97-
| `DROIDGROUND_BUG_REPORT_DISABLED` | Disable bugreport | `false` |
98-
| `DROIDGROUND_FILE_BROWSER_DISABLED` | Disable file browser | `false` |
99-
| `DROIDGROUND_FRIDA_DISABLED` | Disable Frida support | `false` |
100-
| `DROIDGROUND_FRIDA_TYPE` | `jail` or `full` | `jail` |
101-
| `DROIDGROUND_LOGCAT_DISABLED` | Disable logcat | `false` |
102-
| `DROIDGROUND_REBOOT_DISABLED` | Disable reboot | `false` |
103-
| `DROIDGROUND_SHUTDOWN_DISABLED` | Disable shutdown | `false` |
104-
| `DROIDGROUND_START_ACTIVITY_DISABLED` | Disable startActivity | `false` |
105-
| `DROIDGROUND_START_RECEIVER_DISABLED` | Disable broadcast | `false` |
106-
| `DROIDGROUND_START_SERVICE_DISABLED` | Disable startService | `false` |
107-
| `DROIDGROUND_TERMINAL_DISABLED` | Disable terminal | `false` |
76+
The `.env.sample` file in the root directory is a good starting point. This is the full list of all env variables currently supported:
77+
78+
| Variable | Description | Default |
79+
| ------------------------------------- | -------------------------------------------------- | ----------- |
80+
| `DROIDGROUND_APP_PACKAGE_NAME` | Package name of target app | - |
81+
| `DROIDGROUND_ADB_HOST` | ADB host | `localhost` |
82+
| `DROIDGROUND_ADB_PORT` | ADB port | `5037` |
83+
| `DROIDGROUND_DEVICE_TYPE` | `usb` or `network` | `usb` |
84+
| `DROIDGROUND_DEVICE_HOST` | IP of Android device (`adb`) (network mode only) | - |
85+
| `DROIDGROUND_DEVICE_PORT` | port of Android device (`adb`) (network mode only) | - |
86+
| `DROIDGROUND_INIT_SCRIPTS_FOLDER` | Folder containing `setup.sh` and `reset.sh` | `/init.d` |
87+
| `DROIDGROUND_HOST` | Bind address | `0.0.0.0` |
88+
| `DROIDGROUND_PORT` | Bind port | `4242` |
89+
| `DROIDGROUND_APP_MANAGER_DISABLED` | Disable app manager | `false` |
90+
| `DROIDGROUND_BUG_REPORT_DISABLED` | Disable bugreport | `false` |
91+
| `DROIDGROUND_FILE_BROWSER_DISABLED` | Disable file browser | `false` |
92+
| `DROIDGROUND_FRIDA_DISABLED` | Disable Frida support | `false` |
93+
| `DROIDGROUND_FRIDA_TYPE` | `jail` or `full` | `jail` |
94+
| `DROIDGROUND_LOGCAT_DISABLED` | Disable logcat | `false` |
95+
| `DROIDGROUND_REBOOT_DISABLED` | Disable reboot | `false` |
96+
| `DROIDGROUND_SHUTDOWN_DISABLED` | Disable shutdown | `false` |
97+
| `DROIDGROUND_START_ACTIVITY_DISABLED` | Disable startActivity | `false` |
98+
| `DROIDGROUND_START_RECEIVER_DISABLED` | Disable broadcast | `false` |
99+
| `DROIDGROUND_START_SERVICE_DISABLED` | Disable startService | `false` |
100+
| `DROIDGROUND_TERMINAL_DISABLED` | Disable terminal | `false` |
108101

109102
## 🧩 Use Cases
110103

@@ -121,9 +114,9 @@ A couple of sample _Docker Compose_ files are provided in the [examples](./examp
121114
On boot _DroidGround_ does the following:
122115

123116
1. Set up the connection with `adb`
124-
2. Run the `setup.sh` in the folder specified by `DG_INIT_SCRIPTS_FOLDER` if present. This script can be used to install the target app and do everything else that's needed to init the CTF (e.g. placing the flag in a known location)
117+
2. Run the `setup.sh` in the folder specified by `DROIDGROUND_INIT_SCRIPTS_FOLDER` if present. This script can be used to install the target app and do everything else that's needed to init the CTF (e.g. placing the flag in a known location)
125118
3. (if _Frida_ is enabled) Download the correct `frida-server` based on the version installed and the architecture of the device and start it
126-
4. Run the target app (the one specified through `DG_APP_PACKAGE_NAME`). If the app is not installed _DroidGround_ will exit.
119+
4. Run the target app (the one specified through `DROIDGROUND_APP_PACKAGE_NAME`). If the app is not installed _DroidGround_ will exit.
127120
5. Setup the _REST APIs_, the _WebSocket_ servers and the display streaming
128121

129122
Here is a sample `setup.sh` script:
@@ -175,7 +168,7 @@ Pull requests are welcome! Please open an issue first to discuss major changes.
175168

176169
## 📚 Credits
177170

178-
Developed by Angelo Delicato [@SECFORCE](https://www.secforce.com).
171+
Developed by [Angelo Delicato](https://github.com/thelicato) [@SECFORCE](https://www.secforce.com).
179172

180173
The _server_ section heavily relies on the amazing work done by [@yume-chan](https://github.com/yume-chan/ya-webadb), probably this app wouldn't exist if it wasn't for his amazing work.
181174

examples/hidden-activity/compose.docker-android.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ services:
1717
volumes:
1818
- ./init.d:/init.d
1919
environment:
20-
- DG_APP_PACKAGE_NAME=com.droidground.hiddenactivity
21-
- DG_ADB_HOST=localhost
22-
- DG_ADB_PORT=5037
23-
- DG_DEVICE_TYPE=network
24-
- DG_DEVICE_HOST=docker-android
25-
- DG_DEVICE_PORT=5555
26-
- DG_INIT_SCRIPTS_FOLDER=/init.d
20+
- DROIDGROUND_APP_PACKAGE_NAME=com.droidground.hiddenactivity
21+
- DROIDGROUND_ADB_HOST=localhost
22+
- DROIDGROUND_ADB_PORT=5037
23+
- DROIDGROUND_DEVICE_TYPE=network
24+
- DROIDGROUND_DEVICE_HOST=docker-android
25+
- DROIDGROUND_DEVICE_PORT=5555
26+
- DROIDGROUND_INIT_SCRIPTS_FOLDER=/init.d
2727
- DROIDGROUND_HOST=0.0.0.0
2828
- DROIDGROUND_PORT=4242
2929
- DROIDGROUND_SHUTDOWN_DISABLED=true

examples/hidden-activity/compose.redroid.debian.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ services:
2626
volumes:
2727
- ./init.d:/init.d
2828
environment:
29-
- DG_APP_PACKAGE_NAME=com.droidground.hiddenactivity
30-
- DG_ADB_HOST=localhost
31-
- DG_ADB_PORT=5037
32-
- DG_DEVICE_TYPE=network
33-
- DG_DEVICE_HOST=redroid
34-
- DG_DEVICE_PORT=5555
35-
- DG_INIT_SCRIPTS_FOLDER=/init.d
29+
- DROIDGROUND_APP_PACKAGE_NAME=com.droidground.hiddenactivity
30+
- DROIDGROUND_ADB_HOST=localhost
31+
- DROIDGROUND_ADB_PORT=5037
32+
- DROIDGROUND_DEVICE_TYPE=network
33+
- DROIDGROUND_DEVICE_HOST=redroid
34+
- DROIDGROUND_DEVICE_PORT=5555
35+
- DROIDGROUND_INIT_SCRIPTS_FOLDER=/init.d
3636
- DROIDGROUND_HOST=0.0.0.0
3737
- DROIDGROUND_PORT=4242
3838
- DROIDGROUND_SHUTDOWN_DISABLED=true

examples/hidden-activity/compose.redroid.ubuntu.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ services:
2525
volumes:
2626
- ./init.d:/init.d
2727
environment:
28-
- DG_APP_PACKAGE_NAME=com.droidground.hiddenactivity
29-
- DG_ADB_HOST=localhost
30-
- DG_ADB_PORT=5037
31-
- DG_DEVICE_TYPE=network
32-
- DG_DEVICE_HOST=redroid
33-
- DG_DEVICE_PORT=5555
34-
- DG_INIT_SCRIPTS_FOLDER=/init.d
28+
- DROIDGROUND_APP_PACKAGE_NAME=com.droidground.hiddenactivity
29+
- DROIDGROUND_ADB_HOST=localhost
30+
- DROIDGROUND_ADB_PORT=5037
31+
- DROIDGROUND_DEVICE_TYPE=network
32+
- DROIDGROUND_DEVICE_HOST=redroid
33+
- DROIDGROUND_DEVICE_PORT=5555
34+
- DROIDGROUND_INIT_SCRIPTS_FOLDER=/init.d
3535
- DROIDGROUND_HOST=0.0.0.0
3636
- DROIDGROUND_PORT=4242
3737
- DROIDGROUND_SHUTDOWN_DISABLED=true

0 commit comments

Comments
 (0)