Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a snippet of my java code that connects to the login page. I also have six tables in the customer database. You can

I have a snippet of my java code that connects to the login page. I also have six tables in the customer database. You can assume that all of the datatypes are VARCHAR(20). I know it is vulnerable to SQL injection, but I'm not exactly sure what five attacks could be done that use five different attack vectors, and provide five different extractions that come from the different tables in the database. I also need to understand the mechanisms of the five different attacks.

Java snipet:

read = new Scanner(System.in); // ... System.out.println(Enter email: ); String email = read.nextLine(); System.out.println(Enter password: ); String password = read.nextLine(); // Connect to the database. Connection conn = DriverManager.getConnection(URL, USER, PASS); Statement stmt = conn.createStatement(); // ... String sql = SELECT CustomersName FROM Customers, CustomersSecret WHERE Customers.CustomerEmail = + email + AND CustomersSecret.CustomerPassword = + password + ; // ... ResultSet results = stmt.executeQuery(sql); while (results.next()) { }

Tables:

Customers CustomerName, CustomerID, CustomerEmail CustomersSecret CustomerID, CustomerPassword, CustomerAddress, Cus- tomerPhone, CustomersBankCardInfo EmployeeEmployeeID, EmployeeName, EmployeeEmail EmployeeSecretEmployeeID, EmployeeAddress, EmployeePhone OrdersOrderID, OrderDescription, OrderDate, ShipperID, CustomerID, EmployeeID, ProductDescription, Quantity ShippersShipperID, ShipperName, Phone

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

Does it avoid using personal pronouns (such as I and me)?

Answered: 1 week ago

Question

Does it clearly identify what you have done and accomplished?

Answered: 1 week ago