ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/doc/reference.conf
Revision: 9727
Committed: Mon Nov 16 10:29:12 2020 UTC (5 years, 8 months ago) by michael
File size: 25030 byte(s)
Log Message:
- The 'vhost' configuration directive found in the irc {} and scanner {} blocks has been renamed to 'bind'

File Contents

# User Rev Content
1 michael 5052 /*
2 michael 5104 * Hybrid Open Proxy Monitor - HOPM sample configuration
3 michael 5142 *
4 michael 9104 * Copyright (c) 2014-2020 ircd-hybrid development team
5 michael 7005 *
6 michael 5142 * $Id$
7 michael 5104 */
8 michael 5052
9 michael 5104 /*
10     * Shell style (#), C++ style (//) and C style comments are supported.
11     *
12 michael 7711 * Files may be included by either:
13     * .include "filename"
14     * .include <filename>
15     *
16 michael 5104 * Times/durations are written as:
17     * 12 hours 30 minutes 1 second
18     *
19     * Valid units of time:
20     * year, month, week, day, hour, minute, second
21     *
22     * Valid units of size:
23     * megabyte/mbyte/mb, kilobyte/kbyte/kb, byte
24     *
25     * Sizes and times may be singular or plural.
26     */
27 michael 5052
28     options {
29     /*
30     * Full path and filename for storing the process ID of the running
31 michael 5056 * HOPM.
32 michael 5052 */
33 michael 6276 pidfile = "var/run/hopm.pid";
34 michael 5052
35     /*
36 michael 7014 * Maximum commands to queue. Set to 0 if you don't want HOPM
37     * to process commands.
38     */
39     command_queue_size = 64;
40    
41     /*
42     * Interval to check command queue for timed out commands.
43     */
44     command_interval = 10 seconds;
45    
46     /*
47     * Timeout of commands.
48     */
49     command_timeout = 180 seconds;
50    
51     /*
52 michael 5080 * How long to store the IP address of hosts which are confirmed
53 michael 5146 * (by previous scans) to be secure. New users from these
54 michael 5052 * IP addresses will not be scanned again until this amount of time
55     * has passed. IT IS STRONGLY RECOMMENDED THAT YOU DO NOT USE THIS
56     * DIRECTIVE, but it is provided due to demand.
57     *
58     * The main reason for not using this feature is that anyone capable
59     * of running a proxy can get abusers onto your network - all they
60     * need do is shut the proxy down, connect themselves, restart the
61     * proxy, and tell their friends to come flood.
62 michael 5056 *
63 michael 5052 * Keep this directive commented out to disable negative caching.
64     */
65 michael 5080 # negcache = 1 hour;
66 michael 5052
67     /*
68 michael 5332 * How long between rebuilds of the negative cache. The negcache
69     * is only rebuilt to free up memory used by entries that are too old.
70     * You probably don't need to tweak this unless you have huge amounts
71     * of people connecting (hundreds per minute). Default is 12 hours.
72     */
73     negcache_rebuild = 12 hours;
74    
75     /*
76 michael 5146 * Amount of file descriptors to allocate to asynchronous DNS. 64
77 michael 5056 * should be plenty for almost anyone.
78 michael 5052 */
79     dns_fdlimit = 64;
80    
81     /*
82 michael 6200 * Amount of time the resolver waits until a response is received
83     * from a name server.
84     */
85     dns_timeout = 5 seconds;
86    
87     /*
88 michael 5052 * Put the full path and filename of a logfile here if you wish to log
89 michael 5146 * every scan done. Normally HOPM only logs successfully detected
90 michael 5056 * proxies in the hopm.log, but you may get abuse reports to your ISP
91 michael 5146 * about portscanning. Being able to show that it was HOPM that did
92     * the scan in question can be useful. Leave commented for no
93 michael 5052 * logging.
94     */
95 michael 6276 # scanlog = "var/log/scan.log";
96 michael 5052 };
97    
98    
99 michael 5104 irc {
100 michael 5052 /*
101 michael 6170 * IP address to bind to for the IRC connection. You only need to
102     * use this if you wish HOPM to use a particular interface
103     * (virtual host, IP alias, ...) when connecting to the IRC server.
104 michael 9727 * There is another "bind" setting in the scan {} block below for
105 michael 6170 * the actual portscans. Note that this directive expects an IP address,
106     * not a hostname. Please leave this commented out if you do not
107 michael 5052 * understand what it does, as most people don't need it.
108     */
109 michael 9727 # bind = "0.0.0.0";
110 michael 5052
111     /*
112 michael 5056 * Nickname for HOPM to use.
113 michael 5052 */
114 michael 5056 nick = "MyHopm";
115 michael 5052
116     /*
117 michael 5056 * Text to appear in the "realname" field of HOPM's /whois output.
118 michael 5052 */
119 michael 5056 realname = "Hybrid Open Proxy Monitor";
120 michael 5052
121     /*
122     * If you don't have an identd running, what username to use.
123     */
124 michael 5056 username = "hopm";
125 michael 5052
126     /*
127 michael 6170 * Hostname (or IP address) of the IRC server which HOPM will monitor
128 michael 5682 * connections on. IPv6 is now supported.
129 michael 5052 */
130 michael 5109 server = "irc.example.org";
131 michael 5052
132     /*
133     * Password used to connect to the IRC server (PASS)
134     */
135     # password = "secret";
136    
137     /*
138 michael 5146 * Port of the above server to connect to. This is what HOPM uses to
139 michael 5052 * get onto IRC itself, it is nothing to do with what ports/protocols
140     * are scanned, nor do you need to list every port your ircd listens
141     * on.
142     */
143     port = 6667;
144    
145     /*
146 michael 9478 * Whether to use TLS when connecting to the above server.
147     */
148     tls = no;
149    
150 michael 9630 /*
151     * rsa_private_key_file: the path to the file containing the RSA key.
152     *
153     * Once the RSA key is generated, it is highly recommended to lock down
154     * its file permissions:
155     *
156     * chown <ircd-user>.<ircd.group> rsa.key
157     * chmod 0600 rsa.key
158     */
159 michael 9525 # rsa_private_key_file = "etc/rsa.key";
160    
161 michael 9630 /*
162     * tls_certificate_file: the path to the file containing our
163     * TLS certificate for encrypted client connection.
164     */
165 michael 9525 # tls_certificate_file = "etc/cert.pem";
166    
167 michael 9478 /*
168 michael 9501 * Checks if the host name defined above matches the identity in the
169     * certificate.
170     */
171     tls_hostname_verification = yes;
172    
173     /*
174 michael 5198 * Defines time in which bot will timeout if no data is received
175     */
176     readtimeout = 15 minutes;
177    
178     /*
179 michael 6078 * Interval in how often we try to reconnect to the IRC server
180     */
181     reconnectinterval = 30 seconds;
182    
183     /*
184 michael 5052 * Command to execute to identify to NickServ (if your network uses
185 michael 5146 * it). This is the raw IRC command text, and the below example
186     * corresponds to "/msg nickserv identify password" in a client. If
187 michael 5052 * you don't understand, just edit "password" in the line below to be
188 michael 5146 * your HOPM's nick password. Leave commented out if you don't need
189 michael 5052 * to identify to NickServ.
190     */
191 michael 5056 # nickserv = "NS IDENTIFY password";
192 michael 5052
193     /*
194 michael 5056 * The username and password needed for HOPM to oper up.
195 michael 5052 */
196 michael 5056 oper = "hopm operpass";
197 michael 5104
198 michael 5052 /*
199 michael 5056 * Mode string that HOPM needs to set on itself as soon as it opers
200 michael 5146 * up. This needs to include the mode for seeing connection notices,
201 michael 5056 * otherwise HOPM won't scan anyone (that's usually umode +c).
202 michael 5052 */
203 michael 5056 mode = "+c";
204 michael 5052
205     /*
206 michael 5056 * If this is set then HOPM will use it as an /away message as soon as
207 michael 5052 * it connects.
208     */
209 michael 5069 away = "I'm a bot. Your messages will be ignored.";
210 michael 5052
211     /*
212 michael 5056 * Info about channels you wish HOPM to join in order to accept
213 michael 5146 * commands. HOPM will also print messages in these channels every
214     * time it detects a proxy. Only IRC operators can command HOPM to do
215 michael 5056 * anything, but some of the things HOPM reports to these channels
216 michael 5104 * could be considered sensitive, so it's best not to put HOPM into
217 michael 5052 * public channels.
218     */
219     channel {
220 michael 5056 /*
221 michael 5146 * Channel name. Local ("&") channels are supported if your ircd
222 michael 5056 * supports them.
223     */
224     name = "#hopm";
225 michael 5052
226 michael 5056 /*
227     * If HOPM will need to use a key to enter this channel, this is
228     * where you specify it.
229     */
230     # key = "somekey";
231 michael 5052
232 michael 5056 /*
233     * If you use ChanServ then maybe you want to set the channel
234     * invite-only and have each HOPM do "/msg ChanServ invite" to get
235 michael 5146 * itself in. Leave commented if you don't, or if this makes no
236 michael 5056 * sense to you.
237     */
238     # invite = "CS INVITE #hopm";
239 michael 5052 };
240    
241     /*
242     * You can define a bunch of channels if you want:
243     *
244 michael 6170 * channel { name = "#other"; }; channel { name= "#channel"; }
245 michael 5052 */
246 michael 5056
247 michael 5052 /*
248     * connregex is a POSIX regular expression used to parse connection
249 michael 5682 * notices from the ircd. The complexity of the expression should
250 michael 5052 * be kept to a minimum.
251 michael 5056 *
252 michael 5052 * Items in order MUST be: nick user host IP
253     *
254 michael 6170 * HOPM will not work with ircds which do not send an IP address in the
255 michael 5052 * connection notice.
256     *
257     * This is fairly complicated stuff, and the consequences of getting
258 michael 5146 * it wrong are the HOPM does not scan anyone. Unless you know
259 michael 5052 * absolutely what you are doing, please just uncomment the example
260     * below that best matches the type of ircd you use.
261     */
262 michael 5437
263 michael 6985 /* bahamut / charybdis / ircd-hybrid / ircd-ratbox / ircu / UnrealIRCd 3.2.x (in HCN mode) */
264 michael 8197 connregex = "\\*\\*\\* Notice -- Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9a-f\\.:]+)\\].*";
265 michael 5052
266 michael 6984 /* ircd-hybrid with far connect notices (user mode +F) to scan clients on remote servers */
267 michael 8197 # connregex = "\\*\\*\\* Notice -- Client connecting.*: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9a-f\\.:]+)\\].*";
268 michael 6984
269 michael 7035 /* UnrealIRCd 4.0.x */
270 michael 8197 # connregex = "\\*\\*\\* Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9a-f\\.:]+)\\].*";
271 michael 6985
272 michael 5439 /* InspIRCd */
273 michael 8197 # connregex = "\\*\\*\\* .*CONNECT: Client connecting.*: ([^ ]+)!([^@]+)@([^\\)]+) \\(([0-9a-f\\.:]+)\\) \\[.*\\]";
274 michael 5437
275 michael 5922 /* ngIRCd */
276 michael 8197 # connregex = "Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9a-f\\.:]+)\\].*";
277 michael 5922
278 michael 5052 /*
279     * "kline" controls the command used when an open proxy is confirmed.
280     * We suggest applying a temporary (no more than a few hours) KLINE on the host.
281     *
282     * <WARNING>
283 michael 5056 * Make sure if you need to change this string you also change the
284     * kline command for every DNSBL you enable below.
285 michael 5052 *
286 michael 5056 * Also note that some servers do not allow you to include ':' characters
287     * inside the KLINE message (e.g. for a http:// address).
288 michael 5052 *
289     * Users rewriting this message into something that isn't even a valid
290     * IRC command is the single most common cause of support requests and
291     * therefore WE WILL NOT SUPPORT YOU UNLESS YOU USE ONE OF THE EXAMPLE
292     * KLINE COMMANDS BELOW.
293     * </WARNING>
294     *
295     * That said, should you wish to customise this text, several
296     * printf-like placeholders are available:
297     *
298     * %n User's nick
299     * %u User's username
300     * %h User's irc hostname
301     * %i User's IP address
302 michael 5482 * %t Protocol type which has triggered a positive scan
303 michael 5052 */
304 michael 8234
305     /* A KLINE example for bahamut / charybdis / ircd-hybrid / ircd-ratbox */
306 michael 8220 kline = "KLINE 180 *@%i :Open proxy found on your host.";
307 michael 5052
308 michael 8234 /* A KLINE example for InspIRCd */
309     # kline = "KLINE *@%i 3h :Open proxy found on your host.";
310    
311 michael 8237 /* A KLINE example for ngIRCd */
312     # kline = "KLINE *@%i 10800 :Open proxy found on your host.";
313    
314 michael 6178 /* A GLINE example for ircu */
315 michael 8237 # kline = "GLINE +*@%i 10800 :Open proxy found on your host.";
316 michael 6178
317 michael 8230 /* A ZLINE example for UnrealIRCd */
318 michael 8234 # kline = "ZLINE *@%i 3h :Open proxy found on your host.";
319 michael 8230
320 michael 5056 /*
321     * An AKILL example for services with OperServ. Your HOPM must have permission to
322     * AKILL for this to work!
323     */
324 michael 8220 # kline = "OS AKILL ADD +3h *@%i Open proxy found on your host.";
325 michael 5052
326     /*
327 michael 5056 * Text to send on connection, these can be stacked and will be sent in this order.
328 michael 5876 *
329 michael 5443 * !!! UNREAL USERS PLEASE NOTE !!!
330     * Unreal users will need PROTOCTL HCN to force hybrid connect
331     * notices.
332     *
333     * Yes Unreal users! That means you! That means you need the line
334     * below! See that thing at the start of the line? That's what we
335     * call a comment! Remove it to UNcomment the line.
336 michael 7003 *
337     * Note that this is no longer needed as of UnrealIRCd 4.0.0.
338 michael 5052 */
339 michael 5443 # perform = "PROTOCTL HCN";
340 michael 5405
341     /*
342 michael 5409 * Text to send, via NOTICE, immediately when a new client connects. These can be
343 michael 5405 * stacked and will be sent in this order.
344     */
345     # notice = "You are now being scanned for open proxies. If you have nothing to hide, you have nothing to fear.";
346 michael 5052 };
347    
348    
349     /*
350     * OPM Block defines blacklists and information required to report new proxies
351 michael 5146 * to a dns blacklist. DNS-based blacklists store IP addresses in a DNS zone
352 michael 5052 * file. There are several blacklist that list IP addresses known to be open
353     * proxies or other forms of IRC abuse. By checking against these blacklists,
354 michael 5056 * HOPMs are able to ban known sources of abuse without completely scanning them.
355 michael 5052 */
356 michael 5221 #opm {
357 michael 5052 /*
358 michael 5146 * Blacklist zones to check IPs against. If you would rather not
359 michael 5052 * trust a remotely managed blacklist, you could set up your own, or
360     * leave these commented out in which case every user will be
361     * scanned. The use of at least one open proxy DNSBL is recommended
362 michael 5056 * however.
363     *
364 michael 5074 * Please check the policies of each blacklist you use to check you
365 michael 5056 * are comfortable with using them to block access to your server
366     * (and that you are allowed to use them).
367 michael 5052 */
368    
369 michael 5074
370 michael 9722 /* dnsbl.dronebl.org - https://dronebl.org */
371 michael 5052 # blacklist {
372 michael 5074 /* The DNS name of the blacklist */
373     # name = "dnsbl.dronebl.org";
374 michael 5052
375 michael 5074 /*
376 michael 8098 * Address families that are supported by the blacklist. Default is 'ipv4'.
377     */
378 michael 8238 # address_family = ipv4, ipv6;
379 michael 8098
380     /*
381 michael 5074 * There are only two values that are valid for this
382     * "A record bitmask" and "A record reply"
383     * These options affect how the values specified to reply
384     * below will be interpreted, a bitmask is where the reply
385     * values are 2^n and more than one is added up, a reply is
386 michael 6170 * simply where the last octet of the IP address is that number.
387 michael 5074 * If you are not sure then the values set for dnsbl.dronebl.org
388     * will work without any changes.
389     */
390     # type = "A record reply";
391 michael 5052
392 michael 5074 /*
393     * Kline types not listed in the reply list below.
394     *
395     * For DNSBLs that are not IRC specific and you just wish to kline
396     * certain types this can be enabled/disabled.
397     */
398     # ban_unknown = no;
399 michael 5052
400 michael 5074 /*
401     * The actual values returned by the dnsbl.dronebl.org blacklist as
402 michael 9722 * documented at https://dronebl.org/docs/howtouse
403 michael 5074 */
404     # reply {
405 michael 8130 # 2 = "Sample data used for heuristical analysis";
406 michael 7756 # 3 = "IRC spam drone (litmus/sdbot/fyle)";
407 michael 8113 # 5 = "Bottler (experimental)";
408 michael 7756 # 6 = "Unknown worm or spambot";
409     # 7 = "DDoS drone";
410     # 8 = "Open SOCKS proxy";
411     # 9 = "Open HTTP proxy";
412 michael 5074 # 10 = "ProxyChain";
413 michael 7756 # 11 = "Web Page Proxy";
414 michael 8113 # 12 = "Open DNS Resolver";
415 michael 7756 # 13 = "Automated dictionary attacks";
416     # 14 = "Open WINGATE proxy";
417 michael 5074 # 15 = "Compromised router / gateway";
418 michael 7756 # 16 = "Autorooting worms";
419 michael 5074 # 17 = "Automatically determined botnet IPs (experimental)";
420 michael 9721 # 18 = "Possibly compromised DNS/MX type hostname detected on IRC";
421     # 19 = "Abused VPN Service";
422 michael 7756 # 255 = "Uncategorized threat class";
423 michael 5074 # };
424 michael 5052
425 michael 5074 /*
426     * The kline message sent for this specific blacklist, remember to put
427     * the removal method in this.
428     */
429 michael 9722 # kline = "KLINE 180 *@%i :You have a host listed in the DroneBL. For more information, visit https://dronebl.org/lookup_branded?ip=%i&network=Network";
430 michael 5246 # };
431 michael 5052
432 michael 5074
433 michael 8570 /* rbl.efnetrbl.org - https://rbl.efnetrbl.org/ */
434 michael 5074 # blacklist {
435     # name = "rbl.efnetrbl.org";
436     # type = "A record reply";
437     # ban_unknown = no;
438    
439     # reply {
440     # 1 = "Open proxy";
441     # 2 = "spamtrap666";
442     # 3 = "spamtrap50";
443     # 4 = "TOR";
444     # 5 = "Drones / Flooding";
445     # };
446    
447 michael 9722 # kline = "KLINE 180 *@%i :Blacklisted proxy found. For more information, visit https://rbl.efnetrbl.org/?i=%i";
448 michael 5074 # };
449    
450    
451 michael 5075
452 michael 8570 /* tor.efnetrbl.org - https://rbl.efnetrbl.org/ */
453 michael 5075 # blacklist {
454     # name = "tor.efnetrbl.org";
455     # type = "A record reply";
456     # ban_unknown = no;
457    
458     # reply {
459     # 1 = "TOR";
460     # };
461    
462 michael 9722 # kline = "KLINE 180 *@%i :TOR exit node found. For more information, visit https://rbl.efnetrbl.org/?i=%i";
463 michael 5075 # };
464    
465 michael 5052 /*
466     * You can report the insecure proxies you find to a DNSBL also!
467     * The remaining directives in this section are only needed if you
468 michael 5146 * intend to do this. Reports are sent by email, one email per IP
469     * address. The format does support multiple addresses in one email,
470 michael 5052 * but we don't know of any servers that are detecting enough insecure
471     * proxies for this to be really necessary.
472     */
473    
474     /*
475 michael 5146 * Email address to send reports FROM. If you intend to send reports,
476 michael 5052 * please pick an email address that we can actually send mail to
477     * should we ever need to contact you.
478     */
479     # dnsbl_from = "mybopm@myserver.org";
480    
481     /*
482     * Email address to send reports TO.
483 michael 5056 * For example DroneBL:
484 michael 5052 */
485     # dnsbl_to = "bopm-report@dronebl.org";
486    
487     /*
488 michael 5146 * Full path to your sendmail binary. Even if your system does not
489 michael 5052 * use sendmail, it probably does have a binary called "sendmail"
490 michael 5146 * present in /usr/sbin or /usr/lib. If you don't set this, no
491 michael 5052 * proxies will be reported.
492     */
493     # sendmail = "/usr/sbin/sendmail";
494 michael 5221 #};
495 michael 5052
496    
497     /*
498     * The short explanation:
499     *
500 michael 5146 * This is where you define what ports/protocols to check for. You can have
501 michael 5052 * multiple scanner blocks and then choose which users will get scanned by
502     * which scanners further down.
503     *
504     * The long explanation:
505     *
506 michael 5146 * Scanner defines a virtual scanner. For each user being scanned, a scanner
507 michael 5052 * will use a file descriptor (and subsequent connection) for each protocol.
508     * Once connecting it will negotiate the proxy to connect to
509 michael 6170 * target_ip:target_port (target_ip MUST be an IP address).
510 michael 5052 *
511     * Once connected, any data passed through the proxy will be checked to see if
512 michael 5146 * target_string is contained within that data. If it is the proxy is
513 michael 5052 * considered open. If the connection is closed at any point before
514     * target_string is matched, or if at least max_read bytes are read from the
515     * connection, the negotiation is considered failed.
516     */
517     scanner {
518     /*
519 michael 5146 * Unique name of this scanner. This is used further down in the
520 michael 5052 * user {} blocks to decide which users get affected by which
521     * scanners.
522     */
523 michael 5104 name = "default";
524 michael 5052
525     /*
526     * HTTP CONNECT - very common proxy protocol supported by widely known
527 michael 5146 * software such as Squid and Apache. The most common sort of
528     * insecure proxy and found on a multitude of weird ports too. Offers
529 michael 5052 * transparent two way TCP connections.
530     */
531     protocol = HTTP:80;
532     protocol = HTTP:8080;
533     protocol = HTTP:3128;
534     protocol = HTTP:6588;
535    
536 michael 6235 /*
537     * The SSL/TLS variant of HTTP
538     */
539 michael 6297 # protocol = HTTPS:443;
540     # protocol = HTTPS:8443;
541 michael 6222
542 michael 5052 /*
543     * SOCKS4/5 - well known proxy protocols, probably the second most
544     * common for insecure proxies, also offers transparent two way TCP
545 michael 5146 * connections. Fortunately largely confined to port 1080.
546 michael 5052 */
547     protocol = SOCKS4:1080;
548     protocol = SOCKS5:1080;
549    
550     /*
551     * Cisco routers with a default password (yes, it really does happen).
552     * Also pretty much anything else that will let you telnet to anywhere
553 michael 6565 * else on the Internet. Fortunately these are always on port 23.
554 michael 5052 */
555     protocol = ROUTER:23;
556    
557     /*
558     * WinGate is commercial windows proxy software which is now not so
559     * common, but still to be found, and helpfully presents an interface
560     * that can be used to telnet out, on port 23.
561     */
562     protocol = WINGATE:23;
563    
564 michael 6001 /*
565     * Dreambox DVB receivers with a default password allowing
566     * full root access to telnet or install bouncers.
567     */
568 michael 5998 protocol = DREAMBOX:23;
569    
570 michael 5052 /*
571     * The HTTP POST protocol, often dismissed when writing the access
572     * controls for proxies, but sadly can still be used to abused.
573     * Offers only the opportunity to send a single block of data, but
574     * enough of them at once can still make for a devastating flood.
575     * Found on the same ports that HTTP CONNECT proxies inhabit.
576     *
577     * Note that if your ircd has "ping cookies" then clients from HTTP
578 michael 5146 * POST proxies cannot actually ever get onto your network anyway. If
579 michael 5052 * you leave the checks in then you'll still find some (because some
580 michael 5056 * people IRC from boxes that run them), but if you use HOPM purely as
581 michael 5052 * a protective measure and you have ping cookies, you need not scan
582     * for HTTP POST.
583     */
584     protocol = HTTPPOST:80;
585    
586 michael 6235 /*
587     * The SSL/TLS variant of HTTPPOST
588     */
589 michael 6297 # protocol = HTTPSPOST:443;
590     # protocol = HTTPSPOST:8443;
591 michael 6222
592 michael 5052 /*
593 michael 6170 * IP address this scanner will bind to. Use this if you need your scans to
594 michael 5056 * come FROM a particular interface on the machine you run HOPM from.
595 michael 5052 * If you don't understand what this means, please leave this
596     * commented out, as this is a major source of support queries!
597     */
598 michael 9727 # bind = "127.0.0.1";
599 michael 5052
600 michael 5298 /*
601     * Maximum file descriptors this scanner can use. Remember that there
602 michael 5146 * will be one FD for each protocol listed above. As this example
603     * scanner has 8 protocols, it requires 8 FDs per user. With a 512 FD
604 michael 5052 * limit, this scanner can be used on 64 users _at the same time_.
605     * That should be adequate for most servers.
606     */
607     fd = 512;
608    
609     /*
610 michael 5146 * Maximum data read from a proxy before considering it closed. Don't
611 michael 5052 * set this too high, some people have fun setting up lots of ports
612 michael 5146 * that send endless data to tie up your scanner. 4KB is plenty for
613 michael 5052 * any known proxy.
614     */
615 michael 6170 max_read = 4 kbytes;
616 michael 5052
617     /*
618 michael 5080 * Amount of time before a test is considered timed out.
619 michael 5052 * Again, all but the poorest slowest proxies will be detected within
620     * 30 seconds, and this helps keep resource usage low.
621     */
622 michael 5080 timeout = 30 seconds;
623 michael 5052
624 michael 5104 /*
625 michael 5052 * Target IP to tell the proxy to connect to
626 michael 5104 *
627 michael 5052 * !!! THIS MUST BE CHANGED !!!
628     *
629     * You cannot instruct the proxy to connect to itself! The easiest
630 michael 6170 * thing to do would be to set this to the IP address of your ircd
631     * and then keep the default target_strings.
632 michael 5052 *
633 michael 6170 * Please use an IP address that is publically reachable from anywhere
634     * on the Internet, because you have no way of knowing where the insecure
635 michael 5146 * proxies will be located. Just because you and your HOPM can
636 michael 6170 * connect to your ircd on some private IP address like 192.168.0.1,
637     * does not mean that the insecure proxies out there on the Internet will be
638 michael 5146 * able to. And if they never connect, you will never detect them.
639 michael 5052 *
640     * Remember to change this setting for every scanner you configure.
641     */
642 michael 5056 target_ip = "127.0.0.1";
643 michael 5052
644     /*
645 michael 5146 * Target port to tell the proxy to connect to. This is usually
646     * something like 6667. Basically any client-usable port.
647 michael 5052 */
648 michael 5056 target_port = 6667;
649 michael 5052
650 michael 5104 /*
651 michael 5052 * Target string we check for in the data read back by the scanner.
652     * This should be some string out of the data that your ircd usually
653 michael 5686 * sends on connect. Multiple target strings are allowed.
654 michael 5052 *
655     * NOTE: Try to keep the number of target strings to a minimum. Two
656     * should be fine. One for normal connections and one for throttled
657     * connections. Comment out any others for efficiency.
658     */
659    
660 michael 5056 /*
661 michael 5104 * Usually first line sent to client on connection to ircd.
662 michael 5052 * If your ircd supports a more specific line (see below),
663     * using it will reduce false positives.
664     */
665 michael 5109 target_string = ":irc.example.org NOTICE * :*** Looking up your hostname";
666 michael 5052
667 michael 5056 /*
668     * If you try to connect too fast, you'll be throttled by your own
669 michael 5146 * ircd. Here's what a hybrid throttle message looks like:
670 michael 5052 */
671     target_string = "ERROR :Your host is trying to (re)connect too fast -- throttled.";
672     };
673    
674 michael 5056
675 michael 5052 scanner {
676     name = "extended";
677    
678     protocol = HTTP:81;
679     protocol = HTTP:8000;
680     protocol = HTTP:8001;
681     protocol = HTTP:8081;
682    
683     protocol = HTTPPOST:81;
684     protocol = HTTPPOST:6588;
685 michael 6235 protocol = HTTPPOST:4480;
686 michael 5052 protocol = HTTPPOST:8000;
687     protocol = HTTPPOST:8001;
688     protocol = HTTPPOST:8080;
689     protocol = HTTPPOST:8081;
690    
691     /*
692     * IRCnet have seen many socks5 on these ports, more than on the
693     * standard ports even.
694     */
695     protocol = SOCKS4:4914;
696     protocol = SOCKS4:6826;
697     protocol = SOCKS4:7198;
698     protocol = SOCKS4:7366;
699     protocol = SOCKS4:9036;
700    
701     protocol = SOCKS5:4438;
702     protocol = SOCKS5:5104;
703     protocol = SOCKS5:5113;
704     protocol = SOCKS5:5262;
705     protocol = SOCKS5:5634;
706     protocol = SOCKS5:6552;
707     protocol = SOCKS5:6561;
708     protocol = SOCKS5:7464;
709     protocol = SOCKS5:7810;
710     protocol = SOCKS5:8130;
711     protocol = SOCKS5:8148;
712     protocol = SOCKS5:8520;
713     protocol = SOCKS5:8814;
714     protocol = SOCKS5:9100;
715     protocol = SOCKS5:9186;
716     protocol = SOCKS5:9447;
717     protocol = SOCKS5:9578;
718 michael 7199 protocol = SOCKS5:10000;
719 michael 6967 protocol = SOCKS5:64101;
720 michael 5052
721     /*
722     * These came courtsey of Keith Dunnett from a bunch of public open
723     * proxy lists.
724     */
725     protocol = SOCKS4:29992;
726     protocol = SOCKS4:38884;
727     protocol = SOCKS4:18844;
728     protocol = SOCKS4:17771;
729     protocol = SOCKS4:31121;
730    
731     fd = 400;
732    
733 michael 5298 /*
734     * If required you can add settings such as target_ip here
735 michael 5052 * they will override the defaults set in the first scanner
736     * for this and subsequent scanners defined in the config file
737     * This affects the following options:
738 michael 9727 * fd, bind, target_ip, target_port, target_string, timeout and
739 michael 5052 * max_read.
740     */
741     };
742    
743 michael 8564 /*
744     * Scanner to detect vulnerable SSH versions that normally exist on hacked
745     * routers and IoT devices. Don't forget to add this scanner to a user block.
746     */
747     scanner {
748     name = "ssh";
749 michael 5052
750 michael 8564 protocol = SSH:22;
751    
752     target_string = "SSH-1.99-OpenSSH_5.1";
753     target_string = "SSH-2.0-dropbear_0.51";
754     target_string = "SSH-2.0-dropbear_0.52";
755     target_string = "SSH-2.0-dropbear_0.53.1";
756     target_string = "SSH-2.0-dropbear_2012.55";
757     target_string = "SSH-2.0-dropbear_2013.62";
758     target_string = "SSH-2.0-dropbear_2014.63";
759     target_string = "SSH-2.0-OpenSSH_4.3";
760     target_string = "SSH-2.0-OpenSSH_5.1";
761     target_string = "SSH-2.0-OpenSSH_5.5p1";
762     target_string = "SSH-2.0-ROSSSH";
763     target_string = "SSH-2.0-SSH_Server";
764     };
765    
766    
767 michael 5052 /*
768 michael 5298 * User blocks define what scanners will be used to scan which hostmasks.
769     * When a user connects they will be scanned on every scanner {} (above)
770     * that matches their host.
771 michael 5052 */
772     user {
773     /*
774     * Users matching this host mask will be scanned with all the
775     * protocols in the scanner named.
776     */
777     mask = "*!*@*";
778     scanner = "default";
779     };
780    
781     user {
782 michael 5056 /*
783     * Connections without ident will match on a vast number of connections
784     * very few proxies run ident though
785     */
786 michael 5052 # mask = "*!~*@*";
787     mask = "*!squid@*";
788     mask = "*!nobody@*";
789     mask = "*!www-data@*";
790     mask = "*!cache@*";
791     mask = "*!CacheFlowS@*";
792     mask = "*!*@*www*";
793     mask = "*!*@*proxy*";
794     mask = "*!*@*cache*";
795    
796     scanner = "extended";
797     };
798    
799    
800     /*
801     * Exempt hosts matching certain strings from any form of scanning or dnsbl.
802 michael 5056 * HOPM will check each string against both the hostname and the IP address of
803 michael 5052 * the user.
804     *
805 michael 5146 * There are very few valid reasons to actually use "exempt". HOPM should
806 michael 5052 * never get false positives, and we would like to know very much if it does.
807 michael 5056 * One possible scenario is that the machine HOPM runs from is specifically
808 michael 5052 * authorized to use certain hosts as proxies, and users from those hosts use
809 michael 5146 * your network. In this case, without exempt, HOPM will scan these hosts,
810 michael 5052 * find itself able to use them as proxies, and ban them.
811     */
812     exempt {
813     mask = "*!*@127.0.0.1";
814     };

Properties

Name Value
svn:eol-style native
svn:keywords Id