nerdexam
EC-Council

212-82 · Question #31

given a task to exploit the web application and fetch the user credentials. Select the UID which is mapped to user john in the database table. Note: Username: sam Pass: test

The correct answer is D. 4. 4 is the UID that is mapped to user john in the database table in the above scenario. SQL injection is a type of web application attack that exploits a vulnerability in a web application that allows an attacker to inject malicious SQL statements into an input field, such as a use

Submitted by certguy· Mar 6, 2026Application Security for Cloud

Question

given a task to exploit the web application and fetch the user credentials. Select the UID which is mapped to user john in the database table. Note:

Username: sam Pass: test

Options

  • A5
  • B3
  • C2
  • D4

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    19% (6)
  • C
    9% (3)
  • D
    66% (21)

Explanation

4 is the UID that is mapped to user john in the database table in the above scenario. SQL injection is a type of web application attack that exploits a vulnerability in a web application that allows an attacker to inject malicious SQL statements into an input field, such as a username or password field, and execute them on the database server. SQL injection can be used to bypass authentication, access or modify sensitive data, execute commands, etc. To exploit the web application and fetch the user credentials, one has to follow these steps: Press Enter key to access the web application. Enter sam as username and test as password. Click on Login button. Observe that a welcome message with username sam is displayed. Click on Logout button. Enter sam' or '1'='1 as username and test as password. Click on Login button. Observe that a welcome message with username admin is displayed, indicating that SQL injection was successful. Click on Logout button. Enter sam'; SELECT * FROM users; ?as username and test as password. Click on Login button. Observe that an error message with user credentials from users table is displayed. The user credentials from users table are: The UID that is mapped to user john is 4.

Topics

#web application security#vulnerability exploitation#SQL injection#credential compromise#practical exercise

Community Discussion

No community discussion yet for this question.

Full 212-82 Practice