Chuyển đến nội dung chính

Hướng Dẫn Thực Hành -Burp Suite, Spider Function : Lesson 12

  1. What is Damn Vulnerable Web App (DVWA)?
    • Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable.
    • Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.
  2. What is Burp Suite?
    • Burp suite is a java application that can be used to secure or crack web applications. The suite consists of different tools, like a proxy server, a web spider an intruder and a so called repeater, with which requests can be automated.
  3. Pre-Requisite Labs
    • Damn Vulnerable Web App (DVWA): Lesson 1: How to Install DVWA in Fedora 14
    • BackTrack: Lesson 1: Installing BackTrack 5 Rx
  4. Lab Notes
    • In this lab we will do the following:
      1. We will configure Firefox to use Burp Suite as its Proxy
      2. We will configure Burp Suite to accept requests from Firefox.
      3. We will use Burp Suite to spider the DVWA web application.
      4. We will conduct a very simple forensics investigation on Fedora's Web Server, in which the DVWA web application resides.
  5. Legal Disclaimer
       Bài lab dùng cho mục đích học tập
Section 1. Configure Fedora14 Virtual Machine Settings
  1. Open Your VMware Player
    • Instructions:
      1. On Your Host Computer, Go To
      2. Start --> All Program --> VMWare --> VMWare Player
  2. Edit fedora14 Virtual Machine Settings
    • Instructions:
      1. Highlight fedora14
      2. Click Edit virtual machine settings
  3. Edit Network Adapter
    • Instructions:
      1. Highlight Network Adapter
      2. Select Bridged
      3. Click on the OK Button.

Section 2. Login to Fedora14
  1. Start Fedora14 VM Instance
    • Instructions:
      1. Start Up VMWare Player
      2. Select Fedora14
      3. Play virtual machine
  2. Login to Fedora14
    • Instructions:
      1. Login: student
      2. Password: <whatever you set it to>.

Section 3. Open Console Terminal and Retrieve IP Address
  1. Start a Terminal Console
    • Instructions:
      1. Applications --> Terminal
  2. Switch user to root
    • Instructions:
      1. su - root
      2. <Whatever you set the root password to>
  3. Get IP Address
    • Instructions:
      1. ifconfig -a
    • Notes:
      • As indicated below, my IP address is 192.168.1.106.
      • Please record your IP address.

Section 4. Configure BackTrack Virtual Machine Settings
  1. Open Your VMware Player
    • Instructions:
      1. On Your Host Computer, Go To
      2. Start --> All Program --> VMWare --> VMWare Player
  2. Edit BackTrack Virtual Machine Settings
    • Instructions:
      1. Highlight BackTrack5R1
      2. Click Edit virtual machine settings
  3. Edit Network Adapter
    • Instructions:
      1. Highlight Network Adapter
      2. Select Bridged
      3. Do not Click on the OK Button.

Section 5. Login to BackTrack
  1. Start BackTrack VM Instance
    • Instructions:
      1. Start Up VMWare Player
      2. Select BackTrack5R1
      3. Play virtual machine
  2. Login to BackTrack
    • Instructions:
      1. Login: root
      2. Password: toor or <whatever you changed it to>.
  3. Bring up the GNOME
    • Instructions:
      1. Type startx

Section 6. Open Console Terminal and Retrieve IP Address
  1. Open a console terminal
    • Instructions:
      1. Click on the console terminal
  2. Get IP Address
    • Instructions:
      1. ifconfig -a
    • Notes:
      • As indicated below, my IP address is 192.168.1.105.
      • Please record your IP address.
Section 7. Configure Firefox Proxy Settings
  1. Start Firefox
    • Instructions:
      1. Click on Firefox
  2. Preferences
    • Instructions:
      1. Edit --> Preferences
  3. Preferences
    • Instructions:
      1. Click on Advanced
      2. Click on the Network Tab
      3. Click on the Settings Button
  4. Preferences
    • Instructions:
      1. Click on Manual proxy configurations
      2. Type "127.0.0.1" in the HTTP Proxy Text Box
      3. Type "8080" in the Port Text Box
      4. Check Use the proxy server for all protocols
      5. Click OK
      6. Click Close

Section 8. Configure Burp Suite
  1. Start Burp Suite
    • Instructions:
      1. Applications --> Vulnerability Assessment --> Web Application Assessment ---> Web Vulnerability Scanner --> burpsuite
  2. JRE Message
    • Instructions:
      1. Click OK
  3. Configure proxy
    • Instructions:
      1. Click on the proxy tab
      2. Click on the options tab
      3. Verify the port is set to 8080
  4. Turn on intercept
    • Instructions:
      1. Click on the proxy tab
      2. Click on the intercept tab
      3. Click on the "intercept is on" button to change it to "intercept is off"

Section 9. Spider with Burp Suite
  1. Browse to DVWA's homepage
    • Instructions:
      1. http://IPADDRESS/dvwa/
        • Replace IPADDRESS with the Fedora's IP Address obtain in (Section 3, Step 3).
      2. Press <Enter>
      3. Continue to Next Step.
  2. Target Host
    • Instructions:
      1. Click on the target tab
      2. Click on the site map tab
    • Notes(FYI):
      1. Although the intercept is turned off you are still able to view get requests.
      2. In addition, you are able to see the contents of the get requests, including the PHPSESSID for /dvwa/login.php.
      3. Notice, how a directory structure of the DVWA has been created for the login page.
      4. Continue to Next Step.
  3. Spider Configuration
    • Instructions:
      1. Click on the spider tab
      2. Click on the options tab
      3. Click on radio button "automatically submit these credentials"
      4. Click on the request tab
      5. username: admin
      6. password: password
  4. Spider Host
    • Instructions:
      1. Click on the target tab
      2. Click on the site map tab
      3. Click on the DVWA IP Address, then Right Click to display the utility menu.
      4. Click on spider this host.
      5. Continue to Next Step
  5. Spider Directory True Results
    • Notes:
      1. Notice that you now have a pretty accurate map of the DVWA website.
      2. Continue to next step.
     
  6. Spider Directory True Results
    • Instructions:
      1. Click on the spider tab
      2. Click on the control tab
      3. Notice that 460+/- requests were made to the DVWA website.
      4. Continue to Next Step

