Pentesting2015: Difference between revisions
Paul Wilhelm (talk | contribs) |
|||
Line 8: | Line 8: | ||
*Einrichten von DVWA aus Raspberry Pi und VMs |
*Einrichten von DVWA aus Raspberry Pi und VMs |
||
*Brute-Force Angriff auf DVWA |
*Brute-Force Angriff auf DVWA |
||
==DVWA auf Rasperry Pi einrichten== |
|||
<pre> |
|||
#sources |
|||
#http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ |
|||
#https://github.com/RandomStorm/DVWA |
|||
#http://www.computersecuritystudent.com/SECURITY_TOOLS/DVWA/DVWAv107/lesson1/ |
|||
mkdir dvwa |
|||
cd dvwa/ |
|||
wget https://github.com/RandomStorm/DVWA/archive/v1.0.8.zip |
|||
sudo apt-get -y install apache2 mysql-server php5 php5-mysql php-pear php5-gd |
|||
sudo apt-get update |
|||
sudo apt-get -y install apache2 mysql-server php5 php5-mysql php-pear php |
|||
mysql passwort: |
|||
root |
|||
mysqlpassword |
|||
#raspbian got a different default directory |
|||
#see step 5 http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ |
|||
#cd /etc/apache2/sites-available/ |
|||
#ls |
|||
#cat default |
|||
#cd /var/www/ |
|||
sudo mv /home/pi/dvwa/v1.0.8.zip . |
|||
unzip v1.0.8.zip |
|||
vim DVWA-1.0.8/config/config.inc.php |
|||
#find the following line: |
|||
# |
|||
#$_DVWA[ 'db_password' ] = 'p@ssw0rd'; |
|||
# |
|||
#and replace “p@ssw0rd” with your MySQL password. |
|||
#i.e. mysqlpassword |
|||
sudo vim /etc/php5/apache2/php.ini |
|||
#change to on: |
|||
;allow_url_include = Off |
|||
allow_url_include = On |
|||
#step 10 |
|||
sudo chmod -R 777 DVWA-1.0.8/ |
|||
mysql -u root -p |
|||
#password: |
|||
#mysqlpassword |
|||
create database dvwa; |
|||
exit |
|||
#let out Step 12 and Step 13 from http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ |
|||
#vim /etc/apache2/apache2.conf |
|||
##Move to the bottom of the file and add the following line: |
|||
#ServerName localhost |
|||
#(re)start apache: |
|||
sudo service apache2 start |
|||
#Step 15 |
|||
#Open a web browser and navigate to: |
|||
#http://[server IP address]/[dvwa-directory]/setup.php |
|||
#Example: |
|||
#http://192.168.0.20/dvwa/setup.php |
|||
#browser: |
|||
firefox http://192.168.5.112/DVWA-1.0.8/setup.php |
|||
#and click the button that says “Create / Reset Database” |
|||
#now go to the dvwa mainpage: |
|||
firefox http://192.168.5.112/DVWA-1.0.8/ |
|||
#login with |
|||
#username: admin |
|||
#password: password |
|||
#follow the instructions |
|||
</pre> |
|||
==Brute-Force Angriff auf DVWA== |
==Brute-Force Angriff auf DVWA== |
Revision as of 14:16, 29 September 2015
Wikiseite für das Thema Pentesting vom IT-Security Workshop 2015.
allgemeine Planung
Einarbeitung ins Pentesting für Web-Applikationen mit Hilfe von dvwa.
1. Tag:
- Einrichten von DVWA aus Raspberry Pi und VMs
- Brute-Force Angriff auf DVWA
DVWA auf Rasperry Pi einrichten
#sources #http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ #https://github.com/RandomStorm/DVWA #http://www.computersecuritystudent.com/SECURITY_TOOLS/DVWA/DVWAv107/lesson1/ mkdir dvwa cd dvwa/ wget https://github.com/RandomStorm/DVWA/archive/v1.0.8.zip sudo apt-get -y install apache2 mysql-server php5 php5-mysql php-pear php5-gd sudo apt-get update sudo apt-get -y install apache2 mysql-server php5 php5-mysql php-pear php mysql passwort: root mysqlpassword #raspbian got a different default directory #see step 5 http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ #cd /etc/apache2/sites-available/ #ls #cat default #cd /var/www/ sudo mv /home/pi/dvwa/v1.0.8.zip . unzip v1.0.8.zip vim DVWA-1.0.8/config/config.inc.php #find the following line: # #$_DVWA[ 'db_password' ] = 'p@ssw0rd'; # #and replace “p@ssw0rd” with your MySQL password. #i.e. mysqlpassword sudo vim /etc/php5/apache2/php.ini #change to on: ;allow_url_include = Off allow_url_include = On #step 10 sudo chmod -R 777 DVWA-1.0.8/ mysql -u root -p #password: #mysqlpassword create database dvwa; exit #let out Step 12 and Step 13 from http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/ #vim /etc/apache2/apache2.conf ##Move to the bottom of the file and add the following line: #ServerName localhost #(re)start apache: sudo service apache2 start #Step 15 #Open a web browser and navigate to: #http://[server IP address]/[dvwa-directory]/setup.php #Example: #http://192.168.0.20/dvwa/setup.php #browser: firefox http://192.168.5.112/DVWA-1.0.8/setup.php #and click the button that says “Create / Reset Database” #now go to the dvwa mainpage: firefox http://192.168.5.112/DVWA-1.0.8/ #login with #username: admin #password: password #follow the instructions
Brute-Force Angriff auf DVWA
Zum Angriff auf DVWA wurde das Programm Hydra verwendet. Hydra können zwei Dateien übergeben werden, z.B. users.txt mit den Login-Namen und pwd.txt mit den zu testenden Passwörtern. Hydra wird wie folgt verwendet:
hydra {IP-Adresse} {http-form-post|http-get-form} -L {users.txt} -P {pwd.txt} "{Pfad auf dem Server}/index.php:{zu setzende Variablen}:S={Teil eines Strings, der im Erfolgfall angezeigt wird}"
Command Execution
Tip für medium security: http://stackoverflow.com/questions/5130847/shell-multiple-commands-in-one-line
Weiteres vorgehen: http://www.computersecuritystudent.com/SECURITY_TOOLS/DVWA/DVWAv107/lesson3/index.html
Links
- dvwa : http://www.dvwa.co.uk/
- installation von dvwa auf ubuntu server: http://hackthistv.com/blog/how-to-install-dvwa-on-ubuntu-server-14-04/
- alte Projekte: http://blog.taddong.com/2011/10/hacking-vulnerable-web-applications.html
- VMs: https://www.owasp.org/index.php/OWASP_Vulnerable_Web_Applications_Directory_Project/Pages/VMs
- Applikationen: https://github.com/OWASP/OWASP-VWAD/blob/master/src/offline.tsv
- intercepting Proxy: https://portswigger.net/burp/download.html
- Applikations, Virtual Machines und ISOs (siehe jeweils Tab): https://www.owasp.org/index.php/OWASP_Vulnerable_Web_Applications_Directory_Project#tab=On-Line_apps
Wörterbücher
https://wiki.skullsecurity.org/Passwords
https://crackstation.net/buy-crackstation-wordlist-password-cracking-dictionary.htm