bXSS and Docker
Published: August 4, 2021 12:03 pm
A brief how-to guide outlining the installation of bXSS (https://github.com/LewisArdern/bXSS) inside a Docker container.
First, you will want to obtain the software:
~$ git clone https://github.com/LewisArdern/bXSS.git
Then configure the application (follow the official instructions for more information).
~$ cd bXSS ~$ cp server/config/configExample.js server/config/config.js
You’ll most likely want to comment out 95% of the config.js file and focus on the
config.url parameter setting this to the domain name where you intend to run the software.
Dockerfile inside the bXSS directory with the following contents:
FROM node:14 WORKDIR /usr/src/app COPY package*.json ./ RUN npm install COPY . /usr/src/app EXPOSE 8080 CMD [ "node", "app.js" ]
Then build the Docker image:
~$ docker build -t bxss .
If you didn’t change the port parameter in the
config.js then the default is port 80. To create the container and run it with default parameters:
~$ docker run --name bxss -p 127.0.0.1:8080:80 bxss
This will expose port 8080 on the host and forward internally to the container on port 80. Now you are ready to set up the host on your web server by proxying to port 8080.
If you need to use a different port on your webserver, simply change out all references to port 8080 to your desired port.