From c06bc7a732756e8e4e0c65fbf108e190a97c50ac Mon Sep 17 00:00:00 2001 From: BBerastegui Date: Fri, 9 Feb 2018 20:19:19 +0100 Subject: [PATCH 1/3] Added docker container for quick review of an application. --- docker/Dockerfile | 12 ++++++++++++ docker/stacoan.sh | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/stacoan.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b85a10b --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3 + +RUN apt-get update && apt-get install upx -y + +RUN git clone https://github.com/vincentcox/StaCoAn/ +WORKDIR /StaCoAn +RUN pip3 install -r requirements.txt && chmod u+rwx /StaCoAn/jadx/bin/jadx + +COPY stacoan.sh /stacoan.sh + +EXPOSE 8000 +ENTRYPOINT ["/bin/bash", "/stacoan.sh"] diff --git a/docker/stacoan.sh b/docker/stacoan.sh new file mode 100644 index 0000000..9852a91 --- /dev/null +++ b/docker/stacoan.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# https://unix.stackexchange.com/questions/25945/how-to-check-if-there-are-no-parameters-provided-to-a-command +if [ $# -eq 0 ]; then + echo "[!] Pass at least the name of the app to be analysed." + echo -e "\t - Remember to mount the volume and pass the container path to the app." + exit 1 +fi + +python /StaCoAn/main.py $@ +# https://stackoverflow.com/questions/90418/exit-shell-script-based-on-process-exit-code +rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + +# Redirect to start.html +echo '' > /StaCoAn/report/index.html +cd /StaCoAn/report/ && python -m http.server From 6615d01c64ad6ec0fa80974cf2540022073783e3 Mon Sep 17 00:00:00 2001 From: BBerastegui Date: Fri, 9 Feb 2018 20:23:00 +0100 Subject: [PATCH 2/3] Added readme for the docker. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c667c92..cca9808 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,13 @@ __Linux__ `python3 -m PyInstaller main.py --onefile -p jadx --icon icon.ico --name stacoan --clean` +### Running the Docker container + +`cd docker` +`docker build . -t stacoan` +`docker run -p 8000:8000 -v /yourappsfolder:/tmp -i -t stacoan /tmp/com.myapk.apk` + +Wait for it to be analysed and the open your browser in http://localhost:8000 ## Contributing This entire program's value is depending on the wordlists it is using. In the end, the final result is what matters. It is easy to build a wordlist (in comparison to writing actual code), but it has the biggest impact on the end result. You can help the community the most with making wordlists. From 97b3408336b72ac17ca216646c06499978e6966b Mon Sep 17 00:00:00 2001 From: BBerastegui Date: Fri, 9 Feb 2018 20:24:57 +0100 Subject: [PATCH 3/3] oops. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cca9808..f172a60 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,9 @@ __Linux__ ### Running the Docker container `cd docker` + `docker build . -t stacoan` + `docker run -p 8000:8000 -v /yourappsfolder:/tmp -i -t stacoan /tmp/com.myapk.apk` Wait for it to be analysed and the open your browser in http://localhost:8000