Current location: Hot Scripts Forums » General Community » The Lounge » Web server vulnerability


Web server vulnerability

Reply
  #1 (permalink)  
Old 12-17-06, 05:53 AM
Kobra Kobra is offline
Banned
 
Join Date: Dec 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Web server vulnerability

Some days ago one of my site logs had been hacked, it has been added an iframe code, but since it was a .log, the iframe hack didnt work on browser.
I just want to know if web servers are so vulnerable that any hacker may just get into them and do whatever they want like deleting files and so.
Reply With Quote
  #2 (permalink)  
Old 12-19-06, 09:37 AM
webzen's Avatar
webzen webzen is offline
Newbie Coder
 
Join Date: Feb 2005
Location: Levis, QC
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb iframing

Okay, there's a bunch of grey zones you don't mention in your post.

First off, what's the 411 on your web server? Are you running Apache or IIS? These are necessary to properly address the security issue.

Apart from the hacking questions, you should know that anyone in the world can easily iframe your web pages into his, for whatever purpose... unless you install a code that breaks such "inclusion frames".

In the case of logs, forgive me for asking but why haven't you hosted those behind the air-tight protection of a realm (especially easy under Apache)?

If your "iframer" doesn't have the access codes to your newly created realm, the he can't see you log pages... even less share them with the world.

Wouldn't that be a short term -and effective- fix?
__________________
Yes, that's right, I blog at Beep.Name...
Reply With Quote
  #3 (permalink)  
Old 12-19-06, 03:27 PM
Kobra Kobra is offline
Banned
 
Join Date: Dec 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Let me see if i can explain this better:

I have a file called example.log (just an example)

File structure is:

..
error line 1
error line 2
..

somebody, somehow, accessed that file and changed it into this:

<iframe>
..
</iframe>
error line 1
error line 2
..
Reply With Quote
  #4 (permalink)  
Old 12-20-06, 03:53 AM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Simply put, your logs should not be web accessible

Quote:
Originally Posted by Kobra
Let me see if i can explain this better:

I have a file called example.log (just an example)

File structure is:

..
error line 1
error line 2
..

somebody, somehow, accessed that file and changed it into this:

<iframe>
..
</iframe>
error line 1
error line 2
..

True security practices by your hosting company would simply make sure that your access.log file was non-web accessible. Having said that, you have to check the permissions of your root directory to make sure that other people hosting sites on the same server cannot access YOUR files and folder as well. This seems to be more and more common with hosting companies not enforcing *better* security measures. Most hosting companies would have CHMOD'd your root folder to 755 at worst. This means that the server have read(4) + write(2) + execute(1) permissions =7, others on the server have read(4) + execute(1) permissions =5, and anyone on the Internet has read(4) + execute(1) permissions =5 thus giving you the resulting 755 permission settings. Some servers are different when it comes to CGI directories, but that is another conversation...

Hope that helps...
Reply With Quote
  #5 (permalink)  
Old 12-21-06, 09:27 AM
Kobra Kobra is offline
Banned
 
Join Date: Dec 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Is there any possibility someone got into webserver cpanel? I heard that cpanel is vulnerable to external attacks...
Reply With Quote
  #6 (permalink)  
Old 12-22-06, 08:30 PM
King Coder King Coder is offline
Community VIP
 
Join Date: Jan 2006
Posts: 703
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Kobra
Is there any possibility someone got into webserver cpanel? I heard that cpanel is vulnerable to external attacks...
If they have your password. I think if your CPanel was hacked you would have a lot more damage done. I've given my CPanel and FTP passwords out before so that I could have work done, but I immediately changed them afterwords.

It's probably been some simple exploit scan that came up positive on your site. As curb basically said, your hosting company should have holes like that closed.
__________________
my site
Reply With Quote
  #7 (permalink)  
Old 12-22-06, 09:15 PM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by King Coder
If they have your password. I think if your CPanel was hacked you would have a lot more damage done. I've given my CPanel and FTP passwords out before so that I could have work done, but I immediately changed them afterwords.

It's probably been some simple exploit scan that came up positive on your site. As curb basically said, your hosting company should have holes like that closed.
I was going to leave this thread be since the OP hasn't of late, responded to the feedback given. I have been able to replicate the hack on a local server. This method has been in the wild and is similar of "cross-site scripting". It is not a case of hacking the server as Kobra's original post stated that it showed up in his log file. If you were a client, I would look at your log file to find which script was used and secure it by sanitizing user-input (namely, the $ENV{'QUERY_STRING'}.)

To exploit this type of hack, the hacker believes that the victim will view his server logs with a browser (as many hate looking at the raw format and the abundance of log-analyzing software on the open market) and in doing so, tries to gather data for a perhaps future security compromise be it on or off-line.

You may want to find a CEH and have them perform a security analysis of your server and scripts.

Last edited by curbview.com; 12-22-06 at 09:17 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outsourcing web design to Bulgaria - Marin Todorov gal_flower Job Offers & Assistance 4 02-14-06 08:05 PM
HOW To transfer images from one local server to web server ajay007_bond PHP 4 06-12-05 04:05 AM


All times are GMT -5. The time now is 03:10 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.