Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile to be able to develop in a Container #33

Closed
wants to merge 2 commits into from

Conversation

Shosta
Copy link

@Shosta Shosta commented Nov 11, 2020

This Container is supposed to be used with the VSCode Remote Container extension.

➜ It has every required tools ready to be used at the proper location.
➜ It copies inside the container all the .apk files that are in the folder where you start the Remote Container extension.
➜ You can either attach a running container or build it from the Dockerfile.

Add the VSCode devcontainer.json file

➜ The devcontainer.json file describes everything we want to install in the VSCode development container.

Signed-off-by: Rémi Lavedrine


So now, apktool, jadx and uber-apk-signer are not downloaded and installed somewhere on your machine, but everything stays in the Container and is already downloaded at the proper location within the container.

It works like a charm. 👌🏼
I launched it with InsecureBankv2.apk in the folder and everything was decoded perfectly. 👍🏼

This Container is supposed to be used with the VSCode Remote Container extension.
It has every required tools ready to be used at the proper location.
It copy inside the container all the .apk files that are in the folder where you start the Remote Container extension.
You can either attach a running container or build it from the Dockerfile.

Signed-off-by: Rémi Lavedrine <remi.lavedrine@outlook.com>
The devcontainer.json file describes everything we want to install in the VSCode development container.

Signed-off-by: Rémi Lavedrine <remi.lavedrine@outlook.com>
@Shosta Shosta changed the title Add Dockerfile to be able to develop in a Container #32 Add Dockerfile to be able to develop in a Container Nov 11, 2020
@Surendrajat
Copy link
Member

@Shosta Thanks for the PR.

I've looked into code a bit but before commenting on anything I want to ask about the advantage of putting this all in a container, for most other people, apart from isolation. I must say, I haven't used this feature in VS Code yet so I may be missing any other obvious benefits of this approach. This will help me understand the usability side of this PR. For now, it seems to be doing the same thing but with more steps because APKLab will itself download all tools on the first run.

And, if this PR is intended to solve the issue you faced in #30, ie. not able to detect tool paths first time, then we should look at fixing the issue directly in APKLab.

@Shosta
Copy link
Author

Shosta commented Nov 16, 2020

@Surendrajat The point of all of this is to be able to work and pentest the app in a container where I can have all the tools, set up and environment required.
It is the way we are working as a team in order that we can't say "I don't understand, it worked on my machine", because everyone has the exact same environment.
VSCode Remote Containers makes it super simple to have everything containerized.
So to use APKLab in that environment, a Dockerfile or a Docker Image in a registry (from which I will attach VSCode once downloaded and launched), this PR makes it super simple.
Just Launch APKLab from this Dockerfile and everything is up and running. No hassle from the dev team.
And it is faster and simpler than using a Virtual Machine as the dependencies and apk I want to pentest can be syncrhonized as well.

That's the purpose of all of it.

@Surendrajat
Copy link
Member

Surendrajat commented Nov 18, 2020

@Shosta Thanks for explaining. It makes sense.

Now that I think about it, it means that people will have to clone the entire APKLab repo for these two files which might not be the best option. So here is what I propose(let me know if you have a better alternative/reasoning):
Create a repo with those two files, push the image to DockerHub or GitHub Projects registry and I will link the repo(and image) to APKLab README for interested people to directly pull it from, without needing to have an entire copy of this repo. It will make managing this feature easier for you (and me as well).

@Shosta
Copy link
Author

Shosta commented Nov 18, 2020

Good deal. 👌🏼
I'll do it as soon as possible and let you know as soon as it's done. 👍🏼

@Surendrajat
Copy link
Member

@Shosta Closing this one.

@Surendrajat Surendrajat closed this Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants