Yeah it's not just Amazon, but so far Amazon was the only one specifically looking for URLs in source code. Interestingly it ignored URLs in the fake markdown docs.
Another detail: the scraper did not attempt to access the endpoints immediately (as it did for hrefs in htmls) but it did it on the day after, twice.
Perhaps you need a TOS that requires a usage fee be mailed to a PO Box that has a reasonable "free" limit of like 100$ and when they exceed it, you automatically mail them a copy of the TOS, the logs and an invoice.
It would fall under contact law, and the case would hinge on either the ToS is binding, and whether the bot operator is deemed to have accepted the ToS, and whether access inflicts a cost.
In the UK, you would likely win in court, and be awarded £1 for your increased hosting costs. There isn't the concept of punitive damages for contract law here. YMMV.
However. People report that you can get paid by sending a plausible invoice to a tech company. The culture disincentivises verifying purchase orders.
Make sure that gives you CIDR blocks, then add it to a script and use a for loop to
for AWS in $(fetch_aws);do ip route add blackhole "${AWS}" 2>/dev/null
Google and Cloudflare if you need them:
get_google()
{
for line in $(dig +short txt _cloud-netblocks.googleusercontent.com | tr " " "\n" | grep include | cut -f 2 -d :)
do
dig +short txt "${line}"
done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n | uniq
}
get_cloudflare()
{
curl -A Mozilla "https://api.cloudflare.com/local-ip-ranges.csv"|grep -Ev "::|/32"|awk -F "," '{print $1}'|sort | uniq
}
This assumes you have no need to connect to or get connections from Amazon on your web server. If your server is an instance in Amazon that will break DNS resolution unless you are using something outside of AWS for DNS. The gateway should still work just fine. Obviously test from an out of band console if that is an option. This is easier to maintain if you remove DNS records for IPv6 and eventually disable IPv6 listeners.
If you paste a couple of lines of the bots from your access logs I can offer more suggestions in the event they try from outside of Amazon.
If you want to have some fun, add a hidden link only the bot will see that points to http://cpanel.yourdomain.tld/ after adding a DNS record for cpanel that points to 169.254.169.254 so they start scraping the AWS cloud-init IP.
Respecting robots.txt is not a legal obligation. If you don’t want the traffic, ban the offending IP block or ASN, or put the origin behind Cloudflare for their crawler blocker.
You could go down the rabbit hole and try to find someone at Amazon to tell their crawler to chill. Don’t expect success but would make a fun blog post.
Whether it’s negligent isn’t terribly relevant. Is it illegal? It is not, they aren’t bypassing access controls. No different than using Shodan, scanning public IPs, crawling open directories, etc.
It would be different if they were attempting to brute force credentials to access an endpoint, but they aren’t.
I haven't personally seen it, but I think us operators need to take entire registered ranges and hook 'em up to fail2ban. Maybe maintain lists of offenders and document it and block these orgs.
That is, I haven't personally seen a bad actors list that gets used in a fail2ban-like setup.
It is not just Amazon (although they're #4 on my list of bad actors)[1].
1. https://files.littlebird.com.au/bad-scrapers.png
Yeah it's not just Amazon, but so far Amazon was the only one specifically looking for URLs in source code. Interestingly it ignored URLs in the fake markdown docs.
Another detail: the scraper did not attempt to access the endpoints immediately (as it did for hrefs in htmls) but it did it on the day after, twice.
Was it actually an Amazon bot IP[1] or someone pretending to be on AWS?
1. https://developer.amazon.com/amazonbot/searchbot-ip-addresse...
Yup, already mentioned in a comment below: the IPs are in that list.
They also show up in AbuseIPDB with multiple reports.
Perhaps you need a TOS that requires a usage fee be mailed to a PO Box that has a reasonable "free" limit of like 100$ and when they exceed it, you automatically mail them a copy of the TOS, the logs and an invoice.
Just make sure you have a good lawyer.
is there a law they’re breaking?
because idk i could be wrong but some small project vs a 2.5T market cap company is gonna need more than “a good lawyer”
It would fall under contact law, and the case would hinge on either the ToS is binding, and whether the bot operator is deemed to have accepted the ToS, and whether access inflicts a cost.
In the UK, you would likely win in court, and be awarded £1 for your increased hosting costs. There isn't the concept of punitive damages for contract law here. YMMV.
However. People report that you can get paid by sending a plausible invoice to a tech company. The culture disincentivises verifying purchase orders.
Edit: oops, double-posted.
Ban Singapore that solved my Amazon traffic issues and probably others.
Ah, if its only Amazon, then you are in a good position :-))
I hosted a small website with some newfeeds and it got killed by all the AI scrapers in the end.
Assuming your site has no dependency on Amazon EC2:
Make sure that gives you CIDR blocks, then add it to a script and use a for loop to Google and Cloudflare if you need them: This assumes you have no need to connect to or get connections from Amazon on your web server. If your server is an instance in Amazon that will break DNS resolution unless you are using something outside of AWS for DNS. The gateway should still work just fine. Obviously test from an out of band console if that is an option. This is easier to maintain if you remove DNS records for IPv6 and eventually disable IPv6 listeners.If you paste a couple of lines of the bots from your access logs I can offer more suggestions in the event they try from outside of Amazon.
If you want to have some fun, add a hidden link only the bot will see that points to http://cpanel.yourdomain.tld/ after adding a DNS record for cpanel that points to 169.254.169.254 so they start scraping the AWS cloud-init IP.
Thanks, the Amazonbot IPs that accessed my honeypot are in this other list:
https://developer.amazon.com/amazonbot/searchbot-ip-addresse...
By the way, they used false user-agents.
Thanks ! I've been looking into a simple solution for blocking aws ips.
Which website platform are you using and hosting provider to support your need?
Respecting robots.txt is not a legal obligation. If you don’t want the traffic, ban the offending IP block or ASN, or put the origin behind Cloudflare for their crawler blocker.
You could go down the rabbit hole and try to find someone at Amazon to tell their crawler to chill. Don’t expect success but would make a fun blog post.
https://www.cloudflare.com/learning/ai/how-to-block-ai-crawl...
My concern is more in relation to trying to use an endpoint from non-public source code, it seems negligent to randomly try endpoints like this
Whether it’s negligent isn’t terribly relevant. Is it illegal? It is not, they aren’t bypassing access controls. No different than using Shodan, scanning public IPs, crawling open directories, etc.
It would be different if they were attempting to brute force credentials to access an endpoint, but they aren’t.
> they aren’t bypassing access controls.
Weev went to jail for accessing public api's, https://en.wikipedia.org/wiki/Weev#AT&T_data_breach
> The flaw was part of a publicly-accessible URL, which allowed the group to collect the e-mails without having to break into AT&T's system.
It was argued that he didn't circumvent, but it didn't stop them from putting him in jail initially.
His conviction was vacated and Amazon has deep pockets and diffusion of internal liability. The illicit state drug charges did not help his case.
I haven't personally seen it, but I think us operators need to take entire registered ranges and hook 'em up to fail2ban. Maybe maintain lists of offenders and document it and block these orgs.
That is, I haven't personally seen a bad actors list that gets used in a fail2ban-like setup.