myph.git


myph

~ shellcode loader for your evasion needs
git clone https://github.com/matro7sh/myph.git
log | files | refs | archive | README | LICENSE

commit d1ff25687aceda271c2d6b09cdd7100806ac101c
parent 54a29d25395e6f4ff83a833b6d4e1098532034b5
Author: winds0r <[email protected]>
Date: Thu, 20 Jul 2023 23:48:11 +0900

feat(build): non-root user for docker build

Diffstat:
A.dockerignore | 14++++++++++++++
MDockerfile | 8+++++---
MMakefile | 4++--
MREADME.md | 6++----

4 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/.dockerignore b/.dockerignore
@@ -0,0 +1,14 @@
+.git
+
+*.raw
+*.bin
+myph
+
+README.md
+
+Makefile
+Dockerfile
+
+.goreleaser.yml
+.dockerignore
+.gitignore
diff --git a/Dockerfile b/Dockerfile
@@ -11,14 +11,16 @@ COPY go.mod .
 RUN go mod download
 
 COPY . .
-RUN go build -o myph main.go
+RUN go build -o myph .
 
 
 FROM alpine:3.18.2
 LABEL maintainer="djnn <[email protected]>"
 
-WORKDIR /app
+RUN adduser -D djnn
+USER djnn
+WORKDIR /home/djnn
 
 COPY --from=builder /root/myph .
 
-ENTRYPOINT [ "/app/myph" ]
+ENTRYPOINT [ "/home/djnn/myph" ]
diff --git a/Makefile b/Makefile
@@ -51,8 +51,8 @@ compile: ## compile the project
 
 .PHONY: clean
 clean: ## clean up the project directory
-	@rm -f $(APP_NAME)
+	@rm -vf $(APP_NAME)
 
 .PHONY: docker
 docker: ## build a local docker image
-	@docker build . -t $(APP_NAME):latest
+	@docker build . -t $(APP_NAME):latest -t $(APP_NAME):$(APP_VERSION)
diff --git a/README.md b/README.md
@@ -15,9 +15,6 @@ or related to the access to or use of the software.
 ## Usage
 
 ```bash
-myph --help
-In loving memory of Wassyl Iaroslavovytch Slipak (1974 - 2016)
-
 Usage:
   myph [flags]
 
@@ -25,9 +22,10 @@ Flags:
   -r, --arch string          architecture compilation target (default "amd64")
   -e, --encryption encKind   encryption method. (allowed: AES, RSA, XOR) (default AES)
   -h, --help                 help for myph
-  -k, --key string           encryption key, auto-generated if empty. (if used by --encryption-method)
+  -k, --key string           encryption key, auto-generated if empty. (if used by --encryption)
   -o, --os string            OS compilation target (default "windows")
   -f, --outdir string        output directory (default "myph-out")
+  -p, --process string       target process to inject shellcode to (default "cmd.exe")
   -s, --shellcode string     shellcode path (default "msf.raw")
   -v, --version              version for myph
 ```