Logstash¶
Logstash, Elastic tarafından geliştirilen açık kaynaklı bir veri işleme ve log yönetimi aracıdır. Wallarm'ı, tespit edilen olay bildirimlerini Logstash'e gönderecek şekilde yapılandırabilirsiniz.
Bildirim Formatı¶
Wallarm, bildirimleri webhook aracılığıyla JSON formatında Logstash'e gönderir. JSON nesnelerinin kümesi, Wallarm'ın bildirim yaptığı olaya bağlıdır.
Yeni tespit edilen hit bildirimine bir örnek:
[
{
"summary": "[Wallarm] New hit detected",
"details": {
"client_name": "TestCompany",
"cloud": "EU",
"notification_type": "new_hits",
"hit": {
"domain": "www.example.com",
"heur_distance": 0.01111,
"method": "POST",
"parameter": "SOME_value",
"path": "/news/some_path",
"payloads": [
"say ni"
],
"point": [
"post"
],
"probability": 0.01,
"remote_country": "PL",
"remote_port": 0,
"remote_addr4": "8.8.8.8",
"remote_addr6": "",
"tor": "none",
"request_time": 1603834606,
"create_time": 1603834608,
"response_len": 14,
"response_status": 200,
"response_time": 5,
"stamps": [
1111
],
"regex": [],
"stamps_hash": -22222,
"regex_hash": -33333,
"type": "sqli",
"block_status": "monitored",
"id": [
"hits_production_999_202010_v_1",
"c2dd33831a13be0d_AC9"
],
"object_type": "hit",
"anomaly": 0
}
}
}
]
Gereksinimler¶
Logstash yapılandırması aşağıdaki gereksinimleri karşılamalıdır:
-
POST veya PUT isteklerini kabul etmek
-
HTTPS isteklerini kabul etmek
-
Genel bir URL’ye sahip olmak
Logstash yapılandırma örneği:
Daha fazla detayı resmi Logstash dokümantasyonunda bulabilirsiniz.
Entegrasyonu Ayarlama¶
-
Wallarm Console → Integrations → Logstash bölümüne giderek Logstash entegrasyon ayarlarına devam edin.
-
Entegrasyon adını girin.
-
Hedef Logstash URL'sini (Webhook URL) belirtin.
-
Gerekirse, gelişmiş ayarları yapılandırın:
- Request method:
POST
orPUT
. By default, POST requests are sent. - Request header and its value if the server requires a non-standard header to execute the request. The number of headers is not limited.
- CA certificate: certificate of CA that signed a server certificate. If CA is publicly trusted, this field is optional. If a server certificate is self-signed, this field is required and must contain a certificate of your own CA that signed a server certificate.
- Verify TLS certificate: this setting allows to disable verification of the specified server certificate. By default, Wallarm verifies whether a server certificate is signed by a publicly trusted CA. We do not recommend disabling the verification of production server certificates. If your server uses a self-signed TLS certificate, you can add a self-signed CA certificate to allow sending requests to this server.
- Request timeout, in seconds: if the server does not respond to the request within the specified time, the request fails. By default: 15 seconds.
- Connection timeout, in seconds: if the connection to the server cannot be established during the specified time, the request fails. By default: 20 seconds.
- Wallarm data format: either a JSON Array (default) or a New Line Delimited JSON (NDJSON).
- Request method:
-
Bildirimleri tetikleyecek olay tiplerini seçin.
Kullanılabilir olaylar hakkında detaylar:
-
Hits detected except for:
- Experimental hits detected based on the custom regular expression. Non-experimental hits trigger notifications.
- Hits not saved in the sample.
-
System related:
- User changes (newly created, deleted, role change)
- Integration changes (disabled, deleted)
- Application changes (newly created, deleted, name change)
- Errors during regular update of specifications used for rogue API detection or API specification enforcement
- Vulnerabilities detected, all by default or only for the selected risk level(s) - high, medium or low.
- Rules and triggers changed (creating, updating, or deleting the rule or trigger)
- (Requires AASM Enterprise) Security issues detected, all or only for the selected risk level(s):
- Critical risk
- High risk
- Medium risk
- Low risk
- Info risk
- On an hourly basis, you can get a notification with the number of requests processed during the previous hour
-
-
Yapılandırmanın doğruluğunu, Wallarm Cloud'un kullanılabilirliğini ve bildirim formatını kontrol etmek için Test integration butonuna tıklayın.
Test Logstash logu:
[ { summary:"[Test message] [Test partner(US)] New vulnerability detected", description:"Notification type: vuln New vulnerability was detected in your system. ID: Title: Test Domain: example.com Path: Method: Discovered by: Parameter: Type: Info Threat: Medium More details: https://us1.my.wallarm.com/object/555 Client: TestCompany Cloud: US ", details:{ client_name:"TestCompany", cloud:"US", notification_type:"vuln", vuln_link:"https://us1.my.wallarm.com/object/555", vuln:{ domain:"example.com", id:null, method:null, parameter:null, path:null, title:"Test", discovered_by:null, threat:"Medium", type:"Info" } } } ]
-
Add integration butonuna tıklayın.
Wallarm Cloud IP addresses
To provide Wallarm Cloud access to your system, you may need a list of its public IP addresses:
Ek Uyarıları Ayarlama¶
Besides the notifications you have already set up through the integration card, Wallarm triggers allow you to select additional events for notifications:
-
Number of attacks, hits or incidents per time interval (day, hour, etc.) exceeds the set number
What is not counted
- For attacks:
- The experimental attacks based on the custom regular expressions.
- For hits:
- The experimental hits based on the custom regular expressions.
- Hits not saved in the sample.
- For attacks:
-
Changes in API took place
-
IP address was denylisted
-
New rogue API (shadow, orphan, zombie) was detected
-
New user was added to the company account
For condition detailing, you can add one or more filters. As soon, as condition and filters are set, select the integration through which the selected alert should be sent. You can select several integrations simultaneously.
Araca Ara Toplayıcı Olarak Logstash Kullanma¶
The most common logging scheme in complex systems consists of the following components:
-
Data collector: accepts logs from several sources and forwards logs to the SIEM system
-
SIEM system or log management systems: used to analyze logs and monitor the system status
Örneğin:
Bu şemayı kullanarak Wallarm olaylarını loglamak için:
-
Gelen webhook'ları okuyup logları bir sonraki sisteme iletecek şekilde veri toplayıcıyı yapılandırın. Wallarm, olayları webhook'lar aracılığıyla veri toplayıcılara gönderir.
-
Veri toplayıcıdan logları alıp okuyacak şekilde bir SIEM sistemini yapılandırın.
-
Wallarm'ı, logları veri toplayıcıya gönderecek şekilde yapılandırın.
Wallarm, logları webhook'lar aracılığıyla herhangi bir veri toplayıcıya gönderebilir.
Wallarm'ı Fluentd veya Logstash ile entegre etmek için, Wallarm Console UI'da ilgili entegrasyon kartlarını kullanabilirsiniz.
Wallarm'ı diğer veri toplayıcıları ile entegre etmek için, Wallarm Console UI'da bulunan webhook integration card kullanılabilir.
Popüler veri toplayıcılara logları SIEM sistemlerine iletmek için entegrasyonun nasıl yapılandırılacağına dair bazı örnekleri açıkladık:
-
Wallarm ayrıca Datadog API aracılığıyla Datadog ile yerel entegrasyonu desteklemektedir. Yerel entegrasyon için ara veri toplayıcının kullanılmasına gerek yoktur.
Bir Entegrasyonun Devre Dışı Bırakılması ve Silinmesi¶
You can delete or temporarily disable the integration. While deleting stops sending notificatioins and completely deletes all configuration, disabling just stops sending notifications which you can at any moment re-enable with the same settings.
If for the integration the System related events are selected to trigger notifications, Wallarm will notify about both of these actions.