How to upgrade OWASP Mutillidae II to the latest release in Samurai Web Testing Framework or Web Security Dojo (SOLVED)

OWASP Mutillidae II is pre-installed in Samurai Web Testing Framework and Web Security Dojo (ethical hacking sandboxes, pre-configured vulnerable targets). However, the release version is likely outdated.

To update OWASP Mutillidae II to the latest release in Samurai Web Testing Framework

Create the upd_mutillidae.sh file with the following contents:

#!/bin/bash  
  
cd /tmp
temp="$(curl -sL -A 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' https://sourceforge.net/projects/mutillidae/files/mutillidae-project/)"
if [ $? -ne '0' ]; then
    exit 1
fi
  
wget -O "mutillidae.zip" `echo "${temp}" | grep -o -E 'https://[A-Za-z0-9./-]{7,}[.]zip/download' | head -n 1`
unzip mutillidae.zip
 
sudo rm -rf /usr/share/mutillidae.original.backup
sudo mv /usr/share/mutillidae /usr/share/mutillidae.original.backup
sudo mkdir /usr/share/mutillidae
sudo mv mutillidae*/* /usr/share/mutillidae/
sudo mv /usr/share/mutillidae.original.backup/ssl.crt /usr/share/mutillidae/ssl.crt
 
sudo chown -R www-data:www-data /usr/share/mutillidae/
 
sudo rm -rf mutillidae*
 
cd

Run the script:

sudo bash upd_mutillidae.sh

In your web browser, open the http://mutillidae/set-up-database.php URL address to rebuild the database.

To update OWASP Mutillidae II to the latest release in Web Security Dojo

Create the upd_mutillidae.sh file with the following contents:

#!/bin/bash  
  
cd /tmp
temp="$(curl -sL -A 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' https://sourceforge.net/projects/mutillidae/files/mutillidae-project/)"
if [ $? -ne '0' ]; then
    exit 1
fi
  
wget -O "mutillidae.zip" `echo "${temp}" | grep -o -E 'https://[A-Za-z0-9./-]{7,}[.]zip/download' | head -n 1`
unzip mutillidae.zip
 
sudo rm -rf /var/www/mutillidae.original.backup
sudo mv /var/www/mutillidae /var/www/mutillidae.original.backup
sudo mkdir /var/www/mutillidae
sudo mv mutillidae*/* /var/www/mutillidae/
 
sudo sed -i 's/static public $mMySQLDatabaseHost = "localhost";/static public $mMySQLDatabaseHost = "127.0.0.1";/' /var/www/mutillidae/classes/MySQLHandler.php
sudo sed -i 's/static public $mMySQLDatabasePassword = "";/static public $mMySQLDatabasePassword = "dojo";/' /var/www/mutillidae/classes/MySQLHandler.php
 
sudo chown -R www-data:www-data /var/www/mutillidae/
 
sudo rm -rf mutillidae*
 
cd

Run the script:

sudo bash upd_mutillidae.sh

In your web browser, open the http://localhost/mutillidae/set-up-database.php link to rebuild the database.

To install OWASP Mutillidae II in Kali Linux follow this guide.

Recommended for you:

Leave a Reply

Your email address will not be published.