Yes and no...
If you are playing single player then yes your accounts & passwords are stored on them, and should be located somewhere within the character file.
If you are playing on the realms then no, your characters along with passwords are stored on blizzard's servers. They do this to prevent people from hacking characters as you can do in single player.
3rd party hacks can sometimes contain "keyloggers"; code designed to record your account/password/cd key then send them to someone, this is a common source of character/cdkey theft.