Code Monkey home page Code Monkey logo

mutillidae-docker's People

Contributors

nicovell3 avatar sgerlach avatar softwrdev avatar thackeraaron avatar webpwnized avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mutillidae-docker's Issues

Stuck on GET parameter 'page' does not appear to be dynamic

Have tried on 2 different Kali hosts and getting the same issue:

[*] starting @ 19:57:44 /2022-10-08/

[19:57:44] [INFO] testing connection to the target URL
[19:57:44] [WARNING] there is a DBMS error found in the HTTP response body which could interfere with the results of the tests
you have not declared cookie(s), while server wants to set its own ('PHPSESSID=qoijh8f8rh3...icq6o4eka3;showhints=1'). Do you want to use those [Y/n]
[19:57:45] [INFO] checking if the target is protected by some kind of WAF/IPS
[19:57:45] [INFO] testing if the target URL content is stable
[19:57:46] [INFO] target URL content is stable
[19:57:46] [INFO] testing if GET parameter 'page' is dynamic
[19:58:16] [CRITICAL] connection timed out to the target URL. sqlmap is going to retry the request(s)
[19:59:46] [WARNING] GET parameter 'page' does not appear to be dynamic
[20:00:16] [CRITICAL] connection timed out to the target URL. sqlmap is going to retry the request(s)
[20:01:46] [CRITICAL] connection timed out to the target URL

[*] ending @ 20:01:46 /2022-10-08/


www |

www | Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0

www |

www | Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0

www |

www | Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0

www |

www | Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0

Error with composing

docker-compose up
Creating network "mutillidae-dockerhub_datanet" with the default driver
Creating network "mutillidae-dockerhub_ldapnet" with the default driver
Creating volume "mutillidae-dockerhub_ldap_data" with default driver
Creating volume "mutillidae-dockerhub_ldap_config" with default driver
Creating directory ...
Creating database ... error

Creating directory ... error
211e8f29b46d1f67a0eeeef1800380ca5cd". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for directory Cannot create container for service directory: Conflict. The container name "/directory" is already in use by container "cfb4e4ae223d66524c4fe13d0b2c0d624b8e43f403c7fb190db16e04dcd0f055". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for database Cannot create container for service database: Conflict. The container name "/database" is already in use by container "c511d89c38b2ff494cd16c207113d211e8f29b46d1f67a0eeeef1800380ca5cd". You have to remove (or rename) that container to be able to reuse that name.

ERROR: for directory Cannot create container for service directory: Conflict. The container name "/directory" is already in use by container "cfb4e4ae223d66524c4fe13d0b2c0d624b8e43f403c7fb190db16e04dcd0f055". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.

www server is not work on Apple M1

www server is not work on Apple M1

www | [core:emerg] [pid 1] (95)Operation not supported: AH00023: Couldn't create the mpm-accept mutex
www | (95)Operation not supported: could not create accept mutex

Add database creation disclaimer

When setting up the docker compose environment for the first time, the database "mutillidae" cannot be accessed and reports an error. It would be ideal if a disclaimer like "Use the option to recreate the database the first the web interface is displayed" was included in the README.md, just after the docker compose up -d command in the TLDR section.

I reviewed the database docker logs and the Dockerfile, which do not make any kind of reference to the "mutillidae" database, before realizing the error in the web interface provides the utility to create the database:

image

Apache2 crashed when the service restarted

Thanks for your suggestion, I tried to change HSTS setting by override the application in the Apache headers configuration file (/etc/apache2/sites-available/mutillidae.conf), however apache2 was crashed when I restarted the service and it can't be brought up.

Here is the step by step to reproduced the error, let me know if I missed anything

  1. Start docker container
host:~/mutillidae-docker$ docker-compose up
Creating network "mutillidae-docker_datanet" with the default driver
Creating network "mutillidae-docker_ldapnet" with the default driver
Creating mutillidae-docker_directory_1      ... done
Creating mutillidae-docker_database_1  ... done
Creating mutillidae-docker_database_admin_1  ... done
Creating mutillidae-docker_www_1             ... done
Creating mutillidae-docker_directory_admin_1 ... done
...
  1. Docker is listening on port 80,81,82 and 443 which is normal
