mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
dscanner - Drozer based post-build dynamic vulnerability scanner command
* New command `dscanner`, enables one to scan signed APKs with Drozer * Drozer is a dynamic vulnerability scanner for Android * Drozer runs in a emulator or on-device, this new `dscanner` command... * starts a docker image with Drozer and the Android Emulator pre-installed, * loads the signed APK into the emulator * activates Drozer automated tests for the APK * gathers the report output and places it next to the original APK * The Drozer docker image can be: * cached locally for re-use (just don't run --clean*) * retrieved from dockerhub.com for more efficient runtime * or be built from scratch (in the new "./docker" directory) * New "Vulnerability Scanning" documentation section (run gendocs.sh)
This commit is contained in:
parent
f439266303
commit
df27bae6a0
13 changed files with 1063 additions and 1 deletions
42
docker/entrypoint.sh
Executable file
42
docker/entrypoint.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $EMULATOR == "" ]]; then
|
||||
EMULATOR="android-19"
|
||||
echo "Using default emulator $EMULATOR"
|
||||
fi
|
||||
|
||||
if [[ $ARCH == "" ]]; then
|
||||
ARCH="x86"
|
||||
echo "Using default arch $ARCH"
|
||||
fi
|
||||
echo EMULATOR = "Requested API: ${EMULATOR} (${ARCH}) emulator."
|
||||
if [[ -n $1 ]]; then
|
||||
echo "Last line of file specified as non-opt/last argument:"
|
||||
tail -1 $1
|
||||
fi
|
||||
|
||||
# Run sshd
|
||||
/usr/sbin/sshd
|
||||
adb start-server
|
||||
|
||||
# Detect ip and forward ADB ports outside to outside interface
|
||||
ip=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
|
||||
socat tcp-listen:5037,bind=$ip,fork tcp:127.0.0.1:5037 &
|
||||
socat tcp-listen:5554,bind=$ip,fork tcp:127.0.0.1:5554 &
|
||||
socat tcp-listen:5555,bind=$ip,fork tcp:127.0.0.1:5555 &
|
||||
|
||||
# Set up and run emulator
|
||||
if [[ $ARCH == *"x86"* ]]
|
||||
then
|
||||
EMU="x86"
|
||||
else
|
||||
EMU="arm"
|
||||
fi
|
||||
|
||||
#FASTDROID_VNC_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/fastdroid-vnc/fastdroid-vnc"
|
||||
#wget -c "${FASTDROID_VNC_URL}"
|
||||
|
||||
export PATH="${PATH}:/usr/local/android-sdk/tools/:/usr/local/android-sdk/platform-tools/"
|
||||
|
||||
echo "no" | android create avd -f -n test -t ${EMULATOR} --abi default/${ARCH}
|
||||
echo "no" | emulator64-${EMU} -avd test -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet -vnc :0
|
||||
Loading…
Add table
Add a link
Reference in a new issue