yorman
Forum Replies Created
-
Hello @shaunmesh
Thank you for providing some logs.
These are not error logs, but ModSecurity logs, good enough.
The only thing that seems to explain the 500 internal server errors:
- mod_fcgid: read data timeout in 60 seconds
- Connection timed out: mod_fcgid: ap_pass_brigade failed
This information, along with the fact that the Sucuri plugin seems to be the only one causing the problem, leads me to believe that one or more of the actions attached to the “admin_init” WordPress hook is taking too long to finish the process.
src/globals.php [064] SucuriScanInterface::initialize src/globals.php [068] SucuriScanInterface::handleOldPlugins src/globals.php [069] SucuriScanInterface::createStorageFolder src/globals.php [168] SucuriScanHook::hookCoreUpdate src/globals.php [169] SucuriScanHook::hookOptionsManagement src/globals.php [170] SucuriScanHook::hookPluginDelete src/globals.php [171] SucuriScanHook::hookPluginEditor src/globals.php [172] SucuriScanHook::hookPluginInstall src/globals.php [173] SucuriScanHook::hookPluginUpdate src/globals.php [174] SucuriScanHook::hookThemeDelete src/globals.php [175] SucuriScanHook::hookThemeEditor src/globals.php [176] SucuriScanHook::hookThemeInstall src/globals.php [177] SucuriScanHook::hookThemeUpdate src/globals.php [178] SucuriScanHook::hookWidgetAdd src/globals.php [179] SucuriScanHook::hookWidgetDelete
These are the only functions that run when you load the WordPress admin page. One thing you can do to continue the investigation is to deactivate these functions by adding the following constant to
wp-config.php, then reload the admin page, if the page loads without the “500 Internal Server Error” then congratulations, you have narrowed the error down to this block of code:define("SUCURISCAN_ADMIN_INIT", false);Let me know what happens after adding this constant.
Hello
You can always get real-time data by resetting the cache from the “Data Storage” panel located in the plugin’ settings page. The file that you have to reset is called “sucuri-sitecheck.php” . Alternatively, you can visit the official website [1] to request a malware scan the same way you do with the plugin. There’s a link at the bottom of the page that says “Force a Re-scan to clear the cache”.
Marking as resolved, let me know if you need more information.
[1] https://sitecheck.sucuri.net/results/www.isopasse.com.br
Hello @schoaf
Fatal error: Cannot redeclare sucuriscanResetAndDeactivate()
There’s only one single declaration of this function in the plugin [1].
This error can —and will— happen if:
- You have installed a copy of the plugin with a different name
- Your APC installation is misconfigured, fix it with this [2]
- There’s a bug in WordPress forcing multiple plugin loads [3]
- Someone modified the plugin to duplicate the function
[…] but this server has not changed in all of those years?
I read this sentence as: I haven’t installed security updates, haven’t upgraded to a newer version of PHP, and no one except me have logged into this server in 3+ years. Please confirm if what I am assuming is correct, otherwise, we can conclude that the problem is related with a misconfiguration of the APC module that you or someone else may have installed.
We can continue investigating this issue if you provide more information about your server, otherwise, it will be impossible for me to provide a solution because the code is not broken. Here is a list of things that may help us continue the investigation:
- What type of web server is running?
- What PHP modules are currently installed?
- What PHP modules are currently active?
- What web server modules are currently active?
- How many people have access to your server?
- Is there a caching system in front of your website?
- Do you have any type of PHP Accelerator? [4]
- What WordPress plugins are currently installed?
- What WordPress plugins are currently active?
- Can you execute this command [5] in your server?
I hope you can answer all these questions so we can resolve this problem.
[1] Sucuri/sucuri-wordpress-plugin/sucuri.php#L244-L256
[2] https://stackoverflow.com/a/9245774
[3] https://make.wordpress.org/core/handbook/testing/reporting-bugs/
[4] https://en.wikipedia.org/wiki/List_of_PHP_accelerators
[5]grep -r -n "function.*sucuriscanResetAndDeactivate" /Hello @hellobox
The files may be genuine.
- File
sucuri-auditqueue.phpis used to temporarily store the security events triggered by your website before the plugin sends them to Sucuri for secure storage. The plugin re-creates the file every time WordPress triggers an event with relevancy - File
sucuri-settings.phpis where the plugin stores the user configuration. If you modify the options from the plugin’ settings page, the changes will be added to this file. Deleting the file implies that you are resetting the plugin configuration
I say “may be” because a hacker could inject a file with the same name in other parts of your website, so even though the plugin creates files with these names, you shouldn’t necessarily trust them without close inspection. You said the files are in “/wp-content/uploads/” but in reality, the plugin uses “/wp-content/uploads/sucuri/” so it’s possible that the files you found are corrupt.
Marking as resolved, let me know if you need more information.
Hello @amateurhr
@ycampo will be able to answer your question.
I understand the Sucuri Support team uses various email addresses to temporarily verify the ownership of a domain during a malware cleanup, but I am not aware of the current list of addresses they are using.
I hope you can be a better answer soon.
Hello @sampinha
You can find the files here: https://wordpress.org/download/source/
You can fix the issue using the “Actions” available at the bottom of the table.
Marking as resolved, let me know if you need more information.
Cheers.
Thank you, I’ve added your fix here [1].
The fix will be released once @ycampo reviews and merges the changes.
[1] https://github.com/Sucuri/sucuri-wordpress-plugin/pull/73
Hello,
For everyone having this problem.
Please check that both the HTTP and HTTPS version of your website is online.
When SiteCheck (the service behind the Sucuri plugin) scans a website, it starts with the HTTP version of the URL and then follows any redirection until the end of the request. If the website is properly configured to always redirect to HTTPS then the service will cache the instruction and connect there instead.
Also remember, SiteCheck caches the result of every scan for 24+ hours.
If SiteCheck says that there’s a problem with your website, but you cannot see it at the moment, it may be because the problem got resolved by your hosting provider, and SiteCheck is just showing the cached version of the results. You can reset the cache both from SiteCheck [1] and the plugin [2].
I went ahead and reset the cache for your website and it now works [3].
Marking as resolved, let me know if you need more information.
[1] Scrolling down the page until “Force a Re-scan to clear the cache.”
[2] Deleting “sucuri-sitecheck.php” from “Data Storage” in the plugin settings
[3] https://sitecheck.sucuri.net/results/www.anabiko.comHello, yes, you can use both of them at the same time, in the same website.
After this, I started to suspect it’s the other plug-in that hides wp-login.php. Right now, if I disable that, the login page starts working again. On the phone also.
That’s interesting, thank you for the troubleshooting that so fast.
I guess we can mark this ticket as resolved.
Hello @mike80222
(1) Protecting the MemberPress login page
The plugin detects successful and invalid logins by intercepting a WordPress called “wp_login” [1] and “wp_login_failed” [2] respectively. If MemberPress’ login page triggers this action —(they should, if they are hooking into a WordPress page)— then you don’t have to configure anything.
(2) Clearing the failed login page
- Visit “Sucuri Security > Settings > General”
- Scroll down to “Data Storage”
- Select “sucuri-failedlogins.php”
- Select “sucuri-oldfailedlogins.php”
- Click the “Delete” button
- Done
(3) Timezone issues
- Visit “Sucuri Security > Settings > General”
- Scroll down to “Timezone”
- Select date and time that matches your zone
- Submit the form
- Done
(4) What exactly happens after the max unsuccessful logins?
If you choose “60 failed logins per hour”, for example, the plugin will send you and email with a summary of all the failed login attempts that occurred during the last hour, only if there are more than 60 failed attempts. If there are 59 or less attempts, the plugin will ignore them and reset the counter after the hour, then it will start collecting the logs again.
This option goes along with options from the “Security Alerts” panel:
- Receive email alerts for failed login attempts
- Receive email alerts for password guessing attacks
If your website gets 1,000+ failed logins per hour, you will not want to receive 1,000 email alerts. You’ll probably disable the first option, and enable the second option, and then configure the maximum number of attempts to send the summary.
I then test it by typing a bad password 30 times. It *appears* that at that point Sucuri puts up a “captcha” screen.
The plugin doesn’t provides this functionality, the captcha is being added by the Sucuri Firewall [3]. The documentation about this specific feature is available in this page [4] and you can ask for more details via chat (from the Sucuri home page) or via email directing your inquiries to info@sucuri.net
(5) Documentation
You can read about the main features from here [5].
Click on the difference sections listed in the left column.
Marking as resolved, let me know if you need more information.
[1] https://developer.wordpress.org/reference/hooks/wp_login/
[2] https://developer.wordpress.org/reference/hooks/wp_login_failed/
[3] https://sucuri.net/website-firewall/
[4] https://kb.sucuri.net/firewall/Whitelist+and+Blacklist/protected-page
[5] https://kb.sucuri.net/pluginsHello @dandr69 sorry for the delay.
The Sucuri WordPress plugin doesn’t blocks requests by IP address.
In fact, it doesn’t block requests at all, for any criteria.
Your website is probably behind the Sucuri Web Application Firewall [1] which is a different service. You can whitelist your IP from the “Firewall” page, the plugin connects to a remote Sucuri service and makes the appropriate changes. Or you can go directly to the Sucuri WAF Dashboard [2] and make the changes yourself.
Here [3] you can find more information.
That being said, if the request was actually blocked by Sucuri, you would see a “403 Forbidden” page instead. What you are reporting is not an IP blockage but a “500 Internal Server Error” which is a common error code triggered by web servers to indicate that your web application is broken.
Let me know if disabling or uninstalling the Sucuri WordPress plugin actually solves the problem, if that’s the case, I would like to have more information about your server environment so I can reproduce the issue on my side and fix it.
[1] https://sucuri.net/website-firewall/
[2] https://waf.sucuri.net/?settings&panel=whitelist-addr
[3] https://kb.sucuri.net/firewall/Whitelist+and+Blacklist/whitelisting-IPHello @shaunmesh
The file
wp-logon.phpis not part of a normal WordPress installation.It is common for hackers to create files that look like WordPress files by adding the
wp-prefix. I believe you are confusing this file withwp-login.phpand it probably contains PHP syntax errors which some times causes the web server to return a 500 Internal Server Error.My error log doesn’t seen to be much help […]
The log in your comment is not an error log, it’s an access log. You need to search for a file called
error_log, that’s where you can find details about the failure that is causing the 500 Internal Server Error.—
Please keep the Sucuri plugin disabled until you can provide more information about the errors so I can continue the investigation. Otherwise, I may not be able to help you much.
Hello @nycbrook,
Sorry for the delay answering your question.
Why am I suddenly getting these same updates in the past week or so where previously I was not.
If you recently updated to WordPress 5.x then you will notice a higher number of alerts about “Auto Drafts” which are generated when you edit a post or page, or when a plugin uses the posts table to store temporary data for a form.
Everyday now there are 10+ of these alerts for post and page id’s that are seemingly not even in existence.
Auto Drafts are automatically deleted when the post is fully saved.
The workflow is as follows:
- User creates a new post or page
- WordPress automatically creates a draft
- User starts typing content for the post
- WordPress updates the draft with the new content
- User suddenly closes the post editor without saving
- WordPress leaves the draft in place until the post is saved
- User resumes editing the post and then publishes it
- WordPress automatically deletes the auto draft
This process explains the “[…] seemingly not even in existence” part.
Let me know if you need more information.
Hello,
I do not know exactly what features the “WP Security” plugin provides, so I cannot say with confidence if having them both installed in the same website will be redundant. I would say “keep them both”, eventually you’ll find yourself using one more than the other, and then you will decide which one to keep. Here is an article [1] that lists the main features of twelve (12) popular security plugins.
Let me know if you need more information.