Welcome to the Database Security project. This hands-on project is designed to help you understand how real-world data breaches can occur and what strategies can be used to protect against them.
Learning Goals
In this project, you’ll explore two significant types of database vulnerabilities and how attackers exploit them:
-
Inference Attacks: Learn how sensitive information can be uncovered by analyzing and correlating seemingly harmless data. Data mining often uses this technique to “connect the dots” and extract private details without direct access.
-
SQL Injection (SQLi): Understand how attackers inject malicious SQL code through input fields to manipulate databases, access unauthorized data, or execute harmful actions.
Topics Covered
- Basic T-SQL queries
- Basic JavaScript
- Database inference techniques
- SQL injection attacks
GATECH ID – GTID
-
NOTE: This is not you Georgia Tech Username; it is your 9 digit Student Id you can find on your Buzzcard or by following the below steps:
-
Please see the Finding Your GTID section in page page for instructions on retrieving your GTID.
-
Be very careful! When you copy and paste, strip off all leading spaces or special characters.
-
All flags are based off your GTID
Project Time Expectations
Based on feedback from students in previous semesters, the time required to complete this project is roughly divided as follows:
- Approximately one-fourth of your time will be spent on inference-related tasks.
- Approximately half will be dedicated to SQL injection tasks.
- Approximately one-fourth will be dedicated to Defender tasks.
Because some tasks may require thoughtful analysis and trial-and-error, it is strongly recommended that you start early to avoid last-minute difficulties.
Everyone works at their own pace and skill sets vary—don’t be hard on yourself if you find you’re taking more time than estimated.
Feel free to post in the appropriate threads if you have questions about the project that aren’t addressed in the Write-Ups or have not yet been asked on Ed. The TA team will be more than happy to help.
Previous Students Top 5 Recommendations
- Start early
- Take breaks when frustrated
- Attend/Watch the Office Hours
- Abandon Assumptions
- Re-read the writeups
Stats (after all this is a data project) from a previous semester
Average submission per student
The average number of submissions per student is less than 8 total submissions.
1st Submission (Flag0) into Gradescope
Below is a statistical representation of why it is beneficial to start early!
Individual Flag Breakdown
Below is a statistical representation of how students fair on each flag!
Final deliverables
You will submit a single file named project_dbsec.json to Gradescope. A template is available at: /home/dbsec/Desktop/project_dbsec.json
See the page for formatting and content guidelines.
Important Reference Material
Valuable Information –
NOTE: Vital information is provided on the prerequisite page, which is not provided elsewhere!
Submission
- Platform: Gradescope (auto-graded)
- More info:
Virtual Machine
Supported
- Intel/AMD x64 architecture
Not Supported
- Apple M-series (ARM-based) devices are not supported.
- are provided on how to attempt to get the VM to run on a MAC, but again, this is not supported. Note: You should SSH into the VM if you choose to attempt this. UTM can be particularly slow and borderline unusable.
- Extensions will not be granted due to technical issues.
This project uses Microsoft SQL Server Developer Edition, which runs on Linux inside the provided VM. The DBSec project is in the master VM, and the credentials for the Linux user will be provided on the project release in Canvas.
Getting Started
- – This is a must read!
Table of contents
BACKGROUND AND SETUP
Project Scenario: Your First Penetration Test
“Good News, Everyone!” 
You’ve just stepped into your new role at a penetration testing firm, and your first mission awaits. A portfolio of client websites has been placed in front of you, each one resembling a digital fortress with hidden doors and potential cracks. It’s your responsibility to probe their defenses and uncover vulnerabilities before anyone else does.
As you begin your review, familiar patterns start to emerge. The layouts, naming conventions, and user interfaces share striking similarities. A deeper look reveals the reason — all of these websites were developed by the same software vendor. This discovery is critical: any weakness found in one site could very likely exist across the entire portfolio, putting multiple clients at risk.
Your objective in this mission is to identify and report those vulnerabilities. You’ll search for sensitive information that was never meant to be exposed, analyze how data is processed and protected, and test the applications against user input designed to bypass their safeguards. In doing so, you’ll step fully into the role of a penetration tester — wearing many hats and sharpening the skills essential to protecting databases and application security.

Setup Instructions
This project focuses on two common yet critical categories of database attacks: inference attacks and SQL injection. You will take on the role of a security analyst, tasked with identifying, exploiting, and reporting these vulnerabilities, all within a controlled environment designed for learning and exploration.
Do to the nature of this project and resources required, this project requires more resources to run than previous projects.
UTM: the emulation done via UTM is extremely cost prohibited and also unreliable. It is highly recommended to attempt a different approach outside of using UTM. Please check out the following info in the
VirtualBox: If using VirtualBox on an Intel/AMD chipset and it is running slowly, it is recommended to provide more RAM to the VM, adding 4GB at a time, but not exceeding your physical RAM. You can also try to add more CPU to the VM (in pairs of two), but not exceeding your physical cores. Please check out the following info in the
It is highly recommended that you create a snapshot of your VM before even attempting to start the project. Failure to do so may require you to reimport (possibly redownload) the OVA file.
- Creating a Snapshot in VirtualBox
- Select the VM (CS6035-Semester-Year-xxx).
-
On the right hand side, select the Snapshots tab.

-
You will see an icon above the VM that says Take. Click on this to have the Snapshot creation window appear.

- Name the Snapshot and click OK.
-
- Restoring a Snapshot in VirtualBox
- Select the VM (CS6035-Semester-Year-xxx).
- On the right hand side, select the Snapshots tab.
-
Select the Restore Point you want to restore from.

- You will see an icon above the VM that says Restore. Click on this to have the Snapshot restored.
- Clone a VM in UTM
- Note: Ensure you have enough free drive space!
- Right click on the VM (CS6035-Semester-Year-xxx) and select Clone.
- When the Message Box: Do you want to duplicate this VM and all its data? appears, click Yes.
To get started, follow the setup steps carefully. Precision matters here — even a small misstep could cause confusion or errors later in the process.
- Log in to the Virtual Machine
- You will use a pre-configured virtual machine (VM) provided with the project. Log in using the details shared in Canvas’s official Database Security Project release announcements.
Username: Provided on project release in Database Security Project Canvas post
Password: Provided on project release in Database Security Project Canvas post
- Locate the Submission JSON File
- On the desktop of your VM, you will find a file named
project_dbsec.json. This file will serve as your central submission file. - If the file is missing, recreate it using the template and formatting instructions provided in the project’s section.
- Edit the file only with a plain text editor, such as Text Editor on the VM (in plain text mode) or Vim. Do not use word processors like LibreOffice or Microsoft Word, as they may introduce special characters that will cause the autograder to fail.
- Validate your JSON before submitting to Gradescope.
project_dbsec.jsonfile is where you will enter your final hashes and flag values as you complete each task. You will then submit this file to Gradescope for grading.
- On the desktop of your VM, you will find a file named
- Access the project:
- After logging into the virtual machine, you may see a pop-up message prompting you to upgrade the system.
- This is not required for the project. If it appears, minimize the window. While you can click Cancel, This notice will continue to sporadically pop-up which is why minimizing it is recommended.
- To initialize the project environment, Start the container:
- Open the terminal and execute the command:
./StartContainer.sh- After the Terminal displays: Container started, <current datetime>, launch Chrome with
-
This page will show the status of services required for the project.

- DO NOT STOP THE CONTAINER OR RESTART/SHUTDOWN THE VM UNTIL SHOWS RUNNING FOR BOTH HOSTING AND DATABASE SERVER! Doing so may corrupt the system and require you to reimport the OVA file if a snapshot was not taken.
- When everything is RUNNING the page will redirect you to
-
- After the Terminal displays: Container started, <current datetime>, launch Chrome with
- If the container is running and you closed the browser, either:
- Double-click the Chrome Desktop Icon: DbSec – CS6035 > The first time used, you will be prompted with the below popup. Choose Mark Executable.

- Or, open Google Chrome or Firefox inside the virtual machine.
- In the browser’s address bar, enter the URL:
http://www.gt-cs6035.com:8080(You may want to bookmark this for future ease of access)- If you are running SSH, and do not want to set up your local host file to have the redirection from
http://www.gt-cs6035.comtolocalhost, you can manually change the URL to .
- If you are running SSH, and do not want to set up your local host file to have the redirection from
- In the browser’s address bar, enter the URL:
- This will bring you to the main interface where you can begin working on the tasks.
- If you see the below, it most likely means one of two things:
- The services are still “starting” even though the Container stated “started” (If you started the container, wait a couple minutes before retrying)
- You are using UTM and becuse of the x86/64 emulation that causes performance lag, the page is loading but does not have anything yet to display visually (Wait for the page to load)

