Plagiarism Free Homework and Assignment Help

Module 13: Hacking Web Servers

Module 13: Hacking Web Servers

Lab 2: Perform a Web Server Attack

Lab Scenario

After gathering required information about the target web server, the next task for an ethical hacker or pen tester is to attack the web server in order to test the target network’s web server security infrastructure. This requires knowledge of how to perform web server attacks.

Attackers perform web server attacks with certain goals in mind. These goals may be technical or non-technical. For example, attackers may breach the security of the web server to steal sensitive information for financial gain, or merely for curiosity’s sake. The attacker tries all possible techniques to extract the necessary passwords, including password guessing, dictionary attacks, brute force attacks, hybrid attacks, pre-computed hashes, rule-based attacks, distributed network attacks, and rainbow attacks. The attacker needs patience, as some of these techniques are tedious and time-consuming. The attacker can also use automated tools such as Brutus and THC-Hydra, to crack web passwords.

An ethical hacker or pen tester must test the company’s web server against various attacks and other vulnerabilities. It is important to find various ways to extend the security test by analyzing web servers and employing multiple testing techniques. This will help to predict the effectiveness of additional security measures for strengthening and protecting web servers of the organization.

Lab Objectives

  • Crack FTP credentials using a Dictionary Attack

Overview of Web Server Attack

Attackers can cause various kinds of damage to an organization by attacking a web server, including:

  • Compromise of a user account
  • Secondary attacks from the website and website defacement
  • Root access to other applications or servers
  • Data tampering and data theft
  • Damage to the company’s reputation

Task 1: Crack FTP Credentials using a Dictionary Attack

A dictionary or wordlist contains thousands of words that are used by password cracking tools to break into a password-protected system. An attacker may either manually crack a password by guessing it or use automated tools and techniques such as the dictionary method. Most password cracking techniques are successful, because of weak or easily guessable passwords.

First, find the open FTP port using Nmap, and then perform a dictionary attack using the THC Hydra tool.

  1. Click Parrot Security 4.10 to switch to the Parrot Security machine.

    Here, we will use a sample password file (Passwords.txt) containing a list of passwords to crack the FTP credentials on the target machine.

  2. Assume that you are an attacker, and you have observed that the FTP service is running on the Windows 10 machine.
  3. Perform an Nmap scan on the target machine (Windows 10) to check if the FTP port is open.
  4. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window.6766.jpg
  5. Parrot Terminal window appears. In the terminal window, type sudo su and press Enter to run the programs as a root user.
  6. In the [sudo] password for attacker field, type toor as a password and press Enter.

    The password that you type will not be visible.

  7. Now, type cd and press Enter to jump to the root directory.Screenshot
  8. In the terminal window, type nmap -p 21 [IP Address of Windows 10], and press Enter.

    In this lab, the IP address of Windows 10 is 10.10.10.10.

    Screenshot

  9. Observe that port 21 is open in Windows 10.
  10. Check if an FTP server is hosted on the Windows 10 machine.
  11. Type ftp [IP Address of Windows 10] and press Enter. You will be prompted to enter user credentials. The need for credentials implies that an FTP server is hosted on the machine.Screenshot
  12. Try entering random usernames and passwords in an attempt to gain FTP access.

    The password you enter will not be visible on the screen.

  13. As shown in the screenshot, you will not be able to log in to the FTP server. Close the terminal window.Screenshot
  14. Now, to attempt to gain access to the FTP server, perform a dictionary attack using the THC Hydra tool.
  15. Click Places from the top-section of the Desktop and click Desktop from the drop-down options.Screenshot
  16. Navigate to CEHv11 Module 13 Hacking Web Servers folder and copy Wordlists folder.

    Press Ctrl+C to copy the folder.

    Screenshot

  17. Paste the copied folder (Wordlists) on the Desktop. Close the window

    Press Ctrl+V to paste the folder.

    Screenshot

  18. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal window.7889.jpg
  19. Parrot Terminal window appears. In the terminal window, type sudo su and press Enter to run the programs as a root user.
  20. In the [sudo] password for attacker field, type toor as a password and press Enter.

    The password that you type will not be visible.

  21. Now, type cd and press Enter to jump to the root directory.Screenshot
  22. In the terminal window, type hydra -L /home/attacker/Desktop/Wordlists/Usernames.txt -P /home/attacker/Desktop/Wordlists/Passwords.txt ftp://[IP Address of Windows 10] and press Enter.

    The IP address of Windows 10 in this lab exercise is 10.10.10.10. This IP address might vary in your lab environment.

    Screenshot

  23. Hydra tries various combinations of usernames and passwords (present in the Usernames.txt and Passwords.txt files) on the FTP server and outputs cracked usernames and passwords, as shown in the screenshot.

    This might take some time to complete.

  24. On completion of the password cracking, the cracked credentials appear, as shown in the screenshot.2020-08-26_14-57-31.jpg
  25. Try to log in to the FTP server using one of the cracked username and password combinations. In this lab, use Martin’s credentials to gain access to the server.
  26. In the terminal window, type ftp [IP Address of Windows 10], and press Enter.
  27. Enter Martin’s user credentials (Martin and apple) to check whether you can successfully log in to the server.
  28. On entering the credentials, you will successfully be able to log in to the server. An ftp terminal appears, as shown in the screenshot.Screenshot
  29. Now you can remotely access the FTP server hosted on the Windows 10 machine.
  30. Type mkdir Hacked and press Enter to remotely create a directory named Hacked on the Windows 10 machine through the ftp terminal.Screenshot
  31. Click Windows 10 to switch to the Windows 10 machine and navigate to C:\FTP.
  32. View the directory named Hacked, as shown in the screenshot:Screenshot
  33. You have successfully gained remote access to the FTP server by obtaining the appropriate credentials.
  34. Click Parrot Security 4.10 to switch back to the Parrot Security machine.
  35. Enter help to view all other commands that you can use through the FTP terminal.Screenshot
  36. On completing the task, enter quit to exit the ftp terminal.Screenshot
  37. This concludes the demonstration of how to crack FTP credentials using a dictionary attack and gain remote access to the FTP server.
  38. Close all open windows on both the Parrot Security and Windows 10 machines.

Question 2.1.1:

What is the password for Shiela in this task?

Question 2.1.2:

What is the IP address of Windows 10 in this task?

 

$0.00

Module 13: Hacking Web Servers

$0.00