CYS 506 - Lab7
CYS 506 - Lab7
CYS 506 - Lab7
2022/23
IMAM ABDULRAHMAN BIN FAISAL UNIVERSITY
College Department Course
Practical
College of Computer Science Session Plan
Networks and Ethical Hacking (CYS
and Information Technology Communications 506)
Session Topic/Title Session No. Session Duration
(Minutes)
Hacking Web Applications 7 120
1- Session Please list the Session Learning Outcomes (SLOs), as presented in the
Outcomes ABET Student Outcomes A to K.
Note: The sequence of instruction may vary and you may start with the
most essential SLO. 1 is the most important one, followed by 2, 3 and 4, as
per time availability.
2- Tool(s)/Software .
DVWA
Docker
OWASP Zap
burpsuite
Kali Linux
3- procedural steps
(Tasks)
Web Application Hacking refers to the technique of exploiting weaknesses in
the code and architecture of web applications to gain unauthorized access to
sensitive data or execute malicious activities. In this session, we will focus on various
types of attacks that can be performed on web applications, including brute force
attacks, command injection, cross-site request forgery (CSRF). By simulating
these attacks in a controlled environment, you will acquire knowledge on how to
identify and prevent possible threats from occurring in real-world scenarios.
Lab Tasks:
Part 1: Setup
2- Add execute permissions after downloading “Linux Installer” and then execute that
file.
3- Download and install docker in linux using “sudo apt install docker.io”
4- Run the following docker command to have the DVWA vulnerable web application
run in port 80.
7- Click “DVWA Security” on the left panel and set the security level to low and submit.
3- After the scan is done view the alerts to know the vulnerabilities in the web
application.
2- Login to DVWA and go to the brute force option on the left panel.
4- Go to HTTP history in the proxy tab in burpsuite and find the request of the request
you sent.
Note: below the response word, you can pick how you want the page to be rendered
10- Highlight the parameter you want changed and then click add, since we’re brute
forcing the username and password we will pick them.
11- In the positions tab change the attack type to cluster bomb.
12- Now go to the payloads tab and pick your wordlists in order.
14- After the attack is executed sort by length, successful bruteforce attempts should have
replies that are different in length from most the others
Part 5: CSRF
3- Notice how there is no authentication in the source code and the web application only
depends on the session ID.
If this url is sent to a user and he clicks it will change his password on the web application.
6- Now login as a different user in another browser: pablo:letmein
7- Now look at what happens if the url is visited while authenticated as another user.
Assignments:
Do the following tasks and take screenshots as proof.
1- Run an automated scan using OWASP ZAP
2- Explain one of the vulnerabilities found using OWASP ZAP with a short
paragraph
4- Conduct a command injection to create a text file with the words “CYS LAB”
and then read that file.
5- Conduct a CSRF attack on one of the users you found previously by brute
force, make the victim’s password “ETHICAL_HACKING”. (Put sufficient
screenshots to show that the attack was successful).
5- Resources Suggest further resources for the students to manage their learning after
the class. Make sure that the resources are specific and different to suit all
students, e. g. Figures, Tables, Links, etc.
https://en.wikipedia.org/wiki/Cross-site_request_forgery
https://en.wikipedia.org/wiki/Code_injection
https://github.com/digininja/DVWA