Japanese Hack Assistance

Hi there,

This is more of a follow on from ticket - https://premium.wpmudev.org/forums/topic/replacing-404-pages-with-410s-automatically

So a while back our website was hacked and it appears to be Japanese in nature. I've found an article which seems to describe the issue pretty well - https://developers.google.com/webmasters/hacked/docs/fixing_the_japanese_keyword_hack

I think this happened due to our site plugins and WordPress being out of date, therefore leaving it open to vulnerabilities. When this happened originally, we were in the process of creating a new website to replace the old one.

The initial hack was fixed and we then pushed the new one live, which is the current one.

The worst part about this hack was that 3rd party domains were and still are randomly generating links pointed to our domain (You can see this through 'site:justaccounts.com' in Chrome), examples:

justaccounts.com/purchase_nrbGbN7G/
http://www.justaccounts.com/servant_gWG77G.
http://www.justaccounts.com/iterate_7GbNnrG7.

Currently all of these generated links are throwing 404 errors, because the path now does not exist. This is causing us to have an extremely high bounce rate as most of our traffic now comes from Japan and surrounding countries to these dead links, and are immediately leaving because the page doesn't exist.
This is, in turn, causing us to drop in search rankings massively.

The ticket I raised relating to this was looking more towards a 'plaster-over-the-wound' solution, to turn these 404 errors into 410 errors so the links are quickly un-indexed, however I realise that this may work as a temporary solution but I will need to address the main issue.

So the crux of this ticket is, do you have any suggestions on how I can really properly tackle this issue and have it sorted once and for all. Stopping these 3rd party link generations and having our domain show as clean and only displaying URL's submitted in our sitemap?

A few notes.
- I have not yet made the change to the 404 .php file to display them as 410's
- The steps have been followed to remove the 'This site may be hacked' message
- Our site currently seems stable and not hacked, so the main issue is the 3rd party generated links

Any help on this subject would be greatly appreciated as it is becoming a serious issue in terms of us utilising our website properly.

If you need any more information please let me know!

Thank you in advance!

Peter.