Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 01-04-2009, 05:42 PM   #1
Senior Warrior Member
War Room Member
 
Join Date: Aug 2003
Location: Jamaica.
Posts: 2,405
Blog Entries: 3
Thanks: 71
Thanked 135 Times in 109 Posts
Default Simple Tips to keep Your scripts less vulnerable.

Today one of my client asked me to check one of his guestbook script, why it was redirecting to a p**n site. When I checked, some hackers manipulated his folder under this Guestbook script to upload some html files with redirect code.

Here are few simple things to protect your scripts:

* Always upgrade to new versions of software whatever it is. Because many bugs or security issues will be answered in new versions of software.

* Secure the adminpanels with secure passwords. (I have seen many people using regular names/words/simple 5 character passwords)

* Avoid 777 permission in script folders. (This is not always possible on all software. If scripts are running under your user ID, you may not need 777 permissions)

* Upload index.html/index.php (blank files) in images folder , or other script folders to avoid web accessible of all files in those folders.

* Disable attachments or uploads if you are hosting forums or guestbooks. Because these features need 777 permission for folders.

* Form handling: If you have forms on your site, make sure the form input data is processed by the scripts (like with Regexp) before entering into your database.

* Subscribe to your host newsletter especially if you have a VPS/dedicated server. They update you with security issues of the server software. Ask your host to update server side programms like mysql, php, cgi etc.

* Free software: If you have installed free scripts like Wordpress, search google for 'wordpress security'. You will get many tips on how to make your WP blog secure.

* Delete unnecessary scripts that you have installed long back and no longer using.

.

radhika is offline   Reply With Quote
Old 01-04-2009, 07:43 PM   #2
Howdy
War Room Member
 
Valdor Kiebach's Avatar
 
Join Date: Jan 2008
Location: England
Posts: 713
Thanks: 59
Thanked 22 Times in 19 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Default Re: Simple Tips to keep Your scripts less vulnerable.

if you use cpanel hosting go to 'Index Manager'
click on 'public_html'
select 'no indexing'
click save.

This will prevent the folder contents being listed if there is no index.html / php file.

do this in conjunction with
Quote:
Upload index.html/index.php (blank files) in images folder , or other script folders to avoid web accessible of all files in those folders.
to do the above open a text editor and paste in the following
Code:
<?
?>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.google.com">
and save the file as index.php
Put this file in any directory that doesnt have an index file.
you can change the url to anything you want.

Watch this space..........
Valdor Kiebach is online now   Reply With Quote
Old 01-04-2009, 08:58 PM   #3
PHP Juggernaut
War Room Member
 
Scott Carpenter's Avatar
 
Join Date: Oct 2007
Location: Utah, USA
Posts: 244
Thanks: 67
Thanked 4 Times in 4 Posts
Contact Info
Send a message via AIM to Scott Carpenter Send a message via MSN to Scott Carpenter
Default Re: Simple Tips to keep Your scripts less vulnerable.

I would recommend always using index.html for your blank file, and removing the <? and ?> tags. That way, you're handling servers that don't process PHP. If you know that your host handles PHP, Valdor's example will work great
Scott Carpenter is offline   Reply With Quote
Old 01-05-2009, 12:33 PM   #4
Senior Warrior Member
War Room Member
 
Join Date: Aug 2003
Location: Jamaica.
Posts: 2,405
Blog Entries: 3
Thanks: 71
Thanked 135 Times in 109 Posts
Default Re: Simple Tips to keep Your scripts less vulnerable.

Quote:
Originally Posted by Valdor Kiebach View Post
if you use cpanel hosting go to 'Index Manager'
click on 'public_html'
select 'no indexing'
click save.
I have been using cpanel like 6 years? I didn't know this. Thanks.

Another way is using .htaccess to restric php files.

HTML Code:
<Files *.php>
Order Allow,Deny
Deny From All
</Files>
Gives access denied error from server.

.

radhika is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
scripts, simple, tips, vulnerable

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 Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 11:00 AM.