I've accepted an answer, but sadly, I believe we're stuck with our original worst case scenario: CAPTCHA everyone on purchase attempts of the crap. Short explanation: caching / web farms make it impossible to track hits, and any workaround (sending a non-cached web-beacon, writing to a unified table, etc.) slows the site down worse than the bots would. There is likely some pricey hardware from Cisco or the like that can help at a high level, but it's hard to justify the cost if CAPTCHA-ing everyone is an alternative. I'll attempt a more full explanation later, as well as cleaning this up for future searchers (though others are welcome to try, as it's community wiki).

情况

这是关于woot.com上的垃圾销售。我是Woot Workshop的总统,Woot Workshop是Woot的子公司,负责设计,撰写产品描述,播客,博客文章,并主持论坛。我使用CSS/HTML,对其他技术几乎不熟悉。我与开发人员密切合作,在这里讨论了所有的答案(以及我们的许多其他想法)。

可用性是我工作的重要组成部分,而让网站变得令人兴奋和有趣则是剩下的大部分工作。这就是下面三个目标的来源。验证码损害了可用性,机器人从我们的垃圾销售中偷走了乐趣和兴奋。

机器人一秒钟就会在我们的首页上猛击数十次屏幕抓取(和/或扫描我们的RSS),以寻找随机垃圾销售。他们一看到这个,就会触发程序的第二阶段登录,点击“我要一个”,填好表格,然后买下这些垃圾。

评价

lc:在stackoverflow和其他使用此方法的站点上,他们几乎总是处理已验证(登录)的用户,因为正在尝试的任务需要这样。

在Woot上,匿名(未登录)用户可以查看我们的主页。换句话说,撞击机器人可以不经过身份验证(除了IP地址之外基本上无法跟踪)。

所以我们又回到了扫描IP, a)在这个云网络和垃圾邮件僵尸的时代是相当无用的,b)考虑到来自一个IP地址的业务数量,捕获了太多无辜的人(更不用说非静态IP isp的问题和试图跟踪它的潜在性能影响)。

还有,让别人给我们打电话是最糟糕的情况。我们能让他们给你打电话吗?

布拉德克:内德·巴切德的方法看起来很酷,但它们是专门设计来击败为网络站点构建的机器人的。我们的问题是机器人是专门用来破坏我们网站的。其中一些方法可能只在很短的时间内有效,直到脚本编写人员将他们的机器人进化为忽略蜜罐,从屏幕上抓取附近的标签名称而不是表单id,并使用支持javascript的浏览器控件。

 

lc再次说道:“当然,除非炒作是你们营销计划的一部分。”是的,绝对是。当物品出现时的惊喜,以及当你设法得到一件物品时的兴奋,可能比你实际得到的垃圾一样重要,甚至更重要。任何消除先到/先得的东西都不利于“赢”的快感。

 

novatrust:就我个人而言,欢迎我们新的机器人霸主。我们实际上提供RSSfeeds,允许第三方应用程序扫描我们的网站的产品信息,但不是在主站HTML之前。如果我的理解正确的话,你的解决方案通过完全牺牲目标1来帮助目标2(性能问题),并放弃机器人将购买大部分垃圾的事实。我给你的回答投了赞成票,因为你最后一段的悲观情绪对我来说是准确的。这里似乎没有什么灵丹妙药。

其余的响应通常依赖于IP跟踪,这似乎是无用的(僵尸网络/僵尸/云网络)和有害的(捕获许多来自相同IP目的地的无辜的人)。

还有其他方法/想法吗?我的开发人员一直在说“让我们只做验证码”,但我希望有更少的侵入性方法,让所有真正想要我们的垃圾的人。

最初的问题

假设你卖的东西很便宜,但有很高的感知价值,而你的数量非常有限。没有人确切地知道你什么时候会卖这个东西。超过一百万人经常来看你卖什么。

你最终会发现脚本和机器人试图通过编程方式[a]找出你何时出售该道具,[b]确保他们是第一批购买该道具的人。这很糟糕,有两个原因:

