Skip to content

Commit f17073f

Browse files
committed
Initial commit.
0 parents  commit f17073f

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:20.04
2+
3+
WORKDIR /opt
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
RUN apt update && apt upgrade -y
7+
RUN apt install git openjdk-11-jdk -y \
8+
&& git clone https://github.com/morphuslabs/get-log4j-exploit-payload.git
9+
10+
COPY entrypoint.sh /opt/get-log4j-exploit-payload
11+
RUN chmod +x /opt/get-log4j-exploit-payload/entrypoint.sh
12+
ENTRYPOINT ["/opt/get-log4j-exploit-payload/entrypoint.sh"]

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# log4j_payload_downloader Docker Container
2+
3+
Docker container for the project hosted at https://github.com/djt78/log4j_payload_downloader.
4+
All credits go to the original author(s).
5+
6+
Getting Started:
7+
8+
1. Clone the repo:
9+
```sh
10+
git clone https://github.com/YungBinary/get-log4j-exploit-payload-docker.git
11+
```
12+
13+
2. Change directory:
14+
```sh
15+
cd get-log4j-exploit-payload-docker
16+
```
17+
18+
3. Build the docker image:
19+
```sh
20+
docker build . -t get-payloads
21+
```
22+
23+
4. Run the docker image:
24+
```sh
25+
docker run -it get-payloads
26+
```
27+
28+
5. Once finished, use the following command to find the exited container ID:
29+
```sh
30+
docker ps -a
31+
```
32+
33+
6. Copy the downloaded directory from the container to the current directory on the host machine:
34+
```sh
35+
docker cp <CONTAINER_ID>:/opt/get-log4j-exploit-payload-docker/downloaded .
36+
```
37+
38+
## License
39+
40+
See https://github.com/morphuslabs/get-log4j-exploit-payload

entrypoint.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
cd /opt/get-log4j-exploit-payload
4+
javac GetLog4jExploitPayload.java
5+
mkdir downloaded
6+
7+
echo -n "Please enter the addresses in comma separated format, i.e. ldap://x,ldap://y,ldap://z: "
8+
read addresses
9+
10+
for address in $(echo $addresses | sed "s/,/ /g")
11+
do
12+
echo "Running get-log4j-exploit-payload against $address"
13+
java GetLog4jExploitPayload $address downloaded
14+
echo
15+
done

0 commit comments

Comments
 (0)