You may be affected by Visbot Malware. Best approach would be to recover the Magento site using backup of code and database. You need to recover both and database as malware code may be sitting in the database and just reverting the code to a previous clean snapshot may get affected again.
Below are few other things you can do:
1. Scan your site using magereport.com. It will give you the list of missing patches and how to implement them.
2. Go through this URL https://magento.com/security/best-practices/remediating-your-site-after-malware-attack
3. Upgrade Magento if not at the latest version of it. If you this step first you may not have to install security patches.
There are bunch of other things can be done to make your magento secure. However, below items would be a good start point.