Denial of Service from Multiple Logins
Instructions:
- This site allows a user to login multiple times. This site has a database connection pool that allows 2 connections. You must obtain a list of valid users and create a total of 3 logins.
Alright so for this DoS attack we need to have the creds of at least 3 users. Let’s use some SQL injection to pull all of the users in the db:
username: user' or '1' = '1
password: password' or '1' = '1
This concatenates to the following SQL statement:
SELECT * FROM user_system_data WHERE user_name = 'user' and password = 'password' or '1' = '1'
And when we input that to the login prompt:
Bingo! Now let’s see what a login request looks like so we can create a few for our DoS attack:
Username=jsnow&Password=passwd1&SUBMIT=Login
Alright. Now let’s break out some Python again and get cracking on our DoS script:
The basic function of this script is to send login requests for up to max_logins
number of users. It loops around the credentials in accounts
(which could cause a hang if we had < max_logins
of valid creds), and creates requests for these users on the login URL. Let’s see what happens when we run it:
Well, looks like the dave and jeff’s accounts weren’t accepted for the login, but luckily we found 3 working users. Let’s see if we succeeded in DoS:
Nice! Although if 3 users logging in simultaneously overloads your login servers, you might need to rework some of your core infrastructure.