9, July 2008

Hack Attack... - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  Security
Topic: Hack Attack...
« previous next »
Pages: [1] Print

Author Topic: Hack Attack...  (Read 1208 times)
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« on: Apr 26, 2007, 04:34:23 AM »

What do you think of http://www.zone-h.org Visit through proxy ... They list a bunch of Hackers and Defacements Attack, 3 sites I operate have been listed here before... and my recent one by this guy and his forum at http://www.numberonehack.org/ Visit through proxy ... (anyway you can hide there links on the post since they actually like publicity)...

In this light I have a question, I have a prevention for html inject on my scripts, but how can I protect against them actually putting an index.html file inside my folders when my main index page is on index.php... How can I point my server just to read my index.php rather than the index.html? I think I can do that with htaccess? But im not totally a pro with the access file though, just tried to learn it in the past 6 months...

http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Apr 26, 2007, 08:41:41 AM »

while your question is not really clear to me... you should check at the apache site mod_rewrite and maybe the directive "DirectoryIndex"


Last blog : 4th of July Lottery from TemplateMonster.com
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« Reply #2 on: Apr 26, 2007, 09:12:39 AM »

Yep I do use DirectoryIndex on my htaccess, but the problem is the hackers are able to create an index.html file on the root folder... How do I prevent this...

http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Apr 26, 2007, 09:21:09 AM »

Yep I do use DirectoryIndex on my htaccess, but the problem is the hackers are able to create an index.html file on the root folder... How do I prevent this...
by securing the server?


Last blog : 4th of July Lottery from TemplateMonster.com
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« Reply #4 on: Apr 26, 2007, 09:28:48 AM »

Thanks for the Answers, yes I want to secure my server, but the problem is not on the server, maybe it's on my scripts...As I checked, theres frequent access on my php file, and maybe there is an open exploit. anyways, I hope I can plug the holes soon...


http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Apr 26, 2007, 09:32:41 AM »

Thanks for the Answers, yes I want to secure my server, but the problem is not on the server, maybe it's on my scripts...As I checked, theres frequent access on my php file, and maybe there is an open exploit. anyways, I hope I can plug the holes soon...



sure, what is the function from this script?


Last blog : 4th of July Lottery from TemplateMonster.com
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« Reply #6 on: Apr 26, 2007, 09:38:23 AM »

I cant pinpoint specifically yet, just discovered the problem 2 days ago, and have no time to troubleshoot it, or hard test the script...

http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Apr 26, 2007, 09:40:29 AM »

I cant pinpoint specifically yet, just discovered the problem 2 days ago, and have no time to troubleshoot it, or hard test the script...

... but there is some interaction possible with this script?


Last blog : 4th of July Lottery from TemplateMonster.com
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7945
40623 credits
Members referred : 3



« Reply #8 on: Apr 26, 2007, 10:51:23 AM »

Have you contacted your host?

Those turks fellas probably are those that I know because I think they used the same trick on you.

1) There is an XSS vulnerability in your site or in another site of your server. Something like include $_GET['something'] ;
2) Check your crontab entries. They use it to get more permissions
3) Check the /tmp directory. They upload a service there (a perl script) that do this job (creating an index.html on every wwwroot directory)

Hope that helps Wink

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Apr 26, 2007, 11:16:31 AM »

I think in this times its not bad to disable this php directive:

allow_url_fopen = 0]

EDIT:

wrong directive:

use
allow_url_include = 0


Last blog : 4th of July Lottery from TemplateMonster.com
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #10 on: Apr 26, 2007, 11:18:34 AM »

I think in this times its not bad to disable this php directive:

allow_url_fopen = 0]

EDIT:

wrong directive:

use
allow_url_include = 0

hm... just noticed that this setting is for servers with php 5.2 or higher


Last blog : 4th of July Lottery from TemplateMonster.com
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« Reply #11 on: Apr 26, 2007, 12:48:59 PM »

I cant pinpoint specifically yet, just discovered the problem 2 days ago, and have no time to troubleshoot it, or hard test the script...



... but there is some interaction possible with this script?

Yes There is...

Have you contacted your host?

Those turks fellas probably are those that I know because I think they used the same trick on you.

1) There is an XSS vulnerability in your site or in another site of your server. Something like include $_GET['something'] ;
2) Check your crontab entries. They use it to get more permissions
3) Check the /tmp directory. They upload a service there (a perl script) that do this job (creating an index.html on every wwwroot directory)

Hope that helps Wink

Good Tip, will check on first two, checked on 3rd one, didn't find anything...

http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7945
40623 credits
Members referred : 3



« Reply #12 on: Apr 26, 2007, 12:56:14 PM »

Do they hacked one site or the whole server?

Are your sites running in safe mode?

Another tip. Run this from SSH in your htdocs directory :

Code:
chown root:root -R /var/www/htdocs

Those hack scripts usually don't run with root privileges so there will be no way for them to touch your files this way.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Community Supporter ?
What's HTML?
****
Gender: Male
Posts: 493
4892 credits
Members referred : 0


www.demonhale.com


« Reply #13 on: Apr 26, 2007, 12:59:43 PM »

actually on those 3 sites, the two subdirectories and the first attack was a full home page defacement, the home page defacement was due to an insecure host... the subdirectory attacks I think and might be due to my sloppy PHP security...

http://www.demonhale.com Visit through proxy , Just Visit...
Partners:
http://www.resume-fix.com Visit through proxy , Free Resumes

Last blog : Slowly Getting Back
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6459
Tags : hack htaccess index files Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  Security
Topic: Hack Attack...
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 09, 2008, 01:36:39 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.590
Total Topics: 7.356
Total Members: 3.661
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: komrad

35 Guests, 3 Users online :

17 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.