Section 10. View Scan Results on Fedora DVWA web server
  1. Viewing Apache's Access Log
    • Instructions:
      1. Go to the Fedora14 VM
      2. Bring up a Terminal Windows
      3. su - root
      4. cd /var/log/httpd
      5. tail -400 access_log | more
        • tail -400, means display the last 400 lines of the apache's access_log. (I choose 400, because there 460 requests made to DVWA during the spider action)
        • more, means give it to me one screenful at a time.
  2. Viewing Apache's Error Log
    • Instructions:
      1. cd /var/log/http
      2. grep `date '+%a %b %d'` error_log | head
        • grep, search and print lines matching a certain pattern.
        • `date '+%a %b %d'`, display today's date where %a is the abbreviated weekday name, %b is the abbreviated month name, and %d is the abbreviated month name.
        • error_log, is apache's error_log.  Events go in this log when (1) people/spiders are searching for something that might not exists or (2) people/spiders are sending passive/malicious instructions to a form.
        • head, show me the first 10 lines.
      3. Notice how the burpsuite spider is searching for fires that do not exist.

Section 11. Clean Up Notes
  1. On BackTrack's Firefox
    • Instructions:
      1. Edit --> Preferences
  2. Edit Network Settings
    • Instructions:
      1. Click on Advanced
      2. Click on Network Tab.
      3. Click on Settings Button.
  3. Configure Connection Settings
    • Instructions:
      1. Click on No proxy radio button
      2. Click on the OK Button
      3. Click on the Close button

Section 12. Proof of Lab
  1. Proof of Lab
    • Proof of Lab Instructions:
      1. On Fedora, pull up a terminal window.
      2. cd /var/log/httpd
      3. grep `date '+%d/%b/%Y'` access_log | wc -l
        • wc -l, count how man lines grep found for today's date in the access_log.
      4. date
      5. echo "Your Name"
        • Replace the string "Your Name" with your actual name.
        • e.g., echo "John Gray"
      6. Do a <PrtScn>
      7. Paste into a word document
      8. Upload to Www.AnToanThongTin.Edu.Vn


 

 

Bài đăng phổ biến từ blog này

Hack the Gibson VM (CTF Challenge)

It’s a boot2root challenge and it does not get over with getting root access. You have to find flag also. So let’s start. First of all download lab from https://download.vulnhub.com/gibson/gibson.ova Now open kali terminal and like always start with first step i.e. netdiscover netdiscover it shows all the hosts those are up in our network and from here we get our target ip. Target IP: 192.168.1.6 As our target is all set we are going to scan it with nmap which will show all the open ports. In this case open ports are only two i.e. 22 and 80. nmap –p- -A 192.168.1.6 As from the above result we have got 80 port open so we will open target ip in browser. It shows an accessible directory. Let’s try opening it as we cannot see anything important here. Oh no such luck with this also. It’s written the result will be found by brute force but there is no place where we can apply brute force. As we do not have any other option so let’s just go to view page source to see if we could get a...

Penetration Testing in PwnLab (CTF Challenge)

In this article we will walkthrough a root2boot penetration testing challenge i.e PwnLab. PwbLab is a vulnerbale framework, based on the concept of CTF (capture the flag), with a bit of security which is a little complicated to bypass. But it’s not impossible. So, let us learn how we can get its access. Download From Here Now to start let us, firstly, consider that we do not know the IP of the PwnLab, therefore search for the IP address before hand and for that there is a command that shows us all the IP’s present in our network, so go to the terminal of you Kali and type : netdiscover Target IP = 192.168.0.105 And to know that we start our penetration testing. So, first, we will now scan with nmap , we will apply an aggressive scan as it gives detailed information and is fast. The command is : nmap -A 192.168.0.105 We have the result of scanning and as you can see there are only three ports open and they are: 80, 111, 3306. Our target IP is 192.168.0.105 as its MAC Vendor is...

Hack the Pentester Lab: from SQL injection to Shell II (Blind SQL Injection)

Today we are going to perform penetration testing with part II of previous lab, download it from  here . Now install the iso image in VM ware and start it. In this lab task level is intermediate and challenge is to gain access of administration console and then upload a PHP webshell. Start Kali Linux then open the terminal and  type netdiscover  command for scanning network. Here  192.168.1.102  is my target IP which is shown in the screenshot. Now explore this IP in browser. When you will open target IP in browser you will get a web page having heading My Awesome Photoblog . On the top of left side it contains some tags: home; test; ruxcon; 2010; all pictures; admin. Now  Click  on  test . The given URL : http://192.168.1.102/cat.php?id=1  will run sql query for  ID 1  now let try to find out whether the above URL is vulnerable to sql injection or not by adding( ‘) apostrophe at last of URL: http://192.168.1.102/cat.p...