Problems with infected WordPress installation (redirect malware)
-
Hi all,
I’ve found malicious code on a small website that I help support. We had already had NinjaFirewall installed for some time, but unfortunately the rules were sometimes too lax. In the last couple of weeks, our page builder Bricks Builder had some security issues (running on the latest update right now).
In the meantime it has become less, but the code is changed slightly every 2 days and a few lines of PHP code are inserted into core files, often new PHP files are also uploaded (the names for these are cryptic or sometimes simply “wp-login.php” in various subdirectories). When the malicious still is there, the Google Search Results redirect to scam pages, the direct website access still works.WordPress and Plugins are up-to-date, the Rest API is disabled, NinjaFirewall runs in WAF Mode, and in the settings, I’ve set “File Uploads” to “disallow”. But still, file uploads seem to be possible somehow (two hours ago, I got plenty of mails saying that scripts have been accessed; all of them have been uploaded just minutes before and haven’t been there in the morning today).
Here are a few logs from today:
28/Mar/24 05:15:54 #4305864 CRITICAL 3 217.144.54.xxx GET /index.php - Local file inclusion - [GET:file_link = /etc/passwd] - www.lorem-ipsum-website.com
28/Mar/24 05:15:54 #4227031 CRITICAL 3 217.144.54.xxx GET /index.php - Local file inclusion - [GET:url = /etc/passwd] - www.lorem-ipsum-website.com
28/Mar/24 05:15:54 #5633377 CRITICAL 3 217.144.54.xxx GET /index.php - Local file inclusion - [GET:filepath = /etc/passwd] - www.lorem-ipsum-website.com
28/Mar/24 05:15:54 #7690819 CRITICAL 1 217.144.54.xxx GET /index.php - Directory traversal #1 - [GET:fileName = ../../../../../../../../../../etc/passwd] - www.lorem-ipsum-website.com
28/Mar/24 05:15:54 #6671216 CRITICAL 1 217.144.54.xxx GET /index.php - Directory traversal #1 - [GET:filename = ../../../../../../../../../etc/passwd] - www.lorem-ipsum-website.com
28/Mar/24 05:15:55 #7774224 CRITICAL - 217.144.54.xxx POST /index.php - Blocked file upload attempt - [EWvthLQa.php (267,374 bytes)] - www.lorem-ipsum-website.com
28/Mar/24 09:22:03 #2414698 HIGH - 80.187.72.xxx GET /index.php - WordPress: Blocked access to the WP REST API - [/wp-json/contact-form-7/v1/contact-forms/328/feedback/schema] - www.lorem-ipsum-website.com
[…]
28/Mar/24 11:23:46 #2877613 HIGH - 91.134.248.xxx POST /wp-admin/js/widgets/nmwcalbz.php - Forbidden direct access to PHP script - [/wp-admin/js/widgets/nmwcalbz.php] - www.lorem-ipsum-website.com
28/Mar/24 11:23:47 #2580607 HIGH - 192.185.4.xxx POST /wp-admin/js/widgets/nmwcalbz.php - Forbidden direct access to PHP script - [/wp-admin/js/widgets/nmwcalbz.php] - www.lorem-ipsum-website.com
28/Mar/24 11:23:49 #5574986 HIGH - 209.203.48xxx POST /wp-admin/js/widgets/nmwcalbz.php - Forbidden direct access to PHP script - [/wp-admin/js/widgets/nmwcalbz.php] - www.lorem-ipsum-website.com
28/Mar/24 11:23:58 #6956124 HIGH - 148.66.146xxx POST /wp-content/themes/bricks/assets/svg/frontend/css.php - POST request in the themes folder - [/wp-content/themes/bricks/assets/svg/frontend/css.php] - www.lorem-ipsum-website.com
28/Mar/24 11:23:59 #1401823 INFO - 217.70.3xxx POST /wp-includes/blocks/button/bnjgfdox.php - Access to a script modified/created less than 10 hour(s) ago - [{root_path}/wordpress/wp-includes/blocks/button/bnjgfdox.php] - www.lorem-ipsum-website.com
28/Mar/24 11:25:13 #1045041 HIGH - 50.62.177xxx POST /wp-content/themes/bricks/assets/svg/frontend/css.php - POST request in the themes folder - [/wp-content/themes/bricks/assets/svg/frontend/css.php] - www.lorem-ipsum-website.com
28/Mar/24 11:29:18 #6922300 INFO - 66.196.43.xxx GET /admin-ajax.php - Access to a script modified/created less than 10 hour(s) ago - [{root_path}/wordpress/admin-ajax.php] - www.lorem-ipsum-website.com
28/Mar/24 11:29:29 #2499411 HIGH - 108.167.132xxx POST /wp-content/themes/bricks/assets/svg/frontend/css.php - POST request in the themes folder - [/wp-content/themes/bricks/assets/svg/frontend/css.php] - www.lorem-ipsum-website.com
28/Mar/24 11:29:57 #2941007 INFO - 72.167.249.xxx GET /wp-includes/blocks/list-item/a078ef63.php - Access to a script modified/created less than 10 hour(s) ago - [{root_path}/wordpress/wp-includes/blocks/list-item/a078ef63.php] - www.lorem-ipsum-website.comAny ideas what I’m missing and what I can do? I probably need to delete the entire installation and rebuild it from existing backups (from a point where everything was really safe).
The topic ‘Problems with infected WordPress installation (redirect malware)’ is closed to new replies.