Re: Credit Cards & MySQL

From: Date: Fri, 16 May 2003 22:40:04 +0000
Subject: Re: Credit Cards & MySQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-147990@lists.php.net to get a copy of this message
On Fri, 16 May 2003 17:45:46 -0400, you wrote: >While I agree with the 'ideal' situation from David, often that is not >possible. I certainly agree that my solution was idealized - I was trying to stress the logical split between processes. If you prefer, substitute "account", "script", etc. for "machine" in my post. In the real world, I personally would use two machines and a hardware firewall. >If you have to store credit cards, you need to ensure first of all the the >MYSQL server is NOT accessible from anywhere except the localhost that you >will be calling it from. That minimizes one possible security leak. But I have to say, I do think that holding valuable data (eg CC numbers) on a DMZ'd machine is foolhardy. Yes, the risk is small, but if the cost of reducing it is just a few hundred dollars in hardware... >The second thing to do would be to encrypt the credit card using the mcrypt >functions and a key that is stored on the server, but is only accessible >OUTSIDE the web directory. > >This way in order for someone to get the credit cards, a hacker has to: >A. Get access to the machine - not tough >B. Read your scripts to know the encryption method >C. Gain Access to the mysql server >D. Reproduce the decryption with your key Um... if they've completed A, surely they can just lift the file with the key in it, and the database, and walk away? Or are you assuming limited access, rather than root? Or am I missing something obvious? Security isn't my speciality.

« previous php.general (#147990) next »