5 ms·
Your primary threat is SQL Injection. Use parameterization to avoid this. If your system uses plugins like Wordpress (where you can't guarantee anti-injection
by elchief 11y ago
Your primary threat is SQL Injection. Use parameterization to avoid this.
If your system uses plugins like Wordpress (where you can't guarantee anti-injection measures), then you seriously need to use real per-user database authentication (killing connection pooling, boo-hoo).
Your secondary threat is hacker getting root on web server. Web server must not connect to db as superuser. Connect with minimal privileges. Need network monitoring to look for bulk selects, or unwanted sequences of selects. You will lose some data, but you don't have to lose all of it.
1. db server is on own box in own network zone w firewall
2. db server has two network cards. Own network where only web server can connect, and management network. Management network is internal-only or VPN'd on a different IP/domain
3. management network allows for network backup, SNMP, syslog, ssh
4. db text logs go to remote syslog server which is monitored for security events
5. snort or bro NIDS between web server and db server. Preferably in promiscuous/no ip address mode
6. your user authn system allows no direct table access. web server can only connect thru sprocs, which return single records.