LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-15-2009, 06:06 AM   #1
kingkashif
Member
 
Registered: May 2009
Posts: 94

Rep: Reputation: 16
Every upload via FTP/SFTP be scanned by clamav


hello all..

Well i have setup clamav with my sendmail using MailScanner which is working perfectly as it should.

Now the problem is that for example i am a hosting company and i provide hosting to users. There maybe some malicious users who could upload for example "php shell". As you can guess he/she could then do a lot with it because virtually they'll have fully working shell available. They could easily view /etc/password and many other files..

Now what i want is that whenever any user uploads anything to his account, it should be scanned with clamav and if clamav recognizes the file as "php shell" or any other malicious content then it should delete it..


Hope i would find a solution ...

regards
 
Old 08-15-2009, 12:39 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by kingkashif View Post
hello all..

Well i have setup clamav with my sendmail using MailScanner which is working perfectly as it should.

Now the problem is that for example i am a hosting company and i provide hosting to users. There maybe some malicious users who could upload for example "php shell". As you can guess he/she could then do a lot with it because virtually they'll have fully working shell available. They could easily view /etc/password and many other files..

Now what i want is that whenever any user uploads anything to his account, it should be scanned with clamav and if clamav recognizes the file as "php shell" or any other malicious content then it should delete it..


Hope i would find a solution ...

regards
Reference the clamav documentation, and look at the clamuko and clamdscan options. You can also write a small script, to execute a scan on specific directories, when something changes.
 
Old 08-15-2009, 02:26 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Also, look into employing some isolation techniques, so that the damage they can do will be contained. In other words, I recommend you work under the assumption that ClamAV won't be effective at all.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
limit upload/download file size in SFTP bzlaskar Linux - Server 2 02-28-2009 11:25 PM
Is there an ftp program that allows for multi-thread ftp uploads ? Want faster upload brjoon1021 Linux - Software 4 02-04-2009 06:28 PM
how to create sftp user only in red hat 4 not ftp user ..only sftp user princeu28 Linux - Newbie 1 10-14-2008 08:10 AM
FTP and SFTP christopher_c Linux - Newbie 2 08-20-2008 11:07 PM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 09:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration