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.

Malicious scripts all over cpanel account

Discussion in 'Security' started by postcd, Sep 4, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    How is that possible that someone inject many malicious files like proxy spam, url redirects into cpanel hosting account? Is it one simple bug in some of the hosted scripts?

    How to prevent abuser to add these scripts (disabling any function on server, i cant update software or change any files, i can do only system changes)?
    moreover abuser even changes some of already existing files..

    that cpanel account password is not weak and is (was) not known
     
    #1 postcd, Sep 4, 2014
    Last edited: Sep 4, 2014
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    941
    Likes Received:
    56
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    the vast majority of injections/infections like that happen for one of two reasons;

    Old plugin or CMS exploited, or poor CMS admin password.

    Using the php disable_functions in php.ini can help, modsecurity can help, but nothing can 100% prevent exploit if users are using old CMS software. it's usually best to remove and reinstall the CMS and import the old database after auditing it for any extra admin users.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    In addition to the previous post, if you are seeking out overall security advice, then the "Security Advisor" is a good place to start:

    "WHM Home » Security Center » Security Advisor"

    Thank you.
     
  4. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    CSF have a paid plugin that cover regular exploits, I saw in godaddy or hostgator that when they find a exploited script they rename it to .php_

    if you are a server admin you should do the same and report the change to your customer, some nasty exploits can be used to hack bank accounts and be in a blacklist for prishing is not a joke, this can affect the entire network, not just the IP of the user or the server

    Probably you already had disable Perl, CGI and SSH in the old CMS account

    Disable this php functions too
    allow_url_fopen
    allow_url_include
    exec
    shell_exec
    system
    passthru
    popen

    but this will not stop a poorly upload plugin, as a example I saw that the timthumb library used by many WP themes was a big problem years ago, and this mixed with a poor server administration "symlink race" as example and the entire server can be compromised, some servers have thousand of sites, with millions of raw passwords in databases, emails and plain text files so it's really fun, once I saw a sys admin that not change his "master" password in 5 years.

    You can manually check for eval base64_decode, check lastest php or executable files, plus some search in the logs by "POST" and stuff like that, but there is not a magic button or config to be protected 100% from hackers
     
Loading...

Share This Page