最新资讯
dev.to 部署 Underdog Bark 3.0 Pro:逐字转写、自定义后端与分块设置 dev.to 为艰难对话构建 AI:五个 Agent、一条安全正则与一位盲评监督者 techcrunch.com Palo Alto Networks 洽谈以 5 亿美元收购 AI Agent 安全初创公司 Clutch theinformation.com 黄仁勋被要求就涉华间谍指控向国会作简报 www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离 wechat 这波杀疯了!旗舰级模型不限量、1个月视频额度免费领 bloomberg.com AI 抛售蔓延至信用市场,软银领跌亚洲美元债 dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露 dev.to 你的 Agent Harness 应具备的 17 项能力 dev.to 离线 AI 记忆中 0.8 余弦阈值为何失效 dev.to Kimi K3.1 Pro 开放权重:自托管 2.8T 模型前的开发者清单
多元动态
登录 注册
智能体 dev.to · @roadleon

某爬虫自称 ClaudeBot,七天内二十次索要 .env 文件

原文 我的收藏

作者统计其站点截至 9 月 18 日的七天访问日志,发现一个自称 ClaudeBot 的请求方二十次尝试获取 /.env 文件,该路径实际返回 404。作者指出 .env 存放数据库密码、API 密钥和云凭证,正常训练爬虫没有理由请求它,这类请求更像是在探测站点是否暴露密钥。日志面板还显示 Bytespider、ChatGPT-User、meta-externalagent、PerplexityBot 等爬虫访问了首页、标签页和文档页。

AI推荐理由 作者以自己站点七天访问日志为证据,列出伪装成 ClaudeBot 的请求二十次索要 /.env 文件,并给出各路径与爬虫的对应关系;这是关于 AI 爬虫探测敏感文件的具体观察,对运维与安全有参考价值。但仅为单一站点、单一时段的个人观测,无法确认请求方真实身份,也不能据此推断 ClaudeBot 或任何厂商的行为,结论需保留不确定性。

62

正文

In the last seven days, something asked this site for its .env file twenty times. It said it was ClaudeBot. An .env file is where a web application keeps its secrets: database passwords, API keys, cloud credentials. It is not meant to be reachable over HTTP at all. On this site it is not: the path returns a 404, as it should. No training crawler wants that file. There is nothing in it to train on. A crawler that asks for it is not reading your site; it is checking whether you left your keys in the door. What the list actually looked like This is the panel that shows which pages AI crawlers read, for the seven days ending September 18. I have left it in the order the dashboard shows it. Path (requests) Top crawler / (27) Bytespider /.env (20) ClaudeBot /tag/news/ (12) Bytespider /pickup-info/mypal-wifi/ (9) ChatGPT-User /tag/ココナッツ/ (7) meta-externalagent /tag/フィリピンイーグル/ (7) meta-externalagent /read-document (6) PerplexityBot Most of that is a small Japanese site being read the way you would expect: the front page, a few tag pages, an article about pocket wifi. Two rows are not like the others. Neither /.env nor /read-document exists here. Both return 404. My own instrument could not tell me The obvious question is whether those twenty requests really came from Anthropic. My dashboard has a Verified column for exactly this, and over those seven days ClaudeBot came out at 68% verified — meaning about a third of its requests could not be confirmed as Anthropic. Which does not answer the question. The column reports a percentage per crawler, not per path. I cannot ask it whether the /.env requests were among the verified ones or the unverified ones. That is the same defect I described two weeks ago and have still not fixed. 68% Share of ClaudeBot requests confirmed as coming from Anthropic that week. Which tells you nothing about the twenty that asked for the .env file. Per-path verification is the thing my dashboard is missing. I did not have to guess On August 31, the security firm GreyNoise published what it had been watching. Between July 28 and August 23 it counted 824 addresses running scans that forged AI crawler names — six crawler names belonging to four AI companies, with two Amazon crawler names appearing in greater volume still. What they asked for: /.env, /.env.production, /.env.bak, /.aws/credentials. The detail that stopped me is not the volume. It is the tell they found. 0 Requests for robots.txt in that entire scanning campaign. The real ClaudeBot asks for robots.txt more than anything else — it is 12% of its traffic. The impostors never asked once. That is a beautifully simple signature. A crawler that respects your site checks the rules first; it is the most boring thing it does, and it does it constantly. Something that wants your credentials has no reason to look at a file telling it where it may not go. Why the crawler name was the target These names were not chosen at random. Site owners have spent the past two years being told to add AI crawlers to their allowlists — to let GPTBot and ClaudeBot and PerplexityBot through so their content gets read, or to block them deliberately if they would rather not be. Either way, the name became a thing that firewalls and plugins make decisions about. A user agent is a header the client writes about itself. It is a claim, not an identity. I demonstrated this on my own site two weeks ago by asking it for a page while calling myself ClaudeBot, and watching my dashboard record the visit as ClaudeBot. That took one line of curl. The scanners are doing the same thing, at scale, against the specific names that people have been trained to wave through. An allowlist keyed on a name that anybody can type is not a control. It is a convention being mistaken for one. What to actually do Do not serve secrets over HTTP, ever. This is the one that matters. If .env is unreachable, the scan is a wasted 404 and nothing else. Everything below is secondary to this. Check addresses, not names. OpenAI, Anthropic, Perplexity, Common Crawl and Google all publish IP ranges or reverse-DNS schemes now. If a request claims a vendor that publishes one and does not match it, the name is worth nothing. Watch for what is missing. A client that never fetches robots.txt but does fetch config paths is not a crawler, whatever it calls itself. That signature costs nothing to look for. Treat crawler traffic as traffic. The habit of filing "AI crawler" away as a separate, benign category is precisely what this campaign is built to exploit. What this instrument cannot see Verification is per crawler, not per path. The central question of this article — were those twenty requests Anthropic or not — is one my own dashboard cannot answer. I am reporting the limit rather than writing around it. One site, seven days. Twenty requests is a tiny sample. It is consistent with a campaign that GreyNoise measured at 824 addresses; it does not independently prove anything. I have not attributed anything. I do not know who sent these, and nothing here should be read as a claim about Anthropic, whose name was used without its involvement. Cached pages are invisible. When a page cache answers, PHP never runs and nothing is recorded. Every count here is a lower bound. How to measure your own site The instrument is a WordPress plugin called AILYS Lens, and it is free. I build it, which you should factor in. Every calculation runs on your own server, nothing is transmitted anywhere, and human visitors are never recorded. The page list described here is on the main dashboard. If a path you have never heard of appears on it, that is worth ten seconds of your attention. A note on AILYS Doctor AILYS Lens is free permanently. That is a design commitment rather than a pricing stage — every feature runs locally on your server, so there is nothing for a paid tier to unlock. The diagnostic service alongside it, AILYS Doctor, is a different thing. Lens tells you what happened; Doctor tells you why, and what to change. It is free to use during its data-collection period, and any future pricing will be announced on the site. See a sample diagnosis · AILYS Doctor Illustration generated with AI and selected by the author.

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容