Currently, the security goes as follows:
When the program opens, prompt for a password, or read the password in from a file (Done for convenience, ideally the security is completely invisible). It then goes out to the internet to a basic file storage site I have set up and reads in an encrypted version of the password the user just entered. (For the curious, the password we're currently using can be found here. The program then runs the user-entered password through the encryption algorithm and compares it with the one gotten from the internet. If they match, the password is correct and the main form loads up. If it doesn't match, the program exits.
I think this is pretty secure as I control exactly when the passwords are changed, and I have it set up so that I can force versions to expire by deleting that version's password file.
I do have two main worries, however: The first is that if the user has their own DNS server, they can redirect traffic from fortunecity.com to their own site, allowing them to use old passwords and thus not be subject to password changes.
My second worry is that any user who knows asm can decompile the EXE into asm, find the if statement where I test the password, and just change it to if(true) or some alternative that guarantees them access to the rest of the program.
The solution to the first problem is language and implementation specific, and I really don't know if it's solvable, so I'm looking past it for now. What really bothers me is the second one.
How can I change the flow of the program so that is very difficult or impossible for someone to just edit a few lines in asm? Is the hole I described even feasible?
Here's my password testing function, for reference. MS.testPassword() returns true if the password is correct and false if it is not correct.
Code: Select all
Private Sub testPassword(enteredPW as String)
Dim correctPassword As Boolean
correctPassword = MS.testPassword(enteredPW)
If (correctPassword) Then
a = MsgBox("Password Incorrect.", vbCritical, "Incorrect Password")
I posted this in CS because the answer doesn't really seem to be language-specific and instead relates to general things of security.