mirror of
https://github.com/S3cur3Th1sSh1t/NimSyscallPacker
synced 2026-06-11 09:59:09 +00:00
add dockerfile, fix donut command in linux + path separator issues
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
FROM ubuntu:jammy
|
||||
RUN apt update && apt install -y curl python3 python3-pip mingw-w64=8.0.0-1
|
||||
RUN apt install -y wget git
|
||||
RUN wget https://nim-lang.org/choosenim/init.sh && CHOOSENIM_CHOOSE_VERSION=1.6.2 bash init.sh -y
|
||||
ENV PATH=/root/.nimble/bin:$PATH
|
||||
RUN nimble install -y nimcrypto docopt ptr_math strenc winim
|
||||
RUN cd /opt/ && git clone https://github.com/S4ntiagoP/donut --branch syscalls && cd donut && make
|
||||
ENV PATH=/opt/donut/:$PATH
|
||||
ADD . /opt/packer
|
||||
WORKDIR /opt/packer
|
||||
RUN nim c -d:noRES NimSyscallLoader.nim
|
||||
RUN mkdir /shared
|
||||
ENTRYPOINT ["/opt/packer/NimSyscallLoader"]
|
||||
@@ -559,12 +559,12 @@ if (peinject):
|
||||
discard os.execShellCmd(fmt"{packerPath}\sgn\sgn.exe -a 64 -c 3 -o tmpshellcode.bin tmpshellcode.bin")
|
||||
sgn = false
|
||||
elif system.hostOS == "linux":
|
||||
discard os.execShellCmd(fmt"donut {filename} -b 1 -o tmpshellcode.bin")
|
||||
discard os.execShellCmd(fmt"donut --input:{filename} -b 1 -o tmpshellcode.bin")
|
||||
if (sgn):
|
||||
if (compileX86):
|
||||
discard os.execShellCmd(fmt"{packerPath}\sgn\sgn -c 3 -o tmpshellcode.bin tmpshellcode.bin")
|
||||
discard os.execShellCmd(fmt"{packerPath}/sgn/sgn -c 3 -o tmpshellcode.bin tmpshellcode.bin")
|
||||
else:
|
||||
discard os.execShellCmd(fmt"{packerPath}\sgn\sgn -a 64 -c 3 -o tmpshellcode.bin tmpshellcode.bin")
|
||||
discard os.execShellCmd(fmt"{packerPath}/sgn/sgn -a 64 -c 3 -o tmpshellcode.bin tmpshellcode.bin")
|
||||
sgn = false
|
||||
blob = readFile("tmpshellcode.bin")
|
||||
shellcode = true
|
||||
@@ -1758,4 +1758,4 @@ if (pump):
|
||||
writeFile(fmt"{outfile}",pumpsequence)
|
||||
|
||||
if (retrieveFromURL):
|
||||
echo fmt"[!] Make sure to host the {shellcodeFile} file on your webserver with the correct file-Name to have a working payload ;-)"
|
||||
echo fmt"[!] Make sure to host the {shellcodeFile} file on your webserver with the correct file-Name to have a working payload ;-)"
|
||||
|
||||
Reference in New Issue
Block a user