你的网站被非人类攻击,拖慢了所有人的速度。 编剧最终“赢得”了产品,让常客感到被骗了。

一个看似显而易见的解决方案是为用户在下单前设置一些障碍,但这至少有三个问题:

The user experience sucks for humans, as they have to decipher CAPTCHA, pick out the cat, or solve a math problem. If the perceived benefit is high enough, and the crowd large enough, some group will find their way around any tweak, leading to an arms race. (This is especially true the simpler the tweak is; hidden 'comments' form, re-arranging the form elements, mis-labeling them, hidden 'gotcha' text all will work once and then need to be changed to fight targeting this specific form.) Even if the scripters can't 'solve' your tweak it doesn't prevent them from slamming your front page, and then sounding an alarm for the scripter to fill out the order, manually. Given they get the advantage from solving [a], they will likely still win [b] since they'll be the first humans reaching the order page. Additionally, 1. still happens, causing server errors and a decreased performance for everyone.

另一种解决方案是经常监视ip攻击,阻止它们进入防火墙,或以其他方式阻止它们排序。这个可以解2。和阻止[b],但扫描ip对性能的影响是巨大的,可能会导致更多像1这样的问题。比编剧自己造成的还要严重。此外,云网络和垃圾邮件僵尸的可能性使得IP检查相当无用。

第三个想法,强迫订单表单加载一段时间(比如半秒),可能会减慢快速订单的进度,但同样,脚本编写人员仍然是第一个进入的人,在任何速度下都不会对实际用户造成损害。

目标

将道具卖给非脚本人。 保持网站运行的速度不被机器人减慢。 不要让“正常”用户完成任何任务来证明他们是人类。


当前回答

大多数纯技术解决方案已经提供。因此,我将提出这个问题的另一种看法。

据我所知,这些机器人是由真正想买你卖的包的人设置的。问题是——

其他不操作机器人的人应该有购买的机会,而你提供的是有限数量的包。 你想要吸引人们到你的网站,而只是销售包包。

你可以让潜在的包包买家订阅电子邮件,甚至短信更新,以便在交易发生时收到通知,而不是试图避开机器人。你甚至可以给他们一到两分钟的时间(一个销售开始的特殊URL,随机生成,并随邮件/短信发送)。

当这些买家去购买他们在你的网站上,你可以向他们展示你想要的任何东西。那些运行机器人将更喜欢简单地注册到您的通知服务。

机器人运行者可能仍然会在你的通知中运行机器人以更快地完成购买。一些解决方案可以提供一键购买。

顺便说一下,你提到你的用户不是注册的,但听起来那些购买这些包的人不是随机的买家,而是期待这些销售的人。因此,他们可能愿意注册,以便在试图“赢得”一个包时获得优势。

从本质上讲,我的建议是试着把这个问题看作一个社会问题,而不是一个技术问题。

Asaf

其他回答

好吧,所以垃圾邮件发送者在和普通人竞争赢得“垃圾沼泽”拍卖?为什么不让下一次拍卖变成一堆垃圾呢?垃圾邮件发送者可以花大钱买一袋狗屎,我们都嘲笑他们。

我的解决方案是市场变革和技术变革的结合。

目前,销售垃圾促销袋部分的技术方面被处理为正常的woot销售。促销开始了,人们争相购买,所有的商品都卖光了。用于日常销售的相同统计图表都是用过的垃圾销售。

这里涉及到几个市场目标:

Get customers to visit the site once every day (impluse purchasing). The possiblility of a seeing a bag of crap sale is the reason/reward. Network/viral/gossipy effect where a customer sees a bag of crap sale is on they will IM/EMail/Telephone their friends. There is also what I'd call general "good will". Woot is a really cool place because it occasionally rewards its customers with amazing sales (bag of crap that included a flat panel tv)... AND its done in a fair "first comes first served" manner.

前两个似乎是最重要的。纯粹的访客数量会影响正常交易的销售速度(或销售一空)。传统上,新客户主要是通过口口相传来吸引的,让客户把自己的朋友推荐到woot.com是一种胜利。

