ConfigServer eXploit Scanner  با اختصار (CXS) برنامه عالی برای شناسایی و حذف malware  برروی سرورهای   cpanel  میباشد. در این آموزش به نحوه نصب و راه اندازی CXS برروی سرورهای cPanel  میپردازیم.
مرحله اول )
قبل از هرچیزی ابتدا لایسنس برنامه را خریداری کنید برای خرید میتوانید وارد لینک زیر شوید:
	کد:
	http://configserver.com/cp/cxs.html
 مرحله دوم)
بعد از خرید لایسنس فایل را دانلود کنید:
	کد:
	wget https://download.configserver.com/cxsinstaller.tgz
 مرحله سوم)
فایل را اکسترکت کنید :
	کد:
	tar -xzf cxsinstaller.tgz
 مرحله چهارم )
وارد دایرکتوری بشید و سپس فایل نصب  cxs  را اجرا کنید تا برنامه را اجرا کنید :
مرحله پنجم ) 
بعد از نصب دایرکتوری به اسم quarantine  را به شکل زیر ایجاد کنید :
	کد:
	cxs --qcreate --quarantine /etc/cxs/quarantine
 مرحله ششم )
فایل های cxswatch.sh, cxsftp.sh and cxsdaily.sh را به شکل زیر تغییر دهید:
cxswatch.sh
	کد:
	#!/bin/sh
###############################################################################
# Copyright 2009-2015, Way to the Web Limited
###############################################################################
# The option --Wstart MUST be used on the cxs command line here
#
# Examples (only use ONE line for cxs scanning):
#/usr/sbin/cxs --Wstart --allusers --mail root
#/usr/sbin/cxs --Wstart --allusers --www --mail root --quarantine /home/safe/ --qoptions Mv --Wadd /etc/cxs/cxs.wadd
#
# We would recommend using --qoptions Mv initially if you use --quarantine
# otherwise you might find cxs quarantining files that you do not want to.
# For example, you probably do NOT want to quarantine all script files (T)!
#
/usr/sbin/cxs --options -wW --Wstart --allusers --www --smtp --ignore /etc/cxs/cxs.ignore --qoptions Mv --quarantine /etc/cxs/quarantine --log /var/log/cxs.log --Wmaxchild 3 --Wloglevel 0 --Wsleep 3 --filemax 0 --Wrateignore 300
 cxsftp.sh
	کد:
	#!/bin/sh
###############################################################################
# Copyright 2009-2015, Way to the Web Limited
###############################################################################
# The option --ftp MUST be used on the cxs command line here
#
# Examples (only use ONE line for cxs scanning):
#/usr/sbin/cxs --quiet --ftp --mail root "$1"
#/usr/sbin/cxs --quiet --ftp --mail root --quarantine /home/safe/ "$1"
#/usr/sbin/cxs --quiet --ftp --mail root --quarantine /home/safe/ --block "$1"
#/usr/sbin/cxs --quiet --ftp --logfile /var/log/cxs.log "$1"
#
# If you use --logfile, remember to chmod 666 [file] to allow write access
/usr/sbin/cxs --quiet --ftp --quarantine /etc/cxs/quarantine --logfile /var/log/cxs.log --mail yourname@youremail.com "$1"
 cxsdaily.sh
	کد:
	#!/bin/sh
###############################################################################
# Copyright 2009-2015, Way to the Web Limited
###############################################################################
# Run this script via cron daily
# Daily update of cxs and/or fingerprint definitions
/usr/sbin/cxs --upgrade --quiet
# Daily cleanup of quarantine if used. Modify to specify your quarantine
# directory and duplicate if you use more than one.
#
# Set --qclean to the number of days to retain, e.g. 7 = one week
/usr/sbin/cxs --qclean 7 --quarantine /etc/cxs/quarantine --quiet
 مرحله هفتم ) 
مطمئن شوید که ClamAV  نصب شده باشد و دستورات زیر را وارد کنید :
	کد:
	/scripts/update_local_rpm_versions --edit target_settings.clamav installed
/scripts/check_cpanel_rpms --fix --targets=clamav
 
مرحله هشتم )
میتوانید با استفاده از دو دستور زیر لاگ فایل مربوط به cxs را درست کنید :
	کد:
	
touch /var/log/cxs.log
chmod 630 /var/log/cxs.log
 
مرحله نهم ) 
فعال کردن تابع CallUploadScript  در pure-ftp برای اسکن فایل هایی اپلود شده توسط ftp  به صورت  real time 
	کد:
	
vi /etc/pure-ftpd.conf
find #CallUploadScript and change to CallUploadScript (remove comment)
service pure-ftpd restart
service pure-uploadscript restart
 
مرحله دهم )
فعال کردن CXS ModSecurity 
	کد:
	
/scripts/modsec_vendor add https://download.configserver.com/waf/meta_configserver.yaml
/scripts/modsec_vendor enable configserver
service httpd restart
 مرحله یازدهم )
ساخت Symlink  برای اپدیت روزانه در cron  برای آنکه مطمئن بشیم که هرروز دیتابیس آپدیت میشود و مشکلی به وجود نمیاد :
	کد:
	ln -s /etc/cxs/cxsdaily.sh /etc/cron.daily/
 مرحله دوازدهم )
ساخت cron  جدید برای اسکن روزانه 
	کد:
	ln -s /etc/cxs/cxsdaily.sh /etc/cron.daily/
 به عنوان مثال میتوانیم دستور زیر را بنویسم که هر روز ساعت 4 صبح برنامه اجرا و شروع به اسکن کند و در صورت پیدا کردن هرگونه ویروس /  fingerprint  گزارشات را برای شما ایمیل میکند.
	کد:
	0   4   *   *   *   root  /usr/sbin/cxs --logfile /var/log/cxs.log --mail yourname@youremail.com --exploitscan --virusscan --sversionscan --bayes -I /etc/cxs/cxs.ignore -Q /etc/cxs/quarantine --options mMOLfSGchexdnwZRD --voptions mfuhexT --qoptions Mv -Z --www --summary --html --ssl -C /var/clamd --nofallback -T 5 --ctime 48 --allusers --quiet
 مرحله سیزدهم )
برای اجرا شدن cxswatch  هنگام ریبوت شدن  سرور میتوانیم از دو دستور زیر استفاده کنیم : 
	کد:
	
service cxswatch start
chkconfig cxswatch on