I have been tasked with investigating some possible security holes in an application, one that I have come across is that when the system is configured to use Ldap it takes the unencoded username and password, creates a NetworkCredentials (System.net) object and then passes that to an LdapConnection (System.DirectoryServices.Protocols).
If the username and/or password is left unencoded this would obviously be a security hole for an injection based attack, so my query is: do the .NET classes handle this behind the scenes or do I need to deal with it before it reaches them.