Web Attacks

Worth 80 points

Description

Web Attacks

For this project, you will exploit four web based vulnerabilities. They are running on a webserver hosted on netsec-projects.cs.northwestern.edu, port 5000.
You can access it via port forwarding. E.g., ssh -L 8080:netsec-projects:5000 username@hamsa.cs.northwestern.edu. It is now available at localhost on port 8080.

Do not run this inside your student container. Run it on your nix OS (VM for windows) (normal shell is fine for macOS) (nix same as macOS)

DO NOT ATTEMPT TO MODIFY THE DATABASE!

This is a great demo of SQL injection, you'll probably find it helpful in doing the project: https://www.youtube.com/watch?v=ciNHn38EyRc

For each exploit, you will find a flag which is associated with your username. To submit your flags, put them in the file called flags.txt, and run the submit script as usual. This file is located inside your student container at /mnt/projects/web-attacks/flags.txt

Here is a little information about each of the vulnerabilities:

Hint 1: Remember the name of this project is "webattacks"

Hint 2: You can get all database by running the following command

^$' union select table_schema, '' from information_schema.tables group by table_schema union select '', '

Hint 3: when writing scripts for part 3 and 4, start the script with var Ajax=null; instead of let Ajax=null;

Tips

The user who's session you are trying to steal for each of the last two parts is logging in from behind the firewall, i.e., accesses the site by visiting netsec-projects.cs.northwestern.edu directly, not via localhost and port forwarding like you.

For any XSS you write, it is not recommended that you communicate with any server other than netsec-projects because of potential firewall issues.