Question: From the following code identify the possible attack: Line 1 . String username = request.getParameter ( username ) ; Line 2 . String

From the following code identify the possible attack: Line 1.String username = request.getParameter("username"); Line 2.String password = request.getParameter("password"); Line 3.conn = pool.getConnection(); String sql = "select * from user where Line 4 username='"+ username +"' and password='"+ password +"""; Line 5.stmt = conn.createStatement(); Line
6.rs = stmt.executeQuery(sql); Line 7.if (rs.next()){ out.println("Logged in Successfully"); } else Line 8.{ out.println("Invalid Username or Password"); }
Select the correct option(s) and click submit
SQL Injection
Cross Site Scripting
Password Tampering
Denial of Service

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!