mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-07 01:41:06 +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
48
docker/Makefile
Normal file
48
docker/Makefile
Normal file
|
@ -0,0 +1,48 @@
|
|||
SHELL := /bin/bash
|
||||
ALIAS = "dscanner"
|
||||
EXISTS := $(shell docker ps -a -q -f name=$(ALIAS))
|
||||
RUNNED := $(shell docker ps -q -f name=$(ALIAS))
|
||||
ifneq "$(RUNNED)" ""
|
||||
IP := $(shell docker inspect $(ALIAS) | grep "IPAddress\"" | head -n1 | cut -d '"' -f 4)
|
||||
endif
|
||||
STALE_IMAGES := $(shell docker images | grep "<none>" | awk '{print($$3)}')
|
||||
EMULATOR ?= "android-19"
|
||||
ARCH ?= "armeabi-v7a"
|
||||
|
||||
COLON := :
|
||||
|
||||
.PHONY = build clean kill info
|
||||
|
||||
all: help
|
||||
|
||||
help:
|
||||
@echo "usage: make {help|build|clean|kill|info}"
|
||||
@echo ""
|
||||
@echo " help this help screen"
|
||||
@echo " build create docker image"
|
||||
@echo " clean remove images and containers"
|
||||
@echo " kill stop running containers"
|
||||
@echo " info details of running container"
|
||||
|
||||
build:
|
||||
@docker build -t "dscanner/fdroidserver:latest" .
|
||||
|
||||
clean: kill
|
||||
@docker ps -a -q | xargs -n 1 -I {} docker rm -f {}
|
||||
ifneq "$(STALE_IMAGES)" ""
|
||||
@docker rmi -f $(STALE_IMAGES)
|
||||
endif
|
||||
|
||||
kill:
|
||||
ifneq "$(RUNNED)" ""
|
||||
@docker kill $(ALIAS)
|
||||
endif
|
||||
|
||||
info:
|
||||
@docker ps -a -f name=$(ALIAS)
|
||||
ifneq "$(RUNNED)" ""
|
||||
$(eval ADBPORT := $(shell docker port $(ALIAS) | grep '5555/tcp' | awk '{split($$3,a,"$(COLON)");print a[2]}'))
|
||||
@echo -e "Use:\n adb kill-server\n adb connect $(IP):$(ADBPORT)"
|
||||
else
|
||||
@echo "Run container"
|
||||
endif
|
Loading…
Add table
Add a link
Reference in a new issue