PHP & Mysql injection in phplist

This is a discussion on "PHP & Mysql injection in phplist" within the PHP Forum section. This forum, and the thread "PHP & Mysql injection in phplist are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 7th, 2006, 18:05
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 26
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
PHP & Mysql injection in phplist

Hello all,
I want to secure a page which uses the script of "phplist". Basically this script stores username, name, surname, email etc of users in order for the company to send newsletters to their clients.
Except from stripping slashes,backslashes etc or special characters, are there any other ways to prevent the data stored in the db from somenone that wants to "lay their hands" on them?

Thank you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 8th, 2006, 13:28
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP & Mysql injection in phplist

I'm not an expert on this, so consider this more one learner trying to help another.

Regex is very powerful for validating input. It's hard as hell to learn though, although it's easier to write it than read it. There's a good editor for like $30, I think it's called Regex Buddy from JG Softwaree. And there's a great free tutorial at http://www.regular-expressions.info/php.html by Jan Goyvaerts, the guy who runs JG. He's a real class act, as far as my experiences go. I use his text editor, which is $50 although if you don't have many scruples you can use it as freeware.

Of course you want to set permissions carefully for the user and give the user connection a unique password. Keep the database connection files outside the public directory. Also use some kind of encryption for member passwords.

Hope this helps some, Geoff and Graham are a lot more experienced. But there are a ton of good security tips on the internet, just Google for them.

Oh yes, and like anything, backup your database.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 9th, 2006, 08:48
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: PHP & Mysql injection in phplist

For a PHP mailing list / security ... things I would check include:

a) That you deal with inputs through stripslashes, use addslashes befor you save to a database, and use htmlspecialchars before you display. And that you quote values echoed back into forms using " characters. Correctly taking these actions should bullet proof you against injection attacks.

b) Ensure that intermediate data files, backup copies of code, etc, are NOT left in web accessible directories on the server.

c) Take steps to ensure that user contributed data really is contributed by the users who are who they claim to be.

d) Ensure that you have good backups and also take steps to ensure that the backups aren't easily accessible / copyable by other parties.

e) On a shared server, consider any possible actions by other account holders on the same server and how their actions / lack of security knowledge could effect you.

f) Consider automata - programs that can browse your site / data and systematically harvest or contribute database content.

Naturally, some of these may be "no brainer"s for you in your particular setup but it's worth just a moment or two's thought to each of them just in case.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
injection, phplist

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about validation and sql injection sudhakararaog PHP Forum 5 May 21st, 2008 14:22
help with getting phplist set up Oak PHP Forum 3 May 21st, 2008 08:22
SQL injection prevention AdRock PHP Forum 3 Sep 6th, 2007 13:55
SQL Injection Security PHP nate2099 Databases 7 Jul 14th, 2007 13:58
ohol-injection.com rocket468 Free Web Site Critique 2 Oct 27th, 2006 00:03


All times are GMT. The time now is 13:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved