• Resolved frasermarlow

    (@frasermarlow)


    I am running WordPress 4.5.3, and the site I am working on has been hacked/exploited. Looking into this I see it affecting other WordPress sites.

    The nature of the hack/exploit is to drop in a div with style="position: absolute; top: -3167px" and then strangely a link to a PDF document hosted on this or another wordpress server.

    Here is an example of how it comes out:

    [ redacted ]

    These hacked links do not appear on every <a> tag, but when they do, if the offending </a><a> tag is removed form the site, the exploit jumps to the next link in the HTML.

    Other sites affected I have found include:

    [ redacted ]

    … and probably many more.
    `
    Strangely these all point to Italian PDFs hosted on the hacked sites.

    I tried running the Exploit Scanner plug-in but got this error “Searching your filesystem and database for possible exploit code – An error occurred. Please try again later” which makes me nervous!

    The theme I am running is Parallax One but the other sites are all on other themes, so I don’t think it’s a theme issue.

    Any advice on where this is coming from, how to address it and prevent it in the future would be welcome. Many thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter frasermarlow

    (@frasermarlow)

    Additional note – this exploit is pointing to PDFs pulled form my site such as [ redacted ] but I can’t locate that in the root folder or anywhere else on the server… Any clues where that might be hidden?

    Thread Starter frasermarlow

    (@frasermarlow)

    I seem to have found a resolution, so I will document it here for the benefit of anybody else facing the same issue. I overwrote the entire WP-admin folder, and this flushed the issue out (i.e. these are not links in the WP database, but somehow fed in via js or some other method.) I have backed up the old set of files and will do a comparison to see if I can spot the exploit.

    Thread Starter frasermarlow

    (@frasermarlow)

    Sorry: correction that should be the WP-includes folder. Not the WP-admin one.

    … I overwrote the entire WP-admin folder, and this flushed the issue out

    That is not a complete fix. Carefully follow FAQ My site was hacked – WordPress Codex or you will likely be hacked again.

    Then take a look at the recommended security measures in Hardening WordPress – WordPress Codex and Brute Force Attacks – WordPress Codex

    Thread Starter frasermarlow

    (@frasermarlow)

    Hi Mark, you are correct. The issue reappeared a few hours later. Also the XML site map is compromised in a major way. This seems quite a widespread attack on many WP sites. I am surprised not to find any others documenting this issue, but maybe I am just not finding it?

    Thanks for the links – it does look like an overhaul of the accounts, and a fresh install might be the logical way to go.

    Ugh.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @frasermarlow Please do not open the same topic multiple times. Those get deleted or closed when found.

    How far did you get with Mark’s links above?

    Thread Starter frasermarlow

    (@frasermarlow)

    OK, thanks and understood.
    I followed Mark’s notes, purged the entire site, changed all passwords (WP-admin and FTP), I reinstalled WP from the GoDaddy console, Reintalled the Theme from new. The only files I brought back from the original install was the uploads folder (which contains only images) and then I reloaded the database from an SQL export.

    A couple of hours after I complete the reinstall, the same hack reappeared.

    This said I have a second instance of WordPress running on the same server for another project and that one has not been compromised.

    So to pick up from my duplicate post, I am curious to get pointers on how this hack can reference PDFs listed on my server (ostensibly) such as [ redacted ] when I can’t locate any of these may PDFs in my file system and the .htaccess file looks clean.

    Thanks

    Thread Starter frasermarlow

    (@frasermarlow)

    Additional note: besides restricting FTP access to one user and changing the password to a long randomly generated one, I have changed the log-in on the WP install to only using CLEF, so those two doors are fairly well secured. I must still have a window open somewhere.

    Thread Starter frasermarlow

    (@frasermarlow)

    OK, one final post on this subject (I hope). Somehow, mysteriously while I was working on a second WP setup to do some testing, the exploit on my main WP site disappeared.

    Now I am not one to jump to conclusions and blame the hosting company, but I do know the site is on an older (not WordPress dedicated) hosting environment, and as I mentioned @godaddy in the thread, I am wondering if my speculation wasn’t correct: the issue was with the shared server and quietly got fixed.

    This would make sense since you would need higher level access to the server to exploit the root-folder of the various domains.

    This said, I would love to get back my two days of billable time and all the files I purged off my server as I worked round the clock to tackle this issue :-/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Site Hack or Exploit: links to italian PDFs on WP sites’ is closed to new replies.