Content Injection

XML Injection

Extensible Markup Language (XML) injection is going to look exceedingly similar to CSV, YAML, and JSON injection some of the time, but will look completely different the rest of the time. It can present itself as simple data injection or even as XPath injection. This module's goal is to help you understand these different types.

2 challenges

Challenges

CHALLENGE 01

Teacher Login 6

— solves

The goal of this challenge is to login as the teacher to get the flag. There is a serious vulnerability in this server that allows you to use the structure of the XML file that the login data is stored in to sneakily trick the server into thinking you are the teacher. This will look similar to the previous injection challenges.

CHALLENGE 02

Teacher Login 7

— solves

This challenge demonstrates textbook XPath injection, where untrusted user input is inserted directly into an XPath query without sanitization. The application queries an XML file to determine if you are a teacher, but because it builds the query from raw input, a carefully crafted username can alter the query’s logic. Your goal is to exploit this weakness, manipulating XPath logic, in order to gain teacher access and retrieve the flag.