- Go to to check the statuses of the services
- Note: If either service still says STOPPED or you cannot access or after Ten Minutes, follow the steps in
-
Once you see the below, it means that the project is ready to be used.

- Double-click the Chrome Desktop Icon: DbSec – CS6035 > The first time used, you will be prompted with the below popup. Choose Mark Executable.
- Open the terminal and execute the command:
- After logging into the virtual machine, you may see a pop-up message prompting you to upgrade the system.
- IMPORTANT: You should complete flag0 to obtain your hash and then:
- Quickly run through each link in the Project Page Menu to ensure all pages display with data (not just a header)
- Connect to DbGate (instructions below), and validate TaskD and TaskI database tables have records in them (no tables with 0 records)
- If an issue is seen with either of the above, you should restore from a snapshot prior to trying the first Start of the Container. If a shanpsot does not exists, you should restore the OVA.
- If no issues from above exists, it is recommended to create another snapshot
- Note: It is highly recommended that you stop the container before restarting or shutting down the VM. To do so open the terminal and execute the command:
./StopContainer.sh- Close the Terminal after the message: Container stopped, <current datetime>
-
Starting the Tasks
-
You must begin with Task A. This task validates your GTID and generates a unique identifier required to complete the project. None of the other tasks will work correctly until Task A has been completed and the corresponding hash is submitted. IT IS HIGHLY RECOMMENDED TO USE A SUBMISSION TO VALIDATE FLAG 0!
-
After completing Task A, the remaining tasks (Tasks B through J) can be completed in any order. However, for clarity and ease of progress, it is recommended that you follow them alphabetically (with flags completed in numerical order).
-
Each task is designed to teach you a new concept or technique in database security. As you progress, you’ll begin to think like a penetration tester, evaluating the strengths and weaknesses of database protections.
-
DbGate
Note: While it may be tempting to get into DbGate before starting the project, you mut complete Flag 0 first as it sets up the data – otherwise tables in your databases will be blank!
This is required for Task D and J. Any testing can be done online with , however if you want a more real world setup for testing, 3 blank databases are provided for you and can be accessed via DbGate.
Install
- Open the terminal and execute the command:
./InstallDbGate.sh- Close the Terminal after the message: … installed
Location in the VM
- Click on the Linix Mint Launcher Icon
- Click on the Development Menu
- Click on DbGate
Setup
DbGate is a cross-platform database tool designed for ease of use while managing multiple databases simultaneously. It offers powerful features like schema comparison, a visual query builder, data charts, and tools for importing and exporting large amounts of data.