所以…我的解决方案是将促销活动的递送方式改为更多的抽奖方式。

偶尔用户可以做一些有趣的事情,看看他们是否有资格得到一袋垃圾。有趣的内容可以是类似“punch The monkey”或Orbitz迷你看球游戏、棒球或曲棍球的愚蠢flash游戏。这里的目标是机器人无法编写脚本的游戏,因此需要相当谨慎。我们的目标也不仅仅是给游戏赢家一袋垃圾……但对所有游戏玩家来说。

The technical core of the game is that at the end of the game a request is made to a server that does an "instant lottery" to determine if the user has won a bag of crap sale opportunity. The server request will need to include something calculated by the game itself (roughly speaking "hash cash"... a complex, CPU cycle consuming, calculation, and hopefully one that is difficult to reproduce). This is to prevent a bot from repeatedly entering the lottery just be querying the lottery server/service.

游戏本身也会随着时间而改变。你可以为万圣节、圣诞节、情人节、复活节等制作特殊事件游戏。还有许多有趣的营销理念可以与woot的“wooiness”相匹配。

If the user wins they can purchase N bags of crap (in a time limited window)... but they can also send N friends a time limited invitation to purchase a bag of crap (good for 24 hours). This provides a super strong network effect... customers will definately tell their friends. Or you could also do it as "buy 1 give 1"... let customers buy up to a total of N but force every second one to be shipped to a friend. The key here is to make the network/gossip effect an full fledged part... help the customer tell the world about the wonderfulness of woot.

促销材料周围袋垃圾销售概念也将需要修改。一袋垃圾多快卖完的图表已经无关紧要了。比如每个月人们有多少次机会购买。有多少人告诉他们的朋友。材料应该微妙地强调这一点,每天去拜访是一个好主意。

你也可以宣传为什么一袋垃圾的销售正在改变。尤其是你免费雇佣了最烂的顾问。

不管纳粹认为他们的通信有多安全,盟军经常会破坏他们的信息。无论你如何试图阻止机器人使用你的网站,机器人所有者都会想出一个方法来解决它。如果这让你成为纳粹,我很抱歉:-)

我认为需要一种不同的心态

不要试图阻止机器人使用你的网站 不去寻求立即见效的解决办法,打持久战

要有这样一种心态:不管你网站的客户是真人还是机器人,他们都只是付费客户;但其中一个比另一个有不公平的优势。一些没有太多社交生活的用户(隐士)可能会像机器人一样让你的网站的其他用户讨厌。

记录您发布报价的时间和帐户选择购买的时间。

这可以让你记录下速度 客户在买东西。

改变你发布优惠的时间。

例如,设置3小时的窗口 从某个不知名的时间开始 天(午夜?)只有机器人和隐士 会不断刷新一个页面3 好几个小时才拿到订单 秒。不要改变基准时间, 只有窗户的大小。

随着时间的推移,一幅图景就会浮现出来。

01:你可以看到哪些账户经常在产品上线后几秒钟内购买产品。这表明他们可能是机器人。

02:你也可以看看促销的时间窗口,如果窗口是1小时,那么一些早期买家将是人类。然而,人类很少会在4小时内恢复精神。如果发布/购买之间的运行时间相当一致,而不考虑窗口持续时间,那么这就是一个bot。如果发布/购买时间对于小窗口很短,而对于大窗口很长,那就是隐士!

现在不是阻止机器人使用你的网站,你有足够的信息告诉你哪些账户肯定被机器人使用,哪些账户可能被隐士使用。你如何处理这些信息取决于你,但你当然可以用它来让你的网站对有生活的人更公平。

我认为禁止机器人账户是毫无意义的,这就像打电话给希特勒说“谢谢你的u艇的位置!”你需要以一种账户所有者不会意识到的方式使用这些信息。让我们看看我是否能想出什么.....

在队列中处理订单:

