X

Επιλέξτε τη χώρα σας

Greece (greece)Greece (greece) Worldwide (English)Worldwide (English)
X

Επιλέξτε το νόμισμά σας

Euro $ US Dollar

Πώς μπορώ να ρυθμίσω τα cxs για σάρωση και καραντίνα ύποπτων αρχείων που έχουν μεταφορτωθεί μέσω σεναρίων php και cgi χρησιμοποιώντας το mod_security;

Θα πρέπει να είστε άνετοι όταν συνδέεστε στο ssh ως root και εκτελείτε εντολές Linux για να ακολουθήσετε αυτές τις οδηγίες.

1. Πρώτα βεβαιωθείτε ότι το mod_security είναι εγκατεστημένο και ενεργοποιημένο στον διακομιστή σας.

2. Δημιουργήστε τον κατάλογο καραντίνας εάν δεν το έχετε κάνει ήδη. Για παράδειγμα, δημιουργήστε έναν κατάλογο που ονομάζεται /home/quarantine/. Φροντίστε να το chmod 1777.

mkdir /home/quarantine/
chmod 1777 /home/quarantine/

Σημειώστε ότι ο κατάλογος καραντίνας σας πρέπει να βρίσκεται σε τοποθεσία με παγκόσμια πρόσβαση εγγραφής. Έτσι, για παράδειγμα, μην το βάζετε σε μια θέση που μόνο η root μπορεί να διαβάσει, όπως ο κατάλογος /root/. Θα μπορούσατε να το βάλετε κάπου στο /var/ ή /usr/, αν δεν το θέλετε στο /home/.

3. Επεξεργαστείτε το αρχείο /usr/local/apache/conf/modsec2.user.conf και προσθέστε τις ακόλουθες δύο γραμμές (στο επάνω μέρος είναι εντάξει):

SecRequestBodyAccess On
SecRule FILES_TMPNAMES "@inspectFile /etc/cxs/cxscgi.sh" \
	"log,auditlog,deny,severity:2,id:'1010101'

(Note: The backslash (\) allows you to split a long command line onto two lines.)

4. Restart Apache and check for errors:

/scripts/restartsrv_httpd
tail -f /usr/local/apache/logs/error_log

5. Edit the file /etc/cxs/cxscgi.sh and modify the command line to suit your requirements. For example, to use the default cxs scan options and quarantine any suspicious files, if your quarantine directory is in /home/quarantine/, your command line in cxscgi.sh might look like this:
 
/usr/sbin/cxs --quiet --cgi --mail root \ --quarantine /home/quarantine/ "$1"

Note: The backslash (\) allows you to split a long command line onto two lines.)

If you want to only quarantine uploads that match specific scan options you can add --qoptions. If you add --qoptions, any file that matches any of the options you do NOT include in --qoptions but IS included in --options or the default options will trigger an alert email but will not be quarantined.

For example, this command line would quarantine fingerprint matches and viruses (these are the least likely to include false positives):

/usr/sbin/cxs --quiet --cgi --qoptions Mv --mail root \
     --quarantine /home/quarantine/ "$1"

Make sure that the email address set up as the root forwarder is a working and monitored email address, so you will receive the cxs alert emails.

Make sure that you have only one uncommented cxs command line in your cxscgi.sh file.

Δεν μπορείτε να βρείτε τις πληροφορίες που ψάχνετε;

Δημιουργήστε ένα Support Ticket
Το θεωρήσατε χρήσιμο;
(93 times viewed / 0 άνθρωποι το βρήκαν χρήσιμο)
Top