• I have two issues I’m struggling to fix. I’ve tried most everything suggested online and am at a loss as to what else to do.

    Wordpress Version: 5.2.1
    Theme: Mesmerize
    Plugins: ALL are deactivated

    Issue 1:
    403 Forbidden Forbidden You don’t have permission to access /wp-admin/admin-ajax.php on this server.

    I get this message any time I try to update or delete a plugin. It also shows this message on the Dashboard tab of the Admin panel.

    Things I’ve tried:
    1. Deactivating all plugins
    2. Via FTP I have verified admin-ajax.php permission code is set to 640
    3. Via FTP I have verified all WP folder permissions are set to 755
    4. Installed WP Super Cache, there are no cached contents showing to delete
    5. Cleared theme cache

    Is there anything I should be checking at the host level?

    Issue 2:
    When clicking on my site from a search engine it redirects to a pharma scam site.

    Things I’ve tried to fix this:
    1. Inspected htaccess which looks normal. I tried deleting it and generating a new file but a new file was never created. I’ve compared my file with other “normal” ones online and they look the same.
    2. Inspected all *.php files (index, header, footer, etc.). I know it is common to encode PHP in these files to facilitate the redirect but all of mine look normal.

    I’ve seen vague mention of these redirects working via scripts or an infected database but I haven’t found much information on how to troubleshoot those cases.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Stef

    (@serafinnyc)

    Did you look at the htaccess? Have you cleaned your hack yet?

    Thread Starter stjason

    (@stjason)

    Hi Stef

    I have inspected htaccess and it only contains this, which I surmise is normal.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    Stef

    (@serafinnyc)

    Sorry, was viewing without my glasses on and now I’m in front of main computer. Good. Yeah that’s correct.

    Have you run a grep looking for the main leak of the virus?

    Thread Starter stjason

    (@stjason)

    Thanks Stef, I’m on Windows so I will attempt to do Select-String in Powershell. I’ve downloaded all of the files from my host. Hopefully this can reveal some clues as to where the hack is hiding out.

    Stef

    (@serafinnyc)

    Oooooo! I like how you roll ??????????

    Pharma hacks like JS files the most, header files and index files.

    Best of luck

    Thread Starter stjason

    (@stjason)

    Somewhat surprisingly I was unable to find anything at all related to the hack in my files. I could find no mention of the destination of the redirect anywhere. I had expected to find “something” in the theme php files, scripts, etc. but no luck. I also didn’t see any unusual encoded PHP blocks or additions to the htaccess file. Everything looks exactly as it should… I’m really puzzled at this point.

    I also checked everything at the host level just to make sure that wasn’t the source of the problem but everything looks fine.

    Curiously I contacted my host about the 403 error on admin-ajax.php and they say everything is configured exactly as it should be and they have no idea why I’m getting the permission error. This is a real mess.

    Stef

    (@serafinnyc)

    Let’s start over.

    Issue 1:
    403 Forbidden Forbidden You don’t have permission to access /wp-admin/admin-ajax.php on this server.

    What brought you to or how did you come about receiving /admin-ajax.php ??

    If I goto https://partnerfirst.biz/wp-admin I’m good. I get the login page. Is it after you get in that your URL changes over to /admin-ajax.php?

    Thread Starter stjason

    (@stjason)

    What brought you to or how did you come about receiving /admin-ajax.php ??

    If I goto https://partnerfirst.biz/wp-admin I’m good. I get the login page. Is it after you get in that your URL changes over to /admin-ajax.php?

    I see the /admin-ajax.php 403 error anytime I try to update a theme, plugin, or delete a plugin. None of those things are possible.

    A few updates…

    My hosting service ‘scanned’ my site and identified several files which may have been compromised. I removed all of the files via FTP but the problem persists.

    As of now the site is still redirecting to the pharma site. I don’t really know what else to try other than a complete reinstall.

    Stef

    (@serafinnyc)

    Carefully follow this guide.

    When you’re done, you may want to implement some (if not all) of the recommended security measures found here

    • This reply was modified 5 years, 6 months ago by Stef.

    I have the same issue… Any updates on this?

    Thread Starter stjason

    (@stjason)

    Hey Ryan

    I eventually got it fixed by doing several things…
    – disabled all plugins
    – deleted unused non-essential plugins
    – my host scanned the files and found some encoded php and malicious files I had to cleanup manually via FTP

    At this point I was able to start scanning the site via WP plugins (I used a few). There was a cascade of issues for a little while but eventually it got cleared up.

    Sometimes, the 403 Forbidden error to access /wp-admin/admin-ajax.php is caused from the server configuration.

    In case you can admin your server, if you have Mod Security enabled, try to disable it temporaly. Hopefully, you will be able to send your webform successfully. After that, you can enable it again.

    This is happening to me when changing the settings in several plugins.

    cowpen

    (@cowpen)

    Having the same issue with a pharma-hack. Can’t install WordFence. How did you get around the 403 error in order to delete your plugins?

    mniggemann

    (@mniggemann)

    Hey @stjason can you give us the file names and maybe code samples of the malicious code your host found?
    That would be of great help to others encountering the same hack.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Pharma hack and 403 error admin-ajax.php’ is closed to new replies.