Question: In reviewing a source code of an ASP.Net web application, you have discovered the following routine for a login page: protected void Authenticate (object
In reviewing a source code of an ASP.Net web application, you have discovered the following routine for a login page: protected void Authenticate (object theSender, AuthenticateEventArgs theEvent) { SqlConnection conn = new SqlConnection(@"Data Source-. \sqlexpress; Initial Catalog MyDb;Integrated Security=True"); string query="SELECT * FROM UsersTable WHERE Email = "" + Login.UserName + "" AND Password =HASHBYTES ('SHA2_512', " + Login.Password + "'+ salt)"; adapter = new SqlDataAdapter(query, conn); dataTable new DataTable(); adapter.Fill(dataTable); if (dataTable.Rows.Count >= 1) { } Response.Redirect("index.aspx"); Identify the vulnerability and remediate the code using appropriate countermeasures. Demonstrate how the vulnerability is formed from the user input.
Step by Step Solution
There are 3 Steps involved in it
The code provided contains a significant security vulnerability known as SQL injection The vulnerabi... View full answer
Get step-by-step solutions from verified subject matter experts
