Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ docker-compose build
### Run Web App Attack Demo

1. Setup your docker listener in the first terminal
1. `nc -lv 10.10.10.31 9001`
1. `nc -lnvp 9001`
1. Start the docker containers in a second terminal
1. `docker-compose up`
1. Navigate to the web app on port 8080
Expand All @@ -54,7 +54,7 @@ docker-compose build
### Run a User Agent Attack Demo

1. Setup your docker listener in the first terminal
1. `nc -lv 10.10.10.31 9001`
1. `nc -lnvp 9001`
1. Start the docker containers in a second terminal
1. `docker-compose up`
1. In a third terminal, run the following. The second IP is the docker host
Expand Down
2 changes: 1 addition & 1 deletion cve-neo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt -qy update && apt -qy upgrade && apt -qy install wget git vim iputils-pi

COPY files /

RUN wget https://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz &&\
RUN wget https://downloads.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz &&\
tar xvzf apache-maven-3.8.4-bin.tar.gz &&\
ln -s apache-maven-3.8.4 apache-maven

Expand Down
14 changes: 14 additions & 0 deletions cve-neo/cve-neo.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/files/opt/bitnami/log4j-shell-poc/vulnerable-application/src/main/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="marshalsec-0.0.3-SNAPSHOT-all" level="project" />
<orderEntry type="library" name="lib1" level="project" />
<orderEntry type="library" name="lib" level="project" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws S

if(userName.equals("admin") && password.equals("password")){
out.println("Welcome Back Admin");
}
else{
Logger logger = LogManager.getLogger(com.example.log4shell.log4j.class);
logger.info(userName);

}else{

// vulnerable code
Logger logger = LogManager.getLogger(com.example.log4shell.log4j.class);
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
environment:
- POC_ADDR=172.16.238.11
- POC_PORT=80
- LISTENER_ADDR=10.10.10.31
- LISTENER_ADDR=192.168.1.121
- LISTENER_PORT=9001
networks:
cve-net:
Expand Down