-
Notifications
You must be signed in to change notification settings - Fork 20
08-challenge-shellcode-after: Add Makefile and Dockerfile with multi-stage pattern #54
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Dockerfile
instead of dockerfile
. What is the Dockerfile
model you used?
Use proper commit messages. See:
- instructions here (part of the Git workshop content)
- history of commits in the repository
Sign your commits, use Signed-off-by: ...
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Makefile
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extend your commit message with a commit description. Mention the rationale / motivation for adding a Dockerfile.
You need two Makefile
s. A Makefile.sol
that will be used to build the source code. That Makefile
will get copied in the Dockerfile
. And a Makefile
(the current one) that deploys the container.
Currently you are copying the Docker Makefile
and running make
inside the container. That will not work.
Use a proper name for the commit authorship and signature, i.e. use Stefan Calmac <[email protected]>
instead of Stefan1627 <[email protected]>
.
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Dockerfile
Outdated
Show resolved
Hide resolved
37aeb60
to
ce6744b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extend your commit message with a commit description. Mention the rationale / motivation for adding a Dockerfile
.
Add a Makefile.sol
file with the rules to build the source code file. Copy that file in the container in order to build it to an executable.
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Dockerfile
Outdated
Show resolved
Hide resolved
…stage pattern This Dockerfile provides a reproducible, containerized environment for the shellcode-after drill by: • Separating compilation (build stage) from execution (runtime stage) • Installing only minimal runtime dependencies (binutils, cpp, pwntools) • Exposing port 31346 so vuln & exploit.py can communicate Using multi-stage builds keeps the final image small, improves portability across CI environs, and ensures anyone can rebuild and re-run the exercise with a single `docker build && docker run` command. Signed-off-by: Stefan Calmac <[email protected]>
Prerequisite Checklist
Description of changes