host:~/mutillidae-docker$ sudo ss -antp | grep docker
LISTEN 0      4096          0.0.0.0:80         0.0.0.0:*     users:(("docker-proxy",pid=9894,fd=4))               
LISTEN 0      4096          0.0.0.0:81         0.0.0.0:*     users:(("docker-proxy",pid=9788,fd=4))               
LISTEN 0      4096          0.0.0.0:82         0.0.0.0:*     users:(("docker-proxy",pid=9842,fd=4))               
LISTEN 0      4096          0.0.0.0:443        0.0.0.0:*     users:(("docker-proxy",pid=9855,fd=4))               
host:~/mutillidae-docker$ 
  1. HSTS is disabled
host:~/mutillidae-docker$ curl -IL localhost
HTTP/1.1 302 Found
Server: Apache/2.4.52 (Debian)
X-Powered-By: PHP/8.1.2
Set-Cookie: PHPSESSID=c3a2a70d2e0d92c1c1d193dc13f9cff4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: showhints=1; path=/; SameSite=Lax
Location: database-offline.php
Content-Type: text/html; charset=UTF-8

HTTP/1.1 200 OK
Server: Apache/2.4.52 (Debian)
X-Powered-By: PHP/8.1.2
Set-Cookie: PHPSESSID=36d10641d76f05201aba97d59f08d734; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=UTF-8

host:~/mutillidae-docker$
  1. Create database, however, HSTS is seen on HTTP response but still disabled (max-age=0)
host:~$ curl -skI http://localhost | grep Strict
Strict-Transport-Security: max-age=0
host:~$ 
  1. List containers
host:~/mutillidae-docker$ docker-compose ps
               Name                              Command               State                    Ports                  
-----------------------------------------------------------------------------------------------------------------------
mutillidae-docker_database_1          docker-entrypoint.sh mysqld      Up      3306/tcp, 33060/tcp                     
mutillidae-docker_database_admin_1    /docker-entrypoint.sh apac ...   Up      0.0.0.0:81->80/tcp                      
mutillidae-docker_directory_1         /container/tool/run              Up      389/tcp, 636/tcp                        
mutillidae-docker_directory_admin_1   /container/tool/run              Up      443/tcp, 0.0.0.0:82->80/tcp             
mutillidae-docker_www_1               docker-php-entrypoint apac ...   Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
host:~/mutillidae-docker$ 
  1. Get into container's bash
host:~/mutillidae-docker$ docker exec -it mutillidae-docker_www_1 bash
root@9528fb465ddd:/var/www/html# 
  1. View HSTS setting in mutillidae.conf (disabled)
root@9528fb465ddd:/var/www/html# cd /etc/apache2/sites-available/
root@9528fb465ddd:/etc/apache2/sites-available# ls -lh
total 16K
-rw-r--r-- 1 root root 1.4K Aug  8  2020 000-default.conf
-rw-r--r-- 1 root root 6.2K Aug  8  2020 default-ssl.conf
-rw-r--r-- 1 root root 2.4K Feb 27 11:20 mutillidae.conf
root@9528fb465ddd:/etc/apache2/sites-available# 

root@9528fb465ddd:/etc/apache2/sites-available# nl mutillidae.conf | grep Strict-Transport-Security
    21            #Header set Strict-Transport-Security "max-age=31536000;includeSubDomains;preload"
root@9528fb465ddd:/etc/apache2/sites-available# 

root@9528fb465ddd:/etc/apache2/sites-available# nl mutillidae.conf | grep Header
    21            #Header set Strict-Transport-Security "max-age=31536000;includeSubDomains;preload"
root@9528fb465ddd:/etc/apache2/sites-available# 
  1. Enable it
root@9528fb465ddd:/etc/apache2/sites-available# sed -i 's/#Header/Header/' mutillidae.conf | grep Header
root@9528fb465ddd:/etc/apache2/sites-available# nl mutillidae.conf | grep Header
    21            Header set Strict-Transport-Security "max-age=31536000;includeSubDomains;preload"
root@9528fb465ddd:/etc/apache2/sites-available# 
  1. Restart Apache, apache2 was Terminated/crashed
root@9528fb465ddd:/etc/apache2/sites-available# service apache2 status 
apache2 is running.
root@9528fb465ddd:/etc/apache2/sites-available# 

root@9528fb465ddd:/etc/apache2/sites-available# service apache2 restart
Restarting Apache httpd web server: apache2Terminated
root@9528fb465ddd:/etc/apache2/sites-available# host:~/mutillidae-docker$ 
host:~/mutillidae-docker$ 
  1. State for "mutillidae-docker_www_1" is "Exit 0" after apache2 service restarted
