Hi,
I didn’t see this posted already, and its been a while now that this is happening. I think the main website of invoiceninja.com is infected with malware, but its doing something clever to make it a bit unnoticable. It only kicks in when you arrive from a Google search. If you go directly to invoiceninja.com nothing happens. And when you arrive for the second time from Google on the same page it doesnt always kick in again. Steps to reproduce:
- Google any invoiceninja web page (for example “invoiceninja payment gateway integration”)
- Click the result (in this case: “Payment Gateway Integrations | Invoice Ninja”)
- Now, while the invoiceninja website is loading, if you look closely in the bottom left corner you can see all kinds of strange websites loading in the background. Using the developer tools we can see on the network tab what is happening:
As you can see it injects a script. Now whenever you click anywhere on the page, it opens a new tab which goes to that extra-bonus-here website.
It also sends a GET request to a few other websites as you can see (swisdermindonesia, 23rdbromleyscouts). These do not return any response, they probably add something to a database for the owner of those websites to keep track of how many people visit their infected websites.
I have tested this on 2 different computers to make sure the issue is not on my end.
When cleaning the malware, make sure to change all your passwords (of any admin panels, databases, etc, the attacker probably has full access to this information since it was able to modify what your site serves) also investigate which exploit the attacker used, and update all of your software (PHP, wordpress plugins, etc.), so that you are sure that the exploit cannot be used again.