Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Security considerations when collecting and storing bank account details in a php/mysql application

We have been asked to look into the feasibility of an application to collect bank account numbers and sort codes and store them temporarily for offline processing through a paperless direct debit system.

Data will be collected from website visitors through a 256 bit SSL connection and stored in a mySQL database for later collection by our client. This data would be held temporarily until downloaded at which point it would be erased from the database.

Details: We host a few other websites on this particular server No-one has shell access or FTP access to the server Server is PCI compliant Mod_security and other software running on machine

I know this is very similar to this question Best practices for storing bank information in a database, and appreciate the bulk of responses are to steer clear.

I understand the list of security considerations is potentially very large.

What particular areas of security should we focus on?

like image 752
BrochanGuMor Avatar asked Aug 09 '11 13:08

BrochanGuMor


People also ask

How securely store bank details in database?

You could use any file encryption software like PGP, FileVault, TrueCrypt, AxCrypt, VeraCrypt, etc., to store such sensitive information. Cloud based file encryption services like Cryptomator, which uses AES encryption, are convenient as well by not being device specific.

Should bank account numbers be encrypted?

The ACH Rules require that any transmission of banking information, such as a customer's bank account and routing number, be encrypted using “commercially reasonable” encryption technology if transmitted via an unsecured network, like the Internet.

Does PCI compliance apply to bank accounts?

Bank account data, such as branch identification numbers, bank account numbers, sort codes, routing numbers, etc., are not considered payment card data, and PCI DSS does not apply to this information. However, if a bank account number is also a PAN or contains the PAN, then PCI DSS applies.


1 Answers

Use asymmetric encryption so that the data is encrypted before being inserted into the database, but you don't store the necessary key to decrypt the data on the server.

This key should only be stored on the client's side, so they can decrypt it after retrieving it from your server.

Still with this protection, you'll want to create a tunnel of sorts for them to securely connect to your server(s). If you intend to let them connect to MySQL directly, I should mention it is inadvisable to accept external connections to the MySQL listening port indiscriminately. If they have a static IP, you can make use of a software or hardware firewall to restrict it in that manner, if creating a VPN is not workable for you.

This answer provides some information about doing asymmetric encryption with the built-in openssl_* functions in PHP.

Please ask for clarification/expansion on any of this as necessary.

like image 185
mh. Avatar answered Oct 11 '22 21:10

mh.