This page describes an infection case in which script malware was appended to a large number of posts in WordPress.
Analysis of script malware that writes itself at the bottom of a large amount of post data
The malware shown above is an example of malicious code (mainly a redirection hack that redirects the page to another site without permission) embedded in a post with a script tag.
The trouble with this malware is that in some cases, this malicious JS code is written to thousands of WordPress posts.
The malware is characterized by multiple strings of _0x3023 ( _0x562006 , _0x1334d6, etc.) and obfuscation of the JS code to make it impossible to tell what it is doing.
Some parts of this code use a special way of specifying strings such as \x68\x74\x74\x74\x70\x3a\x2f\x2f\x75\x72\x6c\x63\x75\x74\x74\x74\x6c\x79\x2e\x6e\x65\ as unicode, and such The code can be converted to a readable string by outputting it at a site such as the following.
https://playcode.io/javascript
Decoding shows that this JS is sending the user to a redirect site URL that shortens any URL.
How to deal with SCRIPT malware that writes itself at the bottom of large amounts of submitted data
The malware itself writes the above malformed JS to thousands of posts in bulk. In addition, the fact that such modification of posts is possible means that hackers have access to the database, so it is likely that they have already taken over the privileges to rewrite and install files on the server through the installation of backdoors or other means.
The measures to deal with this are roughly as follows.
(1) Detect and remove malicious JS embedded in posts
(2) Detect and remove the malware itself that writes malicious JS (*There is a possibility that the malware has already been deleted.
(3) Detection and removal of backdoors that hackers use to infiltrate the server (*The backdoors may not exist as files, but may have been written to memory)
(4) Inspection and elimination of vulnerabilities that allowed hackers to enter the server in the first place.
(*1-4 can be done to some extent automatically by the malware inspection and disinfection plug-ins. Please use it if you like.
To remove infected JS from thousands of posts, you can use Search Regex or other plug-ins that can replace strings in posts with regular expressions in batches.
Reference https://blog.website-malware-removal.com/7572
This page prohibits the use, quotation, or summarization of any page, in whole or in part, by the Generated AI. However, if the following conditions are met, the specification of content using generated AI is permitted.
1. it is not for the purpose of learning by the generated AI. 2. only the summary or title of the page content at a level that does not lead to the solution of the user’s problem is shown to the user. 3. in the case of 2, a link to this content is shown to lead the user to this page.