diff --git a/Broken Access Control/hard/wierd-securitatis/Dockerfile b/Broken Access Control/hard/wierd-securitatis/Dockerfile index 37436f1..0d9ba00 100644 --- a/Broken Access Control/hard/wierd-securitatis/Dockerfile +++ b/Broken Access Control/hard/wierd-securitatis/Dockerfile @@ -1,12 +1,9 @@ FROM node:slim -WORKDIR /wierd-securitatis +WORKDIR /app 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/bac-hard.yaml b/Broken Access Control/hard/wierd-securitatis/bac-hard.yaml new file mode 100644 index 0000000..f5183e2 --- /dev/null +++ b/Broken Access Control/hard/wierd-securitatis/bac-hard.yaml @@ -0,0 +1,48 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: my-ingress +spec: + rules: + - host: chall.nullvitap.tech + http: + paths: + - path: /bac-hard + pathType: Prefix + backend: + service: + name: bac-hard-service + port: + number: 80 +--- +apiVersion: v1 +kind: Service +metadata: + name: bac-hard-service +spec: + selector: + app: bac-hard + ports: + - name: http + port: 80 + targetPort: 3555 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: bac-hard-deployment +spec: + replicas: 1 # Set the desired number of replicas for Docker 1 + selector: + matchLabels: + app: bac-hard + template: + metadata: + labels: + app: bac-hard + spec: + containers: + - name: docker1-container + image: sanjay7178/hu-chall-23:bac-hard + ports: + - containerPort: 3555 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/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/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/.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..5e254d6 --- /dev/null +++ b/Insecure Design/easy/Dockerfile @@ -0,0 +1,4 @@ +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/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 + 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 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 @@