SunQuest
 
       Security
  Home arrow Security arrow Page 3 - Regaining Control of a Hacked PHP-Nuke...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SECURITY

Regaining Control of a Hacked PHP-Nuke Site
By: Vinu Thomas
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 35
    2004-05-18

    Table of Contents:
  • Regaining Control of a Hacked PHP-Nuke Site
  • Bugs and How
  • Regain your Site
  • Cleaning up

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Regaining Control of a Hacked PHP-Nuke Site - Regain your Site


    (Page 3 of 4 )

    To regain control of your admin account, you’ll have to reset your password in two authors table in your database, the author’s table is nuke_authors. The table name prefix 'nuke' is the standard prefix if you haven't made any changes to it when you installed PHP-Nuke. If you have changed the standard prefix, use your custom prefix instead. If your custom prefix is 'mysite', your table name will be mysite_authors.

    You’ll find that your admin user name comes in the aid (admin id) column. You can do this using the mysql command (if you have telnet access or remote access) or with PHPMyAdmin (web based administration of MySQL).

    Here’s a sample of what you would see in the nuke_author’s table.

    AID

    Name

    URL

    EMAIL

    PWD

    nickGODhttp://www.site.comyour@email.com  dc647eb65e6711e155375218212b3964

    PHP-Nuke uses the name GOD to signify that the user is a super-administrator who has access to all sections of the site. Edit the password field for the ‘GOD’ account and change it to dc647eb65e6711e155375218212b3964. This will reset the password for the super-admin user as Password. If you see any other admin users that you haven’t created, delete them immediately. The attacker could have created those admin users. To be on the safe side, delete all other administrator accounts other than your ‘GOD’ account. You can always create the additional admin accounts later, once you patch up and reopen your site.

    Patch up

    Before you can bring your site back online, you should apply the latest patches for your version of PHP-Nuke. These patches should secure all variables passed to PHP-Nuke and sanitize their contents before they are passed over to MySQL. This will prevent any SQL-Injection attacks on your site. The zipped patch files for all versions of PHP-Nuke are available at: http://phpnuke.org/modules.php?name=News&file=article&sid=6679. If you haven’t modified the core files of PHP-Nuke, you should be able to just copy all the files and folders in the zip to the server, overwriting the older files.

    If you have made changes to the core files, you’ll have to redo the changes in the newly patched files before you upload them to the server. Make sure that your custom code doesn’t open up the security holes that were previously present.

    Since the patches contain the full version of the files index.php, admin.php and modules.php, once your patched files are uploaded to the server, your site should be operational again. Now head over to the admin module, (http://yoursite.com/admin.php), log in using your admin user name and ‘Password’ as the password. Once you’re logged in as the administrator, head over to the Edit Admins option in the administrative menu. You can change the password for your admin account there.

    More Security Articles
    More By Vinu Thomas


     

       

    SECURITY ARTICLES

    - An Epilogue to Cryptography
    - A Sequel to Cryptography
    - An Introduction to Cryptography
    - Security Overview
    - Network Security Assessment
    - Firewalls
    - What’s behind the curtain? Part II
    - What’s behind the curtain? Part I
    - Vectors
    - PKI: Looking at the Risks
    - A Quick Look at Cross Site Scripting
    - PKI Architectures: How to Choose One
    - Trust, Access Control, and Rights for Web Se...
    - Basic Concepts of Web Services Security
    - Safeguarding the Identity and Integrity of X...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway