-
Zitnik, Anze authored
Squashed commit of the following: commit 40d02c48 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Jul 15 13:04:16 2022 +0000 Update README.md commit e0241dc7 Merge: 24996290 04db64f0 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 14:10:25 2022 +0000 Merge branch 'redis-version-upgrade' into 'master' Upgraded Redis version See merge request medina/evidence-collector!18 commit 04db64f0 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri May 20 16:06:59 2022 +0200 Upgraded Redis version commit 24996290 Merge: 64ce6c53 7d66a733 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 12:53:53 2022 +0000 Merge branch 'debug-logging' into 'master' Additional logging See merge request medina/evidence-collector!17 commit 7d66a733 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri May 20 14:48:56 2022 +0200 Additional logging commit 64ce6c53 Merge: 641bb587 e9398a1e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri May 20 09:40:20 2022 +0000 Merge branch 'k8s-config-update' into 'master' K8s config update See merge request medina/evidence-collector!16 commit e9398a1e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 09:40:20 2022 +0000 K8s config update commit 641bb587 Merge: 320c3c2c c7f5e0aa Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Apr 20 15:52:16 2022 +0000 Merge branch 'oauth2-config-update' into 'master' gRPC config & exception handling update See merge request medina/evidence-collector!15 commit c7f5e0aa Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Wed Apr 20 15:52:16 2022 +0000 gRPC config & exception handling update commit 320c3c2c Merge: cfc71e8d 6186bb87 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 19 09:59:10 2022 +0000 Merge branch 'config-update' into 'master' Updated clouditor host & port config See merge request medina/evidence-collector!14 commit 6186bb87 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Apr 19 11:55:57 2022 +0200 Updated clouditor host & port config commit cfc71e8d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 12 16:58:22 2022 +0200 Fix k8s config commit ec8ddf6a Merge: 46646188 60bd257e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 5 11:05:06 2022 +0000 Merge branch 'wazuh-threat-count' into 'master' Wazuh threat count See merge request medina/evidence-collector!13 commit 60bd257e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Apr 5 11:05:05 2022 +0000 Wazuh threat count commit 46646188 Merge: 2eb0fa06 4ee3ff18 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Apr 1 12:31:15 2022 +0000 Merge branch 'cron-interval' into 'master' Custom Cron job interval See merge request medina/evidence-collector!12 commit 4ee3ff18 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Apr 1 12:31:15 2022 +0000 Custom Cron job interval commit 2eb0fa06 Merge: a8a65509 2a3f602f Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Mar 25 15:10:28 2022 +0000 Merge branch 'resource-id-mapping' into 'master' Resource ID mapping See merge request medina/evidence-collector!11 commit 2a3f602f Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Mar 25 15:10:28 2022 +0000 Resource ID mapping commit a8a65509 Merge: 530ddad1 cb432ad4 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Mar 24 11:57:45 2022 +0100 Merge branch 'master' of git.code.tecnalia.com:medina/wp3/task_3.2/evidence-collector commit 530ddad1 Merge: a7951bf4 037167ff Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Mar 24 10:52:27 2022 +0000 Merge branch 'updated-error-handling' into 'master' Updated error handling and tests See merge request medina/evidence-collector!10 commit 037167ff Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Thu Mar 24 10:52:27 2022 +0000 Updated error handling and tests commit a7951bf4 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Mar 22 16:57:43 2022 +0100 Minor bug fix commit eed1854b Merge: 99cf3d50 0ab0d80e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Mar 22 15:04:16 2022 +0000 Merge branch 'oauth2-implementation' into 'master' Oauth2 implementation See merge request medina/evidence-collector!9 commit 0ab0d80e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Mar 22 15:04:16 2022 +0000 Oauth2 implementation commit 99cf3d50 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Mar 9 16:03:41 2022 +0100 Fixed problems with environment variables & updated README commit cb432ad4 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Mar 8 10:10:30 2022 +0100 Version 0.0.8 commit 75a950df Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Mon Mar 7 17:38:19 2022 +0100 Migration from json config to env variables Migration from json config to env variables Fixed failing CI job commit f1f537ff Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Feb 22 13:15:15 2022 +0100 Add malwareProtectionOutput metric Separate malware protection evidence Data combined in single evidence, updated output struct Fixed Python image in Dockerfile commit 40821f7e Merge: a0b4d6d5 3aa96646 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Feb 15 12:42:06 2022 +0000 Merge branch 'elasticsearch-query-update' into 'master' Corrected elasticsearch rule.description query See merge request medina/evidence-collector!5 commit 3aa96646 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Feb 15 13:22:58 2022 +0100 Corrected elasticsearch rule.description query commit a0b4d6d5 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Feb 15 11:45:12 2022 +0100 CI: automate deploy to MEDINA k8s. commit 57b66dc2 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 17:35:06 2022 +0100 Add basic kubernetes YAML definitions. commit 1cf48f6e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:22:15 2022 +0100 Add demo mode function. Squashed commit of the following: commit 718efd4db1fd64e5baed53d27c149219fab47879 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:03:58 2022 +0100 Version up commit c574b33acd9c5c131e8a2b53ad69ff1a970d2203 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:02:07 2022 +0100 Add demo mode function. Created an option in constants.json where demo mode can be selected. It will not query wazuh or elastic, just output random evidence. commit 7e7ce806 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Jan 18 13:56:32 2022 +0100 Rename artifact name adding wazuh-vat prefix to evidence-collector commit 06f97ad3 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Jan 18 13:49:44 2022 +0100 Add docker push to MEDINA artifactory to CI script commit 6f3d5cfb Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 13:40:12 2021 +0100 Fix some typos in code commit 8904133d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:49:08 2021 +0100 Use AssessEvidence instead of StoreEvidence RPC on Clouditor. Some refactoring. Squashed commit of the following: commit 11ae9a48f6b41c2dc5b3e00de1b808b75cc39013 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:40:01 2021 +0100 Change CI script: build and test all branches commit fe84541d50ffc6b25d5fff94b1781345ec2b548d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:33:07 2021 +0100 Version up commit b99df078408ea2649ce59cd2d17c247c04c6a992 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:25:12 2021 +0100 Update dockerignore: add (v)env folder. commit 20944e6743ce112d558fb0205a9347a46c17da8b Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 10:56:41 2021 +0100 Refactoring: move all gRPC-generated files to their own package (grpc_gen). commit f4dce9c9076a1336dc7d0b5e15759b24c4f9bea7 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 10:34:05 2021 +0100 Use AssessEvidence instead of StoreEvidence RPC on Clouditor. Added necessary proto files (removed unneeded) and regenerated python code from them. Also added Google APIs dependencies for grpc code generation. Accordingly updated README. Also updated requirements.txt to include some packages for grpc python code generation and for usage of Google APIs. Note that with the call to AssessEvidence, we need to provide an AssessEvidenceRequest object (instead of simply Evidence as before). Most changes of existing code are because of this. commit 257ce00a Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:40:01 2021 +0100 Change CI script: build and test all branches commit 4e52cac5 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Dec 10 13:35:36 2021 +0100 Version up commit 313a0139 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Dec 10 13:34:37 2021 +0100 Logging all exceptions commit 1e714e73 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Dec 9 17:49:41 2021 +0100 Use logging. Replaced all print() calls with logger.info/debug. Printing evidence objects. Logging to /var/log/evidence_collector.log and setting tailf to this file in docker entrypoint. Version 0.0.4. Squashed commit of the following: commit 825d1f95a141f8e11703c27889e53a6e16c3cd66 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Dec 1 12:21:26 2021 +0100 Output logs to /var/log... and tailf in Dockerfile commit db9b34317d19e42316fc0c5f0a8f60b03b2e4dbc Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Dec 1 12:19:54 2021 +0100 Introduce logger. Replace all prints. commit e6220b09 Merge: 4484a05f 1636c411 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Mon Nov 22 08:46:47 2021 +0000 Merge branch 'develop' into 'master' Updated gRPC message structure See merge request medina/evidence-collector!4 commit 1636c411 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Mon Nov 22 08:46:47 2021 +0000 Updated gRPC message structure commit 4484a05f Merge: 9221f03b d4329db8 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Mon Nov 15 15:56:17 2021 +0000 Merge branch 'develop' into 'master' gRPC implementation See merge request medina/evidence-collector!3 commit d4329db8 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Mon Nov 15 15:56:16 2021 +0000 gRPC implementation commit 9221f03b Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Nov 5 09:02:24 2021 +0100 Replaced LICENSE (Apache 2.0). commit 5b488ed8 Merge: eef54a04 658a7ec6 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Oct 19 11:53:52 2021 +0000 Merge branch 'develop' into 'master' Merge CI tests to Master See merge request medina/evidence-collector!2 commit 658a7ec6 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Oct 19 11:53:52 2021 +0000 Merge CI tests to Master commit eef54a04 Merge: c0b92a96 254dd879 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Oct 8 15:20:36 2021 +0000 Merge branch 'develop' into 'master' Added initial Docker image See merge request medina/evidence-collector!1 commit 254dd879 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri Oct 8 14:35:45 2021 +0200 Added CI config commit fe175304 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Tue Oct 5 10:53:59 2021 +0200 Working Docker image commit e9bb14da Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Oct 1 12:37:15 2021 +0200 Added scheduling and proto files commit 7a579ff1 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Tue Sep 28 11:33:43 2021 +0200 Added Dockerfile commit 3384ba8d Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Sep 24 12:46:51 2021 +0200 Added ClamAV install verification via Elasticsearch commit c0b92a96 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Sep 28 09:46:58 2021 +0200 Empty repo init commit 603b253e Author: matevz_erzen <matevz.erzen@xlab.si> Date: Wed Sep 22 15:46:12 2021 +0200 Check ClamAV packages and process commit a0fe1815 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Sep 17 14:29:57 2021 +0200 VirusTotal and last scan checks commit 2917af9e Author: matevz_erzen <matevz.erzen@xlab.si> Date: Thu Sep 16 17:24:20 2021 +0200 Basic configuration checks commit d13f5ba7 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Sep 15 10:13:39 2021 +0200 initial
Zitnik, Anze authoredSquashed commit of the following: commit 40d02c48 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Jul 15 13:04:16 2022 +0000 Update README.md commit e0241dc7 Merge: 24996290 04db64f0 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 14:10:25 2022 +0000 Merge branch 'redis-version-upgrade' into 'master' Upgraded Redis version See merge request medina/evidence-collector!18 commit 04db64f0 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri May 20 16:06:59 2022 +0200 Upgraded Redis version commit 24996290 Merge: 64ce6c53 7d66a733 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 12:53:53 2022 +0000 Merge branch 'debug-logging' into 'master' Additional logging See merge request medina/evidence-collector!17 commit 7d66a733 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri May 20 14:48:56 2022 +0200 Additional logging commit 64ce6c53 Merge: 641bb587 e9398a1e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri May 20 09:40:20 2022 +0000 Merge branch 'k8s-config-update' into 'master' K8s config update See merge request medina/evidence-collector!16 commit e9398a1e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri May 20 09:40:20 2022 +0000 K8s config update commit 641bb587 Merge: 320c3c2c c7f5e0aa Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Apr 20 15:52:16 2022 +0000 Merge branch 'oauth2-config-update' into 'master' gRPC config & exception handling update See merge request medina/evidence-collector!15 commit c7f5e0aa Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Wed Apr 20 15:52:16 2022 +0000 gRPC config & exception handling update commit 320c3c2c Merge: cfc71e8d 6186bb87 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 19 09:59:10 2022 +0000 Merge branch 'config-update' into 'master' Updated clouditor host & port config See merge request medina/evidence-collector!14 commit 6186bb87 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Apr 19 11:55:57 2022 +0200 Updated clouditor host & port config commit cfc71e8d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 12 16:58:22 2022 +0200 Fix k8s config commit ec8ddf6a Merge: 46646188 60bd257e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Apr 5 11:05:06 2022 +0000 Merge branch 'wazuh-threat-count' into 'master' Wazuh threat count See merge request medina/evidence-collector!13 commit 60bd257e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Apr 5 11:05:05 2022 +0000 Wazuh threat count commit 46646188 Merge: 2eb0fa06 4ee3ff18 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Apr 1 12:31:15 2022 +0000 Merge branch 'cron-interval' into 'master' Custom Cron job interval See merge request medina/evidence-collector!12 commit 4ee3ff18 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Apr 1 12:31:15 2022 +0000 Custom Cron job interval commit 2eb0fa06 Merge: a8a65509 2a3f602f Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Mar 25 15:10:28 2022 +0000 Merge branch 'resource-id-mapping' into 'master' Resource ID mapping See merge request medina/evidence-collector!11 commit 2a3f602f Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Fri Mar 25 15:10:28 2022 +0000 Resource ID mapping commit a8a65509 Merge: 530ddad1 cb432ad4 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Mar 24 11:57:45 2022 +0100 Merge branch 'master' of git.code.tecnalia.com:medina/wp3/task_3.2/evidence-collector commit 530ddad1 Merge: a7951bf4 037167ff Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Mar 24 10:52:27 2022 +0000 Merge branch 'updated-error-handling' into 'master' Updated error handling and tests See merge request medina/evidence-collector!10 commit 037167ff Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Thu Mar 24 10:52:27 2022 +0000 Updated error handling and tests commit a7951bf4 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Mar 22 16:57:43 2022 +0100 Minor bug fix commit eed1854b Merge: 99cf3d50 0ab0d80e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Mar 22 15:04:16 2022 +0000 Merge branch 'oauth2-implementation' into 'master' Oauth2 implementation See merge request medina/evidence-collector!9 commit 0ab0d80e Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Mar 22 15:04:16 2022 +0000 Oauth2 implementation commit 99cf3d50 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Mar 9 16:03:41 2022 +0100 Fixed problems with environment variables & updated README commit cb432ad4 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Mar 8 10:10:30 2022 +0100 Version 0.0.8 commit 75a950df Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Mon Mar 7 17:38:19 2022 +0100 Migration from json config to env variables Migration from json config to env variables Fixed failing CI job commit f1f537ff Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Feb 22 13:15:15 2022 +0100 Add malwareProtectionOutput metric Separate malware protection evidence Data combined in single evidence, updated output struct Fixed Python image in Dockerfile commit 40821f7e Merge: a0b4d6d5 3aa96646 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Feb 15 12:42:06 2022 +0000 Merge branch 'elasticsearch-query-update' into 'master' Corrected elasticsearch rule.description query See merge request medina/evidence-collector!5 commit 3aa96646 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Tue Feb 15 13:22:58 2022 +0100 Corrected elasticsearch rule.description query commit a0b4d6d5 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Feb 15 11:45:12 2022 +0100 CI: automate deploy to MEDINA k8s. commit 57b66dc2 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 17:35:06 2022 +0100 Add basic kubernetes YAML definitions. commit 1cf48f6e Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:22:15 2022 +0100 Add demo mode function. Squashed commit of the following: commit 718efd4db1fd64e5baed53d27c149219fab47879 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:03:58 2022 +0100 Version up commit c574b33acd9c5c131e8a2b53ad69ff1a970d2203 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Jan 20 16:02:07 2022 +0100 Add demo mode function. Created an option in constants.json where demo mode can be selected. It will not query wazuh or elastic, just output random evidence. commit 7e7ce806 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Jan 18 13:56:32 2022 +0100 Rename artifact name adding wazuh-vat prefix to evidence-collector commit 06f97ad3 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Jan 18 13:49:44 2022 +0100 Add docker push to MEDINA artifactory to CI script commit 6f3d5cfb Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 13:40:12 2021 +0100 Fix some typos in code commit 8904133d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:49:08 2021 +0100 Use AssessEvidence instead of StoreEvidence RPC on Clouditor. Some refactoring. Squashed commit of the following: commit 11ae9a48f6b41c2dc5b3e00de1b808b75cc39013 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:40:01 2021 +0100 Change CI script: build and test all branches commit fe84541d50ffc6b25d5fff94b1781345ec2b548d Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:33:07 2021 +0100 Version up commit b99df078408ea2649ce59cd2d17c247c04c6a992 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:25:12 2021 +0100 Update dockerignore: add (v)env folder. commit 20944e6743ce112d558fb0205a9347a46c17da8b Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 10:56:41 2021 +0100 Refactoring: move all gRPC-generated files to their own package (grpc_gen). commit f4dce9c9076a1336dc7d0b5e15759b24c4f9bea7 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 10:34:05 2021 +0100 Use AssessEvidence instead of StoreEvidence RPC on Clouditor. Added necessary proto files (removed unneeded) and regenerated python code from them. Also added Google APIs dependencies for grpc code generation. Accordingly updated README. Also updated requirements.txt to include some packages for grpc python code generation and for usage of Google APIs. Note that with the call to AssessEvidence, we need to provide an AssessEvidenceRequest object (instead of simply Evidence as before). Most changes of existing code are because of this. commit 257ce00a Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Dec 14 11:40:01 2021 +0100 Change CI script: build and test all branches commit 4e52cac5 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Dec 10 13:35:36 2021 +0100 Version up commit 313a0139 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Dec 10 13:34:37 2021 +0100 Logging all exceptions commit 1e714e73 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Thu Dec 9 17:49:41 2021 +0100 Use logging. Replaced all print() calls with logger.info/debug. Printing evidence objects. Logging to /var/log/evidence_collector.log and setting tailf to this file in docker entrypoint. Version 0.0.4. Squashed commit of the following: commit 825d1f95a141f8e11703c27889e53a6e16c3cd66 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Dec 1 12:21:26 2021 +0100 Output logs to /var/log... and tailf in Dockerfile commit db9b34317d19e42316fc0c5f0a8f60b03b2e4dbc Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Dec 1 12:19:54 2021 +0100 Introduce logger. Replace all prints. commit e6220b09 Merge: 4484a05f 1636c411 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Mon Nov 22 08:46:47 2021 +0000 Merge branch 'develop' into 'master' Updated gRPC message structure See merge request medina/evidence-collector!4 commit 1636c411 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Mon Nov 22 08:46:47 2021 +0000 Updated gRPC message structure commit 4484a05f Merge: 9221f03b d4329db8 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Mon Nov 15 15:56:17 2021 +0000 Merge branch 'develop' into 'master' gRPC implementation See merge request medina/evidence-collector!3 commit d4329db8 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Mon Nov 15 15:56:16 2021 +0000 gRPC implementation commit 9221f03b Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Nov 5 09:02:24 2021 +0100 Replaced LICENSE (Apache 2.0). commit 5b488ed8 Merge: eef54a04 658a7ec6 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Oct 19 11:53:52 2021 +0000 Merge branch 'develop' into 'master' Merge CI tests to Master See merge request medina/evidence-collector!2 commit 658a7ec6 Author: Matevž Eržen <matevz.erzen@xlab.si> Date: Tue Oct 19 11:53:52 2021 +0000 Merge CI tests to Master commit eef54a04 Merge: c0b92a96 254dd879 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Fri Oct 8 15:20:36 2021 +0000 Merge branch 'develop' into 'master' Added initial Docker image See merge request medina/evidence-collector!1 commit 254dd879 Author: Matevz Erzen <matevz.erzen@xlab.si> Date: Fri Oct 8 14:35:45 2021 +0200 Added CI config commit fe175304 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Tue Oct 5 10:53:59 2021 +0200 Working Docker image commit e9bb14da Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Oct 1 12:37:15 2021 +0200 Added scheduling and proto files commit 7a579ff1 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Tue Sep 28 11:33:43 2021 +0200 Added Dockerfile commit 3384ba8d Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Sep 24 12:46:51 2021 +0200 Added ClamAV install verification via Elasticsearch commit c0b92a96 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Tue Sep 28 09:46:58 2021 +0200 Empty repo init commit 603b253e Author: matevz_erzen <matevz.erzen@xlab.si> Date: Wed Sep 22 15:46:12 2021 +0200 Check ClamAV packages and process commit a0fe1815 Author: matevz_erzen <matevz.erzen@xlab.si> Date: Fri Sep 17 14:29:57 2021 +0200 VirusTotal and last scan checks commit 2917af9e Author: matevz_erzen <matevz.erzen@xlab.si> Date: Thu Sep 16 17:24:20 2021 +0200 Basic configuration checks commit d13f5ba7 Author: Anže Žitnik <anze.zitnik@xlab.si> Date: Wed Sep 15 10:13:39 2021 +0200 initial
- Evidence Collector
- Wazuh evidence collector
- Installation & use
- Using docker
- Local environment
- Component configuration
- Environment variables
- Medina resource ID mapping
- Generate gRPC code from .proto files
- API User authentication
- Manual Elasticsearch API testin with cURL
- Running RQ and RQ-scheduler locally
- Known issues & debugging
- Debugging gRPC services
- Python Elasticsearch library problems with ODFE
Evidence Collector
Author: XLAB
This project includes modules for collecting evidence regarding Wazuh and VAT and sending it to Clouditor for further processing.
Wazuh evidence collector
Wazuh evidence collector uses Wazuh's API to access information about manager's and agents' system informations and configurations. As an additional measure to ensure correct configuration of ClamAV (if installed on machine) we also make use of Elasticsearch's API to dirrectly access collected logs | Elastic stack is one of the Wazuh's required components (usually installed on the same machine as Wazuh server, but can be stand alone as well).
Installation & use
Using docker
-
Set up your Wazuh development environment. Use Security Monitoring repository to create and deploy Vagrant box with all the required components.
-
Clone this repository.
-
Build Docker image:
$ make build
-
Run the image:
$ make run
Note: See
Environment variables
section for more information about configuration of this component and it's interaction with Wazuh, Clouditor etc.
Local environment
-
Set up your Wazuh development environment. Use Security Monitoring repository to create and deploy Vagrant box with all required components.
-
Clone this repository.
-
Install dependencies:
$ pip install -r requirements.txt
-
Set environment variables:
$ source .env
-
a) Install Redis server locally:
$ sudo apt-get install redis-server
Note: To stop Redis server use
/etc/init.d/redis-server stop
.b) Run Redis server in Docker container:
$ docker run --name my-redis-server -p 6379:6379 -d redis
In this case also comment-out server start command in
entrypoint.sh
:#redis-server &
-
Run
entrypoint.sh
:$ ./entrypoint.sh
Note: This repository consists of multiple Python modules. When running Python code manually, use of
-m
flag might be necessary.
Component configuration
Environment variables
Required environment variables (if deployed locally) are located and can be set in .env
file.
Variables used when deploying to Kubernetes can be edited in data
section of /kubernetes/wazuh-vat-evidence-collector-configmap.yaml
file.
All of the following environment variables have to be set (or passed to container) for evidence-collector
to work:
Variable | Description |
---|---|
dummy_wazuh_manager |
Default value false . Set to true in case Evidence collector runs alone (without security-monitoring framework) locally - generates dummy data. |
wazuh_host |
Wazuh manager host's IP address. |
wazuh_port |
Wazuh manager port. Default value 55000 . |
wazuh_username |
Wazuh manager's username. |
wazuh_password |
Wazuh manager's password. |
elastic_host |
Elasticsearch host's IP address. Usually same as wazuh_host . |
elastic_port |
Elasticsearch port. Default value 9200 . |
elastic_username |
Elasticsearch's username. |
elastic_password |
Elasticsearch's password. |
redis_host |
Redis server host's IP address. Usually localhost . |
redis_port |
Redis server port. Default value 6379 . |
redis_queue |
Redis queue name. |
local_clouditor_deploy |
Default value true . Set to false in case Evidence collector will be using Kubernetes deployed Clouditor. |
clouditor_host |
Clouditor host's IP address. |
clouditor_port |
Clouditor port. Default value 9090 . |
clouditor_oauth2_port |
Clouditor port used for authentication services. Default value 8080 . |
clouditor_client_id |
Clouditor OAuth2 default id. Default value clouditor . |
clouditor_client_secret |
Clouditor OAuth2 default secret. Default value clouditor . |
clouditor_oauth2_scope |
Must be defined if local_clouditor_deploy is set to false . Defines scope used when requesting OAuth2 token. |
wazuh_check_interval |
Interval in seconds (rounded to a minute/60 second intervals); how often should evidence be created and forwarded. Should be the same as the check interval set on Wazuh manager. |
wazuh_rule_level |
Min. Wazuh rule severity level that is required for an event to be counted as a threat. |
Medina resource ID mapping
Resource IDs used to generate evidence resources can be easily mapped to required values. In case ID isn't set, Evidence collector will use name
parameter acquired from Wazuh - which is set to machine's hostname, unless explicitly set to something else.
IDs can be set as key:value
pairs inside resource_id_map.json
file, that is later passed to Docker container:
{
"manager": "wazuh_manager",
"agent1": "test_agent_1",
"agent2": "test_agent_2"
}
Where key
represents Wazuh's name
parameter (machine's hostname) and value
equals to string name
will be mapped to.
.proto
files
Generate gRPC code from pip3 install grpcio-tools # (included in requirements.txt)
python3 -m grpc_tools.protoc --proto_path=proto evidence.proto --python_out=grpc_gen --grpc_python_out=grpc_gen
python3 -m grpc_tools.protoc --proto_path=proto assessment.proto --python_out=grpc_gen --grpc_python_out=grpc_gen
python3 -m grpc_tools.protoc --proto_path=proto metric.proto --python_out=grpc_gen --grpc_python_out=grpc_gen
As we are interacting with Clouditor, .proto files are taken from there.
Because of dependencies on Google APIs, .proto files in proto/google are taken from here.
Note: since we are running the code as a package, we have to modify imports in newly generated code:
import evidence_pb2 as evidence__pb2
-->import grpc_gen.evidence_pb2 as evidence__pb2
(check all generated files)
API User authentication
Current implementation has disabled SSL certificate verification & uses simple username/password verification (defined inside /constants/constants.py
). Production version should change this with cert verification.
Manual Elasticsearch API testin with cURL
Example command for testing the API via CLI:
$ curl --user admin:changeme --insecure -X GET "https://192.168.33.10:9200/wazuh-alerts*/_search?pretty" -H 'Content-Type: application/json' -d'
{"query": {
"bool": {
"must": [{"match": {"predecoder.program_name": "clamd"}},
{"match": {"rule.description": "Clamd restarted"}},
{"match": {"agent.id": "001"}}]
}
}
}'
RQ and RQ-scheduler locally
Running-
Install (if needed) and run
redis-server
:$ sudo apt-get install redis-server $ redis-server
Note: By default, server listens on port
6379
. Take this into consideration when starting other components. -
Install RQ and RQ-scheduler:
$ pip install rq $ pip install rq-scheduler
-
Run both components in 2 terminals:
$ rqworker low $ rqscheduler --host localhost --port 6379
Note:
low
in the first command references task queue worker will use. -
Run Python script containing RQ commands as usual:
$ python3 -m wazuh_evidence_collector.wazuh_evidence_collector
Known issues & debugging
Debugging gRPC services
gRPC can be easily set to verbose debug mode by adding the following variables to .env
file passed to Docker container:
GRPC_VERBOSITY=DEBUG
GRPC_TRACE=http,tcp,api,channel,connectivity_state,handshaker,server_channel
Full list of gRPC environment variables is available here.
Python Elasticsearch library problems with ODFE
Latest versions (7.14.0
& 7.15.0
) of Python Elasticsearch library have problems connecting to Open Distro for Elasticsearch and produce the following error when trying to do so:
elasticsearch.exceptions.UnsupportedProductError: The client noticed that the server is not a supported distribution of Elasticsearch
To resolve this, downgrade to older package version:
$ pip install 'elasticsearch<7.14.0'