-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (47 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:latest
WORKDIR /log4doom
ENV PUBLIC_IP="127.0.0.1"
# === Install packages ===
RUN apt-get update
# Java and Maven
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y maven
# NodeJS
RUN apt-get -y install curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get -y install nodejs
# === Copy files and setting up directories ===
# Marshalsec
COPY marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec-0.0.3-SNAPSHOT-all.jar
# Payload web server
COPY PayloadServer /log4doom/PayloadServer
RUN mkdir /log4doom/PayloadServer/payload
COPY *.class /log4doom/PayloadServer/payload/
WORKDIR /log4doom/PayloadServer
RUN npm install
COPY Log4DoomPayload.java /log4doom/PayloadServer/payload/Log4DoomPayload.java
# Minecraft server
COPY MinecraftServer /log4doom/MinecraftServer
RUN mkdir /log4doom/MinecraftServer/plugins
# Compiling the exploit
#WORKDIR /log4doom/PayloadServer/payload
#RUN ls
#RUN javac -cp "./lib/jna-platform-5.10.0.jar;./lib/jna-5.10.0.jar" Log4DoomPayload.java
WORKDIR /log4doom
# Compile plugins
RUN mkdir /build
COPY Log4DoomPlugin /build/Log4DoomPlugin
WORKDIR /build/Log4DoomPlugin
RUN mvn clean package
# Install plugins
RUN cp /build/Log4DoomPlugin/target/Log4Doom-1.0.0-SNAPSHOT.jar /log4doom/MinecraftServer/plugins/Log4Doom.jar
WORKDIR /log4doom/MinecraftServer/plugins
COPY ./plugins/*.jar .
WORKDIR /log4doom
# Main script
COPY start.sh .
# Expose the ports
EXPOSE 1389
EXPOSE 3000
EXPOSE 25565
CMD ["bash", "./start.sh"]