host:~/mutillidae-docker$ docker-compose ps
               Name                              Command               State               Ports           
-----------------------------------------------------------------------------------------------------------
mutillidae-docker_database_1          docker-entrypoint.sh mysqld      Up       3306/tcp, 33060/tcp        
mutillidae-docker_database_admin_1    /docker-entrypoint.sh apac ...   Up       0.0.0.0:81->80/tcp         
mutillidae-docker_directory_1         /container/tool/run              Up       389/tcp, 636/tcp           
mutillidae-docker_directory_admin_1   /container/tool/run              Up       443/tcp, 0.0.0.0:82->80/tcp
mutillidae-docker_www_1               docker-php-entrypoint apac ...   Exit 0                              
host:~/mutillidae-docker$
  1. I stop the docker with Ctrl+C and tried to brought it up with "docker-compose up", however the State for "mutillidae-docker_www_1" changed to "Exit 1" now
host:~/mutillidae-docker$ docker-compose ps
               Name                              Command               State               Ports           
-----------------------------------------------------------------------------------------------------------
mutillidae-docker_database_1          docker-entrypoint.sh mysqld      Up       3306/tcp, 33060/tcp        
mutillidae-docker_database_admin_1    /docker-entrypoint.sh apac ...   Up       0.0.0.0:81->80/tcp         
mutillidae-docker_directory_1         /container/tool/run              Up       389/tcp, 636/tcp           
mutillidae-docker_directory_admin_1   /container/tool/run              Up       443/tcp, 0.0.0.0:82->80/tcp
mutillidae-docker_www_1               docker-php-entrypoint apac ...   Exit 1                              
host:~/mutillidae-docker$ 
  1. Port 80 & 443 are not listening now, only 81 & 82 are listening
host:~/mutillidae-docker$ sudo ss -antp | grep docker
LISTEN 0      4096          0.0.0.0:81         0.0.0.0:*     users:(("docker-proxy",pid=12040,fd=4))              
LISTEN 0      4096          0.0.0.0:82         0.0.0.0:*     users:(("docker-proxy",pid=12060,fd=4))              
host:~/mutillidae-docker$ 
  1. At this moment, I've no choice but to stop and remove containers, networks, images, and volumes with "docker-compose down" and "docker-compose up" again to use mutillidae again. However, the main issue which is to enabled HSTS by override the application in the Apache headers configuration file was not accomplished yet.

What's wrong in my steps? Please let me know the right way to do it. Thanks again

How to access mysql directly?

I notice that mysql 3306/tcp is not listening when I bring up mutillidae via docker-compose up command

$ ss -ant
State    Recv-Q Send-Q  Local Address:Port Peer Address:Port
LISTEN   0      4096      127.0.0.1:443       127.0.0.1:*     
LISTEN   0      4096      127.0.0.1:80        127.0.0.1:*     
LISTEN   0      4096      127.0.0.1:81        127.0.0.1:*     
LISTEN   0      4096      127.0.0.1:82        127.0.0.1:* 
$ docker ps

IMAGE                                  PORTS                                        NAMES
webpwnized/mutillidae:database_admin   127.0.0.1:81->80/tcp                         mutillidae-docker_database_admin_1
webpwnized/mutillidae:www              127.0.0.1:80->80/tcp, 127.0.0.1:443->443/tcp mutillidae-docker_www_1
webpwnized/mutillidae:ldap_admin       443/tcp, 127.0.0.1:82->80/tcp                mutillidae-docker_directory_admin_1
webpwnized/mutillidae:database         3306/tcp, 33060/tcp                          mutillidae-docker_database_1
webpwnized/mutillidae:ldap             389/tcp, 636/tcp                             mutillidae-docker_directory_1

I also notice that it's not in docker-compose.yml file

Is there a way to access mysql database via command line instead of phpMyAdmin on port 81/tcp?

How to enable HSTS on mutillidae-docker?

I noticed that HSTS is diabled on docker image?

~/mutillidae-docker$ curl http://localhost -skI | grep Strict 
Strict-Transport-Security: max-age=0
~/mutillidae-docker$ 

~/mutillidae-docker$ curl https://localhost -skI | grep Strict 
Strict-Transport-Security: max-age=0
~/mutillidae-docker$ 

Is it possible to enable it? If yes, please let me know. Thanks

~ mutillidae fan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.