Context: I work for a business that uses an ERP's built in macro functionality to automate tasks. It uses VBScript as its language. Previous IT Admins had hardcoded the DB connection in all of these macros. ERP clients on users machines have a directory where these macros are stored that get referenced.
Concern: In the event of a security breach, a hacker would easily be able to gain access to the database after browsing our shared network drives and finding the macros with the database credentials.
Ideas I've had: I've thought about adding the connection string to the environment variables on the ERP client machines. Also, I've thought about Integrated Windows Authentication with System DSN reference for the database instances, then adding an Active Directory group for all ERP client users with read/write privileges as a database's login (this isn't ideal either since the user's still have writing capabilities. I would've made the UPDATE/INSERT/DELETE commands into stored procedures as a solution, but there are hundreds of them).
Question: Given this dilemma, what would be a viable solution or best practice from a security standpoint?