I have been hacked twice over the past two weeks using phpNuke as the entrance. I am running phpNuke 5.6 on a Linux server. Can someone give me some advice on how should I CHMOD the files and directories and if there is any other tip that will help me to secure my site?
Thanks
Wizarium Nuke Soldier
Joined: Jan 15, 2003
Posts: 26
Location: USA
Posted:
Mon Jan 27, 2003 9:57 pm
I'll let someone else be specific on CHMOD for 5.6... I know that everything previous to 6.x needed some things 777, which create security risks. After 6.x, everything written to the config went to the DB instead of config.php, so you could tighten up permissions. You might consider upgrading if that will solve the problem.
What I did want to ask is, exactly HOW are they hacking you, and what are they doing once they get in? That will help us figure out a possible solution for you.
Zhen-Xjell Nuke Cops Founder
Joined: Nov 14, 2002
Posts: 5939
Posted:
Mon Jan 27, 2003 9:57 pm
Welcome to the site. http://computercops.biz focuses on security patches for php-nuke. Take a stroll over there and check out the PHP-Nuke downloads section. Some of which were incorporated into Nuke 6.
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
marfa Nuke Cadet
Joined: Jan 28, 2003
Posts: 8
Location: USA
Posted:
Mon Jan 27, 2003 10:13 pm
Wizarium:
I found that they broke in the first time through the pictures subfolder of MyEgallery which was CHMOD 777 to allow users to upload their pictures.
They uploaded a file that allowed them to CHMOD everything to 777. Then they uploaded a file mail.tar which changed the information in the mail folder. So far this is the only information I have been able to gather. What happened after they untar the mail.tar file is still unknown. Finally, they changed muy index.php file to their file showing a devil's face, giving their nicknames and saying "bye admin".
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Tue Jan 28, 2003 12:14 am
don't you have my_eGallery set up to only allow certain file types????
ArtificialIntel
Zhen-Xjell Nuke Cops Founder
Joined: Nov 14, 2002
Posts: 5939
Posted:
Tue Jan 28, 2003 9:20 am
That is a problem. Whenever you allow someone to upload files to your system there is the potential for exploit. I haven't seen my_egallery yet, but if it doesn't have a subroutine to watch for this stuff then you get hacked. Can you post the code section for the upload?
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
Next question I'd like to know is, is there a standard location where uploaded files are placed pending approval?
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
chatserv General
Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
Posted:
Tue Jan 28, 2003 2:22 pm
I have that gallery as well but have disabled it as i prefer Gallery, i do know it has a temp folder but i'm not sure if uploaded files get sent here or directly to the gallery/album_name_dir instead.
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Tue Jan 28, 2003 3:22 pm
yeah, soz, forgot about that. I set that up cause i decided that if it was limited to user uploading only, it'd secure it a bit better.
THe Gallery was originally released for nuke 5.5 so the links should have been right. However, they obviously aren't so I'll take a look @ the code and update it a bit (including hte mod to the new SQL layer)
ArtificialIntel
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Tue Jan 28, 2003 5:41 pm
ur files uploaded to a temp directory. The module needs an extreme re-write of all it's SQL functions.
ArtificialIntel
Zhen-Xjell Nuke Cops Founder
Joined: Nov 14, 2002
Posts: 5939
Posted:
Tue Jan 28, 2003 6:08 pm
Question is, is that temp directory assigned by you or the system? And if by the system, what is its path?
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki]
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum