Ism TH Da 4
Ism TH Da 4
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 7 www.netacad.com
Lab - Attacking a mySQL Database
a. The PCAP file opens within Wireshark and displays the captured network traffic. This capture file extends
over an 8-minute (441 second) period, the duration of this SQL injection attack.
What are the two IP addresses involved in this SQL injection attack based on the information displayed?
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 7 www.netacad.com
Lab - Attacking a mySQL Database
The source traffic is shown in red. The source has sent a GET request to host 10.0.2.15. In blue, the
destination device is responding back to the source.
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 7 www.netacad.com
Lab - Attacking a mySQL Database
c. The attacker has entered a query (1=1) into a UserID search box on the target 10.0.2.15 to see if the
application is vulnerable to SQL injection. Instead of the application responding with a login failure
message, it responded with a record from a database. The attacker has verified they can input an SQL
command and the database will respond. The search string 1=1 creates an SQL statement that will be
always true. In the example, it does not matter what is entered into the field, it will always be true.
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 7 www.netacad.com
Lab - Attacking a mySQL Database
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 7 www.netacad.com
Lab - Attacking a mySQL Database
The database name is dvwa and the database user is root@localhost. There are also multiple user
accounts being displayed.
d. Close the Follow HTTP Stream window.
e. Click Clear display filter to display the entire Wireshark conversation.
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 7 www.netacad.com
Lab - Attacking a mySQL Database
database. This provides a huge output of many tables, as the attacker specified “null” without any furtherspecifications.
What would the modified command of (1' OR 1=1 UNION SELECT null, column_name FROM
INFORMATION_SCHEMA.columns WHERE table_name='users') do for the attacker?
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 7 www.netacad.com
Lab - Attacking a mySQL Database
The attacker has entered a query (1’or 1=1 union select user, password from users#) into a UserID
search box on the target 10.0.2.15 to pull usernames and password hashes!
c. Using a website such as https://crackstation.net/, copy the password hash into the password hash
cracker and get cracking.
d. Close the Follow HTTP Stream window. Close any open windows.
Reflection Questions
1. What is the risk of having platforms use the SQL langauge?
2. Browse the internet and perform a search on “prevent SQL injection attacks”. What are 2 methods or steps
that can be taken to prevent SQL injection attacks?
2018 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 7 www.netacad.com