|
1 | | -# [Watcher](https://github.com/thalesgroup-cert/Watcher) |
| 1 | +# [Watcher](https://github.com/thalesgroup-cert/Watcher) Analyzer |
2 | 2 |
|
3 | | -## Watcher Check Domain Analyzer |
| 3 | +## Watcher Analyzer |
4 | 4 |
|
5 | 5 | ### Description |
6 | | -The Watcher Check Domain Analyzer is an Analyzer for TheHive/Cortex that checks if a given domain is already being monitored in the Watcher website monitoring system. |
| 6 | +Watcher Analyzer for TheHive/Cortex enables comprehensive domain presence checking across both Watcher modules: |
| 7 | +- **Legitimate Domain Module** (`/api/common/legitimate_domains/`) - Check legitimate/repurchased domains |
| 8 | +- **Website Monitoring Module** (`/api/site_monitoring/site/`) - Check monitored suspicious/malicious domains |
| 9 | + |
| 10 | +The analyzer checks both modules simultaneously and provides a unified result. |
| 11 | + |
| 12 | +--- |
7 | 13 |
|
8 | 14 | ### Features |
9 | | -- **Check if a domain is monitored**: Verifies whether a specific domain is already being monitored in the Watcher system. |
| 15 | + |
| 16 | +#### Watcher_Check |
| 17 | +Check if a domain is monitored in one or both Watcher modules and retrieve a unified status and details: |
| 18 | + |
| 19 | +**From Legitimate Domain Module:** |
| 20 | +- Domain name |
| 21 | +- Ticket ID |
| 22 | +- Repurchased status (Yes/No) |
| 23 | +- Contact email |
| 24 | +- Creation/update timestamps |
| 25 | + |
| 26 | +**From Website Monitoring Module:** |
| 27 | +- Domain name |
| 28 | +- Ticket ID |
| 29 | +- Legitimacy score (2-6) |
| 30 | +- IP addresses (primary, secondary) |
| 31 | +- MX records |
| 32 | +- Mail server IP |
| 33 | +- Takedown request status |
| 34 | +- Legal team notification status |
| 35 | +- Blocking request status |
| 36 | +- Creation/update timestamps |
| 37 | + |
| 38 | +--- |
10 | 39 |
|
11 | 40 | ### Prerequisites |
12 | 41 | - Access to the Watcher API |
13 | 42 | - A valid API key for Watcher |
14 | 43 | - A functional instance of Cortex and TheHive |
15 | 44 |
|
| 45 | +--- |
| 46 | + |
16 | 47 | ### Installation |
17 | | -- Add the configuration files for this analyzer to your Cortex configuration. |
| 48 | + |
| 49 | +Add the configuration file to the Cortex configurations. |
| 50 | + |
| 51 | +--- |
18 | 52 |
|
19 | 53 | ### Configuration |
20 | | -In Cortex, configure the following parameters for the Analyzer: |
21 | 54 |
|
22 | | -| Parameter | Description | Required | Default Value | |
23 | | -|--------------------|--------------------------------------------------------------------|----------|----------------| |
24 | | -| `watcher_url` | URL of Watcher (e.g. `https://example.watcher.local:9002`) | Yes | - | |
25 | | -| `watcher_api_key` | API key for authenticating | Yes | - | |
| 55 | +Configure the following parameters in Cortex: |
26 | 56 |
|
27 | | -### Usage |
28 | | -When a domain artifact is submitted to this analyzer, it will: |
29 | | -1. Query the Watcher API to check if the domain is already monitored. |
30 | | -2. Return a report with either the monitoring status of the domain or an indication that it is not yet monitored. |
| 57 | +| Parameter | Description | Type | Required | |
| 58 | +|-------------------|--------------------------------------------------------------------|--------|----------| |
| 59 | +| `watcher_url` | Base URL of Watcher instance (e.g., `https://watcher.local:9002`) | String | Yes | |
| 60 | +| `watcher_api_key` | API authentication token for Watcher | String | Yes | |
31 | 61 |
|
32 | | -### Example JSON Response |
33 | | -#### Domain is already monitored |
| 62 | +**Example Configuration:** |
34 | 63 | ```json |
35 | 64 | { |
36 | | - "status": "Monitored", |
37 | | - "Message": "Domain 'example.com' is already monitored in Watcher.", |
38 | | - "ticket_id": "12345" |
| 65 | + "watcher_url": "https://watcher.example.com:9002", |
| 66 | + "watcher_api_key": "your-api-token-here" |
39 | 67 | } |
40 | 68 | ``` |
41 | 69 |
|
42 | | -#### Domain is not monitored |
43 | | -```json |
44 | | -{ |
45 | | - "status": "Not Monitored", |
46 | | - "Message": "Domain 'example.com' is not monitored in Watcher. You can add it using the Watcher responder." |
47 | | -} |
| 70 | +--- |
| 71 | + |
| 72 | +### Usage |
| 73 | + |
| 74 | +#### Check Domain Presence |
| 75 | +1. In TheHive, create a domain observable: `example.com` |
| 76 | +2. Run analyzer: **Watcher_Check** |
| 77 | +3. View results with one of four possible taxonomies: |
| 78 | + - `Watcher:Check = FoundOnBoth` (green) - Domain found in both modules |
| 79 | + - `Watcher:Check = FoundOnLegitDomain` (green) - Domain found in Legitimate Domain only |
| 80 | + - `Watcher:Check = FoundOnWebsiteMonitoring` (green) - Domain found in Website Monitoring only |
| 81 | + - `Watcher:Check = NotFound` (blue) - Domain not found in any module |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +### API Endpoints Used |
| 86 | + |
| 87 | +#### Legitimate Domain Module |
48 | 88 | ``` |
| 89 | +GET /api/common/legitimate_domains/?search={domain} |
| 90 | +``` |
| 91 | + |
| 92 | +#### Website Monitoring Module |
| 93 | +``` |
| 94 | +GET /api/site_monitoring/site/ |
| 95 | +``` |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +### Taxonomies |
| 100 | + |
| 101 | +The analyzer uses a unified taxonomy system: |
| 102 | + |
| 103 | +| Analyzer | Namespace | Predicate | Values | Colors | |
| 104 | +|-----------------|-----------|-----------|-------------------------------------------------------------------------------------------|---------------------| |
| 105 | +| **Watcher_Check** | Watcher | Check | FoundOnBoth / FoundOnLegitDomain / FoundOnWebsiteMonitoring / NotFound | safe / safe / safe / info | |
| 106 | + |
| 107 | +**Examples in TheHive:** |
| 108 | +- `Watcher:Check = "MonitoredOnBoth"` (Green badge) - Found in both modules |
| 109 | +- `Watcher:Check = "MonitoredOnLegitDomain"` (Green badge) - Found in Legitimate Domain only |
| 110 | +- `Watcher:Check = "MonitoredOnWebsiteMonitoring"` (Green badge) - Found in Website Monitoring only |
| 111 | +- `Watcher:Check = "None"` (Blue badge) - Not found in any module |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +### Best Practices |
49 | 116 |
|
50 | | -### Template Setup in TheHive |
| 117 | +1. **Single analyzer approach** - One analyzer checks both modules simultaneously |
| 118 | +2. **Use results** to trigger appropriate responders based on the status |
| 119 | +3. **Template files** provide rich visual feedback in TheHive interface with detailed information from both modules when available |
51 | 120 |
|
52 | | -To customize the display of analyzer results in TheHive, you can use **analyzer templates**. |
| 121 | +--- |
53 | 122 |
|
54 | | -Follow these steps to install the templates for the `Watcher_CheckDomain` analyzer: |
| 123 | +### Support |
55 | 124 |
|
56 | | -1. Navigate to **TheHive** web interface |
57 | | -2. Go to **Admin** > **Entities Management** > **Analyzer templates** |
58 | | -3. Click on **Import templates** |
59 | | -4. Browse to the template directory |
60 | | -5. Select both `short.html` and `long.html` files |
61 | | -6. Click **Import** |
62 | | -7. Make sure the templates are correctly associated with the `Watcher_CheckDomain` analyzer |
| 125 | +For issues, questions, or feature requests: |
| 126 | +- **GitHub Issues**: [Watcher Repository](https://github.com/thalesgroup-cert/Watcher/issues) |
63 | 127 |
|
64 | | -Once done, TheHive will use these templates to display the analyzer output with better readability and style. |
| 128 | +--- |
65 | 129 |
|
66 | | -### Author |
| 130 | +### Authors |
67 | 131 |
|
68 | 132 | **Thales Group CERT** - [thalesgroup-cert on GitHub](https://github.com/thalesgroup-cert) |
69 | 133 | **Ygal NEZRI** - [@ygalnezri](https://github.com/ygalnezri) |
0 commit comments