MyBB Community Forums

Full Version: Database Encryption for user tables...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I support this idea. And this is not something well-suited for a plugin because of the complex nature of encrypting in the database. Most SQL engines support encryption now. If it doesn't then it shoudn't be used.

I assume the point of redesigning MyBB for 2.0 is to use the latest technology and improve vastly MyBB's features. This is definitely doable if MyBB wants to do it. I suggest encrypting only a few private columns such as the password and email in users table. Possibly even the PM's. The encryption would ensure that a database dump is useless.

And yes, I do realize the encryption would add some load and slow the site down but it shouldn't be significant for most boards.

Quote:Seems like something better served as a plugin for those extremely security-conscious board owners

No because you'd have to change core files so that every instance of grabbing the encrypted data was done properly. This is something poorly served by a plugin.
(2017-01-10, 02:41 PM)labrocca Wrote: [ -> ]I support this idea. And this is not something well-suited for a plugin because of the complex nature of encrypting in the database. Most SQL engines support encryption now. If it doesn't then it shoudn't be used.

I assume the point of redesigning MyBB for 2.0 is to use the latest technology and improve vastly MyBB's features. This is definitely doable if MyBB wants to do it. I suggest encrypting only a few private columns such as the password and email in users table. Possibly even the PM's. The encryption would ensure that a database dump is useless.

And yes, I do realize the encryption would add some load and slow the site down but it shouldn't be significant for most boards.

Quote:Seems like something better served as a plugin for those extremely security-conscious board owners

No because you'd have to change core files so that every instance of grabbing the encrypted data was done properly. This is something poorly served by a plugin.

Honestly as https://istlsfastyet.com says "TLS has exactly one performance problem: it is not used widely enough. Everything else can be optimized.". That being said I'd say the same applies to other forms of encryption. By using seperate database hooks for encrypted data we'd prevent someone who found an SQLi vulnerability in a plugin from using the data.
(2017-01-10, 02:41 PM)labrocca Wrote: [ -> ]I support this idea.  And this is not something well-suited for a plugin because of the complex nature of encrypting in the database.   Most SQL engines support encryption now. If it doesn't then it shoudn't be used.  

I assume the point of redesigning MyBB for 2.0 is to use the latest technology and improve vastly MyBB's features.  This is definitely doable if MyBB wants to do it.  I suggest encrypting only a few private columns such as the password and email in users table.  Possibly even the PM's.  The encryption would ensure that a database dump is useless.  

And yes, I do realize the encryption would add some load and slow the site down but it shouldn't be significant for most boards.

Quote:Seems like something better served as a plugin for those extremely security-conscious board owners

No because you'd have to change core files so that every instance of grabbing the encrypted data was done properly. This is something poorly served by a plugin.

Note that it would actually be easy to implement as a plugin with 2.0. All you'd need to do is add accessor/setter functions to models where data is encrypted. This is how it would be done in the core too.

I would like to get it in the core, but we'll see how we're doing for time. Ideally the connection to the DB server would be encrypted, along with the data being stored.
(2017-01-10, 05:46 PM)Euan T Wrote: [ -> ]
(2017-01-10, 02:41 PM)labrocca Wrote: [ -> ]I support this idea.  And this is not something well-suited for a plugin because of the complex nature of encrypting in the database.   Most SQL engines support encryption now. If it doesn't then it shoudn't be used.  

I assume the point of redesigning MyBB for 2.0 is to use the latest technology and improve vastly MyBB's features.  This is definitely doable if MyBB wants to do it.  I suggest encrypting only a few private columns such as the password and email in users table.  Possibly even the PM's.  The encryption would ensure that a database dump is useless.  

And yes, I do realize the encryption would add some load and slow the site down but it shouldn't be significant for most boards.

Quote:Seems like something better served as a plugin for those extremely security-conscious board owners

No because you'd have to change core files so that every instance of grabbing the encrypted data was done properly. This is something poorly served by a plugin.

Note that it would actually be easy to implement as a plugin with 2.0. All you'd need to do is add accessor/setter functions to models where data is encrypted. This is how it would be done in the core too.

I would like to get it in the core, but we'll see how we're doing for time. Ideally the connection to the DB server would be encrypted, along with the data being stored.

I really hope you choose to implement it into the core.
Posting here to show my support for core database encryption. Smile
(2017-03-03, 06:02 AM)kawaii Wrote: [ -> ]Posting here to show my support for core database encryption. Smile

Awesome I'd really like to see this functionality implemented into MyBB 2.0.
I would question the usefulness of this. Prepared statements are supposed to eliminate SQL Injections entirely rather than relying on partial solutions to reduce the damage of a database compromise. It's better to cut a problem off at the source than to figure out new ways to mitigate the damage.

Prepared statements are slower than regular queries, and are presumably not used in 1.x as they slow down the page load times.
If MyBB had prepared statements, then MyBB.com's database would have never been dumped to begin with following the launch of 1.8.

To this day, I still don't understand why we don't have prepared statements yet in 1.8.
Prepared statements send the variables separately from the query string, so even someone injects SQL into one of the variables, it won't let them run whatever query they wish. I for one would rather my site run slower than risk it getting hacked and defaced.
(2017-03-13, 05:02 AM)Azah Wrote: [ -> ]I would question the usefulness of this. Prepared statements are supposed to eliminate SQL Injections entirely rather than relying on partial solutions to reduce the damage of a database compromise. It's better to cut a problem off at the source than to figure out new ways to mitigate the damage.

Prepared statements are slower than regular queries, and are presumably not used in 1.x as they slow down the page load times.
If MyBB had prepared statements, then MyBB.com's database would have never been dumped to begin with following the launch of 1.8.

To this day, I still don't understand why we don't have prepared statements yet in 1.8.
Prepared statements send the variables separately from the query string, so even someone injects SQL into one of the variables, it won't let them run whatever query they wish.

Maybe when official MyBB 1.8 Support dies, I'll rewrite their entire SQL Structure into a custom version of MyBB 1.8 with Prepared Queries. I'll open source it if I do Big Grin
Pages: 1 2