Install IronWASP on Ubuntu

IronWASP is an open source system for web application vulnerability testing.

Tested on Ubuntu Desktop 14.04.2 LTS 64bit. The same steps works for Ubuntu server 14.10 as well.

[email protected] $ wget -c  -q  -O ironwasp.zip    https://ironwasp.org/ironwasp.zip
  • Install the latest version of wine, by adding ubuntu-wine repository.
[email protected] $ sudo add-apt-repository ppa:ubuntu-wine/ppa 
[sudo] password for osdefsec: 
 Welcome to the Wine Team PPA.  Here you can get the latest available Wine betas for every supported version of Ubuntu.  This PPA is managed by Scott Ritchie and Maarten Lankhorst.
 More info: https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp1exde8p1/secring.gpg' created
gpg: keyring `/tmp/tmp1exde8p1/pubring.gpg' created
gpg: requesting key F9CB8DB0 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp1exde8p1/trustdb.gpg: trustdb created
gpg: key F9CB8DB0: public key "Launchpad PPA for Ubuntu Wine Team" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

[email protected] $ ## update apt and upgrade system
[email protected] $ sudo apt-get update && sudo apt-get upgrade
. . . 

[email protected] $ sudo apt-get install wine1.7 winetricks wine-mono4.5.6
#!/bin/bash 


IRONPATH=${HOME}/ironwasp 
dircheck() { 
	if [ !  -d $1 ] ; then 
		echo "Creating directory $1 " 
		mkdir -p $1 
	fi
} 

prepare(){
	WINECACHE=${HOME}/.cache/wine/
	WINETRICKSCACHE=${HOME}/.cache/winetricks/
	dircheck $WINECACHE 
	dircheck $WINETRICKSCACHE 
	dircheck ${WINETRICKSCACHE}dotnet20 
	dircheck ${WINETRICKSCACHE}dotnet20sp2 
	
	echo -e "\n\nCopying wine-mono-4.5.6.msi to $WINECACHE "
	cp -v /usr/share/wine/mono/wine-mono-4.5.6.msi $WINECACHE
	echo -e "\n\nFetching wine_gecko-2.36-x86.msi"
	wget -O ${WINECACHE}/wine_gecko-2.36-x86.msi http://downloads.sourceforge.net/project/wine/Wine%20Gecko/2.36/wine_gecko-2.36-x86.msi 
	echo -e "\n\nFetching dotnetfx.exe"
	wget -O ${WINETRICKSCACHE}/dotnet20/dotnetfx.exe http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe 
	echo -e "\n\nFetching NetFx20SP2_x86.exe"
	wget -O ${WINETRICKSCACHE}/dotnet20sp2/NetFx20SP2_x86.exe http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 


} 
install() { 
	WINEARCH=win32  WINEPREFIX=$IRONPATH wineboot 
	WINEPREFIX=$IRONPATH winetricks    dotnet20sp2 fontfix	
	cd ${IRONPATH}/drive_c 

	if [ -f ${HOME}/Downloads/ironwasp.zip ] ; then 
		unzip  ${HOME}/Downloads/ironwasp.zip 
	else 
		echo "Need file ${HOME}/Downloads/ironwasp.zip "
	fi
} 

cleanup() {
	read -p "Are you sure you want to delete $IRONPATH (y/[n])? " sure 
	echo ""
	if [ ${sure:="n"} == "y" ] ; then 
		rm -rvf $IRONPATH
		echo -e "Run install script again\n$0 install"
	else 
		echo "Doing nothing "
	fi
}

# To run 
run() { 
	WINEPREFIX=$IRONPATH wine 'c:/IronWASP/IronWASP.exe' 

} 

OPTIONS=(install run cleanup prepare)
usage() { 
	echo "$0 ( `echo ${OPTIONS[@]} | tr ' ' ' | ' ` ) "
	exit 1 
} 


echo ${OPTIONS[@]} | grep -wq $1  || usage 
$1  

Add execute permission to the file

[email protected]~ $ chmod +x ironwasp.sh 

Download required files by running prepare option.

[email protected]~ $ ./ironwasp.sh   prepare      
Creating directory /home/osdefsec/.cache/wine/ 
Creating directory /home/osdefsec/.cache/winetricks/ 
Creating directory /home/osdefsec/.cache/winetricks/dotnet20 
Creating directory /home/osdefsec/.cache/winetricks/dotnet20sp2 


Copying wine-mono-4.5.6.msi to /home/osdefsec/.cache/wine/ 
‘/usr/share/wine/mono/wine-mono-4.5.6.msi’ -> ‘/home/osdefsec/.cache/wine/wine-mono-4.5.6.msi’


Fetching wine_gecko-2.36-x86.msi
--2015-04-18 20:53:53--  http://downloads.sourceforge.net/project/wine/Wine%20Gecko/2.36/wine_gecko-2.36-x86.msi
. . . 

2015-04-18 20:56:37 (178 KB/s) - ‘/home/osdefsec/.cache/wine//wine_gecko-2.36-x86.msi’ saved [29718016/29718016]



Fetching dotnetfx.exe
--2015-04-18 20:56:37--  http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe
. . . 
2015-04-18 21:00:00 (113 KB/s) - ‘/home/osdefsec/.cache/winetricks//dotnet20/dotnetfx.exe’ saved [23510720/23510720]



Fetching NetFx20SP2_x86.exe
--2015-04-18 21:00:00--  http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe
. . . 
2015-04-18 21:00:24 (1003 KB/s) - ‘/home/osdefsec/.cache/winetricks//dotnet20sp2/NetFx20SP2_x86.exe’ saved [25001480/25001480]

Run installation

[email protected]~ $ ./ironwasp.sh  install 

In case, the installation fails for some reasons, run cleanup and install again.

[email protected]~ $ ./ironwasp.sh  cleanup
... press y 

[email protected]~ $ ./ironwasp.sh  install 

Run ironwasp

[email protected]~ $ ./ironwasp.sh  run 

Good luck!

Dinesh Gunasekar - | Tags : Web Application, Security
comments powered by Disqus