forked from pzaino/thecrowler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crowler-config-schema.json
687 lines (687 loc) · 36.3 KB
/
crowler-config-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"remote": {
"type": "object",
"properties": {
"host": {
"type": "string",
"description": "This is the host that the CROWler will use to fetch its configuration."
},
"path": {
"type": "string",
"description": "This is the path that the CROWler will use to fetch its configuration."
},
"port": {
"type": "integer",
"description": "This is the port that the CROWler will use to fetch its configuration."
},
"region": {
"type": "string",
"description": "This is the region that the CROWler will use to fetch its configuration. For example in case the distribution server is on an AWS S3 bucket, you can specify the region here."
},
"token": {
"type": "string",
"description": "This is the token that the CROWler will use to connect to the distribution server to fetch its configuration."
},
"secret": {
"type": "string",
"description": "This is the secret that the CROWler will use to connect to the distribution server to fetch its configuration."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the CROWler to fetch its configuration."
},
"type": {
"type": "string",
"description": "This is the type of the distribution server that the CROWler will use to fetch its configuration. For example, s3 or http."
},
"sslmode": {
"type": "string",
"description": "This is the sslmode that the CROWler will use to connect to the distribution server to fetch its configuration."
}
},
"description": "This is the configuration section to tell the CROWler its actual configuration has to be fetched remotely from a distribution server. If you use this section, then do not populate the other configuration sections as they will be ignored. The CROWler will fetch its configuration from the remote server and use it to start the engine.",
"required": [
"host",
"path",
"port",
"type"
]
},
"database": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"host": {
"type": "string"
},
"port": {
"type": "integer"
},
"user": {
"type": "string"
},
"password": {
"type": "string"
},
"dbname": {
"type": "string"
},
"retry_time": {
"type": "integer"
},
"ping_time": {
"type": "integer"
},
"sslmode": {
"type": "string"
},
"optimize_for": {
"type": "string",
"description": "This option allows the user to optimize the database for a specific use case. For example, if the user is doing more write operations than query, then use the value \"write\". If the user is doing more query operations than write, then use the value \"query\". If unsure leave it empty."
}
},
"description": "This is the configuration for the database that the CROWler will use to store data.",
"extraProperties": false,
"required": [
"type",
"host",
"port",
"user",
"password",
"dbname"
]
},
"crawler": {
"type": "object",
"properties": {
"workers": {
"type": "integer",
"description": "This is the number of workers that the CROWler will use to crawl websites. Minimum number is 3 per each Source if you have network discovery enabled or 1 per each source if you are doing crawling only. Increase the number of workers to scale up the CROWler engine vertically."
},
"interval": {
"type": "string",
"description": "This is the interval at which the CROWler will crawl websites. It is the interval at which the CROWler will crawl websites, values are in seconds, e.g. '3' means 3 seconds. For the interval you can also use the CROWler exprterpreter to generate delay values at runtime, e.g., 'random(1, 3)' or 'random(random(1,3), random(5,8))'."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the CROWler. It is the maximum amount of time that the CROWler will wait for a website to respond."
},
"maintenance": {
"type": "integer",
"description": "This is the maintenance interval for the CROWler. It is the interval at which the CROWler will perform automatic maintenance tasks."
},
"source_screenshot": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to take a screenshot of the source website. This is useful for debugging purposes."
},
"full_site_screenshot": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to take a screenshot of the full website. This is useful for debugging purposes."
},
"max_depth": {
"type": "integer",
"description": "This is the maximum depth that the CROWler will crawl websites."
},
"max_sources": {
"type": "integer",
"description": "This is the maximum number of sources that a single instance of the CROWler's engine will fetch atomically to enqueue and crawl."
},
"delay": {
"type": "string",
"description": "This is the delay between requests that the CROWler will use to crawl websites. It is the delay between requests that the CROWler will use to crawl websites. For delay you can also use the CROWler exprterpreter to generate delay values at runtime, e.g., 'random(1, 3)' or 'random(random(1,3), random(5,8))'."
},
"browsing_mode": {
"type": "string",
"description": "This is the browsing mode that the CROWler will use to crawl websites. For example, recursive, human, or fuzzing."
},
"max_retries": {
"type": "integer",
"description": "This is the maximum number of times that the CROWler will retry a request to a website. If the CROWler is unable to fetch a website after this number of retries, it will move on to the next website."
},
"max_requests": {
"type": "integer",
"description": "This is the maximum number of requests that the CROWler will send to a website. If the CROWler sends this number of requests to a website and is unable to fetch the website, it will move on to the next website."
},
"collect_html": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect the HTML of a website. This is useful for debugging purposes."
},
"collect_images": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect images from a website. This is useful for debugging purposes."
},
"collect_files": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect files from a website. This is useful for debugging purposes."
},
"collect_content": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect the text content of a website. This is useful for AI datasets creation and knowledge bases."
},
"collect_keywords": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect the keywords of a website. This is useful for AI datasets creation and knowledge bases."
},
"collect_metatags": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to collect the metatags of a website. This is useful for AI datasets creation and knowledge bases."
}
}
},
"api": {
"type": "object",
"properties": {
"host": {
"type": "string",
"description": "This is the host that the API will use to communicate with the outside world. Use 0.0.0.0 to make the API accessible from any IP address."
},
"port": {
"type": "integer",
"description": "This is the port that the API will use to communicate with the outside world."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the API. It is the maximum amount of time that the CROWler will wait for the API to respond."
},
"content_search": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to search also in the content field of a web object in the search results. This is useful for searching for every possible details of a web object, however will reduce performance quite a bit."
},
"return_content": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to return the web object content of a page in the search results. To improve performance, you can disable this option."
},
"sslmode": {
"type": "string",
"description": "This is the sslmode switch for the API. Use 'enable' to make the API use HTTPS."
},
"cert_file": {
"type": "string",
"description": "This is the certificate file for the API HTTPS protocol."
},
"key_file": {
"type": "string",
"description": "This is the key file for the API HTTPS certificates."
},
"rate_limit": {
"type": "string",
"description": "This is the rate limit for the API. It is the maximum number of requests that the CROWler will accept per second. You can use the ExprTerpreter language to set the rate limit."
},
"enable_console": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to enable the admin console via the API. In other words, you'll get more endpoints to manage the CROWler via the Search API instead of local commands."
},
"return_404": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to return 404 status code if a query has no results."
}
},
"description": "This is the configuration for the API (has no effect on the engine). It is the configuration for the API that the CROWler will use to communicate with the outside world.",
"required": [
"host",
"port",
"timeout"
]
},
"selenium": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "This is the name of the VDI image."
},
"location": {
"type": "string",
"description": "This is the location of the VDI image."
},
"path": {
"type": "string",
"description": "This is the path to the selenium driver (IF LOCAL). It is the path to the selenium driver that the CROWler will use to crawl websites."
},
"driver_path": {
"type": "string",
"description": "This is the path to the selenium driver (IF REMOTE). It is the path to the selenium driver that the CROWler will use to crawl websites."
},
"type": {
"type": "string",
"description": "This is the type of selenium driver that the CROWler will use to crawl websites. For example, chrome or firefox."
},
"port": {
"type": "integer",
"description": "This is the port that the selenium driver will use to connect to the CROWler. It is the port that the selenium driver will use to connect to the CROWler."
},
"host": {
"type": "string",
"description": "This is the host that the selenium driver will use to connect to the CROWler. It is the host that the selenium driver will use to connect to the CROWler. For example, localhost. This is also the recommended way to use the Selenium driver with the CROWler."
},
"headless": {
"type": "boolean",
"description": "This is a flag that tells the selenium driver to run in headless mode. This is useful for running the selenium driver in a headless environment. It's generally NOT recommended to enable headless mode for the selenium driver."
},
"use_service": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to access Selenium as service."
},
"sslmode": {
"type": "string",
"description": "This is the sslmode that the selenium driver will use to connect to the CROWler. It is the sslmode that the selenium driver will use to connect to the CROWler."
},
"download_path": {
"type": "string",
"description": "This is the download path for the selenium driver. It is the path where the selenium driver will download files. This is useful for downloading files from websites. The CROWler will use this path to store the downloaded files."
}
},
"required": [
"type",
"path",
"port",
"host"
],
"additionalProperties": false,
"description": "This is the configuration for the selenium driver. It is the configuration for the selenium driver that the CROWler will use to crawl websites. To scale the CROWler web crawling capabilities, you can add multiple selenium drivers in the array."
}
},
"image_storage": {
"type": "object",
"properties": {
"host": {
"type": "string"
},
"path": {
"type": "string"
},
"port": {
"type": "integer"
},
"region": {
"type": "string"
},
"token": {
"type": "string"
},
"secret": {
"type": "string"
},
"timeout": {
"type": "integer"
},
"type": {
"type": "string"
},
"sslmode": {
"type": "string"
}
},
"description": "This is the configuration for the image storage. It is the configuration for the storage that the CROWler will use to store images.",
"required": [
"path",
"type"
]
},
"file_storage": {
"type": "object",
"properties": {
"host": {
"type": "string"
},
"path": {
"type": "string"
},
"port": {
"type": "integer"
},
"region": {
"type": "string"
},
"token": {
"type": "string"
},
"secret": {
"type": "string"
},
"timeout": {
"type": "integer"
},
"type": {
"type": "string"
},
"sslmode": {
"type": "string"
}
},
"description": "This is the configuration for the file storage. File storage will be used for web object content storage.",
"required": [
"path",
"type"
]
},
"network_info": {
"type": "object",
"properties": {
"dns": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use DNS techniques. This is useful for detecting the IP address of a domain."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the DNS database. It is the maximum amount of time that the CROWler will wait for the DNS database to respond."
},
"rate_limit": {
"type": "string",
"description": "This is the rate limit for the DNS database. It is the maximum number of requests that the CROWler will send to the DNS database per second. You can use the ExprTerpreter language to set the rate limit."
}
},
"required": [
"enabled"
]
},
"whois": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use whois techniques. This is useful for detecting the owner of a domain."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the whois database. It is the maximum amount of time that the CROWler will wait for the whois database to respond."
},
"rate_limit": {
"type": "string",
"description": "This is the rate limit for the whois database. It is the maximum number of requests that the CROWler will send to the whois database per second. You can use the ExprTerpreter language to set the rate limit."
}
},
"required": [
"enabled"
]
},
"netlookup": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use netlookup techniques. This is useful for detecting the network information of a host."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the netlookup database. It is the maximum amount of time that the CROWler will wait for the netlookup database to respond."
},
"rate_limit": {
"type": "string",
"description": "This is the rate limit for the netlookup database. It is the maximum number of requests that the CROWler will send to the netlookup database per second. You can use the ExprTerpreter language to set the rate limit."
}
},
"required": [
"enabled"
]
},
"geo_localization": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use geolocation techniques. This is useful for detecting the location of a host."
},
"path": {
"type": "string",
"description": "This is the path to the geolocation database. It is the path to the database that the CROWler will use to determine the location of a host."
},
"type": {
"type": "string",
"description": "This is the type of geolocation database that the CROWler will use. It is the type of database that the CROWler will use to determine the location of a host. For example maxmind or ip2location"
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the geolocation database. It is the maximum amount of time that the CROWler will wait for the geolocation database to respond."
},
"api_key": {
"type": "string",
"description": "This is the API key for the geolocation database. It is the API key that the CROWler will use to connect to the geolocation database."
},
"sslmode": {
"type": "string",
"description": "This is the sslmode for the geolocation database. It is the sslmode that the CROWler will use to connect to the geolocation database."
}
},
"required": [
"enabled",
"path"
]
},
"service_scout": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use service scanning techniques. This is useful for detecting services that are running on a host."
},
"timeout": {
"type": "integer",
"description": "This is the timeout for the scan. It is the maximum amount of time that the CROWler will wait for a host to respond to a scan."
},
"idle_scan": {
"type": "object",
"description": "This is the configuration for the idle scan.",
"properties": {
"host": {
"type": "string",
"description": "Host FQDN or IP address."
},
"port": {
"type": "integer",
"description": "Port number."
}
}
},
"ping_scan": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use ping scanning techniques. This is useful for detecting hosts that are alive."
},
"connect_scan": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use connect scanning techniques. This is useful for detecting services that are running on a host."
},
"syn_scan": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use SYN scanning techniques. This is useful for detecting services that are running on a host."
},
"udp_scan": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use UDP scanning techniques. This is useful for detecting services that are running on a host."
},
"no_dns_resolution": {
"type": "boolean",
"description": "This is a flag that tells the CROWler not to resolve hostnames to IP addresses. This is useful for avoiding detection by intrusion detection systems."
},
"service_detection": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use service detection techniques. This is useful for detecting services that are running on a host."
},
"service_db": {
"type": "string",
"description": "This is the service detection database."
},
"os_finger_print": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use OS fingerprinting techniques. This is useful for detecting the operating system that is running on a host."
},
"aggressive_scan": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use aggressive scanning techniques. This is useful for detecting services that are running on a host."
},
"script_scan": {
"type": "array",
"items": {
"type": "string"
},
"description": "This is a list of nmap scripts to run. This is particularly important when a user wants to do vulnerability scanning."
},
"excluded_hosts": {
"type": "array",
"items": {
"type": "string"
},
"description": "This is a list of hosts to exclude from the scan. The CROWler may encounter such hosts during its crawling activities, so this field makes it easy to define a list of hosts that it should always avoid scanning."
},
"timing_template": {
"type": "string",
"description": "This allows the user to set the timing template for the scan. The timing template is a string that is passed to nmap to set the timing of the scan. DO not specify values using Tx, where x is a number. Instead, use just the number, e.g., '3'."
},
"host_timeout": {
"type": "string",
"description": "This is the timeout for the scan. It is the maximum amount of time that the CROWler will wait for a host to respond to a scan."
},
"min_rate": {
"type": "string",
"description": "This is the minimum rate at which the CROWler will scan hosts. It is the minimum number of packets that the CROWler will send to a host per second."
},
"max_retries": {
"type": "integer",
"description": "This is the maximum number of times that the CROWler will retry a scan on a host. If the CROWler is unable to scan a host after this number of retries, it will move on to the next host."
},
"source_port": {
"type": "integer",
"description": "This is the source port that the CROWler will use for scanning. It is the port that the CROWler will use to send packets to hosts."
},
"interface": {
"type": "string",
"description": "This is the interface that the CROWler will use for scanning. It is the network interface that the CROWler will use to send packets to hosts. Use this option with a port that is behind a VPN or a proxy for better results."
},
"spoof_ip": {
"type": "string",
"description": "This is the IP address that the CROWler will use to spoof its identity. It is the IP address that the CROWler will use to send packets to hosts. Use this option with a port that is behind a VPN or a proxy for better results."
},
"randomize_hosts": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to randomize the order in which it scans hosts. This is useful for avoiding detection by intrusion detection systems."
},
"data_length": {
"type": "integer",
"description": "This is the length of the data that the CROWler will send to hosts. It is the length of the data that the CROWler will use to send packets to hosts. Use this option with a port that is behind a VPN or a proxy for better results."
},
"delay": {
"type": "string",
"description": "This is the delay between packets that the CROWler will use for scanning. It is the delay between packets that the CROWler will use to send packets to hosts. Use this option with a port that is behind a VPN or a proxy for better results. For the delay you can also use the CROWler exprterpreter to generate delay values at runtime, e.g., 'random(1, 3)' or 'random(random(1,3), random(5,8))'."
},
"mtu_discovery": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to use MTU discovery when scanning hosts. This is useful for avoiding detection by intrusion detection systems."
},
"scan_flags": {
"type": "string",
"description": "This is the flags that the CROWler will use for scanning. It is the flags that the CROWler will use to send packets to hosts. Use this option with a port that is behind a VPN or a proxy for better results."
},
"ip_fragment": {
"type": "boolean",
"description": "This is a flag that tells the CROWler to fragment IP packets. This is useful for avoiding detection by intrusion detection systems."
},
"max_port_number": {
"type": "integer",
"description": "This is the maximum port number to scan (default is 9000)."
},
"max_parallelism": {
"type": "integer",
"description": "This is the maximum number of parallelism."
},
"dns_servers": {
"type": "array",
"items": {
"type": "string"
},
"description": "This is a list of custom DNS servers."
},
"proxies": {
"type": "array",
"items": {
"type": "string"
},
"description": "Proxies for the database connection."
}
},
"required": [
"enabled"
]
}
},
"description": "This is the configuration for the network information collection."
},
"rulesets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
}
},
"host": {
"type": "string"
},
"port": {
"type": "string"
},
"region": {
"type": "string"
},
"token": {
"type": "string"
},
"secret": {
"type": "string"
},
"timeout": {
"type": "integer"
},
"type": {
"type": "string"
},
"sslmode": {
"type": "string"
},
"refresh": {
"type": "integer"
}
},
"required": [
"path",
"type"
]
},
"description": "This is the configuration for the rulesets that the CROWler will use to crawl, interact, scrape info and detect stuff on the provided Sources to crawl."
},
"os": {
"type": "string"
},
"debug_level": {
"type": "integer"
}
},
"anyOf": [
{
"required": [
"remote"
]
},
{
"required": [
"database",
"crawler",
"api",
"selenium",
"network_info"
]
}
]
}