当客户下订单时,他们会立即收到一封确认电子邮件,告诉他们他们的订单已被放入队列中,并将在处理完毕时收到通知。我在亚马逊上的订单/发货就经历过这种事情,这一点也不困扰我,我不介意几天后收到一封电子邮件,告诉我我的订单已经发货了,只要我立即收到一封电子邮件,告诉我亚马逊知道我想要这本书。在你的情况下,这将是一封电子邮件

您的订单已经下单,正在排队。 您的订单已经处理完毕。 您的订单已发出。

用户认为他们排在一个公平的队列中。每1小时处理一次队列,让普通用户也经历一次队列,以免引起怀疑。只有在机器人和隐士账户排队超过“人类平均下单时间+ x小时”后,才会处理他们的订单。有效地减少机器人对人类的影响。

我将要描述的方法有两个要求。1) Javascript被强制执行2)一个具有有效http://msdn.microsoft.com/en-us/library/bb894287.aspx浏览器会话的web浏览器。

如果没有其中任何一个,你就是“故意”倒霉的。互联网被设计成允许匿名客户查看内容。简单的HTML没有办法解决这个问题。哦,我只是想说,简单的,基于图像的验证码很容易被击败,甚至作者也承认这一点。

Moving along to the problem and the solution. The problem is in two parts. The first is that you cannot block out an individual for "doing bad things". To fix this you setup a method that takes in the browsers valid session and generate a md5sum + salt + hash (of your own private device) and send it back to the browser. The browser then is REQUIRED to return that hashed key back during every post / get. If you do not ever get a valid browser session, then you reply back with "Please use a valid web browser blah blah blah". All popular browsers have valid browser session id's.

现在我们至少有了该浏览器会话的标识(我知道它不会永久锁定,但是通过简单的脚本很难“更新”一个浏览器会话),我们可以有效地锁定一个会话(例如;让脚本编写人员很难访问你的网站,而不会对有效用户造成任何惩罚)。

Now this next part is why it requires javascript. On the client you build a simple hash for each character that comes from the keyboard versus the value of the text in the textarea. That valid key comes over to the server as a simple hash and has to be validated. While this method could easily be reverse engineered, it does make it one extra hoop that individuals have to go through before they can submit data. Mind you this only prevents auto posting of data, not DOS with constant visits to the web site. If you even have access to ajax there is a way to send a salt and hash key across the wire and use javascript with it to build the onkeypress characters "valid token" that gets sent across the wire. Yes like I said it could easily be reversed engineered, but you see where I am going with this hopefully.

现在为了防止不断的交通滥用。有几种方法可以在给定有效的会话id后建立模式。这些模式(即使使用Random来抵消请求时间)的epsilon比人类试图重现相同的误差范围时要低。由于您有一个会话ID,并且您有一个“看起来像一个bot”的模式,那么您可以用一个简单的轻量级响应屏蔽该会话,该响应是20字节而不是200000字节。

You see here, the goal is to 1) make the anonymous non-anonymous (even if it's only per session) and 2) develop a method to identify bots vs. normal people by establishing patterns in the way they use your system. You can't say that the latter is impossible, because I have done it before. While, my implementations were for tracking video game bots I would seem to think that those algorithms for identifying a bot vs. a user can be generalized to the form of web site visits. If you reduce the traffic that the bots consume you reduce the load on your system. Mind you this still does not prevent DOS attacks, but it does reduce the amount of strain a bot produces on the system.

目标的一个可能的解决方案,不一定是问题的标题:

Instead of serving up the special deal to everyone, serve it to random sets of ip addresses at a time. For instance, partition the IP space into 256 unique blocks, and at time=0, only allow people with ip addresses in the first block, and at time=5 seconds, allow people from the first block and the second block... until the last time slot arrives, and allow everyone to see the deal. One idea to randomize it would be to take the least significant bits of the md5/sha of their IP plus some salt based on the deal.

这将允许脚本编写人员拥有接近于零的响应时间,以及拥有多个ip地址的优势,但这将意味着给定的机器人与其他因ip地址而比他们“幸运”的客户相比没有任何优势。

将这一点与其他一些想法结合起来似乎是个好主意。