Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Cryptology in the database

by ikegami (Pope)
on Mar 31, 2008 at 07:37 UTC ( #677456=note: print w/replies, xml ) Need Help??


in reply to Re^2: Cryptology in the database
in thread Cryptology in the database

"break into my db server" is rather vague. How would the attacker do that? You need to look at more specific attacks (for example, "tricking the database into returning data is shouldn't" and "access to arbitrary files"), calculate the chance of the attack happening, the cost of successful attack (not just financial), the costs of the possible counter-measures (again, not just financial) and the effectiveness of the possible counter-measures.

The most likely source of leaks is an SQL injection vulnerability, and encrypting the database won't help protect you from that at all since you'll happily decrypt the returned data for the attacker.

Replies are listed 'Best First'.
Re^4: Cryptology in the database
by patspam (Sexton) on Mar 31, 2008 at 09:08 UTC
    Hi ikegami,

    You're right, I'm not being specific enough. By "break into my db server" I really mean "obtain a copy of my database"
    • How would the attacker do that? Gaining shell access to my server and doing a live dump of the db (only I have access to the machine, no shared-hosting or anything), stealing my backups, etc..
    • Chance of the attack happening Hopefully very low but since I'm dealing with medical info I'm compelled to encrypt the database anyway
    • the cost of successful attack A whole lot of badness
    • the costs of the possible counter-measures and the effectiveness of the possible counter-measures The point of my post is to find out if any counter-measures exist, suggestions welcome!
    I'm not so much concerned with SQL injection in regards to this question although I totally agree it's a really tough hole to protect against and something I'll also need to adrress in my code.

    Cheers,

    Patrick
      SQL injection [is] a really tough hole to protect against
      Not really. Revoke SELECT, INSERT, UPDATE, DELETE privileges from you application's user account and grant access to your data through stored procedures only (provided that the DBMS of your choice supports it). That's what I consider the most effective SQL injection prevention.

      See also Avoiding SQL Injection (owasp.org).

      --
      Andreas
      One potential thing encryption can guard against is theft of the database backup tapes. If the database backup tapes and the application server backup tapes are kept and stored in different locations, it is conceivable that someone could steal a database backup tape and thus obtain a copy of the database without a copy of your application. In this case, encryption could be a benefit.


      --JAS

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://677456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2021-02-25 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?