The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to use grep to check NAN value and nonexistense element in file ahjiefreak Shell Programming and Scripting 1 12-17-2007 12:35 AM
monitor daily file uploads jweinraub Shell Programming and Scripting 2 10-19-2006 10:23 PM
vsftpd hiding partial uploads jhod22 Linux 3 07-08-2006 01:49 PM
OSX uploads to 2000 server extremly slow wbeard6142 OS X (Apple) 2 08-14-2005 08:53 AM
Creating a Password-Protected directory for ftp Uploads & Downloads NAL Security 3 06-03-2002 02:20 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-18-2008
Registered User
 

Join Date: Mar 2007
Posts: 84
grep and check uploads

Hi,


In suhosin php hardening patch there is an option of scanning uploaded files via php or web.


upload verification_script
==============================
*
Type: String
*
Default:

This defines the full path to a verification script for uploaded files. The script gets the temporary filename supplied and has to decide if the upload is allowed. A possible application for this is to scan uploaded files for viruses. The called script has to write a 1 as first line to standard output to allow the upload. Any other value or no output at all will result in the file being deleted.


On a systme with suhosin installed we add In php.ini

suhosin.upload.verification_script = /path-to-scanner.


Can you please advise a scanner script that will scan for:

1) viruses using clamscan

2) grep the uploaded file for certain malicious patterns and if it matches the pattern, the file is deleted

example pattern:

pattern='r0nin|m0rtix|upl0ad|r57shell|c99shell|shellbot|phpshell|void\.ru|phpremoteview|directmail|b ash_history|\.ru/|brute *force|multiviews|cwings|bitchx|eggdrop|guardservices|psybnc|dalnet|undernet|vulnscan|spymeta|raslan 58'

3) email report if it finds any virus or malicious pattern



Thanks
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0