By tacensi
I found a strange entry in my nginx error log file:
2014/06/29 18:05:17 [crit] 878#0: *31 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 107.170.53.191, server: localhost, request: "GET /wp-admin/install.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.81.217.36"
I have a couple of WP installs in this New York based cloudlet. I cannot fully understand this log entry, so I went to check this IP address (107.170.53.191). Apparently it is hosted at the same datacenter, but it shows the default Apache page (It works!).
It also has some WP files or something that look like a WP install. I went looking in the wp-content/uploads folder, which I know lists the files in a default install. It has some weird .so files and a script called pwn.ssh that my curiosity made me download to take a look.
This file has a comments saying it is a ‘Digital Ocean [Ubuntu x86_64] pwnage script’. (It is located at http://107.170.53.191/wp-content/uploads/2014/06/ocean/).
So, my questions are:
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
It does certainly seem to be a malicious system attempting to find vulnerable Wordpress instances. Thanks for letting us know! I’ve notified our abuse team, and they will examine the situation more thoroughly. In the future, if you notice malicious activity you can email abuse@digitalocean.com or just open a support ticket to put it on our radar.
Usually, these attacks work by exploiting a vulnerability in Wordpress itself. So one of the best methods of keeping safe is to make sure you keep Wordpress up to date. The script you point to seems to be something that is run after the attacker gains access to the system. It downloads SSH binaries and replaces the system ones. It then deletes itself. In the future, you might want to consider running something like RKHunter.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.