466 points · by stanislavb · 3y ago · 290 comments
I'm trying to deal with a very interesting (to me) case. Someone is proxy-mirroring all content of my website under a different domain name.
- Original: https://www.saashub.com
- Abuser/Proxy-mirror: https://sukuns.us.to
My ideas of resolution:
1) Block them by IP - That doesn't work as they are rotating the IP from which the request is coming.
2) Block them by User Agent - They are duplicating the user-agent of the person making the request to sukuns.us.to
3) Add some JavaScript to redirect to the original domain-name - They are stripping all JS.
4) Use absolute URLs everywhere - they are rewriting everything www.saashub.com to their domain name.
i.e. I'm out of ideas. Any suggestions would be highly appreciated.
p.s. what is more, Bing is indexing all of SaaSHub's content under sukuns.us.to ¯\_(ツ)_/¯. I've reported a copyright infringement, but I have a feeling that it could take ages to get resolved.
I wrote a HN post about it as well: https://news.ycombinator.com/item?id=26105890, but to spare you all the irrelevant details and digging in the comments for updates - here is what worked for me - you can block all their IPs, even though they may have A LOT and can change them on each call:
1) I prepared a fake URL that no legitimate user will ever visit (like website_proxying_mine.com/search?search=proxy_mirroring_hacker_tag)
2) I loaded that URL like 30 thousand times
3) from my logs, I extracted all IPs that searched for "proxy_mirroring_hacker_tag" (which, from memory, was something like 4 or 5k unique IPs)
4) I blocked all of them
After doing the above, the offending domains were showing errors for 2-3 days and then they switched to something else and left me alone.
I still go back and check them every few months or so ...
P.S. My advice is to remove their URL from your post here. This will not help with search engines picking up their domain and ranking it with your content ...
You could make a page that shames their domain name for stealing content. You could make a redirect page that redirects people to your website. Or you could make a page with absolutely disgusting content. I think it would discourage them from playing the cat and mouse game with you and fixing it by getting new IPs.
Assuming you've monetized your content with ads, depending on your ads provider, this may have deleterious effects on your account with that provider, as they may then assume you're trying to game ads revenue.
Not if you value the people who might move to the real domain.
Love the idea.
edit: or when somebody embed-links your image inside some forum, replace the original filename with the contents of hello.jpg
In most countries in the western world, there are 3-4 major ISPs and this is where 99% of your legit traffic comes from. Regular people don't browse the web proxying via hosting centres as Cloudflare will treat them with suspicion on all the websites they protect.
Found the hosting information from here: https://host.io/us.to
They are the ones providing the subdomain
Also: since you say 4k-5k IPs... any of them from cloud providers? And specific location?
Don't block them. Show dicks instead
For starters: copyright-infringing material.
there were a bunch of sites mirroring 8chan to steal content
these were useful because they had both a simpler / lighter / better user interface (aside from images being missing), and posts / threads that were deleted would stay on the mirrors. being able to see deleted posts / threads was highly useful as the moderation on such sites tends to be utterly useless and the output of a random number generator. it was hilarious reading "zigforum" instead of "8chan" in all the posts as the mirror replaced certain words to thinly veil their operation. they even had a reply button that didnt seem to work or was just fake.
tl;dr the web is broken and only is good when "abused" by proxy/mirrors
Those variables are populated by the browser, unless proxying server is rewring them, your web-server will be able to detect imposter and serve him/her with a redirect. If rewrites are indeed in place, then check in the frontend. Blocking by IP is the last option if nothing else works.
More sophisticated options can been found in other comments.
You might also start with the hypothesis that they're using regex for JS removal and try various script injection tricks...
2. Create fake html elements and put unique strings inside. And you can search that string in search engines for finding similar fake sites on different domains.
3. Create fake html element and put all request details in encrypted format. Visit adversary's website and look for that element and flag that ip OR flag the headers.
4. Buy proxy databases, and when any user requests your webpage, check if its a proxy.
5. Instead of banning them, return fake content (fake titles and fake images etc) if proxy is detected OR the ip is flagged.
6. Don't ban the flagged ip's. She/He's gonna find another one. Make them angry and their user's angry so they give up on you.
7. Maybe write some bad words to the user on random places in the HTML when you detect flagged ip's :D So the user's will leave the site and this will reduce the SEO point of the adversary. Will be downranked.
8. Enable image hotlinking protection. Increase the cost of proxying for them.
9. Use @document CSS to hide the stuff when the URL is different.
10. Send abuse mail request to the hosting site.
11. Send abuse mail request to the domain provider.
12. Look for the flagged IPs and try to find the proxy provider. If you find, send mail to them too.
Edit: More ideas sparkled in my mind when I was in toilet:
1. Create fake big css files (10MB etc). And repeatedly download that from the adversary's website. This should cost them too much money on proxies.
2. When you detect proxy, return too big fake HTML files (10GB) etc. That could crash their server if they load the HTML into the memory when parsing.
Reminds me of a time some real estate website hotlinked a ton of images from my website. After I asked them to stop and they ignored me I added an nginx rewrite rule to send them a bunch of pictures of houses that were on fire.
For some reason they stopped using my website as their image host after that.
I'm curious if they are stealing anything else, e.g. are they selling ads/tracking, do they replace order forms with their own...
Also to teach them an important lesson about the internet.
Additionally if they decide to blackhole the fake/honeypot url, since you mentioned they pass along the user agent, you could mixin some token in a randomized user agent string that your scraper uses so that you could duck-type the request on your end to signal when to capture the egress ip.
a[href*= "sukuns.us.to"] {
display:none;
}
Then use SRI to enforce that CSS. body[href*= "<OFFENDING URL>"] {
background-image: url("http://goatse...");
}
Ala: http://ascii.textfiles.com/archives/1011 body[href*= "<OFFENDING URL>"] {
animation: rotation 20s infinite linear;
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
} <html data-path="https://www.saashub.com/about">
then hide the full page with: html {display: none;}
html[data-path*="saashub.com"] {display:block;}SRI is for the situation where a CDN has been poisoned, not this.
A. Blank page
B. Let the find and replace update the CSS. Generate new hashes in the HTML.
C. Find someone new to pick on.
B is time and potentially computationally expensive, so it makes C a better option.
For example, I had an app developer start stealing API content, so once I determined points to key from them, instead of blocking them I simply randomized the API content details returned to their user's apps.
Hey, API calls look good, the app looks like it is working, no problem right? Well, the users of the app were pissed and the negative reviews rolled in. It was glorious.
As a side note, their domain is linked in this thread so they are seeing HN in their access logs and probably reading this. It should make for an interesting arms race. Or red/blue team event.
Then, write a little script that repeatedly hits that honeypot URL. I quite like this idea.
> 6. Don't ban the flagged ip's. She/He's gonna find another one. Make them angry and their user's angry so they give up on you.
There's a popular blog that no longer gets linked on HN.
The author didn't like the discussions HN had around his writing, so any visitors with HN as the referer are shown goatse, a notorious upsetting image, instead of the blog content.
Fortunately, there are many upsetting images for the OP to choose from!
> Create fake big css files (10MB etc). And repeatedly download that from the adversary's website. This should cost them too much money on proxies.
Be careful when doing things like this, including the shock image option mentioned in other comments, as then it could become an arsehole race with them trying to DoS your site in retribution. Then again, going through more official channels could also get the same reaction, so…
> When you detect proxy, return too big fake HTML files (10GB) etc. That could crash their server if they load the HTML into the memory when parsing.
Make sure you are setup to always compress outgoing content, so that you can send GBs of mostly single-token content with MBs of bandwidth.
Doesn't that also cost you an equal amount? You'll be serving them an equal amount that they proxy to the end user.
It's not even necessarily a cost for them; you're assuming that the host is owned and paid for by the abuser. If it's simply been hijacked (quite possible), you're just racking up costs for another victim.
Not sure how you actually do it and if it serves your purpose but sounded neat.
Nope, since anybody doing this and it has at least minimum intelligence are using residential botnets as proxies.
You can also write some obfuscated inline JavaScript that checks the current hostname and compares to the expected one and redirects when not aligned.
https://webmasters.stackexchange.com/questions/56326/canonic...
I noticed that the other domain is hotlinking your images. So you can disable image hotlinking, by only allowing certain domains as the referers. If you block hotlinked images then the other domain will not look as good. Remember to do it for SVGs too.
https://ubiq.co/tech-blog/prevent-image-hotlinking-nginx/
Finally I also see they are using a CDN called Statically to host some assets off your domain. You can block their scrapers by user agent listed here:
If the TLS ciphers the client proposes for negotiation doesn’t align with the client’s User-Agent they get a CAPTCHA.
I would suspect that whoever is doing this proxy-mirroring isn’t smart enough to ensure the TLS ciphers align with the User-Agent they’re passing through.
By the way, I've also reported the abuser as a phishing/fraud website through https://safebrowsing.google.com/safebrowsing/report_phish/?u...
Instead, plot a few different changes and throw them in all at once. Preferably in a way where they will have to solve all of the changes at the same time to figure out what happened and get things working again. Also, favor changes that are harder to detect. E.g., pure IP blocks are easier to detect than tarpitting and returning fake/corrupted content. The longer their feedback loops, the more likely it is that they'll just give up and go be a parasite somewhere else.
I recently had to employ such a strategy against some extremely aggressive card testers (criminals with lists of stolen credit cards who automate stuffing card info into a donation form to test which cards are still working). Instead of blocking their IPs, I started feeding them randomly generated false responses with a statistically accurate "success" rate. They ran tens of thousands of card tests over many days, and 99% of the data they collected was bogus. It amuses me to know that I polluted their data and wasted so much of their time and effort. Jerks.
FIND THE IP FOR THE DOMAIN
PS > ping sukuns.us.to
Pinging sukuns.us.to [45.86.61.166] with 32 bytes of data:
Reply from 45.86.61.166: bytes=32 time=319ms TTL=39
...
REVERSE DNS TO FIND HOST https://dnschecker.org/ip-whois-lookup.php?query=45.86.61.166
Apparently it's "Dedipath".And that WHOIS lookup gives an abuse email address:
"Abuse contact for '45.86.60.0 - 45.86.61.255' is 'abuse@dedipath.com'"
So you could try emailing that address. They may take the site down, or hopefully more than that...It's not the same thing, but I'm reminded now of email in the past, when you would usually get an undeliverable message if something went wrong. But later that was almost entirely stopped - because of spam. Massive volumes of spam was sent from forged addresses, and much of it led to those replies. So that made things worse by doubling the volume, plus the innocents whose addresses had been forged got deluges of confusing undeliverable messages!
I think you're right in that changing IPs would be easy for them. But, changing hosts would be significantly more work and hassle. So if the abuse reporting worked, that could have much more of an impact...
BTW: if they're removing/replacing domain name of your site, try obscuring it with HTML entities. This may dodge simple find'n'replace.
Now let's say that your website will show the ip of whoever visit it, in one of textbox. When you access it it shows your ip. When the proxy sever access it it shows the proxy sever's ip. When you access the proxy site, the proxy site will access your site, having their ip on one of the text box, then return the page with their ip to you.
The more advanced method is to encrypt the ip and put it hidden somewhere, on later for you to decrypt it, get the ip and black list them.
Are they now?
Add a `visibility: hidden` to random elements on the page, and show them with javascript.
OR
Are they removing _all_ js? Have you checked whether they remove `<body onclick="some javascript code that injects some other code">` ?
You can try to do script injection _into your own site_ to see if their mirroring software is smart enough to deal with all the different xss vectors.
Bonus points: if they remove your <body onhover=>` attribute, add a style like
body { display: none} body[onhover='the js code that they will remove'] {display: block}
Then instead of blocking the fingerprint, poison the data. Introduce errors that are hard to detect. Maybe corrupt the URLs, or use the incorrect description or category. Be creative, but make it kind of shit.
It's easy to work around blocks. Working around poisoned data is much harder.
i.e. ssl_cipher, http_x_requested_with, http_accept... and the order of all headers supplied... the casing of all headers supplied... TLS client HELO.
It is relatively easy, if you have enough signals, to essentially create a fingerprint that they won't understand how it works. Yet it will be effective at blocking it regardless of the IP.
Once you add enough of these together it will be hard for them to get around it without being obvious as they do so.
Super aggressive... those same fingerprints will reveal legit browser traffic and the fingerprints for things like Google-bot... so you could go towards a whitelist rather than blocklist. But this is a place you'd have to actively manage as new variations arise constantly.
However, then you're left with the really hard problem of when real browsers are used. But hey, you went a long way before you had to actually look at traffic patterns and in the meantime you've significantly raised the costs for those operating the bots.
It's also worth noting that if you really get enough signals, that bot writers cannot control them all. Everyone can rewrite a HTTP header, but can you pick the right HTTP headers in the right order with the right TLS cipher and TLS HELO to appear to be the same as Chrome on Windows? Good luck.
The nice thing about this is it can be made arbitrarily complex. For example you can make the page actually blank and fetch all the normal, real content with JS after validating the user's browser as much as you like on both client and server. That's what Cloudflare's bot shield stuff does. Since JS is Turing complete there is no shortcut that the proxy can take to avoid running your real JS if you obfuscate it enough. They would have to solve the halting problem.
What a determined adversary would do is run your code in a sandbox that spoofs the URL, so then your job becomes detecting the sandbox. But it's unlikely they would escalate to this point when there are so many other sites on the internet to copy.
At the very least you collect info about their sophistication level; will they adapt to adversity or will the bail/move on?
Unless you have a tiny target audience that includes people who tend to disable Javascript, this seems like a fine solution. I use JS to hide email from the most basic of scrapers most of my sites and so far it has worked wonders.
However, long term this seems like a solution that will be difficult to maintain. Either the proxy will start stripping CSS as well (s/hidden/visible) or it'll require constantly playing along in a cat-and-mouse game that you don't stand to gain anything in by winning.
I would add random, page-like endpoints that only you know and request them through their proxy (through VPNs/TOR/you name it). Ban the entire /48 (IPv6) or /24 (IPv4) or send them into a tar pit (iptables -A INPUT -p tcp -m tcp -dport 80 -j TARPIT for the IP address you target) to exhaust their resources.
Put brandings/personalizations/signatures in your pages that are not easy to remove to remove automatically. Include your site URL if possible. The idea is that if a visitor sees these on a different site, it becomes obvious that the content doesn't belong there.
Write an article page about these things happening, specifically mentioning the mirroring site URLs, and see if they will also blindly mirror it.
The copy is using ZeroSSL. This seems to use a similar mechanism like letsencrypt to verify certs. Maybe, you could get their certificate by serving the response to their challenge from your server. Not idea how to proceed from there.
Or activating the google webmaster tools. Maybe there's some setting "remove from index" or "upload sitemap" that could reduce its visibility on google.
Put it under a URL only you know, then start DoS-ing it.
Of course that requires you to be able to serve a prepared gzipped resonse, depends on your stack.
Bots will trigger it by walking through all pages, but real human would not click in since the paging is non-sense and titles are non-sense.
The first line of defense is contacting the relevant authorities. This means search engines, the hosting provider, and the owner of the domain (who may not be the abuser). Be polite and provide relevant evidence. Make it easy for them to act on it. There'll be some turnaround time and it's not always successful, but it's the best way to get a meaningful resolution to the issue.
What about in the meantime? If all the source IPs are from one ASN, just temporarily block all IPs originating from that ASN. There'll be some collateral damage, but most of your users won't be affected.
What striked me, though, is that a copycat website is waaaay faster than your original. If I were in your shoes, I would invest my time and effort into speeding up the site. Unlike hunting some script kiddies, that will bring palpable benefits.
I have a website doing this to one of my domains. I have let it slide for now since I get value out of users that use their site too, but I have thought about packing their content with advertisements to turn the tables a bit.
If you change subtle details about spelling, spacing, formatting, etc by the source IP, then you can look at one of their pages and figure out which IP it was scraped from.
Then, just add goatse to all pages requested by that IP. Alternatively, replace every other sentence with GPT-generated nonsense.
EDIT: it should be quite easy to use JS to fingerprint the scraper. The downside is that you will also block all NoScript users.
1. Grab the list of IPs that you've already identified and feed them through nrich (https://gitlab.com/shodan-public/nrich): "nrich bad-ips.txt"
2. See if all of the offending IPs share a common open port/ service/ provider/ hostname/ etc. Your regular visitors probably connect from IPs that don't have any open ports exposed to the Internet (or just 7547).
3. If the IPs share a fingerprint then you could lazily enrich client IPs using https://internetdb.shodan.io and block them in near real-time. You could also do the IP enrichment before returning content but then you're adding some latency (<40ms) to every page load which isn't ideal.
I seem to recall someone doing something similar at one point hosting files and setting up resources that get pulled down only on flagged IPs such as a 300kb gzip encoded file that tries to expand to 100TB.
You may be able to claim their domain out from under them and then mess with search settings (e.g. In Google Search Console you can remove URLs from search results).
Extra points if you can cause legal trouble for whoever runs the site. If you're hosting rather large files, then you can also hide content by default that will never be loaded on your site, but will load on the other site. Add a large file to your site, then reference that file a few thousand times with query params to ensure cache busting, and then make the browser load it all using CSS when it detects that it runs on the other site.
- "bait urls" that other crawlers won't touch
- trigger by request volume and filter out legit crawlers
- find something unique about the headers in their requests that you can identify them with
One additional suggestion is to not block them, but rather, serve up different content to them. Like have a big pool of fake pages and randomly return that content. If they get a 200/OK and some content they are less likely to check that anything is wrong.Another idea is to serve them something that you can then report as some type of violation to Google, or something (think SafeSearch) that gets their site filtered.
a[href*="sukuns"] { font-size: 500px!important; color: LimeGreen!important; }
pretty much destroys the page. i guess eventually they would give up in the specificity battle.
probably more stuff you could do with CSS to mess with them.
(Less economical if they're not caching anything.)
Base64 encoding images with watermarks may also be worth a shout.
Love the zip bombing.
Long shot but I wonder if its possible to execute some script on their server.
Happened to me back in the days of blogging.
Posted an image of me mocking them on my blog. Sure enough they published it and they didn't notice for a while. They stopped it soon after :)
Edit: you could maybe add a <meta> tag to define a CSP in but I guess they will remove it [1].
[0] https://developers.cloudflare.com/workers/runtime-apis/reque...
1) Add a watermark to your images when they proxy to you.
Stolen image from {url}
2) Add a js script when the url differs from yours and display a message + redirect
Luckily, I am at home, and my children are at school.
I have no idea what happened, or why I got redirected, but I can certainly suggest not taking up the idea to serve disgusting content (given I clicked a link that someone on HN posted, I shouldn't be subjected to that).
Even with IP rotation, a proxy website would probably generate more traffic than normal from these few IPs, tweak fail2ban vars so you to make it less likely to trigger on false positives (larger number of requests / larger amount of time) but block the violating IPs for long period, few days for example.
I hope it helps
You're already using Cloudflare, you could try talking to their support or just turning up settings to make it more strict for bots.
Instead of blocking their IPs, detect if the traffic is coming from the abuser's IPs, and serve different content -- blank, irrelevant, offensive, copyright violations, etc.
More examples here from long long ago.. http://www.ex-parrot.com/~pete/upside-down-ternet.html
https://bgp.he.net/AS35913#_prefixes
The IPs they switch between may all be from this pool.
it’s possible the combination of blocked image hotlinks, watermarking the domain inside the images, and CSS trickery that messes up the page on the proxy (along with whatever other steps that can be thought of to make it look wrong or erroneous on the proxied site) could get op bumped to #1 on search on enough links that it no longer matters.
Given the other site isn’t generating original content it’s unlikely to ever get its google juice back.
On a side note - does Google have an option for this? I’m sure they must have encountered this before and it helps the quality of their results too to block obviously fudged content.
More simply you could just make all the HTML links broken unless some obfusticated or server-backed algorithm is run on them. Think google search results.
Potential downsides: SEO.
Does copied content even rank in Google? How are they driving the traffic to it?
According to OP, it ranks pretty well on bing.
https://blog.cloudflare.com/introducing-scrapeshield-discove...
EDIT: or building up on what user zhouyisu says above you can generate your perfect match IP blacklist by calling urls via the abusing site that automatically puts any caller into the blacklist.
https://developers.cloudflare.com/fundamentals/get-started/c...
How would one go about finding out?
If your site had been copied but wasn't indexed by the big search engines, that would presumably limit the options to make money from it?
Access denied Error code 1020
You do not have access to www.saashub.com.
The site owner may have set restrictions that prevent you from accessing the site.
Error details Caret icon Was this page helpful?
Performance & security by Cloudflare External link
They're serving your copyrighted content. Seems like what it was made for.
Make your site only work with JS.. Easy.
The current IP 45.86.61.166 is likely a compromised host [1] which tells me you are dealing with one of the gangs that create watering holes for phishing attacks and plan to use your content to lure people in. They probably have several thousand compromised hosts to play with. Since others mentioned you could change the content on your site, I would suggest adding the EICAR string [2] throughout the proxied content as well so that people using anti-malware software might block it. They are probably parking multiple phishing sites on the same compromised hosts [3].
This would also be a game of whack-a-mole but if you can find a bunch of their watering hole sites and get the certificate fingerprints and domains into a text file, give them to ZeroSSL and see if they can mass revoke them. Not many browsers validate this but it might get another set of eyes on the gang abusing their free certs.
If you have a lot of spare time on your hands, you could automate scripting the gathering of the compromised proxy hosts they are using and submit the IP, server name, domain name to the hosting provider with the subject "Host: ${IP}, ${Hostname}, compromised for phishing watering hole attacks". Only do this if you can automate it as many server providers have so many of these complaints they end up in a low priority bucket. Use the abuse@, legal@ and security@ aliases for the hosting company along with whatever they have on their abuse contact page. Send these emails from a domain you do not care about as it will get flagged as spam.
Another option would be to draft a very easy to understand email that explains what is occurring and give that to Google and Bing. Even better would be if we could get the eyes of Tavis Ormandy from Google's vulnerability research team to think of ways to break this type of plagiarized content. Perhaps ping him on Twitter and see if he is up to the challenge of solving this in a generalized way to defeat the watering holes.
I can think of a few other things that would trip up their proxies but no point in mentioning it here since the attackers are reading this.
[1] - https://www.shodan.io/host/45.86.61.166
[2] - https://www.eicar.org/download-anti-malware-testfile/
[3] - https://urlscan.io/result/af93fb90-f676-4300-838f-adc5d16b47...
> How to delete the test file from your PC
> We understand (from the many emails we receive) that it might be difficult for you to delete the test file from your PC. After all, your scanner believes it is a virus infected file and does not allow you to access it anymore. At this point we must refer to our standard answer concerning support for the test file. We are sorry to tell you that EICAR cannot and will not provide AV scanner specific support. The best source to get such information from is the vendor of the tool which you purchased.
> Please contact the support people of your vendor. They have the required expertise to help you in the usage of the tool. Needless to say that you should have read the user’s manual first before contacting them.