To make this answer more general, I removed the actual domains: the links tend to expire shortly when the administrator of the compromised site responds to the problem.
I'm curious about this specific case. -- curl
'ing -- seemingly useless -- obfuscated javascript
This http://example.com/administrator/components/com_falang/inferentialj.html
can been seen as a entry point. It contains seemingly unharmful obfuscated JavaScript that doesn't per se contain anything directly malicious. Many of these tries to look like a completely normal CMS component or plugin, and some even only activate on a certain condition, like when someone visits the site for the firs time. All this is for survival: for hiding from the site administrator as long as possible. The only purpose for the entry point may be to redirect the user to somewhere else, as is the case now.
What happens next may also vary depending on the conditions, to complicate the investigation. The next site may be configured to give the actual payload only when an actual browser access it, or only if the browser's user agent matches something that could be exploited. It may give different contents when user agent is e.g. curl/7.52.1
, so obfuscating the user agent using curl -A
may become handy. The next URL http://example.net/?s=27012018&a=401336&c=cpcdiet
gives an empty reply to curl
, while Google Chrome gets a new HTTP redirect:
Location: http://example.net/all/gcqs/cpc?bhu=CWpXnMGxogFTuYGF1JYCW2zLUa3SvtaoyYB9d
which has the following content (indentation added for readability):
<link rel="stylesheet"
href="/assets/CWpXnMGxogFTuYGF1JYCW2zLUa3SvtaoyYB9d/theme_1pgoz4.css?CID=411298"
type="text/css">
<link rel="dns-prefetch"
href="http://203.0.113.61.d.example.org">
<script>
window.location.replace("http://pharmacy-site.example.org");
where
- the
stylesheet
URL has just a placeholder CSS containing only /*...Empty theme...*/
- the
dns-prefetch
URL leads currently to an NXDOMAIN
- the
script
finally redirects to a site titled Pharmacy online-store, selling Viagra.
The final location is a domain registered to a private person from Russia; high probability for scam.
What potential security flaws could I have been exposed to by simply slicking on an unknown link, and doing nothing else?
This has a huge potential to be harmful in general, but it depends on how your browser reacts and is the exploit targeted against a vulnerability in this particular environment.
This investigation revealed that you could have lost money by ordering Viagra on a (probably fake) pharmacy site, but it could well have been worse, too.