• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue hacked wordpess got root:root files in his account. is it cleanable ?

orenk

Basic Pleskian
a customer of mine just used a hacked plugin, and got his website hacked... His problem...
but.
in his storage, I found very disturbing things.. Many files with root:root access... and not normal PHP files.
take a look at the pictures.

Any Suggestions ?
I Think the server is totally hacked.
unless you think this is normal for user to have such access. (bash with root access)


1595144075662.png1595144108610.png1595144146548.png
 
SSH to the server, and then I type
# su <hacked username>
and then
# groups
I get 'root' in the group lists... it means the user somehow got a root permissions... or something...

Anyway, I think a wordpress instance, should not have the ability to create links to those files (assuming those are links) it probably runs shell scripts through PHP.
Server image restored from backup, but this case I got right away... what about other cases that we dont have control ?
I can make a script that run every few minutes to checks all users permissions and groups. but maybe PLESK Security Team should worry about that too ..
 
# groups <domain ftp user>
I dont get 'root' on any user from my server.

Can you check without su?
# groups <hacked username>
 
Thanks for the idea...
The hacked account it didn't got into root or any suspicious groups, its group list is normal as any other account.
somehow it linked some system libraries into the accounts' folder, without any SSH access or access to PLESK panel. only through WORDPRESS. that is still anoying.
 
For the future, I suggest to add this line to "additional configuration directives" of PHP:
Code:
disable_functions=exec,passthru,shell_exec,system,popen,show_source,pcntl_exec,proc_open,proc_terminate,proc_close,pfsockopen
Else PHP is able to execute system commands, even if SSH permission is not granted. It can be possible to hijack the whole server through a PHP script when the script gains access to system level commands.
 
For the future, I suggest to add this line to "additional configuration directives" of PHP:
Code:
disable_functions=exec,passthru,shell_exec,system,popen,show_source,pcntl_exec,proc_open,proc_terminate,proc_close,pfsockopen
Else PHP is able to execute system commands, even if SSH permission is not granted. It can be possible to hijack the whole server through a PHP script when the script gains access to system level commands.
I am absolutely agree with this, it's always the first thing that we do.
 
For the future, I suggest to add this line to "additional configuration directives" of PHP:
Code:
disable_functions=exec,passthru,shell_exec,system,popen,show_source,pcntl_exec,proc_open,proc_terminate,proc_close,pfsockopen
Else PHP is able to execute system commands, even if SSH permission is not granted. It can be possible to hijack the whole server through a PHP script when the script gains access to system level commands.
Maybe this should be added as default, at installation time.

Do you have any more tips/guides to secure plesk servers ?
 
Do you have any more tips/guides to secure plesk servers ?
Something many people don't do, but which is absolutely essential, is to remove the execution permissions from your server wide /tmp path or partition. For example when /tmp is a separate partition, edit /etc/fstab, change
Code:
/dev/sda3 /tmp ext4 defaults 0 0
to
Code:
/dev/sda3 /tmp ext4 defaults,nodev,nosuid,noexec 0 0
where "/dev/sda3" ist just one possible location (example) of the /tmp partition. It might be a different device on your system. Edit the correct entry using the correct device name that applies to your system.
 
Back
Top