Attacks and Exploits

Which remediation BEST prevents LDAP injection in a login form that builds directory queries from user input?

Show the answer

Correct answerB. Escaping special characters in user input

AWhy not this: Lockout slows password guessing; injected filter input needs no repeated failures.

BWhy this is right: Escaping filter characters keeps user input as data, so it cannot change the query.

CWhy not this: Changes the protocol used for domain authentication; the web form's query stays injectable.

DWhy not this: Number matching hardens push MFA against fatigue, not query manipulation.

LDAP injection works because input is placed unescaped into a search filter. Escaping or validating special characters keeps input as data. Account lockout limits guessing but does not stop crafted filter input.