First make sure java is installed on your host machine. After installation, we go to the folder of the lab we want to practice. "i.e /skf-labs/XSS, /skf-labs/RFI/" and run the following command:
1
$ ./mvnw spring-boot:run
Copied!
Now that the app is running let's go hacking!
Reconnaissance
Mass assignment is a computer vulnerability where an active record pattern in a web application is abused to modify data items that the user should not normally be allowed to access such as password, granted permissions, or administrator status.
Please take note of the following code in the User.java . This line of code will prove critical for exploiting the parameter binding attack.
1
@PostMapping("/create")
2
publicStringcreateUser(User user,Model model){// here is the issue
3
authModel.createUser(user);
4
model.addAttribute("content","Your user has been created");
5
return"index";
6
}
Copied!
To fully understand the attack we need to examine the properties "User" model, which looks like this: