The open-source program announcement said that historical versions have been hacked, check which directories before upgrading.
The open source program announcement says that historical versions have been hacked, check which directories before upgrading? Check in four categories: directories for writing and caching concentrated running, pseudo-static rules and site rewrite configuration, abnormal files in directories related to uploading and templates, as well as scheduled tasks and background login records.PbootCMS indicated in the security公告 on June 22, 2026, that the website owner reported issues including 'being attacked, abnormal file writing, page trojan', affected versions '3.2.5 and above', fixed version 'v3.2.14', and suggested cleaning the runtime directory, checking the rewrite pseudo-static rules.First, collect evidence and clean up, then update the version lastly, directly covering the upgrade will bring the malware files left together with the new version.
The three types of exceptions in the announcement.
The three phenomena named in the announcement correspond to three different levels: being attacked is an entry problem, abnormal file writing is a landing problem, and page hacking is a manifestation problem. Their time sequence is usually 'entry exploitation → file writing → page appearance of abnormal content', so the investigation should trace back from the writing痕迹, rather than just looking at whether the homepage has been changed.
When reading the announcement, grab three pieces of information: the affected version range, the fixed version number, and the official recommended directory for cleaning and inspection. PbootCMS's announcement provided all three items, so just check the list; if the announcement does not specify the directory, follow the general four categories below.
First check the running directory
The running directory is where cache and temporary write operations are concentrated, and it is also the place where abnormal files are most likely to appear. Method:
- Sort by modification time, filter out the newly added or modified files, and focus on script types that should not appear here.
- Check the file owner and permissions, files writable by the Web process with script suffixes should be marked separately.
- Before cleaning up, back up a complete directory first for easy comparison and evidence collection, do not delete directly.
AnQiCMS's backup and recovery supports backing up data along with static files, this step also serves as evidence material in emergency scenarios; after cleaning up, if you need to recover mistakenly deleted content, the documents saved in the recycle bin are the documents moved to the recycle bin, so as not to lose normal articles.
Check the pseudo-static rules again.
The static rewrite rule is often modified after an attack. The announcement of PbootCMS explicitly requires checking the rewrite static rule, usually for the following reasons: jumping links are inserted into the rewrite rules, which can lead visitors or search engines to third-party pages while the page itself looks normal.
Check two things. First, compare the current rules with the rules in the version library or the initial installation package text by text, and confirm the differences item by item; second, check if the rule file can be written by the Web process, and excessive permissions are the root cause of recurrence. AnQiCMS's pseudo-static rules are centrally managed in the background, support custom pseudo-static URLs, changes are recorded for verification, and it is easier to find anomalies than scattered in multiple configuration files on the server.
Version supplement and verification
| Steps | Action | Complete judgment |
|---|---|---|
| Evidence collection | Backup the database, static files, and suspicious directories | There is a traceable original copy |
| Clear abnormal files | Filter and remove suspicious files by time and type | There is no unknown script in the directory |
| Check the rules | Compare the pseudo-static and rewriting configuration | Consistent with the initial rules |
| 补充版本 | Upgrade to the repair version specified in the announcement | The version number is consistent with the announcement |
| Verify | Check the page, form, and backend login | Function is normal and there are no abnormal jumps |
| Review | Check the file list again after a few days | No new suspicious files have been added |
The review after the upgrade is often overlooked: The vulnerability has been patched, but the residual files are still there, and the page will still be hacked. It is recommended to check the file list again for differences a few days after the version is updated, and at the same time, change the administrator password, rotate the site's signature key and other long-term credentials.
There are still two defenses on the content side that are worth confirming: sensitive word filtering and content review can discover the implanted abnormal text, and anti-crawling interference code and JWT authentication belong to daily configuration. After the emergency, it should be confirmed that they have not been temporarily changed.
Common questions
Why not just overwrite the upgrade files?Not enough. The replacement only replaces the files that come with the program, additional scripts written by attackers and modified configurations are not within the replacement scope and will be retained as is.
Should we shut down first?Check the extent of the abnormality. If it is confirmed that there is continuous writing or external jumping, pause the service first and then collect evidence for safety; if there is only the risk of historical versions and there are no abnormal traces, you can directly go through the upgrade process after backup.
Will changing the directory permissions affect normal functionality?Yes. Uploading, caching, and temporary writing all require writable directories. It is recommended to only give write permissions to the subdirectories that truly need to be written, and the rest of the directories should be changed to read-only and verify the functionality item by item.