آموزش نصب و کانفیگ cxs چاپ


با سلام اینم از آموزش نصب و کانفیگ CXS برای اولین بار
ابتدا خرید لایسنس از لینک ConfigServer eXploit Scanner License
جهت نصب آنتی شلر
کد:
wget http://www.configserver.com/free/cxsinstaller.tgz
 tar -xzf cxsinstaller.tgz
 perl cxsinstaller.pl
 rm -fv cxsinstaller.*
پس از نصب در ssh دستورات زیر را دنبال کنید
ابتدا mod_security را روی سرور نصب کنید
سپس با دستور زیر یه پوشه قرنطینه میسازیم
کد:
mkdir /home/quarantine/
 chmod 1777 /home/quarantine/
سپس دستور
کد:
nano /usr/local/apache/conf/modsec2.user.conf
موارد زیر را داخلش قرار بدید
کد:
SecRequestBodyAccess On
 SecRule FILES_TMPNAMES "@inspectFile /etc/cxs/cxscgi.sh" \ 
    "log,auditlog,deny,severity:2,id:'1010101'
بالای خطوط اصلی بذارید بهتره
ریستارت آپاچی
کد:
/scripts/restartsrv_httpd
سپس فایل
کد:
nano /etc/cxs/cxscgi.sh
و بعد از خط آخر بذارید
کد:
/usr/sbin/cxs --quiet --cgi --qoptions Mv --mail root \ 
     --quarantine /home/quarantine/ "$1"
میتونید این کار رو انجام هم ندید
برید داخل whm و
ConfigServer Explorer

و برید به /etc/cxs و پرمیشنهای زیر رو به ترتیب تنظیم کنید
کد:
cxs.xtra      644
 cxs.defaults  644
 cxs.ignore    644
 cxscgi.sh     755
 cxsftp.sh     755

سپس
کد:
nano /usr/local/apache/conf/modsec2.conf
و از پشت

SecRuleEngine On علامت # بردارید
حالا برید به whm و ConfigServer eXploit Scanner و بعد Generate Cxs Commands
تیک اولین گزینه ی All cPanel users رو بزنید
تیک public_html scan بزنید
و تیکهای
Report file
Log file
Email
جلوی Email تو کادر آدرس ایمیلی که میخواید ریپورت بیاد براشو بزنید
و تیک
SMTP
Exploit scan
(L) symlink
(O) socket
(f) suspicious file name/type
(M) fingerprint match
(S) SUID file
(G) GUID file
(c) core dump file
(Z) scan within zip, tar, tar.gz and tar.bz2 files
(h) suspected exploit file
(d) suspicious directory name
(n) hidden directory owned by nobody
(w) world writable directory
Virus scan
(f) suspicious file name/type
(h) suspected exploit file
(T) all PHP, Perl, and other script files
(m) regex pattern match
Ignore file
Xtra file
Quarantine Directory
و در قسمت
Quarantine Options
(S) SUID file
(G) GUID file
(h) suspected exploit file
(c) core dump file
(T) all PHP, Perl, and other script files
(E) all email scripts
(M) fingerprint match
(v) virus
(f) suspicious file name/type
Show statistics summary
و بعد Save as default
رو بزنید
دوباره برگردید به
Generate Cxs Commands
و سپس پایین صفحه کنار
Save as default روی Create Cron job کلیک کنید و یه کرون بسازید
و بعد برید صفحه ی اول
Start Cxs Watch

کد:
nano /etc/cxs/cxsftp.sh
در آخرین خط بزنید
/usr/sbin/cxs -Z --ftp --mail root --qopt Mv -I /etc/cxs/cxs.ignore -Q /home/quarantine "$1"
کد:
nano /etc/cxs/cxscgi.sh
در آخرین خط بزنید
/usr/sbin/cxs -Z --cgi --mail root --qopt Mv -I /etc/cxs/cxs.ignore -Q /home/quarantine "$1"
کد:
nano /etc/cxs/cxswatch.sh
/usr/sbin/cxs --Wstart --mail root -Q /home/quarantine -I /etc/cxs/cxs.ignore --qopt Mv --www --all

آیا این پاسخ مفید بود؟

  • 2
« بازگشت