Skip to content

Commit b181eb7

Browse files
committed
Merge branch 'release/0.2.3'
2 parents fb51112 + 3794b48 commit b181eb7

47 files changed

Lines changed: 698 additions & 121 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,5 @@ dist
132132
# Custom
133133
resources
134134
init.d
135-
!examples/*/init.d
135+
!examples/**/init.d/
136+
examples/**/*.apk*

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ RUN apt-get update && \
6565
python3-pip \
6666
build-essential \
6767
curl \
68+
wget \
6869
git \
6970
unzip \
7071
libglib2.0-dev \

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Here are some ways DroidGround can be used:
110110

111111
## ⚙️ Usage
112112

113-
A couple of sample _Docker Compose_ files are provided in the [examples](./examples) folder. They use apps from the [DroidGround samples repo](https://github.com/SECFORCE/droidground-samples) which will progressively be enhanced to showcase all the key features. They are also a good starting point to understand how to setup your own CTF.
113+
A couple of sample _Docker Compose_ files are provided in the [examples](./examples/apps) folder. They use apps from the [DroidGround samples repo](https://github.com/SECFORCE/droidground-samples) which will progressively be enhanced to showcase all the key features. They are also a good starting point to understand how to setup your own CTF.
114114

115115
On boot _DroidGround_ does the following:
116116

@@ -133,6 +133,8 @@ adb install ./flag.apk # The cwd is set to the "init.d" folder, so the apk file
133133
echo "Install command executed"
134134
```
135135

136+
For a production deploy (in a real CTF) you may want to provision a pre-defined number of DroidGround instances beforehand or you may want to allow the users to spawn instances (with a limitation or maybe associate each team/user with a specific instance). For this reason we also added a simple [spawner example](./examples/spawner).
137+
136138
## 💡 Tips
137139

138140
Here are some suggestions for setting up your Android CTF:

examples/hidden-activity/compose.docker-android.yaml renamed to examples/apps/hidden-activity/compose.docker-android.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ services:
99
- 5555:5555 # No need to expose this, but it's useful for debugging purposes
1010
container_name: docker-android
1111
droidground:
12-
build: ../..
12+
build: ../../..
1313
container_name: droidground
14-
restart: on-failure
14+
restart: unless-stopped
1515
ports:
1616
- 4242:4242
1717
volumes:
1818
- ./init.d:/init.d
1919
environment:
20+
- DROIDGROUND_BASE_PATH=/random1
2021
- DROIDGROUND_APP_PACKAGE_NAME=com.droidground.hiddenactivity
2122
- DROIDGROUND_ADB_HOST=localhost
2223
- DROIDGROUND_ADB_PORT=5037

examples/hidden-activity/compose.redroid.debian.yaml renamed to examples/apps/hidden-activity/compose.redroid.debian.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ services:
1818
container_name: redroid14
1919
image: redroid/redroid:14.0.0-latest
2020
droidground:
21-
build: ../..
21+
build: ../../..
2222
container_name: droidground
23-
restart: on-failure
23+
restart: unless-stopped
2424
ports:
2525
- 4242:4242
2626
volumes:

examples/hidden-activity/compose.redroid.ubuntu.yaml renamed to examples/apps/hidden-activity/compose.redroid.ubuntu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ services:
1717
container_name: redroid14
1818
image: redroid/redroid:14.0.0-latest
1919
droidground:
20-
build: ../..
20+
build: ../../..
2121
container_name: droidground
22-
restart: on-failure
22+
restart: unless-stopped
2323
ports:
2424
- 4242:4242
2525
volumes:
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
#!/usr/bin/env bash
3+
4+
rm hidden-activity-flag.apk
5+
rm hidden-activity-flag.apk*
6+
wget https://github.com/SECFORCE/droidground-samples/releases/download/v0.1.2/hidden-activity-flag.apk
7+
adb shell pm uninstall com.droidground.hiddenactivity
8+
echo "Sleep for 2 seconds before installing app"
9+
sleep 2
10+
echo "Installing app..."
11+
12+
while true; do
13+
adb install ./hidden-activity-flag.apk
14+
if [ $? -eq 0 ]; then
15+
echo "Install command succeeded!"
16+
break
17+
else
18+
echo "Install command failed. Retrying in 3 seconds..."
19+
sleep 3
20+
fi
21+
done

examples/multi-step/compose.docker-android.yaml renamed to examples/apps/multi-step/compose.docker-android.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ services:
99
- 5555:5555 # No need to expose this, but it's useful for debugging purposes
1010
container_name: docker-android
1111
droidground:
12-
build: ../..
12+
build: ../../..
1313
container_name: droidground
14-
restart: on-failure
14+
restart: unless-stopped
1515
ports:
1616
- 4242:4242
1717
volumes:

examples/multi-step/compose.redroid.debian.yaml renamed to examples/apps/multi-step/compose.redroid.debian.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ services:
1818
container_name: redroid14
1919
image: redroid/redroid:14.0.0-latest
2020
droidground:
21-
build: ../..
21+
build: ../../..
2222
container_name: droidground
23-
restart: on-failure
23+
restart: unless-stopped
2424
ports:
2525
- 4242:4242
2626
volumes:

0 commit comments

Comments
 (0)