The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto scan user every night

Discussion in 'Security' started by jazz1611, Sep 1, 2013.

  1. jazz1611

    jazz1611 Well-Known Member

    Joined:
    Jun 5, 2012
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    I installed ClamAV and i dont see ClamAV scan in my server. How can i make ClamAV scan all user hosting every night ( 0AM ) and send alert email to my email when it scan completed.

    Regards,

    PHP ClamAV will deny or prevent shell scripts when attacker upload file to hosting?
     
    #1 jazz1611, Sep 1, 2013
    Last edited: Sep 1, 2013
  2. ThinIce

    ThinIce Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    346
    Likes Received:
    7
    Trophy Points:
    18
    Location:
    Disillusioned in England
    cPanel Access Level:
    Root Administrator
    nvm didn't read op properly :rolleyes:
     
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    To scan your server through ClamAV you will have to setup the cron on your server under the root user.

    Also you can install LMD- Linux Malware Detect on your server and scan your server through LMD. You can configured the LMD with the mod_security
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you let us know what method you used to install ClamAV? You should be able to setup a cron job as root that utilizes the "clamscan" utility. EX:

    Code:
    clamscan -ir /home -l /var/log/clamscan.log
    Thank you.
     
  5. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    I think configserver exploit scanner can scan files as they are uploaded using a custom modsecurity hook. CXS is a one time $50 cost if i remember right.

    As far as clamscan, a cron like Michael suggested should work. If you don't get the e-mail you could also pipe the command to mail, like this:

    Code:
    clamscan -ir /home*/*/public_html/ | mail -s "subject" your@email.com
    I do not recommend scanning all of /home/ as you will get a lot of false positives from spam e-mail files, and sometimes the easyapache source will trigger things like execute globals hits (usually more with maldet than clamscan).
     
  6. inthukha

    inthukha Well-Known Member

    Joined:
    Jul 17, 2013
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Wel if you are looking free so LMD and clamd is good but not so. CXS is a one time $50 cost and too good. even i m still thinking to purchase it because i myself uploaded the virus file in hosting account but both lmd and clamav didn't did anything with file. and i was :eek:
     
  7. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    hi, what is the correct syntax to put after the crontab -e command please :
    clamscan -ir /home*/*/public_html/ | mail -s "subject" your@email.com
    to run a daily scan at 1am
    thanks
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You would use the following syntax to have it run at 1AM daily:

    Thank you.
     
Loading...

Share This Page