iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Internet Security Discussion Forum This forum is for the discussion of security related issues. If you find a new Phishing scheme, spyware, virus or malicious site - let us know about it. If any of the above found you... here's where you ask for help.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2009, 11:59 AM
danlefree's Avatar
WebProWorld Pro
 
Join Date: Jun 2005
Location: Seattle
Posts: 266
danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4
Default PHP Security Audit Script

It did not appear as though anything quite like it existed, so I threw together a PHP security audit script.

Uploaded to your webserver, the script will check known PHP vulnerabilities and provide some general recommendations for securing your PHP installation.

It's still a bit rough / paranoid, though I plan to add vulnerability-specific recommendations and some filters to determine the depth of vulnerability checking in the next revision.

Informed PHP security suggestions (and general usability suggestions) welcomed.
__________________
Dan LeFree | Product Manager (Linux VPS Hosting) | Owner/Operator (Web development, marketing)
Reply With Quote
  #2 (permalink)  
Old 05-18-2009, 12:25 PM
kgun's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Norway
Posts: 5,678
kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9
Default Re: PHP Security Audit Script

Thank you. The code is downloaded. I will test it when I have free time.

Some fast observations / questions:
  1. Why do you not use the recommended PHP documentation? Don't do as I do. Do as I say.
  2. Is your file / functions dependent on server configuration, php.ini (that I can not use on my shared server) versus .htaccess?
  3. Can it be used on all PHP installations?
  4. If the question is no to one of 2 and 3, you should comment it in your code.
Reply With Quote
  #3 (permalink)  
Old 05-18-2009, 01:41 PM
danlefree's Avatar
WebProWorld Pro
 
Join Date: Jun 2005
Location: Seattle
Posts: 266
danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4
Default Re: PHP Security Audit Script

Quote:
Originally Posted by kgun View Post
Why do you not use the recommended PHP documentation? Don't do as I do. Do as I say.
I provide links to the PHP documentation where appropriate (in recommending configuration changes) and I researched the documentation extensively to determine potentially-dangerous functions and configurations.

It is also worth noting that PHP 6.0 does not support "safe mode" (reference), so I have included all functions which safe mode has historically restricted within the script.


Quote:
Originally Posted by kgun View Post
Is your file / functions dependent on server configuration, php.ini (that I can not use on my shared server) versus .htaccess?
The script will parse all loaded PHP configuration directives (whether PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM).

Apache override files may load additional directives - those directives will be evaluated as they occur (I am not aware of a good way to distinguish between directive evaluation from within the script, though I will take into account the options which shared hosting users may have if Apache's AllowOverride setting is enabled and PHP is compiled as an Apache module).


Quote:
Originally Posted by kgun View Post
Can it be used on all PHP installations?
The audit script may be used with any webserver installation - while it will also run under a CLI installation there really isn't much of a need (if you're running PHP-CLI it is likely that you are primarily concerned with functionality over security).


Thank you for the preliminary suggestions - I'll take a look at adding some additional instructions to the script (and please do let me know what you think after you've had a chance to run it).
__________________
Dan LeFree | Product Manager (Linux VPS Hosting) | Owner/Operator (Web development, marketing)
Reply With Quote
  #4 (permalink)  
Old 05-18-2009, 04:43 PM
kgun's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: May 2005
Location: Norway
Posts: 5,678
kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9kgun RepRank 9
Default Re: PHP Security Audit Script

Ran it on one of my websites. It seems like an excellent tool. You should market it, write a book around it and develop it.

Again thank you very much.
Reply With Quote
  #5 (permalink)  
Old 06-10-2009, 11:47 PM
danlefree's Avatar
WebProWorld Pro
 
Join Date: Jun 2005
Location: Seattle
Posts: 266
danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4danlefree RepRank 4
Default Re: PHP Security Audit Script

Quote:
Originally Posted by kgun View Post
Ran it on one of my websites. It seems like an excellent tool. You should market it, write a book around it and develop it.
I think I'll give that a shot...

PHP-Security-Audit.com is now online with a few updates to the script
__________________
Dan LeFree | Product Manager (Linux VPS Hosting) | Owner/Operator (Web development, marketing)
Reply With Quote
  #6 (permalink)  
Old 08-20-2009, 12:10 PM
WebProWorld New Member
 
Join Date: Aug 2009
Posts: 21
clonfran RepRank 1
Default Re: PHP Security Audit Script

Thanks so much for your hard work. I have always had concerns about my websites security and have wished for an easy tool to check things. I agree that you should market this tool. It looks like a winner.
__________________
MBT | MBT Shoe Reviews
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Internet Security Discussion Forum

Thread Tools
Display Modes

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
Struggling with audit trail bizgen Database Discussion Forum 2 01-16-2009 07:13 PM
Need to audit security in Cisco APs? WiFi-Owl Internet Security Discussion Forum 0 03-16-2007 03:58 AM
Enhance pay-per-click audit iowasmiles Search Engine Optimization Forum 1 09-21-2004 08:20 PM
cardsremembered.com - SEO Review/Audit goervin Submit Your Site For Review 2 07-25-2004 05:15 PM
Link Audit software? rcmedia2004 Google Discussion Forum 0 06-17-2004 02:21 AM


All times are GMT -4. The time now is 11:06 PM.



Search Engine Optimization by vBSEO 3.3.0