Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2020-01 - Port mapping mismatch #2

Open
slobodansimic opened this issue Jan 6, 2020 · 1 comment
Open

v2020-01 - Port mapping mismatch #2

slobodansimic opened this issue Jan 6, 2020 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@slobodansimic
Copy link

slobodansimic commented Jan 6, 2020

Hi,

There is a mismatch between the output of containers.sh and the actual containers' mapping ports.

The following are the WebSploit vulnerable containers and associated exposed ports.

Vuln App Container Port
webgoat 8881
juice-shop 8882
dvwa 8883
mutillidae_2 8884
bwapp2 8885
dvna 8886
hackazon 8887
hackme-rtov 8888
IMAGE PORTS NAMES
santosomar/hackme-rtov 0.0.0.0:9000->80/tcp hackme-rtov
santosomar/hackazon 0.0.0.0:6667->80/tcp hackazon
santosomar/dvna 0.0.0.0:6666->9090/tcp dvna
santosomar/bwapp 3306/tcp, 0.0.0.0:6665->80/tcp bwapp2
santosomar/mutillidae_2 3306/tcp, 0.0.0.0:6664->80/tcp mutillidae_2
santosomar/dvwa 0.0.0.0:6663->80/tcp dvwa
santosomar/juice-shop 0.0.0.0:6662->3000/tcp juice-shop
santosomar/webgoat 0.0.0.0:6661->8080/tcp webgoat
@slobodansimic
Copy link
Author

slobodansimic commented Jan 6, 2020

If you need to fix it, you can apply the following changes.

Stop all images
docker stop $(docker ps -a -q)

Stop docker
service docker stop

Update port mapping

cd /var/lib/docker/containers/
find . -type f -name hostconfig.json -exec sed -i 's/666/888/g' {} \;
find . -type f -name hostconfig.json -exec sed -i 's/9000/8888/g' {} \;

Start docker
service docker start

Start all images
docker start $(docker ps -a -q)

run containers.sh
~/containers.sh

Vuln App Container Port
webgoat 8881
juice-shop 8882
dvwa 8883
mutillidae_2 8884
bwapp2 8885
dvna 8886
hackazon 8887
hackme-rtov 8888
IMAGE PORTS NAMES
santosomar/hackme-rtov 0.0.0.0:8888->80/tcp hackme-rtov
santosomar/hackazon 0.0.0.0:8887->80/tcp hackazon
santosomar/dvna 0.0.0.0:8886->9090/tcp dvna
santosomar/bwapp 3306/tcp, 0.0.0.0:8885->80/tcp bwapp2
santosomar/mutillidae_2 3306/tcp, 0.0.0.0:8884->80/tcp mutillidae_2
santosomar/dvwa 0.0.0.0:8883->80/tcp dvwa
santosomar/juice-shop 0.0.0.0:8882->3000/tcp juice-shop
santosomar/webgoat 0.0.0.0:8881->8080/tcp webgoat

@santosomar santosomar self-assigned this Jan 7, 2020
@santosomar santosomar added bug Something isn't working enhancement New feature or request labels Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants