-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 905b89f
Showing
6 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Example: docker build . -t dsvw && docker run -p 65412:65412 dsvw | ||
|
||
FROM python:3.10-alpine3.18 AS build | ||
|
||
RUN apk --no-cache add libxml2-dev libxslt-dev gcc python3 python3-dev py3-pip musl-dev linux-headers | ||
|
||
RUN python3 -m ensurepip --upgrade && python3 -m pip install pex~=2.1.47 | ||
RUN mkdir /source | ||
COPY requirements.txt /source/ | ||
RUN pex -r /source/requirements.txt -o /source/pex_wrapper | ||
|
||
FROM python:3.10-alpine3.18 AS final | ||
|
||
RUN apk upgrade --no-cache | ||
WORKDIR /dsvw | ||
RUN adduser -D dsvw && chown -R dsvw:dsvw /dsvw | ||
|
||
COPY dsvw.py . | ||
RUN sed -i 's/127.0.0.1/0.0.0.0/g' dsvw.py | ||
COPY --from=build /source / | ||
|
||
EXPOSE 65412 | ||
USER dsvw | ||
CMD ["/dsvw/pex_wrapper", "dsvw.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
![Sign](https://i.imgur.com/bovh598.png) | ||
|
||
Damn Small Vulnerable Web [![Python 3.x](https://img.shields.io/badge/python-3.x-yellow.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-Unlicense-red.svg)](https://github.com/stamparm/DSVW/blob/master/LICENSE) | ||
========= | ||
|
||
**Damn Small Vulnerable Web** (DSVW) is a deliberately vulnerable web application written in under 100 lines of code, created for educational purposes. It supports majority of (most popular) web application vulnerabilities together with appropriate attacks. | ||
|
||
![XSS](http://i.imgur.com/BoSOgJs.png) | ||
|
||
Quick start | ||
---- | ||
|
||
Run the following command: | ||
``` | ||
$ python3 dsvw.py | ||
Damn Small Vulnerable Web (DSVW) < 100 LoC (Lines of Code) #v0.2a | ||
by: Miroslav Stampar (@stamparm) | ||
[i] running HTTP server at 'http://127.0.0.1:65412'... | ||
``` | ||
|
||
and navigate your browser to http://127.0.0.1:65412/: | ||
|
||
![DSVW](http://i.imgur.com/9nG4mwu.png) | ||
|
||
Requirements | ||
---- | ||
|
||
Python (**3.x**) is required for running this program. Items *XML External Entity (local)*, *XML External Entity (remote)* and *Blind XPath Injection (boolean)* require installation of `python-lxml` (e.g. `apt-get install python-lxml`). Otherwise, those will be disabled. | ||
|
||
To install lxml via pip, run the following command: | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.9' | ||
|
||
services: | ||
dsvw: | ||
build: . | ||
expose: | ||
- 65412 | ||
ports: | ||
- 65412:65412 | ||
restart: always |
Oops, something went wrong.