changed git call from https to git readonly
[atutor.git] / mods / wiki / doc / LinkSpammers
1
2 link spammers
3 -------------
4
5 Link spammers target Blogs/Boards/Forums and Wikis in particular to
6 publicate hyperlinks to their sites. Those links aren't intended for
7 humans, but placed there purely to push search engine rankings.
8
9 This is not a new trend, but an ongoing annoyance. Luckily ewiki
10 provides you with a small aresenal of useful counterfight plugins
11 and methods. There is a new plugin category ".../spam/" set up
12 exactly for this; the most useful plugins are however sprinkled
13 around - that's why this README tries to guide you.
14
15
16 what to do first
17 ----------------
18
19 If you get spammed, you should first lock that particular page
20 against writing for a while - if only one is target of a massive
21 attack.
22
23
24 denying them success
25 --------------------
26
27 Chances are, you got targeted by a link spammer because your pages
28 are too open for indexing. Go on and prove check, that your site
29 layout script loads following include() fragments:
30
31   <html>
32    ...
33    <?php
34       include(".../ewiki/fragments/head/core.php");
35       include(".../ewiki/fragments/head/meta.php");
36    ?>
37    ...
38   </head>
39
40 The first prevents (old) ?version= pages from getting indexed by
41 search engines, and new revisions cannot be indexed in the first twelve
42 hours. If you ensure that, then spamming your site gets uninteresting
43 for the pundits. It is unlikely that any search engine bot would index
44 the spamlinks before you remove them.
45
46 The only problem here is, that most of the link spammers are only
47 semi-professionals and some won't notice this measure immediately or
48 at all. Nevertheless this is the most important step! Don't forget
49 that bringing crap onto your Wiki is only a time-consuming requirement
50 for spammers, what they are really targetting is Google & Co. and so
51 denying them success there has top priority.
52 Getting rid and preventing further spam is always only step two.
53
54                                       (This attitude makes link spammers
55                                       as angry, as their spam makes us.)
56
57
58 mass link spamming (so called "WikiSpam")
59 ------------------
60
61 Spammers need to spam a lot, else it gets financially uninteresting.
62 We simply call this "brute force" spamming from here.
63
64 So most attacks against Wikis involve throwing a few dozens or even
65 hundreds (!!) of links onto a single page. This activity is easy to
66 track, and so if you see this kind of attack, all you have to do is
67 loading the according plugin:
68
69   include(".../ewiki/plugins/edit/limitlinks.php");
70
71 This will reject any page edits with more than 5 new URLs, which
72 makes your Wiki a useless target for most spammers (those that operate
73 manually would get quickly annoyed here). Easy, Easy, Easy. Solves the
74 problem for most of us.
75
76 If you run a link directory with your Wiki, this plugin will soon show
77 its drawbacks - but you could then specifically disable it for some
78 pages.
79
80
81 single comment link spammers
82 ----------------------------
83
84 Many attacks against Wikis are side-effects and were originally meant
85 for spamming blogs and boards. You can tell apart this sort of attack
86 because of
87  - HTML or "BBcode" around the posted URL
88  - it's just a single link
89  - all previous content of the page is gone
90  - many many page revisions are created
91
92 If this happens, then you are definetely attacked with a script. First
93 lock that particular page, after finding out the attackers entry point
94 (the edit/ page was typically bookmarked somewhere).
95
96 You won't be able to stop this form of attack with simple IP-blacklist
97 methods, because the spammer operates with trojan-governed zombie
98 machines from many different locations. Our advantage is, that we can
99 easily tell it apart because of the edit/POST frequency.
100
101 And also as easily we can get rid of bots, which do not specifically
102 target our Wiki software. Even simple captches (like the ProtectedEMail
103 checkbox) will normally do.
104
105  - plugins/spam/antibot_checkbox.php
106  - plugins/spam/antibot_captcha.php
107
108 Typically attacks start from bookmarked pages with some sort of VBscript
109 (this topic is not fully researched) running from zombie machines. So
110 there is little interaction, which makes the simple captchas successful.
111
112 Moreover those bots are pretty dumb and don't behave like humans. You
113 can detect and blqock them as well by simply looking at how much time
114 is between retrieving the edit page and hitting submit/save. There is
115 a plugin which does exactly that, and blocks if the timespan is below
116 five seconds:
117
118  - plugins/spam/antibot_captcha.php
119
120 (Time is money for link spammers, they cannot even afford slowing their
121 scripts by even those 5 seconds.)
122
123 If only few pages are targeted, you can also disable most of the protection
124 mechanisms selectively. There are a few "trigger" and "anti-trigger"
125 plugins, which specifically enable or disable the rest of our anti-spam
126 extensions.
127
128
129 blocking URLs
130 -------------
131
132 There are also two plugins for blocking URL patterns. Look out for
133 "edit/spam_block" and "edit/spam_deface". For both of which you can
134 mantain patterns (on Wiki pages).
135
136 With "lib/spamblock_whois" you can even go so far and lock against
137 domain registrants or hosters, which will block most future spamming
138 attempts of a person, once you find out.
139
140 The "zero_pagerank" scripts and code is used to implement an
141 intermediate page, which again cripples page rank bonus of linked
142 pages. (Though this is less senseful now with the rise of hyperlink
143 flags as rel="NOFOLLOW"; read on...)
144
145 There are many shared URL black- and blocklists, but we haven't yet
146 prepared a cron script to syndicate or even exchange it. But this is
147 definitely an option and worth considering. You can find a few big
148 blacklist with search engines. Projects like WardsWiki, WikiPedia,
149 MeatBall, CommunityWiki, but also GeekLog, WordPress, PhpNuke and
150 other portal/CMS-ware maintain some.
151
152
153 NOFOLLOW
154 --------
155
156 Google and their page rank idea caused us all that trouble. They later
157 however decided to do something against link spamming, because they
158 itself suffered from a watered search database. It is possible to add
159 an  rel="NOFOLLOW"  to every  <a>  hyperlink tag. (IMHO it would be
160 more honest to call it "NOPAGERANK", but hey, better than nothing.)
161
162 Use ".../ewiki/plugins/linking/a_nofollow.php" as the quick-but-dumb
163 solution. It adds this to all links, and prevents additional page rank
164 bonus for any pages.
165
166 There is a variant of this (".../new_noffollow.php") which works
167 considerably slower, because it checks which links have been added the
168 last two weeks, and only adds the rel="NOFOLLOW" for fresh (=not yet
169 reviewed) links.
170
171
172 chinese spam
173 ------------
174
175 If you don't have any chinese users or discussions, but are targeted
176 with links to there; you could lock against such content getting seen
177 by Google (remember: this is what we need to prevent, then spammers
178 will go away automatically).
179
180  - plugins/meta/block_chinese.php
181
182 It works by setting the NOFOLLOW flag automatically, if it detects
183 foreign (chinese) html entities.
184
185
186 manual
187 ------
188
189 Load ".../plugins/meta/meta.php" to add a smaller input box on the
190 edit pages. On the pages that get targetted by spammers, simply add
191 "robots: NOINDEX,NOFOLLOW"
192 so search engines will avoid them.
193
194 You can remove this again, if attacks go down. It turned out to be
195 too troublesome for most spammers to take care of this field.
196
197
198 last resort
199 -----------
200
201 If everything else fails, then try to get rif of link spammers by
202 opting out from getting indexed by search engines. Either add an
203 <meta name="robots" content="NOINDEX,NOFOLLOW"> to your sites layout
204 or create an all-blocking "/robots.txt" file.
205
206 Alternatively <meta name="robots" content="NOFOLLOW"> may be enough,
207 because search engines then wouldn't follow any spam links. You then
208 could operate your sites as normal, if you post a page with links to
209 all YOUR (real) pages on a non-blocked site. (Make your frontpage
210 static, and place a link to a less frequently renewed page index file;
211 everything else flagged with NOFOLLOW. That would work.)
212
213
214 edit locking
215 ------------
216
217 Of course, if your Wiki is not publically-editable, then you won't
218 even have any of the above mentioned problems. But as you see, there
219 are enough countermeasures to live without any _PROTECTED_MODE setup.
220
221
222 edit captchas
223 -------------
224
225 Another useful workaround against automated link spamming are captchas
226 on the edit/ screen. In the simpler cases, something like the
227 ProtectedEMail checkbox will do. They work because most attacks origin
228 from script-operated zombie machines, and those bots are too dumb to
229 target all possible WWW forms (they usually were meant for blog comment
230 fields).
231
232 ...
233
234
235 cleaning up the mess
236 --------------------
237
238 Many of the tools/ can help you to remove spammy pages. Especially
239 the "holes" and the "revert" tool are useful here. Though most people
240 prefer the WikiCommander or ewikictl to rip bad page revisions.
241
242
243 more notes
244 ----------
245
246 See [http://erfurtwiki.sf.net/WikiSpam] for more informations and a
247 more up-to-date guide.
248