Live data from Hacker News

Avoiding bot detection: How to scrape the web without getting blocked?

github.com

291–300 of 312 posts

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#291
Trying to stop credential stuffing by blocking bots will not work, and can often severely impact people depending on assistive technologies.

I think a better solution is to implement 2FA/MFA (even bad 2FA/MFA like SMS or email will block the mass attacks, for people worried about targeted attacks let them use a token or software token app) or SSO (e.g. sign in with Google/Microsoft/Facebook/Linkedin/Twitter who can generally do a better job securing accounts than some random website). SSO is also a lot less hassle in the long term that 2FA/MFA for most users (major note: public use computers, but that's a tough problem to solve security wise, no matter what).

Better account security is, well, better, regardless of the bot/credential stuffing/etc problem.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#292
post #255

Earlier quoted context omitted.

My bank called as they had red flagged a suspicious charge on on my credit card. The sum was $0. The bank rep told me that this often flies under the radar and doesn't show up in some records and it indeed did not show up in my transaction history that i could see online in my banking details. But yeah the point was exactly the same. The fraudsters testing whether the charge goes through and the card is alive/valid.

Did you verify that it really was the bank calling and not a scammer? I get calls and texts from “credit card fraud departments”, “banks”, “service warranty departments”, “Amazon billing”, “Microsoft security”, “Social Security Administration”, “IRS”, and others frequently; 95% are scammers. The most amusing to me are the ones from “Microsoft” to alert me that they have detected malware on my computer.

Yes actually I think my bank sent me a message and asked me to call them. But either case it was all legitimate and my card was renewed.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#293
post #267

Earlier quoted context omitted.

>I'm fed up of being classed as a bot just because I browse with uMatrix, a Linux user agent, and a ton of ad filtering and anonymisation tech. Have you tried not using these things? Anonymity is exactly what bots want. They want to be able to post a spam message every single second and be impossible to ban since they are anonymous. The internet can't function if people are allowed to be anonymous.

With many of these big anti-bot services like Google ReCaptcha, it's not even specialized anonymity tools that can cause shadow banning, just unusual user-agents. All of these have independently caused me to get into endless ReCaptcha loops: firefox on android, smartphone with unusual screen resolution, clean browser profile with VPN. It's so common that I now default to using duckduckgo, which never blocks me. I dou…

> it's not even specialized anonymity tools that can cause shadow banning, just unusual user-agents.

"Unusual" = not Chrome and doesn't allow tracking scripts.

Switch to Safari with an ad blocker for a week, see how many more ReCaptcha prompts you get.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#294

Earlier quoted context omitted.

Wonder what fraction of that traffic is from p0wned IoT refrigerators, smoke detectors or WiFi enabled light bulbs… probably more than anybody cares to admit…

Also a lot of people who've been tricked into installing malware on their windows PCs, from shady "VPN" operators and other

They've not been tricked, really.

The majority of them want to do something completely benign like see a BBC show in the US, or watch an American football show in the UK, and the one defining feature of capitalism is its many contradictory faces.

One corporation wants to arbitrarily limit its customer base, and the other corporation wants to arbitrarily limit what data its customer base can see. In between the two is a space big enough to drive a Mack truck or a lorry through, depending on where you're from...

One might justify this until the one corporation merges with the other and then you have a situation where the same corporation wants to do two different things to the same pool of users.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#295
post #294

Earlier quoted context omitted.

Also a lot of people who've been tricked into installing malware on their windows PCs, from shady "VPN" operators and other

They've not been tricked, really. The majority of them want to do something completely benign like see a BBC show in the US, or watch an American football show in the UK, and the one defining feature of capitalism is its many contradictory faces. One corporation wants to arbitrarily limit its customer base, and the other corporation wants to arbitrarily limit what data its customer base can see. In between the two is…

When I say tricked, I mean they have no idea that unknown 3rd parties' grey market traffic is being run through their personal home internet connection. They believe they are just using a VPN to watch BBC.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#296
post #2

> I need to make a general remark to people who are evaluating (and/or) planning to introduce anti-bot software on their websites. Anti-bot software is nonsense. Its snake oil sold to people without technical knowledge for heavy bucks. If this guy got to experience how systemically bad the credential stuffing problem is, he'd probably take down the whole repository. None of these anti-bot providers give a shit about…

> None of these anti-bot providers give a shit about invading your privacy, tracking your every movements, or whatever other power fantasy that can be imagined.

There is vast amount of profit available in doing just that (see e.g. GOOG and FB market cap). Even companies that truly have no intention of exploiting data collected as a side-effect of whatever product line they do, nearly always eventually end up going for that profit line. Because passing up on more income merely due to moral considerations is too much of a temptation for a company to be able to resist in the long term.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#297
post #294

Earlier quoted context omitted.

They've not been tricked, really. The majority of them want to do something completely benign like see a BBC show in the US, or watch an American football show in the UK, and the one defining feature of capitalism is its many contradictory faces. One corporation wants to arbitrarily limit its customer base, and the other corporation wants to arbitrarily limit what data its customer base can see. In between the two is…

When I say tricked, I mean they have no idea that unknown 3rd parties' grey market traffic is being run through their personal home internet connection. They believe they are just using a VPN to watch BBC.

Yes, but my point is they've not been duped as much by the "free VPN" provider as much as they've been duped by the people who created the market for the "free VPN" provider.

I found out while sorting through business contributors to a non-profit once that a pretty big market for mobile relays is the "free VPN" offered on the app stores to high school kids looking to circumvent the outgoing blocks on the school's wifi.

In that case the school's administration could easily purge the "free VPN" of local users by removing the wifi restrictions. Instead, they serve more traffic to more nefarious places to maintain an illusion of control not for the kids in the school, but for themselves.

All of this is basically Dr. Strangelove but with spyware rather than nuclear bombs.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#298
post #284

Earlier quoted context omitted.

When these companies endeavor to stop abuse, they trample all over our freedoms. Suddenly we can't have non-browser user agents anymore. Suddenly we can't root our smartphones anymore. They want nothing to do with us unless it's 100% on their terms with us completely under their control.

There seems to be wildly different perspectives on "bad actors means we can't have nice things" -- one group says that this is a fact of life, and the other says that this is an affront to freedom. A non-tech example is I've had guys on Tinder get legit angry at me for insisting that our first few dates have to be in public places where we drive separate -- "oh so you think I'm some creepy stalker?" And like I am tot…

Agreed, I meant the original in a "this is why we can't have nice things" sense.

I generally appreciate registered API integrations, but the trouble is, for the most sites that are most problematic for benign automation, they usually don't have enough demand or revenue to justify well-maintained APIs.

I tend to think the solution is more to somehow make the market prefer more decentralized solutions, preferably federated. Not having one big target for bad actors means much less effort applied to attacking any one of the targets.

Dating might be a bit off topic, but I can see both sides as well. Women have genuine risks, and are very justified in taking precautions. But for the majority of decent guys, it can be tiresome to be constantly treated like you're an evil violent stalker. Maybe it needs a similar solution - a movement to local connections where people can have reputations that you can trust.

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#299
post #2

> I need to make a general remark to people who are evaluating (and/or) planning to introduce anti-bot software on their websites. Anti-bot software is nonsense. Its snake oil sold to people without technical knowledge for heavy bucks. If this guy got to experience how systemically bad the credential stuffing problem is, he'd probably take down the whole repository. None of these anti-bot providers give a shit about…

I wish they'd limit it to just stopping credential stuffing. Here's my scenario: My electricity provider publishes the month's electricity rates on the first of the month, I want to scrape these so that I can update the prices in Home Assistant. This is a very simple task, and it's something that Home Assistant can do with a little configuration. Unfortunately this worked exactly once, after that it started serving u…

Check if your electricity provider offers Green Button Download. https://www.energy.gov/data/green-button

Re: Avoiding bot detection: How to scrape the web without getting blocked?

#300

I am always amazed when otherwise intelligent people assert without data that the marginal cost of serving web traffic to scrapers/bots is zero. It is kind of like people who say "Why don't they put more fuel in the rocket so it can get all the way into orbit with just one stage?" It sounds great but it is a completely ignorant thing to say.

What could my scraper which makes 1 HTTP request per day possibly cost the webmaster?

Nothing of course. But follow that string a little further.

So you do some thing which once a day scrapes a site and pulls off some data that you use in your thing. Maybe you talk about it to friends, or you have this thing as one of your github repositories. Some of your friends download the repository and also start using your thing. They talk to people about how cool your thing is, or what it does and the nice convenience of automating something that you used to have to do manually.

There are 86,400 seconds in a 24 hour period, probably folks won't change your code at all at first, and as it diffuses into the community some webmaster starts seeing this weird spike of queries that happen once a day at some time. Different addresses but always the same kind of request.

It's not a problem when its like 10 or 20 qps burst but when it starts getting up to 100 - 200 or worse 1000 - 2000, it causes the system to perhaps spin up additional instances that it isn't going to need after the burst and waste money. So the webmaster starts denying those requests with a 404.

Now sometimes your code works and sometimes it doesn't but you don't know that the webmaster is fighting you yet. Maybe eventually you start randomly varying the request time, or the people who have copied your thing are in more varied time zones so you it starts getting spread over the day.

now the webmaster is seeing bursts of traffic nearly every hour on the hour and that is weird so a more aggressive mitigation strategy is enacted.

People using your thing complain that it keeps breaking so you look into it and realize that the site is trying to block your requests. Perhaps you don't understand why this is, or perhaps you do and don't care, either way you come up with some strategies that avoid the block (maybe your rotate the user-agent or something).

Now the query traffic is spiking again and the webmaster is getting complaints that this 'bot traffic' is resulting in useless AWS fees because it isn't part of the revenue traffic and it is forcing the service to add more resources for their customers.

Not all scrapers are malicious, but my experience is that it is rare that a non-malicious scraper application isn't talked about and shared (amongst people who have a similar itch that the thing is scratching) and because its all open source it spreads around.

Post reply on HN