TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

It is possible to detect and block Chrome headless

153 pointsby avastelover 7 years ago

18 comments

eastendguyover 7 years ago
The listed techniques not only detect Chrome headless, but all custom browsers built on CEF (Chromium Embedded Framework) <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;chromiumembedded&#x2F;cef" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;chromiumembedded&#x2F;cef</a>, such as Kantu from <a href="https:&#x2F;&#x2F;a9t9.com" rel="nofollow">https:&#x2F;&#x2F;a9t9.com</a><p>If your goal is to only allow the original Google Chrome browser, that is fine. Otherwise this might cause false alarms.
评论 #16183414 未加载
kondroover 7 years ago
And it’s possible to pretend not to be Chrome headless too.<p><a href="https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;making-chrome-headless-undetectable&#x2F;" rel="nofollow">https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;making-chrome-headless-undetectable&#x2F;</a>
评论 #16176433 未加载
DanielBMarkhamover 7 years ago
I read these things and I think &quot;So much wasted energy and effort&quot;<p>In the beginning was the web, and it was good. Content came along. Some was good, some was cats. Then paid sites with sign-up. Then search engines. Then ads.<p>Pretty soon folks thought &quot;I not only own this content, I own how it will be presented to the end user. If I choose to add in cats, or Flash ads, or whatnot? They&#x27;re stuck consuming it. I own everything about the content from the server to the mind of the person consuming it, the entire pipe.&quot;<p>Many people did not like this idea. Ads were malicious, they installed malware. The practice of using ads on content caused sites to track users like lab rats. Armies of people majoring in psychology were hired to try to make the rats do more of what we wanted them to do.<p>Ad blockers were born. Then anti-ad-blockers. Then headless browsers. Now anti-headeless browsers.<p>It&#x27;s just a huge waste of time and energy. The model is broken, and no amount of secret hacker ninja shit is going to make it work. You want to know where we&#x27;ll end up? We&#x27;ll end up with multiple VMs, each with a statistically common setup, each consuming content on the web looking just like a human doing it. (We&#x27;ll be able to do that by tracking actual humans as they consume content). But nobody will be looking at those VMs. Instead, those invisible screens will be read by image recognition software which will then condense what&#x27;s on there and send the results back to whoever wants it.<p>Content providers will never win at this. Nor should they. Instead, we&#x27;re just going to sink billions into a busted-ass business model over the next couple of decades throwing good money after bad.<p>&lt;&#x2F;rant&gt;
评论 #16176635 未加载
评论 #16177280 未加载
评论 #16176669 未加载
评论 #16183685 未加载
评论 #16179078 未加载
评论 #16176824 未加载
评论 #16178411 未加载
评论 #16176918 未加载
评论 #16177406 未加载
pbhjpbhjover 7 years ago
You probably want the web equivalent of malicious compliance - an algorithmically generated web-hole or similar. That way the bot author isn&#x27;t entirely sure you&#x27;re on to them; it could be a bot or server error. Like send the right headers but garbage data that looks like it&#x27;s compressed but isn&#x27;t, or doubly compressed garbage, or trim pages at a different place (before anything interesting), or slow data transfers, or ...
评论 #16178715 未加载
评论 #16177081 未加载
beagerover 7 years ago
All web automation and automation prevention is a cat and mouse game where you never stop the scrapers, you just create more effort for them. It’s like traditional and digital security in that regard, except that security often has an element of difficulty in overcoming it (cryptography, thickness of physical barriers), whereas stopping web scraping is about adding more trivial things to make the process more complicated.<p>Eventually, human browsing and headless browsing converge. Nobody wants to make the human browsing experience bad, so the headless browsing continues.<p>In my opinion, if you’re running a site that is existentially threatened by someone else having your content, you need something else for your moat.
评论 #16177607 未加载
userbinatorover 7 years ago
This feels a bit like the &quot;VMs aren&#x27;t quite like real machines&quot; problem --- as in, it&#x27;s a cat-and-mouse game that will probably continue indefinitely.<p>Personally, as someone who regularly uses several different browsers and experiments with others, I wish the Web was far more browser-neutral.
评论 #16176609 未加载
devitover 7 years ago
The whole point of using an headless browser is to work around web sites that attempt to block simple &quot;curl&quot; style scraping (or where you need to execute JavaScript to scrape).<p>So making it detectable (intentionally, even, right there in the user agent!) is really absurd.<p>Or actually, it makes one wonder about Google&#x27;s motives.
评论 #16176981 未加载
评论 #16177351 未加载
评论 #16181645 未加载
saas_co_deover 7 years ago
so, now I can run a script to fix all of these things so that headless can&#x27;t be detected by any of these methods? thanks.
lossoloover 7 years ago
Is there a way to enable Chrome PDF Viewer&#x2F;Widevine Content Decryption Module etc in headless chromium? Is there some switch in chromium code base that would enable that?
pathdongleover 7 years ago
To every action there is always opposed an equal reaction... <a href="https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;making-chrome-headless-undetectable&#x2F;" rel="nofollow">https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;making-chrome-headless-undetectable&#x2F;</a>
rundigen12over 7 years ago
Re. blocking scrapers: Some of us are neither vast corporate espionage practicioners nor zombie-botnet users: we&#x27;re on our own, scraping for data science &amp; other academic research purposes.<p>Is there some way to declare, &quot;I am a legitimate academic user&quot;, something akin to &#x27;TSA Pre&#x27; status?<p>&quot;Sure, register for &amp; use the site&#x27;s API,&quot; you&#x27;ll say. What if they don&#x27;t have one?<p>&quot;Sure, just don&#x27;t slam the server with too many requests in a short time,&quot; you&#x27;ll say. But if they&#x27;re rejecting you just because they detect you&#x27;re headless, etc...?
评论 #16178264 未加载
lovelearningover 7 years ago
What&#x27;s the reason for blocking a headless browser?
评论 #16177085 未加载
评论 #16176985 未加载
评论 #16176386 未加载
评论 #16176384 未加载
callumprenticeover 7 years ago
For what it&#x27;s worth, Dullahan, my headless SDK on top of Chromium Embedded Framework appears exactly the same as desktop Chrome:<p>Overview: <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;lindenlab&#x2F;dullahan&#x2F;overview" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;lindenlab&#x2F;dullahan&#x2F;overview</a><p>Examples: <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;lindenlab&#x2F;dullahan&#x2F;src&#x2F;default&#x2F;examples&#x2F;?at=default" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;lindenlab&#x2F;dullahan&#x2F;src&#x2F;default&#x2F;example...</a><p>Not suggesting it&#x27;s better or worse - just an alternative if you need something that appears to be like a desktop browser.
walshemjover 7 years ago
Id be careful using this as google crawls (well specifically it indexes) using headless chrome you could block googlebot when you don&#x27;t want to.
j_sover 7 years ago
This discussion is also happening on a counterpoint posted about 9 hours later, also currently on the front page:<p>It is not possible to detect and block Chrome headless | <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16179181" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16179181</a>
yoz-yover 7 years ago
The original article does not mention blocking it, just the detection.
评论 #16176332 未加载
评论 #16177307 未加载
jacheeover 7 years ago
Worth noting, I believe: the word &quot;block&quot; doesn&#x27;t appear in the article, and seems to have been editorialized in the poster&#x27;s title.
nurettinover 7 years ago
So headless now knows it is headless. Then what?
评论 #16176416 未加载
评论 #16177468 未加载