DbGate Connection Procedure
- Under File, choose
Add Connection - In Connection type, choose
Microsoft SQL Server - Enter this information in the General Tab
- Server →
www.gt-cs6035.comorlocalhost - Port →
1433 - User →
CS6035Student - Password →
CS6035DBSec
- Server →
- Check
Trust server certificate - Click
Test- If you see Connected next to save then Click
Save
- If you see Connected next to save then Click
-
Click
Connect
SSH – Running the UI aspects of the project on your Host machine
Note: If the VM is running poorly (this will be the case with UTM) you may want to consider connecting via SSH and running the project via your Host Browser and downloading/running DbGate on your Host machine!
Map the local loopback address to the project domain in your host’s file:
- Windows: c:\Windows\System32\Drivers\etc\hosts
- You will need administrative elevation on the text editor you use (Notepad++)
- Linux: /etc/hosts
sudo nano /etc/hosts
- Mac: /private/etc/hosts
sudo vi /etc/hostsienters edit modeescexits edit mode:wqsaves and quits
- add the following line →
127.0.0.1 www.gt-cs6035.com
Connect via SSH
ssh -L 127.0.0.1:8000:127.0.0.1:8000 -L 127.0.0.1:8080:127.0.0.1:8080 -L 127.0.0.1:1433:127.0.0.1:1433 [email protected]- 8000 is the port used for the service status UI for Host Browser
- 8080 is the port used for project UI for Host Browser
- 1433 is the port used for SQL Server connection via Host DbGate
- If using Linux/Mac, you will need to add sudo to the ssh command
- First Password prompt will be your Mac User Password
- passsword is the project VM password
- UTM – if you are unsure what IP to use (192.168.64.x in example above):
-
On a Mac in the terminal, run :
arp -aand look for IP that does not say (incomplete) and says on bridge100
-
- Make sure you start the container
./StartContainer.sh
Download DbGate
FREQUENTLY ASKED QUESTIONS (FAQ) / TROUBLESHOOTING
Q) Chrome is crashing
- Do this to fix it:
- Disable/turn off the screen saver or lock.
Q) I accidentally deleted or modified files and can’t get them back
- Do this to fix it:
- Restore the VM from the OVA file.
Q) How do I find my GTID?
- Do this to find it:
- Refer to the Finding Your GTID section in page for instructions to find your GT ID.
Q) I’m confused about how to start
- Do this to start:
- Start the Container:
- Open a Terminal window and run:
./StartContainer.sh. - Close the Terminal after seeing the output: “Container Started, current datetime.”
- Open a Terminal window and run:
- Double-click the Chrome Web Browser icon on the Desktop to open Chrome.
- If Chrome doesn’t automatically open to , enter the URL manually.
- Start the Container:
Q) Menu links do not load / Website(s) are not loading (We’re having trouble finding that site){#q-menu-links-do-not-load-websites-are-not-loading}

- Do this to fix it:
- Wait a few seconds for the VM to catch up (don’t rush after starting the container).
- Stop the Container:
- Open a Terminal and run:
./StopContainer.sh. - Close the Terminal after the message: “Container Stopped, current datetime.”
- Open a Terminal and run:
- Start the Container:
- Open a Terminal and run:
./StartContainer.sh. - Close the Terminal after the message: “Container Started, current datetime.”
- Open a Terminal and run:
- Open Chrome and access the site: .
- If issues persist, try restarting your VM and repeat Steps 2-4.
Q) Task A submission fails
- Do this to fix it:
- Ensure your GTID is correct (no extra spaces at the beginning or end).
- Validate your JSON file.
- Re-complete Task A.
Q) Task A states, “You have reached the maximum number of entries; the VM will need to be restored.”
- Do this to fix it:
- Restore the VM from the OVA file.
Q) Do I need to redo Task A every time I return to the VM to complete another task?
- Answer:
- No, Task A only needs to be completed once unless:
- You didn’t enter the correct GTID, and your Gradescope submission for flag0 failed.
- The VM was in an unstable state and not saved correctly.
- No, Task A only needs to be completed once unless:
Q) I had to restore my VM, do I need to redo all tasks?
- Answer:
- No, Task A should be redone and the returned hash compared to your submitted hash.
- If your flag 0 hash matches, you can resume where you left off and apply any new flag completed to your submitted JSON (which you can download from Gradescope if needed).
Q) Task B-I states, “Task A needs to be completed before this Task is unlocked.”
- Do this to fix it:
- Complete Task A.
- If the system was reset, compare the hash you received from your previous successful Gradescope submission with the hash from re-completing Task A.
Q) I’m confused about how to solve Task(s) A-I
- Do this to solve it:
- Read the write-up and pay attention to each task’s section.
- The Writeup is available in the VM at or outside the VM on .
- Note: You must log into GitHub with your GaTech credentials.
- Check for similar questions asked and answered in the corresponding DBSec Task on ED.
- If not answered, post your question in the corresponding DBSec Task on ED.
- NOTE: Posts outside the preconfigured DBSec Task posts, including private posts, will be redirected.
- Bonus hints for you because you are reading the FAQs:
- Report Columns for Tasks B, C, and F are sortable.
- Use DbGate for Task D
- Use JavaScript debugging using Web Developer Tools for Tasks E, G, and H.
- The lessons from Task B help with Task C, D, and F; Task E helps with Tasks F, G ,and H; Task B-H will help with Task I.
- What does “remembering that they often use the same logic on the client and server side” mean?
- Once you access the client-side code via the browser’s Developer Tools and find out how to bypass its security implementation, you will need to do this again to bypass the database’s security implementation. The database security logic is the same as the client-side security logic.
- Read the write-up and pay attention to each task’s section.
Q) Task D is not showing any records in the patient or appointment tables
- Answer:
- Close DbGate
- Re-run Task A / Flag 0
- Check the hash displayed to ensure it matches your submitted hash
- Open DbGate and check the tables
- If records still do not exists
- Close DbGate
- Open the following URL
- Re-run Task A / Flag 0
- Check the hash displayed to ensure it matches your submitted hash
- Open DbGate and check the tables
- If records still do not exists
- See:
- See:
Q) Can I use Firefox instead of Chrome?
- Answer:
- Firefox is pre-installed, and the project works with Chrome and Firefox.
Q) Should my hashes be of different lengths?
- Answer:
- Flags 1-2, 8, and 14-15 are arrays.
- Note: this is not a typical array and the format, which is CRUCIAL, is due to allowing it to process in Gradescope.
- Flags 0 and 13 will have the longest hashes.
- Flags 1-2, 8, and 14-15 will have the shortest hashes (all the same length).
- The hash portion of flags 1 and 2 will be the same length as 8 and 14-15, but will have appended data after the hash value and will also be an array of flags.
- Flags 4-6 and 9-12 will have a medium hash length (same length).
- Flag 3 will not contain hashes but is an array flag.
- See for more information.
- Flags 1-2, 8, and 14-15 are arrays.
Q) Gradescope will not allow any more submissions
- There is a limit of 16 submissions for this project.
- If you have submitted your JSON file 16 times, you may no longer submit for this project.
- If you believe there is an error, contact a TA via private ED discussion post, but note that any decision will be based on the data provided by Gradescope audit logs.
Q) Copying and pasting between the Workstation and Virtual Machine isn’t working
- Open your Virtual Machine (VM) using the VirtualBox application.
- From the VirtualBox menu, select Devices -> Shared Clipboard.
- Ensure it is set to Bidirectional.
Q) Am I on the correct page for the flag I am trying to solve?
- Your browser tab will start with the flag# followed by the page. i.e. – flag4 – Login (Legacy)
Q) Tasks B-I are not unlocked and say “Task A needs to be completed before this Task xyz is unlocked.”
- Complete Task A.
- If you’ve already completed Task A, but the system was reset, compare the hash from your previous submission with the new hash after re-completing Task A.
Q) JavaScript files are not showing in the Web Developer Tools
- Ensure you are under the Sources tab in Developer Tools.
- Expand the tree view under Page > localhost > assets > scripts
- If the
.jsfile is missing:- Close and reopen your browser.
- Clear your browser cache before retrying.
- Try using a different browser (e.g., Firefox or Chrome).
Q) The VM is bricked (no longer functioning)
- Restore the VM from the OVA file.
Q) The Page Says It Can’t be Reached
- Ensure the containers are running:
- Open a Terminal window.
- Run the command:
./StartContainer.sh. - Wait for the message: “Container Started, current datetime.”
- Open your browser
- Access the page
- Wait for the page to redirect you to
Q) Some pages (reports) are not showing data but showing the header
- Restore the VM from the OVA file.
- Change the VM RAM
- Start with 8192 but you may need to try 12228 or possibly even 16384
- NOTE: Going over your available physical RAM could cause issues
- Access the VM
- Start the VM
- Log in to the VM
- Start the Container
- Open a Terminal window.
- Run the command:
./StartContainer.sh.
- Open your browser
- Access the page
- Wait for the page to redirect you to
- DO NOT STOP THE CONTAINER OR RESTART/SHUTDOWN THE VM UNTIL SHOWS RUNNING FOR BOTH HOSTING AND DATABASE SERVER!
- Complete Task A / Flag 0
- Create a Snapshot
Q) VM appears to not show add data on pages / inside DbGate
- You can run the VM in the cloud (a cost should be expected – although I believe there is a trial period).
- NOTE: Like UTM, this is not officially supported but is being provided as an option!
- This set up is for Google Cloud (students have done similar on Azure and AWS).
- Create a Google Cloud Account
- Create a Project and name it something like: gt-cs6035-project
- Create a Storage Bucket and name it something like: gt-cs6035-bucket
- Install DbGate on your host machine
- Install GCloud CLI on your host
- In a terminal/command:
- Initialize GCloud (it will prompt you to log in and choose your default project (i.e., gt-cs6035-project)
gcloud init
- Initialize GCloud (it will prompt you to log in and choose your default project (i.e., gt-cs6035-project)
- Convert the OVA and Compress
- In a Terminal (Linux & Mac)/PowerShell (Windows):
- Linux & Windows:
- Extract OVA –
tar -xvf CS6035...ova - Convert VMDK to raw
qemu-img convert -f vmdk -O raw CS6035...-disk001.vmdk disk.raw
- Compress raw file
tar -czvf cs6035.raw.tar.gz disk.raw
- Extract OVA –
- Mac:
brew install qemubrew install gnu-tar- Extract OVA –
tar -xvf CS6035...ova - Convert VMDK to raw
qemu-img convert -f vmdk -O raw CS6035...-disk001.vmdk disk.raw
- Compress raw file
gtar -czvf cs6035....raw.tar.gz disk.raw
- Linux & Windows:
- In a terminal/command:
- Upload compressed raw to your GCloud storage bucket (example uses storage bucket with name gt-cs6035-bucket)
gcloud storage cp cs6035-summer-2026.raw.tar.gz gs://gt-cs6035-bucket/- Create your GCloud Compute Image
gcloud compute images create cs6035-summer-2026-image --source-uri=gs://gt-cs6035-project/cs6035-summer-2026.raw.tar.gz
- Create your GCloud Compute Instance
gcloud compute instances create cs6035-summer-2026-vm --zone=us-central1-a --image=cs6035-summer-2026-image --machine-type=e2-medium
- SSH into your new GCloud Instance
gcloud compute ssh dbsec@cs6035-summer-2026-vm --zone=us-central1-a -- -L 8000:localhost:8000 -L 8080:localhost:8080 -L 1433:localhost:1433./StartContainer.sh
- Upload compressed raw to your GCloud storage bucket (example uses storage bucket with name gt-cs6035-bucket)
- Open your host browser and navigate to , wait to be redirected to
- After redirection, if you receive a “This site can’t be reached” message, it is because the local host is not set up. You can either:
- Change the site to
- Set up your local host file (make sure to remove after project completion)
- Host file locations:
- Windows:
c:\Windows\System32\Drivers\etc\hosts (needs admin) - Linux:
/etc/hosts - Mac:
/private/etc/hosts
- Windows:
- Add this line:
127.0.0.1 www.gt-cs6035.com
- Host file locations:
- After redirection, if you receive a “This site can’t be reached” message, it is because the local host is not set up. You can either:
- In a Terminal (Linux & Mac)/PowerShell (Windows):
- This set up is for Google Cloud (students have done similar on Azure and AWS).
A couple of notes:
- You will be asked for a Pashphrase upon first SSH connection (Set it to whatever you want, but remember it)
- dbSec password for SSH is the VM password in Canvas
- When the project is done, clean up your Cloud VM to stop charges
- Log in to the GCloud Console (https://console.cloud.google.com/)
- Under Quick Access:
- Find Compute Engine
- Delete your VM
- Delete your Disk
- Delete your Image
- Find Cloud Storage
- Open your bucket
- Delete your compressed raw file
- Open your bucket
- Find Compute Engine
- Under Quick Access:
- Remove the host entry line
127.0.0.1 www.gt-cs6035.comif added
- Log in to the GCloud Console (https://console.cloud.google.com/)
Q) VM on Intel/AMD chipset runs slow / randomly crashes
- Check to see if you are running in emulated mode – A turtle icon appears when you launch your VM in the bottom right of the Virtual Box Window
- If so a. Disable this feature i. Open Registry Editor (regedit) ii. Set VBS/Device Guard to OFF:
- HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard
- EnableVirtualizationBasedSecurity = 0 iii. Disable HVCI (Memory Integrity) via registry (even if UI didn’t show it / didn’t change it):
- HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity
- Enabled = 0
- (If present) EnabledBoot = 0 iv. Create/ensure Credential Guard flag is off:
- HKLM\SYSTEM\CurrentControlSet\Control\Lsa
- LsaCfgFlags = 0 (create DWORD if missing) v. Reboot after. b. In addition to this use “win + r” and type “optionalfeatures” in the field and disable “Windows Hypervisor Platform, Virtual Machine Platform, and Windows Subsystem for Linux”. This will also require a reboot. c. If the turtle still appears you will have to run the dgreadiness script which will disable device guard and virtualization security which can be found here: i. Download this, extract it and use PowerShell to navigate to the extracted folder and run the ps1 file with “./DG_Readiness_Tool_v3.6.ps1 -disable” upon reboot it will prompt you to disable device guard and virtualization security, using the windows key or F3 you can accept. This should allow your virtual machine to run using hardware enabled virtualization instead of software, which should improve speeds and allow for the project to be completed with less headache. d. NOTE: If you are using other virtualization methods on your workstation this may disable them or render them useless. Especially Windows Subsystem for Linux.
- HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard
Error page

The above error page shows up
- Close your browser.
- Revisit the page that caused the error.
If the above steps did not resolve the error
- Do this to fix it:
- Stop the Container:
- Open a Terminal window.
- Run the command:
./StopContainer.sh. - Wait for the message: “Container Stopped, current datetime.”
- Start the Container:
- Open a Terminal window.
- Run the command:
./StartContainer.sh. - Wait for the message: “Container Started, current datetime.”
- Stop the Container:
If the above steps still did not resolve the error, try these steps
- Restart the VM.
- Log in to the VM.
- Stop the Application:
- Open a Terminal window.
- Run the command:
./StopContainer.sh. - Wait for the message: “Container Stopped, current datetime.”
- Start the Application:
- Open a Terminal window.
- Run the command:
./StartContainer.sh. - Wait for the message: “Container Started, current datetime.”
- Access the page that errored.
Finally, if the above steps still did not resolve the error, try these steps
- Do this to fix it:
- Restore the VM.
- Start the VM and log in.
- Stop the Container:
- Open a Terminal window.
- Run the command:
./StopContainer.sh. - Wait for the message: “Container Stopped, current datetime.”
- Start the Container:
- Open a Terminal window.
- Run the command:
./StartContainer.sh. - Wait for the message: “Container Started, current datetime.”
- Access the page that errored.
- If you still have problems, contact the TA staff via a private ED post to get help with your specific error.
TASK A: GTID VERIFICATION
(flag0 – 0.5 pts)
NOTE:** Task A is the setup task and contains **one flag**:
flag0. **Please review the for specific instructions regarding the format.
This task sets up the project and generates the hashes of the other flags, so verifying that the hash is correct in Gradescope is critical. (USE A SUBMISSION)
Important
- You only have 5 attempts to enter your correct GTID.
- If you exceed this limit, you’ll be locked out and must restore your VM.
How to Complete flag0
- Navigate to Task A:
-
Click on the Task A menu from the home page. The page will open in a new tab.

-
-
Enter your nine-digit GTID and click Submit:
Where can I find my GTID?
-
See the Finding Your GTID section on the page for instructions on how to retrieve your GTID.

-
- After entering your GTID and clicking Submit, this can take a while (especially using UTM), wait for the response, or at least five minutes before retrying → doing a refresh too quickly will just restart the process!
-
If after five minutes your hash does not display (most likely to occur using UTM), refresh the page and enter your GTID again → the setup should be finished and the return of the hash should be almost instantaneous.

-
Submission Details
See for more information.
TASK B: INFERENCE ATTACK #1
(flag1 – 10.5 pts)
NOTE:** Task B is an array flag and contains **one flag**:
flag1. **Please review the for specific instructions regarding the format.
What Is an Inference Attack?
An inference attack isn’t a hack in the traditional sense—there’s no breaking into systems. Instead, it’s a method of deducing confidential information by analyzing seemingly harmless data that is available to many people either globally or within a company. Security regarding an inference attack deals with data confidentiality and providing data access/restriction on a need-to-know basis.
In most organizations, data security is enforced by access controls, which might restrict:
- Entire tables (e.g., the employee table, which contains the complete employee list)
- Individual rows (e.g., one specific row of an employee’s record)
- Individual columns (e.g., a piece of information about an employee, like salary, gender, or position at work)
However, even when data access controls are in place, attackers (or curious employees) can sometimes combine multiple safe reports to uncover private information.
This is called an inference attack. You don’t have direct access to sensitive data, but you can infer it from the data you do have. Such attacks often exploit standard reports available to many employees. For example, a company might restrict certain columns to enforce access control, creating an employee roster report that everyone can view but excluding sensitive details like salary. However, if other reports are not carefully designed with the same protections, they may unintentionally reveal that information.
Scenario Overview
You’ve been given four internal reports from a single company:
- Employee Roster – Names and general information, no salary information.
- Tenure Report – Shows how long each employee has worked at the company.
- Average Salary by State – Aggregates the average salary of employees within each state where they live.
- Average Salary by Tenure – Aggregates the average salary based on years worked at the company.
Individually, none of these reports violates the company’s access controls on sensitive HR data. However, with some clever analysis, you realize the reports can be combined in a way that exposes a serious gap, allowing someone to pinpoint individual salaries.
Your Goal
By analyzing and cross-referencing the reports, you must cleverly combine the data to identify specific employees whose salaries you can infer with 100% certainty.
To complete Task B, for each exposed employee:
-
Obtain their hash ID (unique to your VM and generated when you completed Task A).
-
Obtain their exact salary (to two decimal places, without $ or commas).
-
Repeat this process for all relevant employees.
Success Criteria
-
At minimum, you should be able to infer the salary of one employee.
-
There may be multiple; continue analyzing to find as many as possible.
-
You can only uncover one employee’s salary at a time.
-
Submit employees whose salaries are definitively exposed.
-
Do not guess! Submissions are limited, and incorrect or guessed hashes will cost you.
Tips for Success
-
Look for uniqueness – Groups with only one person often provide the clearest clues.
-
Start with small groups – Examine non-employee reports for data that can be linked back to the employee list to reveal salaries.
-
Be methodical – Identify overlaps that isolate individual employees.
-
Double-check your logic – Only report salaries you are 100% certain of.
How to Complete flag1
-
Navigate to the Task B Menu:
-
Hover over the Task B menu, which will display the following four reports:

- Employee Report
- Duration Report
- Salary by State Report
- Salary by Duration Report
-
-
Review the Reports:
- Open each report by clicking its name; it will open in a new tab.
- Look for data that can help you infer at least one employee’s salary.
- Focus on combining data points across multiple reports.
-
Identify an Employee:
- Once you determine an employee’s exact salary, find their hash in the Employee Report (ID column) and record it.
-
Record the Hash and Salary:
- After finding and eliminating one employee, check if there is another whose salary can be determined precisely.
- Use the known employee’s salary to calculate the next employee’s exact salary. Repeat the process until no further deductions are possible.
- Add each employee found to the next position in the flag array (i.e., the order in which employees are found corresponds to array[order – 1]).
Hints
-
Look for unique patterns in the data across the four reports.
- For example, a specific employee’s data might stand out when comparing one of the other reports in the Task Menu with the Employee report.
-
Combine Reports:
- The key to an inference attack is combining data from multiple reports to isolate an individual’s information. Think about how different reports might intersect or overlap.
-
Track Data:
- If you’re having trouble keeping track of the data, consider copying it into a spreadsheet or other application to manipulate and search more easily.
- Logic Helps:
- If you’ve already figured out one employee’s salary, the remaining employees might share a common trait with the ones you’ve found (you will need to “eliminate” the previously found employee’s salary to obtain the newly found employee’s salary).
- Example:
- A little bit of math is involved in figuring out the salary information of the following employee.
- An example that has helped students in the past is: Imagine two people, A and B, buy eight apples together. If we know A only bought six apples, we can “calculate” and “infer” that B bought only two apples.
- General Hints about all Inference flags:
- Only look at the data relevant to the task – Don’t get tied up in data that provides no value to the task.
- If it looks like a table and acts like a table, it is probably a table. While this is unnecessary to complete the task, you can copy data from the report(s) into a spreadsheet program to manipulate it. This may assist you in tracking down the hole that exposes salaries.
- If you use an external application to troubleshoot the data and try to sort, ensure the entire dataset is sorted.
- General Hints about all Array flags:
- You will receive credit for each element in the correct array.
- For flag arrays with more than the hash (salary/cpt), there is no partial credit for the array if the hash is correct but the other data is not.
- You will not be penalized for not filling in the whole array.
- i.e., if there are six elements in the array, and you have only two, you will not be penalized for the missing four.
- You will be penalized if you overfill the expected array.
- i.e., if there are six elements in the array, and you have seven, you will be penalized for the extra one.
- You are reporting a salary in US currency, hence, two decimal places with no $.
- You will receive credit for each element in the correct array.
Submission Details
See for more information.
TASK C: INFERENCE ATTACK #2
(flag2 – 12 pts)
NOTE:** Task C is an **array flag** and contains **one flag**:
flag2. **Please review the for specific instructions regarding the format.
Overview
Now that you’ve seen how an inference attack can expose sensitive information within a single company, it’s time to explore how the same technique can compromise data by linking together unrelated datasets.
In this task, you will carry out another inference attack — but on a broader scale. Instead of one source, you’ll work with four independent datasets that are publicly available online. Each comes from a different domain: hospital visits, voter registration, insurance claims, and medical codes.
Your mission is to analyze these datasets to identify specific individuals who have undergone certain medical procedures, while respecting the deidentification rules designed to protect privacy. Your task is to show how separate anonymized datasets can be combined to reveal sensitive information. Specifically, you will link medical data, particularly procedure records, to voter registration data, uncovering individuals and their associated medical history. This exercise highlights how incomplete deidentification, when paired with publicly available data, can still expose private information. This is, of course, a significant breach of (in fact, this exercise was inspired by the incident where the medical history of the governor of Massachusetts was made public in a similar fashion). .
What you need to do
- Review the four reports: There are four reports you need to examine:
- Medical History – A sample report from a local hospital detailing the types of procedures performed over the last few years.
- Voter Registration – A report containing standard voter fields. Reports like this are often available from a local board of elections for all registered voters in a district.
- Insurance Claims – A partially de-identified dataset from an insurance company, created for public use by the same developers you’ve encountered earlier. “Partially de-identified” means that while some information was removed to obscure patient identities, enough remains that a determined analyst could still link data back to real individuals.
- Medical Codes – A reference report listing medical procedure and diagnosis codes.
-
Find the compromised patients: The objective is to determine which specific patient in the Medical History report has been exposed and can be linked to a Voter Registration record.
- Identify the exposed individuals:
- After you’ve figured out which patient(s) have had procedures performed, you’ll need to look up their hash in the voter registration report.
- The hash will be listed next to the patient’s name, which is specific to you based on your GTID from Task A.
- Record the information:
- For each identified individual, obtain their hash and their corresponding CPT code (procedure code).
- What is a CPT Code?
- Current Procedural Terminology (CPT) codes provide a standardized language for documenting medical services and procedures on a patient’s record. They are also used for billing purposes.
- Unlike the previous task, this is not an elimination-style inference attack. This means the order of the data does not matter; you can add entries in any sequence as you identify individuals. However, make sure each entry is accurate.
How to Complete flag2
- Navigate to the Task C Menu:
-
Hover over the Task C menu, which will display the following four data sources:

- Medical History
- Voter Registration
- Insurance Claims
- Medical Codes
-
- Examine the Reports:
- Open each of the reports and scrutinize the data.
- Pay special attention to identifying procedure data that can be traced back to specific individuals.
- Link the Data:
- You may want to look up the work done (what the procedure was) on the patient.
- Match that information from the other reports with the Voter Registration report to identify the person linked.
- Record the Hash and Procedure Code:
- For each identified individual, locate their hash in the Voter Registration report and note their CPT procedure code .
- Once you isolate a voter, continue to see if you can isolate another voter. Rinse and repeat until you can no longer isolate a voter.
Hints
- Use Spreadsheet Tools:
- Like in Task B, copying the data into a spreadsheet can help you organize and analyze the information.
- Sorting and filtering the data might help identify links between the reports.
- Look for Unique Identifiers:
- In this task, the procedure data from the Insurance Claims and Medical History reports may help you find specific individuals.
- To narrow your search, use the medical codes and cross-reference them with other data.
- Multiple Data Sources:
- Unlike Task B, where you narrowed down the search to a single record, in this task, you will need to use logic and combine multiple data sources to link individuals.
- Whether you believe the claims of voter fraud or not, you may come across a Voter who voted after they passed. This is white-noise. Avoid getting caught up on white_noise!
Submission Details
See for more information.
TASK D: INFERENCE ATTACK #3 – USING DBGATE
(flag3 – 7.5 pts)
NOTE:** Task D contains *one flag:
flag3.* **Please review the for specific instructions regarding the format.
Overview
Task: Inference Attack on Encoded Patient Data
You are tasked with investigating a potential security vulnerability in your company’s patient database. This requires performing an inference attack to determine whether sensitive data can still be uncovered despite the use of encoding measures.
Background
You’ve learned that the database administrator attempted to secure patient data by:
- Encoding sensitive fields in the Patient table, including date of birth (DOB).
- Encrypting the social security number (SSN) using the patient’s original (unencoded) DOB as part of the encryption or masking scheme.
This database supports a Pediatric Office.
During a recent visit with your child, you noticed a sign-in sheet openly displayed at the front desk. The sheet contained the following information:
- Appointment Date
- Patient first and last names
- Provider’s last name
- Appointment time
- Arrival time
You discreetly photographed the sheet, which can be accessed through the Task D Menu link.
Result
Despite encoding efforts, you can derive the following sensitive information for a patient that is not on the sign-in sheet:
- First name
- Last name
- Date of birth
- Social Security number
How to Complete flag3
Important: If any of the tables for TaskD shows 0 rows
- Close DbGate, re-do flag 0, check the tables in DbGate
- If still an issue, you will need to revert to a snapshot or restore the VM
- Navigate to Task D:
-
Click on the Task D menu from the home page. The page will show the picture of the schedule.

-
-
Review the picture you took to see what data is provided that can be relevant in your hunt.
-
Review the tables in the database using DbGate → You will need to access the TaskD Database.

- Review the page for instructions on how to set up/use DbGate.
- You should not run
INSERT,DELETE, orUPDATEqueries on the tables — doing so may require a restore of the database!
- When you find the patient, you will need it to decrypt the SSN using the patient’s decoded (un-encoded) date of birth. Keep the following in mind:
- Assume the DOB format for decryption is
YYYYMMDD. - You’ve heard that the database administrator is using a built-in SQL Server function that encrypts data using a passphrase.
- Assume the DOB format for decryption is
Hints
- Use the data you have: Remember that in an inference attack, all you can use is the data you have available. Do not make “assumptions”.
- Patient data does NOT need to be decoded to complete this task.
- Could you perform an inference attack on data in a language you aren’t familiar with and have no way to translate?
- There is only a single patient that is correct; if you are finding more than one patient, review your logic/code.
- Brute Force: Brute force technique is required to find the patient’s dob and decrypt the SSN.
- Note: While not required, it is recommended to find the correct patient before attempting to brute-force the ssn decrypt.
- Hash: Unlike all other tasks, this task has no hash.
Submission Details
See for more information.
TASK E: SQL INJECTION #1
(flag4 – 2 pts | flag5 – 3 pts | flag6 – 4 pts)
NOTE:** Task E contains **three flags**:
flag4,flag5, andflag6. **Please review the for specific instructions regarding the format.
Introduction: What Is SQL Injection?
This task highlights one of the most common yet preventable database vulnerabilities: SQL Injection (SQLi). SQL injection occurs when user input is not properly validated, allowing attackers to inject or modify SQL statements. The consequences can be severe, ranging from unauthorized access and data exposure to complete system compromise.
The root cause of SQL injection is often careless coding and weak input validation. Developers must ensure that all user-provided data is carefully inspected and that potentially harmful input is sanitized or blocked before reaching a SQL query. This process, known as input sanitization, prevents malicious commands from being executed and protects the database from manipulation
To help you get started, we recommend reviewing online resources like the for an overview of techniques and examples.
To complete this task, you will need to craft basic SQL code that can be entered into a form’s input field and executed by the website as part of a valid — but unintended — SQL statement. The goal is not to write complex queries, but to bypass weak SQL injection defenses. This could involve evading security checks, retrieving unauthorized information, or, in severe cases, altering the site’s data. Once a vulnerability is present, successful exploitation depends on your ability to understand or map the structure of the underlying database.
Task Description
In this task, you will work with a sample web application that contains intentional SQL injection vulnerabilities in three different login implementations. Your objective is to exploit these flaws to bypass authentication and capture the corresponding hash flags.
You’ll log in using your GTID (as entered in Task A). You won’t know the actual password — instead, you’ll attempt SQL injections via the password field to force a successful login.
Objective Breakdown
Task E consists of three parts, each increasing in complexity. The site is updating its Legacy Login page, and all three hashes for Task E will change. The main security check on the legacy page is a direct match of the username, your GTID. You will not know the password needed to access the system, and you will not be provided with it.
-
For flag4, the developers are asking you to assess the difficulty of bypassing the existing security, given that a SQL Injection attack is possible.
- They also want to explore ways to mitigate this risk. Specifically, they are considering whether to implement only client-side data sanitization or both client-side and server-side sanitization, and whether the same rules should apply consistently on both ends.
- For flag5, you will attempt to bypass/beat the security using client-side data sanitization.
- For flag6, you will attempt to bypass/beat the security using client and server-side data sanitization.
- For this flag, remember that there will be server-side data sanitization that you cannot access, but you should assume the logic will duplicate the client-side data sanitization.
- The client provided a snippet of the code they used on the legacy login page.
- You can use this code to determine how to perform the SQL injection.
- When you succeed, you will log in to the website using your GT ID and no password.
- The injection will bypass the password requirements and log you in immediately.
- Once logged in, the hash for flags 4-6, keyed to your GT ID, will be displayed.
How to Complete flag4, flag5, & flag6
- Navigate the Task E Menu
-
Hover over the Task E menu to reveal three links:

Legacy LoginNew Login - ClientNew Login - Client/Server(Each page opens in a new tab.)
-
-
Perform the Injection
- Enter your GTID as the username.
- Enter a **crafted SQL injection payload in the** password field.
- Submit the login form.
- If successful, you’ll be logged in and shown your corresponding flag hash.
- Summarising the flag challenges as below:
- Record Your Hashes Copy the three flags you retrieve (
flag4,flag5,flag6) into your final submission JSON.
Where’s My GTID?
If you’re unsure of your GTID, refer to the page for instructions.
Hints & Tips
For flag5 and flag6
- Open the browser’s Developer Tools to inspect the client-side JavaScript.
- If you don’t know how to open Developer Tools, a quick Google search can help you identify that for your browser.
-
If you are trying to copy/paste into the console in Developer Tools and receive a warning, you will need to follow the steps to enable the ability to paste into the console.

- Look for sanitization functions — analyze how the input is cleaned or blocked.
- Input sanitization is cleaning and validating user input to prevent security threats like SQL injection.
- Consider running these functions manually in the console to understand or bypass/beat them.
Sanitization Considerations
- There is a difference between encoding, escaping, and sanitization. Understand the difference and the validity of using one or the other, remembering that the client/server-side code is doing sanitization.
- You have access to the JS where the sanitization is done on the Client Side. You also know that client-side and server-side sanitization are the same.
- Is there a way in DevTools to call a function again?
- There is a difference between bypassing and beating the sanitization.
- Unless it is a single character in the strip, you can “beat the sanitization.”
- Only one of the lines strips a single character
- Try to beat the sanitization line by line to understand a valid approach! Use the sanitization code against itself.
- Natural sanitization is also at play.
- PHP uses
?and&for variables, so while not “sanitized,” they will break up your injection if used. - The web browser converts the character
#(if not HTTP encoded) into a blank character.
- PHP uses
SQL Injection Hints (For All SQLi)
- SQL not-equals can be written as
!=or<>— one may work even if the other is blocked. - Single quotes (
') are often required to break out of the query string — they are usually not sanitized and are needed for most injections - You may think you are writing a SQL injection, but the database might read it as a regular string.
- Remember that the entire injection statement goes into a string variable.
- While the exception causing the data breach is returned for troubleshooting, this exception is based on the expectation that the input is a string, not an injection!
- The exception returned is for your benefit and may NOT be shared in ED.
Nullworks great for an SQLi when you don’t know the schema and the developers don’t expect it. The developers are actively looking for it!- There is a difference between ending a statement to begin a new statement and escaping out of the statement.
- If you use
+to join varchar (string) statements and aren’t receiving the result you expect, maybe try a different approach! - In MS TSQL, a
;ends a statement to allow a new statement to begin. However, is it really necessary or required?
Reference: Legacy Login Code
- ALL login injection tasks are built off flag4.
-
Below is the login code that you were able to obtain from the legacy login page (both uname and pword have a character limit of 96):
<?php function login($username, $password) { $sql = "SELECT uname, count(*) cnt" . PHP_EOL . " INTO #tmp_user" . PHP_EOL . " FROM creds" . PHP_EOL . " WHERE uname='$username'" . PHP_EOL . " GROUP BY uname"; $usercheck = $this->db->query($sql)->execute()->fetch(); if ($usercheck['cnt'] != 1) { return false; } else { $sql = "SELECT hash" . PHP_EOL . " FROM #tmp_user t" . PHP_EOL . " INNER JOIN users u" . PHP_EOL . " ON t.uname = u.uname" . PHP_EOL . " WHERE pword='$password'"; $userdata = $this->db->query($sql)->next(); if ($userdata) { return true; } else { return false; } } } ?>
Submission Details
See for more information.
TASK F: SQL INJECTION #2 / INFERENCE ATTACK #4
(flag7 – 2.5 pts / flag8 – 5 pts)
Note:** Task F contains two flags:
flag7which is a single hash andflag8which is an **array flag Please review the for specific instructions regarding the format.
Overview
In this task, you’ll combine your knowledge of SQL Injection (SQLi) and Inference Attacks to identify specific students from a fictional grade list who received an “F” in the class.
You’ll start by performing an SQL injection to bypass the login form and gain access to a restricted section of the site. Once logged in, you’ll encounter a security question. To answer it, you’ll use Open-Source Intelligence (OSINT) techniques — methods commonly employed by social engineers to gather publicly available information and exploit it for unauthorized access.022616
If you complete both stages (SQLi and OSINT), you’ll access extended roster data and use an inference attack to identify students who failed the course.
What is OSINT?
OSINT stands for Open-Source Intelligence. It refers to the practice of collecting and analyzing information from publicly available sources — essentially, anything you can legally access online or offline without hacking or breaking into systems.
For example, imagine you’re working on a school project about climate change. You might research news articles, government reports, YouTube videos, and social media posts to gather insights. That’s OSINT in action — using open sources to build practical knowledge.
Learn more about it here –
Objective
Your goal is to:
- Identify a valid username through OSINT techniques.
- Perform a **SQL Injection attack to bypass the** password field.
- Complete a Multi-factor Authentication request using OSINT techniques to obtain the prompted information relevant to the account.
- Submit the faculty id in
flag7. - Access the roster data and identify the students who received an “F”.
- Submit those student ids in the
flag8array (order does not matter).
How to Complete flag7 & flag8
- Navigate to Task F:
-
Click on the Task F menu from the home page.

-
- Login Attempt
- Use the username you discovered or inferred via OSINT.
- Enter an SQL injection payload in the password field to bypass authentication.
- Submit the form.
- Security Question
- If your injection is successful, you’ll receive a multi-authentication prompt (e.g., a security question or a PIN).
- Use OSINT methods to deduce the correct response. Pay attention to contextual hints.
- Access Extended Roster
- If the second authentication step is successful, you’ll gain access to detailed roster data.
flag7
- Upon successful login and 2-factor authentication, obtain the faculty hash.
flag8
- You must gain some inference knowledge to identify the students who received an F.
- Identify all students who have received an “F” grade and record their hashes.
Important: If the student hashes show a – in the hash, then there was an initialization issue.
- Close the page, re-do flag 0, check the page to check if the student hashes no longer contain –
- If still an issue, you will need to revert to a snapshot or restore the VM
Hints & Guidance
- No input sanitization is present on the login form, particularly in the password field. This means the SQL injection should work similarly to earlier tasks.
- You cannot use injection on the Multi-factor Authentication page. Don’t try to do that; it will not give you what you want.
- If you see the security question prompt, it confirms your SQL injection worked.
- OSINT Focus:
- Consider what information users might use to answer security questions.
- Use the provided context or details on the login page to infer possible answers.
- In the real world, this might include social media (professional and personal), forums, or previously disclosed information — here, you’re working within the fictional context of this task.
- This is a combination challenge. You are applying:
- SQL Injection to break into the system.
- OSINT to get past multi-factor authentication.
- Inference to extract meaningful insights from data.
Submission Details
See for more information.
TASK G: SQL INJECTION #3
(flag9 – 7.25 pts / flag10 – 7.25 pts)
NOTE:** Task G contains **two flags**:
flag9andflag10. flag10 is reliant on the “partial completion” of flag9 (while you do not need the hash for flag9 to complete flag10, you do need the schema). **Please review the for specific instructions regarding the format.
Overview
In Task G, you’ll perform two advanced SQL injection attacks targeting a fictional music store database. These attacks will help you:
- flag9: Modify access rights to uncover hidden table schemas.
- flag10: Extract a valid database user’s login credentials through SQL injection, then log into a simulated admin console to retrieve your flag.
Understanding the “Schema” Page and Your Goal
You’re working with a music store’s website that has a search engine for music albums. While exploring the site, you’ve found a page called “schema.” This page shows behind-the-scenes information — specifically, the structure (or metadata) of a database table used in the main report.
What You’ve Noticed
- The website follows a predictable pattern, especially in how links are structured.
- Based on this pattern, manipulating those links is likely a way to gain more access.
- This could let you see more database information than what’s shown by default.
What You Know
- The Schema page uses a database user called Schema to connect to the database – confusing yes, but like programming variables, sometimes the variable name is exactly what it is used for.
- This user only has read-only access to a table called Albums, so you can only see the Albums table’s schema.
What You Need to Do
- Your goal is to use injection to give the Schema user access to all tables, not just Albums.
- That way, when you reaccess the schema page, you’ll see more than just the Albums table (if you performed the injection correctly and found the correct manipulation of the URL).
- Right now, you don’t know the names of the other tables or schemas — that’s part of the challenge.
Task Breakdown
flag9 – Privilege Escalation via Injection
The page called Schema reveals metadata for the Albums table. This view is read-only and tied to a limited-access database user named Schema.
The Report page uses this same schema to generate queries. Your job is to figure out how to extend the Schema user’s access, so it can view more than just the Albums table.
Once you succeed, the Schema page will show additional tables. You will notice that the new table does not have a hash associated with it. There is a reason for this:
- This allows students unable to complete the privilege escalation injection to attempt the next flag.
In order to obtain the hash, you must create the required privelege escalation using the “search” functionality on the Report page. When successful, the new hash will appear in the schema header. That hash is your flag9.
flag10 – Credential Extraction and Login
After gaining visibility into new database tables, you must construct another SQL injection on the Report page. This time, your injection should extract a username and password from another table.
You’ll then log into the Login page using the credentials you uncovered. If successful, you’ll land in a simulated “management console,” where your flag10 hash will be displayed.
Unlike the other login forms thus far, this login page is locked down and SQLi will not work. You are more than willing to try, but as the great DBA Obi-Wan Kenobi said: 
How to Complete flag9 & flag10
- Navigate to the Task G Menu:
-
Hover over the Task G menu, which will display the following three data sources:

- Schema
- Displays the schema for the Albums table.
- Use this to understand how the schema is structured and explore ways to gain broader access.
- Report
- Accepts a search input, which runs a
SELECT ... FROM ... WHERESQL query. - This is your injection point for both flag9 and flag10.
- Accepts a search input, which runs a
- Login
- Once you discover valid login credentials from your injection, enter them here to retrieve flag10.
- Schema
-
Steps to earn flag9 & flag10
flag9 Hash
-
Display the New Table
- By reviewing the Schema page and URL, is there anything you can manipulate to show all schema, not just the Albums table schema, which is available to all users?
-
Find a Privileged Role
- Is there a database role you can add your user to that allows viewing (read) other table schemas (not just
Albums)?
- Is there a database role you can add your user to that allows viewing (read) other table schemas (not just
-
Inject the Role Assignment
- Go to the Report page.
- Enter your injection in the search bar to add the role.
- Click Search.
-
Check the Schema Page
- Return to the Schema page that you have already configured to show the new table.
- If your injection worked, the hash for the new table will appear.
- At the top of the new table, check the Schema header.
- Your flag9 hash will be displayed there.
-
Submit Your Flag
- Add the hash to your
JSONfile under"flag9". - Submit it to Gradescope.
- Add the hash to your
flag10 Hash
-
Query Other Tables
- Now that you can view the other table’s schema, try using the search bar again.
- This time, inject a query that returns rows from a different table, not just the default one.
- Remember that the default query (which you cannot change) will always return data from the Albums table. This means you need to find a way to add data from another table to the default “SELECT * FROM Albums” query.
-
Run Your Injection
- Go to the Report page.
- Type your injection into the search input.
- Click Search.
-
Look for Credentials
- If successful, the report results will display a username and password.
- These credentials are for the Management Console login.
-
Log In
- Go to the Login screen.
- Enter the username and password from the report data.
- If correct, you’ll access the system.
-
Get and Submit the Hash
- Once logged in, your flag10 hash will be shown on the screen.
- Add it to your
JSONfile under"flag10". - Submit your file to Gradescope.
Hints & Tips
General
- The Report page is your main injection point.
- Think carefully about how to construct SQL that extends queries to include other data (joins, unions, etc.).
- You’ll need to experiment and iterate to find the correct structure.
flag9
- There are two parts:
- Viewing the schema of all tables.
- Gaining access/rights to the non-public table.
- There is more than one way to complete this task; however, it may be useful to use SQL Server’s built-in stored procedures to escalate privileges.
- You don’t need admin rights — just enough read access to expose the hidden table. The developers are looking for unauthorized admin access!
- A successful injection might appear to fail — verify by checking the Schema page again.
- Don’t try to brute force access; that might corrupt your virtual environment.
flag10
- flag10 can be completed independently of flag9 (to a degree – you must obtain the schema for the missing table). The reason why flag10 is completable without providing the required rights to the hidden table in flag9 is that the database user schema is not used for the report page and the database user being used has access to both tables.
- Can you combine results from multiple tables with a UNION or similar SQL pattern?
- Think about what the data output tells you — success might look subtle.
URL Exploration
- You may find useful pages by manipulating URLs directly.
- Patterns in link structures may reveal hidden or undocumented pages.
Security Model
- Client-side sanitization is gone here, but server-side logic remains similar to earlier tasks.
- Login injection does not work on this task — injection is limited to the Report page only.
Submission Details
See for more information.
TASK H: SQL INJECTION #4
(flag11 – 7.25 pts / flag12 – 7.25 pts)
NOTE:** Task H contains **two flags**:
flag11andflag12. flag12 is reliant on the completion of flag11 (or you can choose to use your GTID for the username and password, but not receive a hash for flag11). **Please review the for specific instructions regarding the format.
Overview
You’re testing the security of a banking website that allows users to log in and view transaction history. Your objective is to prove the system is vulnerable through two stages of SQL injection attacks :
- flag11: Log in as a valid user without knowing any credentials.
- flag12: Modify the transaction history to show a $2000.00 balance, no overdraw, and exactly 10 transactions .
Steps to earn flag11 & flag12
flag11 – Login Without Username
Goal: Log in to the banking site without knowing a valid username. You must use SQL injection in both the username and password fields to:
- Extract or generate a valid user from the database (see the hints section below for assistance in knowing what the database structure looks like)
- Pass the authentication check
Key Hints:
- Username injection must extract or resolve to a valid row from the user table.
- The injection logic will differ between the username and password fields.
- Brute forcing usernames, while possible, will be extremely tedious and time-consuming – aim to write a smart injection.
- You must use the skills you gained in Task E with more sophisticated SQL knowledge.
- Expect the site to run PHP code similar to the code provided in Task E.
- There is no sanitization for this task, the same as there was no sanitization for flag4 password injection.
- The username injection should extract a real entry. While there are various ways to complete the attack, a sub-query may be a beneficial place to start.
- The account hashed displayed is partial, you will need to find and submit the entire hash.
What success looks like:
- The site logs you in, revealing a username and a hash just beneath it.
- That hash is your
flag11.

- Note: The name shown above is not a valid user → approach the flag as though you have no idea about any user information (because none has been provided to you).
flag12 – Tamper Transaction History
Goal: Once logged in, you’ll see 10 transaction entries and a balance. One entry will be an overdraw fee (-$35). You must:
- Remove the overdraw fee completely (including from any audit trail).
- Insert a new transaction to raise the total balance to exactly $2000.00.
- Maintain 10 total transactions .
Critical Part: You can’t inject into text boxes. You must modify the form payload via Chrome Developer Tools before the form submits. You are altering the data sent to the server, not to the UI!
- Routing & Account Number are only to simulate a real-world transaction (you do not need to find/use real information)
-
Every time you log out/in, the transaction ledger resets

How to Complete flag11 & flag12
-
Find the Transfer Form:
- Click the Transfer button to open the form.
- You’ll see fields like Routing Number, Account Number, and Amount.
-
Open Chrome DevTools (F12):
- Set a breakpoint on the Submit button of the pop-up transfer form.
-
Alter the JSON/Form Payload:
- Use DevTools to pause the form transmission and inject custom SQL into the backend submission.
-
Craft the SQL Injection:
- You must inject an SQL statement that:
- Inserts a credit transaction (you can set the $ amount using the UI, but will need to change the payload before it sends)
- Deletes the overdraw fee entry and removes it from the audit trail
- NOTE: This backend expects/uses JSON.
- You must inject an SQL statement that:
-
Syntax Style:
- The backend uses SQL in one of these forms:
INSERT INTO table (...) VALUES (...)INSERT INTO table (...) SELECT ... FROM ...
- Determine which one is used by guessing or trial/error – again to simulate a real-world scenario (this information would most likely not be publicly available).
- The backend uses SQL in one of these forms:
-
Verify Results:
- Final screen must show:
- Balance: $2000.00
- 10 Transactions
- No Overdraw Fee
-
Validation Hash — This is your
flag12
- NOTE: If anything is off (wrong balance, 11 transactions, or an overdraw still exists), the hash will be wrong.
- Final screen must show:
Hints Recap
flag11
- Look at how a sub-query could be useful to create your injection for the username
- You have already completed the requirements for the password injection in a previous flag
- You must pull a real user from the DB; attempting an injection to bypass the user will not work.
flag12
- If you attempt too many transactions in a short window, you may be flagged as this is sus. Maybe logging off and back on will allow you to try again?
- Use DevTools to edit a field value before the form is submitted.
- Find the table schema; maybe something you have previously done may work here as well.
- Look for a JavaScript function that is delivering your payload and pause the transmission to update the transaction with your payload. Then continue the transmission of your payload and check the results.
Submission Details
See for more information.
TASK I: FIND THE TABLE / FIND THE HASH
(flag13 – 7.5 pts)
NOTE:** Task I contains **one flag**:
flag13. **Please review the for specific instructions regarding the format.
Overview
While you were able to find tables without SQL injection for some of the tasks, in this task, you’ll use SQL Injection to find a hidden table and query it’s contents to find a hidden hash.
Note: you do not need to do anything malicious (drop/delete) or elevation (access) attack!
Accessing the Hidden Table
-
One of the previous tasks has a hidden table that you will need to write SQL to find. Use logic to narrow down which Task you should attempt and attack. To get you started, Task B and C are Inference Attacks and there is not an area to attempt a SQLi. You can also safely ignore Task A.
-
Once you find the hidden table, you will need to return data from the table in order to find the hash to report. You will know the hash as it looks similar to the other hashes up to this point!
-
This will be a multi-phase attack and there will not be points awarded for the various phases, it will be all or nothing.
Hints & Guidance
- Only one of the previous tasks has the hidden table you are looking for.
- Think about what task could provide the return you need.
- Depending on where you attempt your injection, remember there may or may not be sanitization involved.
- You may need to pay attention to any constraints that exists!
Submission Details
Include your flag13 hash in the JSON file and submit it to Gradescope!
See for more information.
Task J: Defend Against Inference and SQL Injection Attacks
(flag14 – 8.25 pts / flag15 – 8.25 pts)
Note:** Task J contains two flags:
flag14which is an **array flag** (Inference – Elements 1-3) andflag15which is an **array flag** (SQLi – Elements 1-3). **Please review the for specific instructions regarding the format.
Overview
You were provided access to the database used by an organization but do not have access to the Front End (web page code). You were informed that there were two views never completed that the front end calls to create a report and that the views must be written to ensure that an inference attack cannot be completed. You also found out that there is a un-written stored procedure that all web page inputs call. This stored procedure is supposed to verify and sanitize any incoming input before returning the data post processing to be used in a query.
In this task, you’ll shift from attacking to defending. Instead of exploiting vulnerabilities (as in Tasks A–G), you’ll write SQL to prevent inference and SQL injection (SQLi) attacks.
HINT: You may want to run the validation tests before making any changes to see where the initial state is.
NOTE: All validations will initially show yellow (not run). Click the Run test button next to each to validate individually.


CRUCIAL: You should use Chrome for Task J Validation Checks → Firefox & Safari both have a signigicantly lower timeout with fetch() calls.
IMPORTANT: If any of the Run Test processes are taking over 5 minutes, refresh the page and re-run the test. The SQLInjection validation runtime will be double of the Inference validations!
How to Complete flag12
- Navigate the Task J Menu
-
Hover over the Task J menu to reveal three links:

Test PagesRun Validation Checks(Each page opens in a new tab.)
-
- Click Test Pages (opens in a new tab).
- Use the dropdown to select from:
- Employee Report Search → Test SQLi UNION injection defense
- Avg Salary By Title Report → Validate
TitleGenderAgeReport - Avg Salary By Dept Report → Validate
DepartmentEthnicityDurationReport - Login → Test SQLi login injection defense
- Use the dropdown to select from:
-
Update the database views/stored procedure in the database using DbGate → You will need to access the TaskI Database.

- Review the page for instructions on how to set up/use DbGate.
- You should not run
INSERT,DELETE, orUPDATEqueries on the tables — doing so may require a restore of the database!
- Click Run Validation Checks (opens in a new tab).
- Click Run Test next to each test you want to validate/tesst
- Note: SQLInjection will take much longer to complete than the other three tests
- Tests take significantly longer using UTM
- If any test takes longer than five minutes to complete, refresh the page and re-run the test
- Some sub-tests may come back with results, but if the hamster does not go away, all sub-tests did not finish!
- Click Run Test next to each test you want to validate/tesst
Part 1: Inference Defense (flag12 Elements 1–3)
View: EmployeeReport
- DO NOT ALTER this Report
View: TitleGenderAgeReport
- Report average salary and bonus by Title, Gender, and Age
- Ensure k-anonymity (k=2) is enforced
- Follow the base table column order
- No default sort required
TGA Report De-Identification Rules
- Age Buckets:
<36,36-50,51-65,>65- Note: Some students have stated issues with copy/paste from above. Please use less than, greater than, and hyphen symbols with no spaces.
- Priority: Title > Gender > Age
- Use
'Redact'to mask Gender - Use
'Other'to mask Title - If needed for anonymity, use
'Omit'to exclude records
TGA Format Rules
- Salary: average, 2 decimal places,
$prefix, no commas - Bonus: average, 2 decimal places,
%suffix, remove trailing zeroes
View: DepartmentEthnicityDurationReport
- Report average salary and bonus by Department, Ethnicity, and Duration
- Calculate Duration from Hire Date to Today (365-day years,
FLOOR*could be useful) - Follow table column order
- No default sort required
DED Report De-Identification Rules
- Duration Buckets:
<6,6-10,11-20,>20- Note: Some students have stated issues with copy/paste from above. Please use less than, greater than, and hyphen symbols with no spaces.
- Priority: Department > Ethnicity > Duration
- Use
'Redact'to mask Ethnicity - Use
'Other'to mask Department - If needed for anonymity, use
'Omit'to exclude records
DED Format Rules
- Salary: average, 2 decimal places,
$prefix, no commas - Bonus: average, 2 decimal places,
%suffix, remove trailing zeroes
Part 2: SQL Injection Defense (flag12 Element 4)
Procedure: uspSQLReplace
- Do not change input parameters or how
@filteris returned () - Only return the
@filteras an output variable (noSELECTstatements)- Remember that becuase you do not have access to the front-end code, you need to sanitize the input to ensure that injections are not possible, but valid inputs are not sanitized.
- Client-side Sanitization was “provided” in other flags. You MUST convert the provided sanitization logic to SQL and use it here
- DO NOT add new keywords or remove existing ones (such as the work LIKE)
- Validation checks for the sanitization is based on the logic used for previous flags and will fail if you manipulate it outside of:
- Correct the the big flaw allowing it to be beat (i.e., oorr → or)
- Prevent attacks like
' OR 1=1 --andUNION SELECT- This goes beyond simply the sanitization (required) and requires parameterization!
- Allow valid inputs that exist (e.g., for login, if a user truly has the ultra secure password “password”, you must allow it while still sanitizing injection attempts)
- Allow the search an employee who has an apostrophe/single quote in their name (e.g., D’Ianni)
- HINT: do not strip it out
- Validate both Login and Search input
Hints & Tips
- The Employee Serach Page search functionality is a direct search (where name/title =) not a partial search (where name/title like %)
- Use Common Table Expressions (CTEs) to group and bucket data
- Prioritize columns in order of importance when grouping
- Only hardcode values when told (e.g.,
'Redact','Other','Omit') - Use
sp_executesqlfor secure dynamic SQL ()
Reset Code (If Needed)
-- Reset TitleGenderAgeReport
ALTER VIEW [dbo].[TitleGenderAgeReport] AS
SELECT *
FROM CompanyEmployees;
GO
-- Reset DepartmentEthnicityDurationReport
ALTER VIEW [dbo].[DepartmentEthnicityDurationReport] AS
SELECT *, '' AS Duration
FROM CompanyEmployees;
GO
-- Reset uspSQLReplace
ALTER PROCEDURE [dbo].[uspSQLReplace]
(@tblName varchar(64), @colName varchar(64), @colValue varchar(1024), @colDataType varchar(32), @filter varchar(1024) OUTPUT)
AS
BEGIN
DECLARE @sql nvarchar(max);
DECLARE @param nvarchar(64);
DECLARE @found int = 0;
SELECT @filter = @colValue;
/*Student Code Should Go Here*/
END;
GO
-- Reset EmployeeReport
ALTER VIEW [dbo].[EmployeeReport] AS
SELECT Name,
Title,
Department,
Gender,
Ethnicity,
Age,
Hired,
City
FROM CompanyEmployees;
GO
DbGate:
- Follow the instructions in
- You will be using the TaskI database
Below is how to edit a view:
- Click on the view you are working
-
Click on SQL

-
Click on Alter View

-
Main Alter View screen

-
Submission Details
See for more information.









