From a433f7fbc75bca23bd20dd389c8495c5a9eb0c8b Mon Sep 17 00:00:00 2001 From: adikpb <67222969+adikpb@users.noreply.github.com> Date: Sat, 18 Nov 2023 02:18:14 +0530 Subject: [PATCH 01/10] Docker - Revert changes due to merge on Broken Access Control - Hard - Insecure Design - Easy --- .../hard/wierd-securitatis/Dockerfile | 12 --------- .../hard/wierd-securitatis/dockerfile | 27 ------------------- Insecure Design/easy/.env | 4 +++ Insecure Design/easy/Dockerfile | 3 +++ Insecure Design/easy/compose.yaml | 6 +++++ 5 files changed, 13 insertions(+), 39 deletions(-) delete mode 100644 Broken Access Control/hard/wierd-securitatis/Dockerfile delete mode 100644 Broken Access Control/hard/wierd-securitatis/dockerfile create mode 100644 Insecure Design/easy/.env create mode 100644 Insecure Design/easy/Dockerfile create mode 100644 Insecure Design/easy/compose.yaml diff --git a/Broken Access Control/hard/wierd-securitatis/Dockerfile b/Broken Access Control/hard/wierd-securitatis/Dockerfile deleted file mode 100644 index 37436f1..0000000 --- a/Broken Access Control/hard/wierd-securitatis/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:slim -WORKDIR /wierd-securitatis - -COPY package*.json ./ -RUN npm install - -COPY . . -EXPOSE 3555 -RUN node initDB.js -CMD [ "node", "index.js" ] - - diff --git a/Broken Access Control/hard/wierd-securitatis/dockerfile b/Broken Access Control/hard/wierd-securitatis/dockerfile deleted file mode 100644 index 49d78ef..0000000 --- a/Broken Access Control/hard/wierd-securitatis/dockerfile +++ /dev/null @@ -1,27 +0,0 @@ - -# Stage 1: Build Node.js application -FROM node:18 AS node_build - -# Set the working directory -WORKDIR /app - -# Copy the Node.js application files -COPY package*.json ./ - -# Install dependencies -RUN npm install - -# Copy the application code -COPY . . - -# Build the Node.js application -# RUN npm run build - - -# Set the working directory for the Node.js application -WORKDIR /app - -RUN node initDB.js -EXPOSE 3555 -# Run the Node.js application -CMD ["node", "index.js"] diff --git a/Insecure Design/easy/.env b/Insecure Design/easy/.env new file mode 100644 index 0000000..5965ead --- /dev/null +++ b/Insecure Design/easy/.env @@ -0,0 +1,4 @@ +PORT = 2915 + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-insecure-design-easy \ No newline at end of file diff --git a/Insecure Design/easy/Dockerfile b/Insecure Design/easy/Dockerfile new file mode 100644 index 0000000..998492d --- /dev/null +++ b/Insecure Design/easy/Dockerfile @@ -0,0 +1,3 @@ +FROM httpd:latest + +COPY ./index.html /usr/local/apache2/htdocs/index.html \ No newline at end of file diff --git a/Insecure Design/easy/compose.yaml b/Insecure Design/easy/compose.yaml new file mode 100644 index 0000000..1a3ea97 --- /dev/null +++ b/Insecure Design/easy/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + ports: + - ${PORT}:80 + From 97d60a57b6999a968c362241078b2b4c960e9e2e Mon Sep 17 00:00:00 2001 From: adikpb <67222969+adikpb@users.noreply.github.com> Date: Sat, 18 Nov 2023 02:18:49 +0530 Subject: [PATCH 02/10] - Fix Merge Issues --- Broken Access Control/hard/wierd-securitatis/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Broken Access Control/hard/wierd-securitatis/Dockerfile diff --git a/Broken Access Control/hard/wierd-securitatis/Dockerfile b/Broken Access Control/hard/wierd-securitatis/Dockerfile new file mode 100644 index 0000000..6fa55ac --- /dev/null +++ b/Broken Access Control/hard/wierd-securitatis/Dockerfile @@ -0,0 +1,9 @@ +FROM node:slim +WORKDIR /wierd-securitatis + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN node initDB.js +CMD [ "node", "index.js" ] From 99a30449d7e6f7a5f204af6ead21e669dfa9508c Mon Sep 17 00:00:00 2001 From: adikpb <67222969+adikpb@users.noreply.github.com> Date: Sat, 18 Nov 2023 02:49:21 +0530 Subject: [PATCH 03/10] Docker - Identification And Authentication Failures - Easy - Identification And Authentication Failures - Hard --- .../easy/.env | 4 ++++ .../easy/Dockerfile | 3 +++ .../easy/compose.yaml | 6 ++++++ .../hard/.env | 4 ++++ .../hard/Dockerfile | 5 +++++ .../hard/compose.yaml | 6 ++++++ Insecure Design/easy/Dockerfile | 2 +- 7 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Identification and Authentication Failures (Broken Authentication)/easy/.env create mode 100644 Identification and Authentication Failures (Broken Authentication)/easy/Dockerfile create mode 100644 Identification and Authentication Failures (Broken Authentication)/easy/compose.yaml create mode 100644 Identification and Authentication Failures (Broken Authentication)/hard/.env create mode 100644 Identification and Authentication Failures (Broken Authentication)/hard/Dockerfile create mode 100644 Identification and Authentication Failures (Broken Authentication)/hard/compose.yaml diff --git a/Identification and Authentication Failures (Broken Authentication)/easy/.env b/Identification and Authentication Failures (Broken Authentication)/easy/.env new file mode 100644 index 0000000..8ab0ef5 --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/easy/.env @@ -0,0 +1,4 @@ +PORT = 2279 + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-identification-and-authentication-failures-easy \ No newline at end of file diff --git a/Identification and Authentication Failures (Broken Authentication)/easy/Dockerfile b/Identification and Authentication Failures (Broken Authentication)/easy/Dockerfile new file mode 100644 index 0000000..3f3593f --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/easy/Dockerfile @@ -0,0 +1,3 @@ +FROM php:apache + +COPY . /var/www/html \ No newline at end of file diff --git a/Identification and Authentication Failures (Broken Authentication)/easy/compose.yaml b/Identification and Authentication Failures (Broken Authentication)/easy/compose.yaml new file mode 100644 index 0000000..1a3ea97 --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/easy/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + ports: + - ${PORT}:80 + diff --git a/Identification and Authentication Failures (Broken Authentication)/hard/.env b/Identification and Authentication Failures (Broken Authentication)/hard/.env new file mode 100644 index 0000000..e1aa1ca --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/hard/.env @@ -0,0 +1,4 @@ +PORT = 2280 + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-identification-and-authentication-failures-hard \ No newline at end of file diff --git a/Identification and Authentication Failures (Broken Authentication)/hard/Dockerfile b/Identification and Authentication Failures (Broken Authentication)/hard/Dockerfile new file mode 100644 index 0000000..fdbd059 --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/hard/Dockerfile @@ -0,0 +1,5 @@ +FROM php:apache + +ARG src="./4uth Xrack Que\$t/" +ARG dest="/var/www/html/" +COPY ${src} ${dest} \ No newline at end of file diff --git a/Identification and Authentication Failures (Broken Authentication)/hard/compose.yaml b/Identification and Authentication Failures (Broken Authentication)/hard/compose.yaml new file mode 100644 index 0000000..1a3ea97 --- /dev/null +++ b/Identification and Authentication Failures (Broken Authentication)/hard/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + ports: + - ${PORT}:80 + diff --git a/Insecure Design/easy/Dockerfile b/Insecure Design/easy/Dockerfile index 998492d..0fc6254 100644 --- a/Insecure Design/easy/Dockerfile +++ b/Insecure Design/easy/Dockerfile @@ -1,3 +1,3 @@ -FROM httpd:latest +FROM httpd:apline COPY ./index.html /usr/local/apache2/htdocs/index.html \ No newline at end of file From aa7d4bde30994effa251f2495a58ae0fd1b047fc Mon Sep 17 00:00:00 2001 From: adikpb <67222969+adikpb@users.noreply.github.com> Date: Sat, 18 Nov 2023 04:22:32 +0530 Subject: [PATCH 04/10] Docker - Injection - Easy - Injection - Hard - Minor changes to docker file of Insecure Design, Broken Access Control --- .../hard/wierd-securitatis/Dockerfile | 2 +- Injection (Cross-Site Scripting (XSS))/easy/.env | 6 ++++++ .../easy/Dockerfile | 8 +++++--- .../easy/compose.yaml | 6 ++++++ Injection (Cross-Site Scripting (XSS))/hard/.env | 10 ++++++++++ .../hard/Dockerfile | 8 +++++--- .../hard/compose.yaml | 13 +++++++++++++ Insecure Design/easy/Dockerfile | 3 ++- Insecure Design/hard/et_tu/Dockerfile | 3 +-- 9 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 Injection (Cross-Site Scripting (XSS))/easy/.env create mode 100644 Injection (Cross-Site Scripting (XSS))/easy/compose.yaml create mode 100644 Injection (Cross-Site Scripting (XSS))/hard/.env create mode 100644 Injection (Cross-Site Scripting (XSS))/hard/compose.yaml diff --git a/Broken Access Control/hard/wierd-securitatis/Dockerfile b/Broken Access Control/hard/wierd-securitatis/Dockerfile index 6fa55ac..0d9ba00 100644 --- a/Broken Access Control/hard/wierd-securitatis/Dockerfile +++ b/Broken Access Control/hard/wierd-securitatis/Dockerfile @@ -1,5 +1,5 @@ FROM node:slim -WORKDIR /wierd-securitatis +WORKDIR /app COPY package*.json ./ RUN npm install diff --git a/Injection (Cross-Site Scripting (XSS))/easy/.env b/Injection (Cross-Site Scripting (XSS))/easy/.env new file mode 100644 index 0000000..f15d463 --- /dev/null +++ b/Injection (Cross-Site Scripting (XSS))/easy/.env @@ -0,0 +1,6 @@ +PORT = 3000 +COOKIE_KEY = "SECRET" +FLAG = "NULL{C3rul3anSuns3t}" + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-injection-easy \ No newline at end of file diff --git a/Injection (Cross-Site Scripting (XSS))/easy/Dockerfile b/Injection (Cross-Site Scripting (XSS))/easy/Dockerfile index 4d243ac..418cd6c 100644 --- a/Injection (Cross-Site Scripting (XSS))/easy/Dockerfile +++ b/Injection (Cross-Site Scripting (XSS))/easy/Dockerfile @@ -1,6 +1,8 @@ -FROM node:18 +FROM node:slim WORKDIR /app -COPY package*.json . -RUN npm install + +COPY package*.json ./ +RUN npm install + COPY . . CMD [ "node", "index.js" ] \ No newline at end of file diff --git a/Injection (Cross-Site Scripting (XSS))/easy/compose.yaml b/Injection (Cross-Site Scripting (XSS))/easy/compose.yaml new file mode 100644 index 0000000..468bea5 --- /dev/null +++ b/Injection (Cross-Site Scripting (XSS))/easy/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + ports: + - ${PORT}:${PORT} + diff --git a/Injection (Cross-Site Scripting (XSS))/hard/.env b/Injection (Cross-Site Scripting (XSS))/hard/.env new file mode 100644 index 0000000..2f1eff8 --- /dev/null +++ b/Injection (Cross-Site Scripting (XSS))/hard/.env @@ -0,0 +1,10 @@ +PORT = 3001 +COOKIE_KEY = "secret" +BOT_USERNAME = "hi" +BOT_PASSWORD = 123 +FLAG = "NULL{R0ogue3lephan1}" +BOT_AUTH = "1234567890" +DB_URI = "mongodb://localhost:27017" + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-injection-hard \ No newline at end of file diff --git a/Injection (Cross-Site Scripting (XSS))/hard/Dockerfile b/Injection (Cross-Site Scripting (XSS))/hard/Dockerfile index 5bbbc9b..2686aa4 100644 --- a/Injection (Cross-Site Scripting (XSS))/hard/Dockerfile +++ b/Injection (Cross-Site Scripting (XSS))/hard/Dockerfile @@ -1,6 +1,8 @@ -FROM node:18 +FROM node:slim WORKDIR /app -COPY package*.json . -RUN npm install + +COPY package*.json ./ +RUN npm install + COPY . . CMD [ "node", "index.js", "&&", "node", "puppeteerBot.js" ] \ No newline at end of file diff --git a/Injection (Cross-Site Scripting (XSS))/hard/compose.yaml b/Injection (Cross-Site Scripting (XSS))/hard/compose.yaml new file mode 100644 index 0000000..6f7221f --- /dev/null +++ b/Injection (Cross-Site Scripting (XSS))/hard/compose.yaml @@ -0,0 +1,13 @@ +services: + db: + image: mongo:latest + restart: always + app: + build: . + ports: + - ${PORT}:${PORT} + depends_on: + db: + condition: service_started + environment: + DB_URI: mongodb://db:27017 diff --git a/Insecure Design/easy/Dockerfile b/Insecure Design/easy/Dockerfile index 0fc6254..5e254d6 100644 --- a/Insecure Design/easy/Dockerfile +++ b/Insecure Design/easy/Dockerfile @@ -1,3 +1,4 @@ -FROM httpd:apline +FROM httpd:alpine +WORKDIR /app COPY ./index.html /usr/local/apache2/htdocs/index.html \ No newline at end of file diff --git a/Insecure Design/hard/et_tu/Dockerfile b/Insecure Design/hard/et_tu/Dockerfile index 1408c82..3fe4d49 100644 --- a/Insecure Design/hard/et_tu/Dockerfile +++ b/Insecure Design/hard/et_tu/Dockerfile @@ -1,6 +1,5 @@ FROM python:3.10-slim-buster - -WORKDIR /et_tu +WORKDIR /app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt From 884f9dc2099547baca0a5eaf24a21fda7ee2a293 Mon Sep 17 00:00:00 2001 From: adikpb <67222969+adikpb@users.noreply.github.com> Date: Sat, 18 Nov 2023 11:47:01 +0530 Subject: [PATCH 05/10] Docker - Security Logging and Monitoring Failures --- .../easy/.env | 4 + .../easy/Dockerfile | 4 + .../easy/compose.yaml | 6 + .../easy/index.html | 22 +-- .../easy/index.php | 160 ------------------ .../hard/.env | 4 + .../hard/Dockerfile | 4 + .../hard/compose.yaml | 6 + .../hard/index.html | 24 +-- .../hard/index.php | 160 ------------------ .../hard/script.js | 20 +++ 11 files changed, 50 insertions(+), 364 deletions(-) create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/.env create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/Dockerfile create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/compose.yaml delete mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/index.php create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/hard/.env create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/hard/Dockerfile create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/hard/compose.yaml delete mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/hard/index.php create mode 100644 Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/hard/script.js diff --git a/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/.env b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/.env new file mode 100644 index 0000000..bd5e72e --- /dev/null +++ b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/.env @@ -0,0 +1,4 @@ +PORT = 3124 + +# Docker +COMPOSE_PROJECT_NAME = challenges2023owasp10-security-logging-and-monitoring-failures-easy \ No newline at end of file diff --git a/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/Dockerfile b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/Dockerfile new file mode 100644 index 0000000..6a83a1d --- /dev/null +++ b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/Dockerfile @@ -0,0 +1,4 @@ +FROM httpd:alpine +WORKDIR /app + +COPY ./ /usr/local/apache2/htdocs/ \ No newline at end of file diff --git a/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/compose.yaml b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/compose.yaml new file mode 100644 index 0000000..1a3ea97 --- /dev/null +++ b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + ports: + - ${PORT}:80 + diff --git a/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/index.html b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/index.html index 56855dd..f3949d9 100644 --- a/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/index.html +++ b/Security Logging and Monitoring Failures (Insufficient Logging and Monitoring)/easy/index.html @@ -92,26 +92,6 @@