Sign inSign up

snovvcrash/ollvm13

By snovvcrash

•Updated over 2 years ago

LLVM 13.x + Obfuscator + Docker = 💚

Image
0

10K+

snovvcrash/ollvm13 repository overview

⁠🐳 obfuscator-llvm-13

Installation instructions are completely stolen from @icyguider⁠'s great Shhhloader⁠ project.

⁠Usage

~$ docker run --rm -it -u `id -u` -v /tmp:/build -v `pwd`:/tmp snovvcrash/ollvm13 x86_64-w64-mingw32-clang -o /build/hello.exe hello.c
~$ file /tmp/hello.exe
hello.exe: PE32+ executable (console) x86-64, for MS Windows

⁠Dockerfile

FROM alpine:3.18
LABEL maintainer="[email protected]"

RUN apk update && \
apk add --no-cache build-base cmake git python3 mingw-w64-gcc && \
rm -rf /var/cache/apk/* && \
git clone --depth=1 -b llvm-13.x --single-branch https://github.com/heroims/obfuscator /opt/ollvm && \
cd /opt/ollvm && \
wget https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch && \
patch llvm/include/llvm/Support/Signals.h < ff1681ddb303223973653f7f5f3f3435b48a1983.patch && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_NEW_PASS_MANAGER=OFF ../llvm && \
sed -i 's/LLVM_TOOL_CLANG_BUILD:BOOL=OFF/LLVM_TOOL_CLANG_BUILD:BOOL=ON/g' CMakeCache.txt && \
sed -i "s|LLVM_EXTERNAL_CLANG_SOURCE_DIR:PATH=|LLVM_EXTERNAL_CLANG_SOURCE_DIR:PATH=`realpath ../clang`|g" CMakeCache.txt && \
make -j7 && \
make install && \
git clone --depth=1 https://github.com/tpoechtrager/wclang /opt/wclang && \
cd /opt/wclang && \
cmake . && \
make -j7 && \
make install && \
rm -rf /opt/ollvm /opt/wclang && mkdir /build

WORKDIR /tmp

CMD ["/bin/sh"]

⁠References

Tag summary

Content type

Image

Digest

sha256:f05cc5be9…

Size

1.1 GB

Last updated

over 2 years ago

docker pull snovvcrash/ollvm13