I have an SQL Server running on a Windows 2008 R2 machine which needs to have basic queries run on it (SELECT / INSERT / UPDATE). These operations are executed directly by the client, an application written in C# which installed on one computer in a different location so the connection is over the internet.
Since the nature of the operations run on the DB is so simple, I would rather not write a back-end on top of the SQL Server. So the setup for security:
1) Username and Password written in client and submitted.
2) A (parameterised) query is run on the server and the password hash and salt are returned to the client.
3) The password and salt are appended, hashed using SHA_512 and is compared to the password hash.
4) If the two match you are given access to the toolset that creates and sends the queries.
After researching the topic somewhat I feel like this system has some security flaws, but I cannot pin-point exactly what these vulnerabilities might be.