-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* QA * Add new android rule setAllow*FromFileURLs * android root bypass and debugger bypass scripts improvements * Dockerfile qa * prevent entrypoint exit if username already exists
- Loading branch information
1 parent
680ca5d
commit 39ba3e6
Showing
9 changed files
with
150 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,24 @@ LABEL \ | |
contributor_2="Vincent Nadal <[email protected]>" \ | ||
description="Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis." | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
MOBSF_USER=mobsf \ | ||
USER_ID=9901 \ | ||
MOBSF_PLATFORM=docker \ | ||
MOBSF_ADB_BINARY=/usr/bin/adb \ | ||
JDK_FILE=openjdk-20.0.2_linux-x64_bin.tar.gz \ | ||
JDK_FILE_ARM=openjdk-20.0.2_linux-aarch64_bin.tar.gz \ | ||
WKH_FILE=wkhtmltox_0.12.6.1-2.jammy_amd64.deb \ | ||
WKH_FILE_ARM=wkhtmltox_0.12.6.1-2.jammy_arm64.deb \ | ||
JAVA_HOME=/jdk-20.0.2 \ | ||
PATH=$JAVA_HOME/bin:$PATH \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US:en \ | ||
LC_ALL=en_US.UTF-8 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONFAULTHANDLER=1 \ | ||
POETRY_VERSION=1.6.1 | ||
|
||
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run | ||
RUN apt update -y && apt install -y --no-install-recommends \ | ||
|
@@ -37,32 +54,13 @@ RUN apt update -y && apt install -y --no-install-recommends \ | |
locale-gen en_US.UTF-8 && \ | ||
apt upgrade -y | ||
|
||
ENV MOBSF_USER=mobsf \ | ||
MOBSF_PLATFORM=docker \ | ||
MOBSF_ADB_BINARY=/usr/bin/adb \ | ||
JDK_FILE=openjdk-20.0.2_linux-x64_bin.tar.gz \ | ||
JDK_FILE_ARM=openjdk-20.0.2_linux-aarch64_bin.tar.gz \ | ||
WKH_FILE=wkhtmltox_0.12.6.1-2.jammy_amd64.deb \ | ||
WKH_FILE_ARM=wkhtmltox_0.12.6.1-2.jammy_arm64.deb \ | ||
JAVA_HOME=/jdk-20.0.2 \ | ||
PATH=$JAVA_HOME/bin:$PATH \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US:en \ | ||
LC_ALL=en_US.UTF-8 \ | ||
PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONFAULTHANDLER=1 \ | ||
POETRY_VERSION=1.6.1 | ||
|
||
# Install wkhtmltopdf & OpenJDK | ||
ARG TARGETPLATFORM | ||
|
||
COPY scripts/install_java_wkhtmltopdf.sh . | ||
RUN ./install_java_wkhtmltopdf.sh | ||
|
||
RUN groupadd -g 9901 $MOBSF_USER | ||
RUN adduser $MOBSF_USER --shell /bin/false -u 9901 --ingroup $MOBSF_USER --gecos "" --disabled-password | ||
|
||
# Install Python dependencies | ||
COPY poetry.lock pyproject.toml ./ | ||
RUN python3 -m pip install --upgrade --no-cache-dir pip poetry==${POETRY_VERSION} && \ | ||
poetry config virtualenvs.create false && \ | ||
|
@@ -104,8 +102,11 @@ HEALTHCHECK CMD curl --fail http://host.docker.internal:8000/ || exit 1 | |
# Expose MobSF Port and Proxy Port | ||
EXPOSE 8000 8000 1337 1337 | ||
|
||
RUN chown -R $MOBSF_USER:$MOBSF_USER /home/mobsf | ||
USER mobsf | ||
# Create mobsf user | ||
RUN groupadd --gid $USER_ID $MOBSF_USER && \ | ||
useradd $MOBSF_USER --uid $USER_ID --gid $MOBSF_USER --shell /bin/false && \ | ||
chown -R $MOBSF_USER:$MOBSF_USER /home/mobsf | ||
USER $MOBSF_USER | ||
|
||
# Run MobSF | ||
CMD ["/home/mobsf/Mobile-Security-Framework-MobSF/scripts/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "mobsf" | ||
version = "4.0.2" | ||
version = "4.0.3" | ||
description = "Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis." | ||
keywords = ["mobsf", "mobile security framework", "mobile security", "security tool", "static analysis", "dynamic analysis", "malware analysis"] | ||
authors = ["Ajin Abraham <[email protected]>"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters