-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4df713d
commit 602c13c
Showing
9 changed files
with
96 additions
and
49 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mythic-container==0.4.18 | ||
tabulate | ||
sliver-py |
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 |
---|---|---|
|
@@ -68,7 +68,7 @@ jobs: | |
uses: docker/build-push-action@v5 # ref: https://github.com/marketplace/actions/build-and-push-docker-images | ||
with: | ||
context: Payload_Type/sliverapi | ||
file: Payload_Type/sliverapi/.docker/Dockerfile | ||
file: Payload_Type/sliverapi/Dockerfile | ||
tags: | | ||
${{ env.REGISTRY }}/${{ env.AGENT_IMAGE_NAME }}:${{ env.VERSION }} | ||
${{ env.REGISTRY }}/${{ env.AGENT_IMAGE_NAME }}:latest | ||
|
@@ -98,23 +98,18 @@ jobs: | |
- name: Lowercase the container image name | ||
run: echo "AGENT_IMAGE_NAME=${AGENT_IMAGE_NAME,,}" >> ${GITHUB_ENV} | ||
|
||
# The Dockerfile which Mythic uses to pull in the base container image needs to be | ||
# updated to reference the newly built container image | ||
- name: Fix the server Dockerfile reference to reference the new release tag (implant) | ||
working-directory: Payload_Type/sliverimplant | ||
run: | | ||
sed -i "s|^FROM ghcr\.io.*$|FROM ${REGISTRY}/${AGENT_IMAGE_NAME}:${VERSION}|" Dockerfile | ||
- name: Fix the server Dockerfile reference to reference the new release tag (api) | ||
working-directory: Payload_Type/sliverapi | ||
run: | | ||
sed -i "s|^FROM ghcr\.io.*$|FROM ${REGISTRY}/${AGENT_IMAGE_NAME}:${VERSION}|" Dockerfile | ||
- name: Update config.json version for sliverapi | ||
uses: jossef/[email protected] | ||
with: | ||
file: config.json | ||
field: remote_images.sliverapi | ||
value: ${{env.REGISTRY}}/${{env.AGENT_IMAGE_NAME}}:${{env.VERSION}} | ||
|
||
- name: Update package.json version | ||
- name: Update config.json version for sliverimplant | ||
uses: jossef/[email protected] | ||
with: | ||
file: config.json | ||
field: remote_images.sliver | ||
field: remote_images.sliverimplant | ||
value: ${{env.REGISTRY}}/${{env.AGENT_IMAGE_NAME}}:${{env.VERSION}} | ||
|
||
# Push the changes to the Dockerfile | ||
|
@@ -123,7 +118,7 @@ jobs: | |
uses: EndBug/add-and-commit@v9 # ref: https://github.com/marketplace/actions/add-commit | ||
with: | ||
# Only add the Dockerfile changes. Nothing else should have been modified | ||
add: "['Payload_Type/sliverapi/Dockerfile', 'Payload_Type/sliverimplant/Dockerfile', 'config.json']" | ||
add: "['config.json']" | ||
# Use the Github actions bot for the commit author | ||
default_author: github_actions | ||
committer_email: github-actions[bot]@users.noreply.github.com | ||
|
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 was deleted.
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 +1,30 @@ | ||
FROM ghcr.io/mythicagents/sliverimplant:v0.0.0.1 | ||
FROM itsafeaturemythic/mythic_python_base:latest as builder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y git gnupg software-properties-common | ||
|
||
WORKDIR /Mythic/ | ||
|
||
RUN git clone --depth 1 https://github.com/grpc/grpc | ||
RUN cd grpc && git submodule update --init | ||
RUN cd grpc && pip install -r requirements.txt | ||
RUN cd grpc && pip uninstall -y protobuf | ||
RUN cd grpc && pip install protobuf==3.20.* | ||
RUN cd grpc && GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . | ||
RUN cd grpc && python setup.py bdist_wheel --dist-dir=/grpc_wheel | ||
|
||
COPY ["requirements.txt", "requirements.txt"] | ||
RUN python3 -m pip wheel --wheel-dir /other_wheels -r requirements.txt | ||
|
||
########################################################### | ||
########################################################### | ||
|
||
FROM itsafeaturemythic/mythic_python_base:latest | ||
|
||
COPY --from=builder /other_wheels /other_wheels | ||
COPY --from=builder /grpc_wheel /grpc_wheel | ||
|
||
RUN pip install --no-cache /other_wheels/* | ||
RUN pip install --no-cache /grpc_wheel/* | ||
|
||
CMD ["python3", "main.py"] |
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 +1,30 @@ | ||
FROM ghcr.io/mythicagents/sliverimplant:v0.0.0.1 | ||
FROM itsafeaturemythic/mythic_python_base:latest as builder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y git gnupg software-properties-common | ||
|
||
WORKDIR /Mythic/ | ||
|
||
RUN git clone --depth 1 https://github.com/grpc/grpc | ||
RUN cd grpc && git submodule update --init | ||
RUN cd grpc && pip install -r requirements.txt | ||
RUN cd grpc && pip uninstall -y protobuf | ||
RUN cd grpc && pip install protobuf==3.20.* | ||
RUN cd grpc && GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . | ||
RUN cd grpc && python setup.py bdist_wheel --dist-dir=/grpc_wheel | ||
|
||
COPY ["requirements.txt", "requirements.txt"] | ||
RUN python3 -m pip wheel --wheel-dir /other_wheels -r requirements.txt | ||
|
||
########################################################### | ||
########################################################### | ||
|
||
FROM itsafeaturemythic/mythic_python_base:latest | ||
|
||
COPY --from=builder /other_wheels /other_wheels | ||
COPY --from=builder /grpc_wheel /grpc_wheel | ||
|
||
RUN pip install --no-cache /other_wheels/* | ||
RUN pip install --no-cache /grpc_wheel/* | ||
|
||
CMD ["python3", "main.py"] |
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