Compare commits

153 Commits

Author SHA1 Message Date
kamil-certat
e2b164525f Merge pull request #30 from qux-bbb/patch-1
Fix wrong command
2024-02-05 15:43:31 +01:00
qux-bbb
52e0be995f Fix wrong command 2024-02-05 22:26:59 +08:00
kamil-certat
c146edfe86 Merge pull request #29 from CERTUNLP/main
Update entrypoint-dev.sh
2023-11-15 08:51:59 +01:00
Einar Felipe Lanfranco
d8f07d0a5a Update entrypoint-dev.sh
I detected some wrong path, i fixed and i think this will fix https://github.com/certat/intelmq-docker/issues/20
2023-10-04 00:35:16 -03:00
Kamil Mankowski
336b93e68c IntelMQ 3.2.1. Improvmenets to test.sh 2023-08-29 12:01:12 +02:00
Kamil Mankowski
2438c10d89 Merge branch 'pr23-certnupl' 2023-08-22 15:53:49 +02:00
Kamil Mankowski
6f9531eeb8 Revert to build from local Dockerfile 2023-08-22 15:52:22 +02:00
kamil-certat
4309530173 Merge pull request #27 from certat/fix_image
Fix IntelMQ 3.2.0 image
2023-07-27 17:16:37 +02:00
Kamil Mankowski
3972be906d Add missed sieve dependency 2023-07-27 17:15:25 +02:00
Kamil Mankowski
5142422890 Remove deprecated config 2023-07-27 16:51:22 +02:00
Kamil Mankowski
bfd8a78a55 Fix uvicorn commands 2023-07-27 16:47:49 +02:00
kamil-certat
a54eb8b845 Merge pull request #24 from certat/intelmq-3.2
Update submodules and Docker for IntelMQ 3.2
2023-07-25 16:10:30 +02:00
Kamil Mankowski
a597fec2a9 Update to IntelMQ 3.2
Move from nosetests to pytest. Move from hug to FastAPI
2023-07-25 16:01:46 +02:00
Kamil Mankowski
90e696543f Update submodules and Docker for IntelMQ 3.2 2023-07-20 16:53:21 +02:00
Einar Felipe Lanfranco
5f98e21a08 Update DEVELOP-GUIDE.md
/opt/install_reqs_and_deploy_bots.sh needs to be called without sudo
2023-05-10 14:45:19 -03:00
Einar Felipe Lanfranco
19cca62755 Update Dockerfile
Added new linr
2023-05-09 16:16:19 -03:00
Einar Lanfranco
c8d43a993b reset config files 2023-05-09 14:19:07 -03:00
Einar Felipe Lanfranco
500c4b1483 Update docker-compose-dev.yml
Tenía mal la referencia a un volumen
2023-05-09 14:13:42 -03:00
Einar Lanfranco
454ca624ff remove example bots 2022-11-28 18:24:28 -03:00
Einar Lanfranco
6947ae3cad Some modifications made to developer guide and a new noop collector bot example added 2022-11-26 14:00:12 -03:00
Einar Lanfranco
c4a77efb42 Update example_bots noop collector 2022-11-26 13:05:15 -03:00
Einar Lanfranco
7e82a9a6e0 volume renamed 2022-11-18 18:56:50 -03:00
Einar Lanfranco
703b49c581 Documentation fix 2022-11-18 18:05:44 -03:00
Einar Lanfranco
c6b4f0ef1e Fixing some more paths, and something in install_reqs_and_deploy_bots 2022-11-18 16:00:09 -03:00
Einar Lanfranco
add8ae79df Merge branch 'main' of https://github.com/certat/intelmq-docker into main 2022-11-18 14:08:06 -03:00
Einar Lanfranco
f9c139ecc0 Path changes solve 2022-11-18 13:55:20 -03:00
Sebastian Waldbauer
7c69331d59 FIX: Fixed some missing dependecies
closes #16
closes #15

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2022-11-15 14:36:41 +01:00
Einar Felipe Lanfranco
51a1d7a4bf Update Dockerfile
Good morning, we found an error in sudoers file, it must be /etc/ not /opt/ !
2022-11-15 11:59:56 +01:00
Einar Lanfranco
25166024c8 Quick fix in runtime.yaml we need to add destination_pipeline_host: redis, source_pipeline_host: redis bacuase intelmqdump dont care about environment variables 2022-11-14 13:48:48 +01:00
Einar Lanfranco
ef59195dfd fixing volumes in documentation 2022-11-14 13:48:48 +01:00
Einar Lanfranco
4872c73489 fixing known issues documentation 2022-11-14 13:48:48 +01:00
Einar Lanfranco
1c397f394d fixing known issues documentation 2022-11-14 13:48:48 +01:00
Einar Lanfranco
9be93b3ddc fix to support dependenceies for all intelmq default bots 2022-11-14 13:48:48 +01:00
Einar Felipe Lanfranco
0e305ca842 Update DEVELOP-GUIDE.md 2022-11-14 13:48:48 +01:00
Einar Lanfranco
662f6ab390 fix entrypoint 2022-11-14 13:48:48 +01:00
Einar Lanfranco
9fb2364546 DEV README fix 2022-11-14 13:48:48 +01:00
Einar Felipe Lanfranco
821dbbefcc Update DEVELOP-GUIDE.md 2022-11-14 13:48:48 +01:00
Einar Felipe Lanfranco
4277635f68 Update entrypoint-dev.sh
Actualizando el entrypoint para prender del inicio
2022-11-14 13:48:48 +01:00
Einar Felipe Lanfranco
d6ed749a27 Update docker-compose-dev.yml
Agregando soporte para emcemder el cluster cuando prende el contenedor
2022-11-14 13:48:48 +01:00
Einar Lanfranco
fd95d93d99 Adding notes to DEVELOP-GUIDE 2022-11-14 13:48:48 +01:00
Einar Lanfranco
9e39baeca5 Adding new entrypoint 2022-11-14 13:48:48 +01:00
Einar Lanfranco
08859e2108 Actualizados para los cambios de 3.0.2 que trajeron muchos problemas 2022-11-14 13:48:48 +01:00
Einar Lanfranco
9d9bef0248 Dockerfile 2022-11-14 13:48:48 +01:00
Einar Felipe Lanfranco
af3be1c46c Update Dockerfile 2022-11-14 13:48:48 +01:00
Einar Lanfranco
536fe2cb7b some issues solved 2022-11-14 13:48:48 +01:00
Einar Lanfranco
4ec9c20a81 docker for dev ready 2022-11-14 13:48:48 +01:00
Sebastian Wagner
61129e65fe intelmq-full: add ssh, required for rsync
https://github.com/certtools/intelmq/discussions/2234
2022-08-31 09:28:34 +02:00
Einar Felipe Lanfranco
2123f04205 Merge branch 'certat:main' into main 2022-08-30 15:03:00 -03:00
Einar Lanfranco
346c3abec1 Quick fix in runtime.yaml we need to add destination_pipeline_host: redis, source_pipeline_host: redis bacuase intelmqdump dont care about environment variables 2022-08-30 14:59:15 -03:00
Einar Lanfranco
0aee947169 fixing volumes in documentation 2022-08-18 13:33:46 -03:00
Einar Lanfranco
40796b5961 fixing known issues documentation 2022-08-18 13:17:46 -03:00
Einar Lanfranco
878f5154be fixing known issues documentation 2022-08-18 13:04:49 -03:00
Einar Lanfranco
d3a1c33341 fix to support dependenceies for all intelmq default bots 2022-08-18 12:13:19 -03:00
Einar Felipe Lanfranco
af31872816 Update DEVELOP-GUIDE.md 2022-08-11 12:41:32 -03:00
Einar Lanfranco
f98068693b fix entrypoint 2022-07-12 14:29:42 -03:00
Einar Lanfranco
8b6e1b8a64 DEV README fix 2022-07-12 12:24:46 -03:00
Einar Felipe Lanfranco
cbdf57a6d4 Update DEVELOP-GUIDE.md 2022-06-14 18:19:48 -03:00
Einar Felipe Lanfranco
49d82eee72 Merge pull request #1 from einar-lanfranco/patch-2
Update docker-compose-dev.yml
2022-06-14 18:17:27 -03:00
Einar Felipe Lanfranco
1cb6031998 Merge pull request #2 from einar-lanfranco/patch-3
Update entrypoint-dev.sh
2022-06-14 18:17:13 -03:00
Einar Felipe Lanfranco
87a9824fef Update entrypoint-dev.sh
Actualizando el entrypoint para prender del inicio
2022-06-14 17:57:40 -03:00
Einar Felipe Lanfranco
46cd50c798 Update docker-compose-dev.yml
Agregando soporte para emcemder el cluster cuando prende el contenedor
2022-06-14 17:53:19 -03:00
Einar Lanfranco
38242fbf58 Adding notes to DEVELOP-GUIDE 2022-05-10 18:10:44 -03:00
Einar Lanfranco
9b2a3ef4b5 Adding new entrypoint 2022-05-10 18:06:40 -03:00
Einar Lanfranco
59c69f03dc Actualizados para los cambios de 3.0.2 que trajeron muchos problemas 2022-05-10 18:06:11 -03:00
Einar Lanfranco
6ea0fd2340 Dockerfile 2022-05-10 12:43:39 -03:00
Einar Felipe Lanfranco
2ea1b86e76 Update Dockerfile 2022-04-22 14:48:03 -03:00
Einar Lanfranco
f533ff5ef6 some issues solved 2022-04-13 10:58:55 -03:00
Sebastian Waldbauer
a865cbcf47 FIX: Keep html directory after build
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2022-02-01 11:13:13 +01:00
Sebastian Waldbauer
7f81bf2651 FIX: Simplify git describe in build.sh
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2022-02-01 10:34:18 +01:00
Sebastian Waldbauer
251f61d419 FIX: Docker build
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2022-01-31 16:12:41 +01:00
Sebastian Waldbauer
39c3f9c571 FIX: fatal error of git describe, using --always
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2022-01-10 12:55:14 +01:00
Nat
53409d6438 FIX: Install otxv2 module using pip3
AlienVault OTX Collector bot fails without the otxv2 python module.
2021-10-20 10:46:44 +02:00
Einar Lanfranco
a84e4edea9 docker for dev ready 2021-10-01 17:45:04 -03:00
Sebastian Waldbauer
220c6a7884 ENH: Better docker debugging
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-14 18:45:00 +02:00
Sebastian Waldbauer
d140232e6a FIX: Using python3-shodan instead of pip3
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-14 18:44:24 +02:00
Sebastian Waldbauer
10d1492e7e FIX: Added missing shodan dependency
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-14 18:41:09 +02:00
Sebastian Waldbauer
8daad990f0 FIX: Fetching remote git modules
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-14 18:39:43 +02:00
Sebastian Waldbauer
f83d557c7f REL: IntelMQ 3.0.2
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-14 18:38:51 +02:00
Sebastian Waldbauer
64d3c34e1e FIX: Using apt-get packages instead of pip
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-07 16:15:06 +02:00
Sebastian Waldbauer
1d6396afe1 FIX: Added aptitude python module instead of pip
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-07 08:55:48 +02:00
Sebastian Waldbauer
85633c70a3 REL: IntelMQ 3.0.1
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-09-02 14:39:56 +02:00
Sebastian Waldbauer
6bd20cadc9 FIX: Added branch to .gitmodules
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-30 12:26:14 +02:00
Sebastian Waldbauer
de754dbb25 FIX: Updated intelmq to correct gitlink submodule
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-26 12:38:33 +02:00
Sebastian Waldbauer
eef60effc6 FIX: Updated to latest versions
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-26 12:34:28 +02:00
Sebastian Waldbauer
16874899df FIX: Create intelmq_persistence
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-25 18:40:36 +02:00
Sebastian Waldbauer
b48c192f14 FIX: Updated permissions in container
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-25 18:37:16 +02:00
Sebastian Waldbauer
339cb02ad0 FIX: Docker paths
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-25 18:12:28 +02:00
Sebastian Waldbauer
6824a6d6fd FIX: Workaround as there are some permission problems
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-25 00:19:59 +02:00
Sebastian Waldbauer
65f02f4f0c FIX: Create intelmq_persistence before mounting
We discovered an permission problem on some machines, because
intelmq_persistence will get mounted afterwards via volume.
So we create it beforehand & change its permission with
owner rights and then mount it in the container.

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-24 10:39:04 +02:00
Sebastian Waldbauer
321e196b26 FIX: IntelMQ Environment changes in 3.0
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-23 12:18:56 +02:00
Sebastian Waldbauer
fbad41e526 FIX: Whitespace
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-20 10:23:29 +02:00
Sebastian Waldbauer
fca0553a4b FIX: Paths in docker-compose
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-20 10:16:47 +02:00
Sebastian Waldbauer
514ed8d1e0 FIX: Escape variables in entrypoints.sh
Fixes #9

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-20 10:15:53 +02:00
Sebastian Waldbauer
9fd85e9b27 FIX: Remove api-session.sqlite file
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-20 10:15:29 +02:00
Sebastian Waldbauer
3df283b513 FIX: Docker update to fix File permissions
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-17 14:31:22 +02:00
Sebastian Waldbauer
636e5493db FIX: Added state.json & updated entrypoint.sh
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-16 12:45:58 +02:00
Sebastian Waldbauer
bbc089fef4 FIX: test.sh volume mounts
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-16 11:23:49 +02:00
Sebastian Waldbauer
9841045cd6 FIX: Added missing dependencies in Dockerfile
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-16 11:23:22 +02:00
Sebastian Waldbauer
aca0ae01ae FIX: Dockerfile now working with latest image instead of 1.0
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:29:23 +02:00
Sebastian Waldbauer
8d3734dfe5 FIX: IntelMQ-API path fixed
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:28:21 +02:00
Sebastian Waldbauer
73cebaa3b1 FIX: Dont git watch intelmq_persistence
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:28:02 +02:00
Sebastian Waldbauer
6da11893c9 FIX: Updated Dockerfile
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:27:31 +02:00
Sebastian Waldbauer
4beea486fd FIX: Updated paths in docker container
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:27:13 +02:00
Sebastian Waldbauer
c8ce343edc FIX: Removed BOTS file & updated runtime.yml
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-15 17:26:20 +02:00
Sebastian Waldbauer
f3cac6053f FIX: Whitespace in entrypoint.sh
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:55:12 +02:00
Sebastian Waldbauer
ec69f12d64 FIX: Whitespace in nginx.conf
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:54:00 +02:00
Sebastian Waldbauer
6a9cbb81a5 REL: IntelMQ 3.0.0
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:53:38 +02:00
Sebastian Waldbauer
eca94136cb FIX: Added new runtime.yaml configuration file
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:53:07 +02:00
Sebastian Waldbauer
6d38f83144 FIX: Removed old, deprecated config files
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:52:40 +02:00
Sebastian Waldbauer
2641466fd6 FIX: Harmonization conf updates & license
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-08-12 13:52:14 +02:00
Sebastian Waldbauer
84be650e9c REL: IntelMQ 2.3.3
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-06-01 13:01:57 +02:00
Sebastian Waldbauer
0797c1ab78 FIX: IntelMQ REL 2.3.2
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-29 09:52:41 +02:00
Sebastian Waldbauer
2a3c976cd8 REL: IntelMQ 2.3.2
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-27 12:15:23 +02:00
Sebastian Waldbauer
1cf11ba674 MAINT: IntelMQ 2.3.1 REL configs
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-27 10:15:40 +02:00
Sebastian Waldbauer
ac115f609d FIX: possible directory ownership problems
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-27 10:10:52 +02:00
Sebastian Waldbauer
e162516a96 FIX: Removed old git rev-parse & use git describe
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-15 12:19:52 +02:00
Sebastian Waldbauer
881475c405 FIX: whitespaces in docker-compose
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-15 12:19:30 +02:00
Sebastian Waldbauer
92c3d2a78b FIX: Moved developer stuff to develop-guide
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-15 12:18:12 +02:00
Sebastian Waldbauer
0834eb239d FIX: Add html files to nginx
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-04-15 12:17:40 +02:00
Sebastian Waldbauer
fd29770ffb Merge pull request #3 from CERTUNLP/main
We developed some adjustments in our repository to integrate with yours in the new version 2.3 adding facilities for bot developers
2021-04-15 11:04:28 +02:00
Sebastian Waldbauer
b2f98d2ba6 REL: 2.3.1 intelmq release
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-03-26 11:32:27 +01:00
Einar Felipe Lanfranco
6ac1503263 Removing mail handler from update.sh 2021-03-25 16:52:55 -03:00
Einar Felipe Lanfranco
8bfbdcbe44 Update README.md
Fix for html building in intelmq-manager, otherwise you get 404
2021-03-25 16:47:39 -03:00
Einar Lanfranco
9c44bd34c9 Mail handler requeriment is going to be migrated to main intelmq 2021-03-25 16:23:49 -03:00
Einar Lanfranco
9ff46cb1e6 Wagner suggestions 2021-03-25 15:41:24 -03:00
Jeremias Pretto
b1c3677f90 2.3 compatibility 2021-03-23 15:44:44 -03:00
Jeremias Pretto
5fba132f9c hotfix 2021-03-23 15:19:03 -03:00
Einar Lanfranco
5f1e2c8f1c Develop guide md update 2021-03-23 13:05:21 -03:00
Einar Lanfranco
612bbb53e6 Develop guide md 2021-03-23 12:30:16 -03:00
Jeremias Pretto
77d05fbc1f Features:
- Support for bot development in intelmq 2.3.1 version
 - Add mail handler
 - Add start botnet at boot option
2021-03-23 11:57:27 -03:00
Einar Lanfranco
171a89a1a3 Adding Dockerfile to dev version 2021-03-23 10:08:27 -03:00
Sebastian Waldbauer
13fbc401a7 [FIX] Fixed path issues & added inspect-container
inspect-container.sh opens a new /bin/bash inside the container
to check files or other stuff like on normal linux maschines

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-03-05 13:44:11 +01:00
Sebastian Waldbauer
b23c60dda5 Updated submodules
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-03-05 13:43:37 +01:00
Sebastian Waldbauer
d06cd0de94 Updated submodules to intelmq 2.3.0 release
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-03-04 11:54:11 +01:00
Sebastian Waldbauer
54b490a846 Updated dependencies
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-19 09:07:56 +01:00
Sebastian Waldbauer
d9c0171aa2 Merge branch 'main' of https://github.com/certat/intelmq-docker into main 2021-02-04 11:40:31 +01:00
Sebastian Waldbauer
0959379801 Changed readme
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-04 11:40:15 +01:00
Sebastian Waldbauer
665d707cd2 [FIX] Path should now be correct
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-04 11:38:41 +01:00
Sebastian Waldbauer
1b5cd8f4b2 Merge pull request #2 from schacht-certat/schacht/fix-typos
DOC: fix typos
2021-02-04 11:04:36 +01:00
Sebastian Waldbauer
ac8808de5f [FIX] Added executeable bit to .sh
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-04 10:59:46 +01:00
Sebastian Waldbauer
3fc8106949 [FIX] Using networks instead of links
Docker links are deprecated, so we're using a recommended way.
Docker Networks!

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-04 09:41:09 +01:00
Sebastian Waldbauer
370b9f1798 Updated gitignore
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-02-04 09:40:58 +01:00
Sebastian Waldbauer
4cb88b3c58 Changed readme
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:16:01 +01:00
Sebastian Waldbauer
e50605fd26 Added manager gitrev to intelmq-full
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:14:46 +01:00
Sebastian Waldbauer
70744fba44 Fixed all related issues with bots
Every library should now be included!

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:03:33 +01:00
Sebastian Waldbauer
ffdb9002c0 Fixed to latest config changes
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:03:07 +01:00
Sebastian Waldbauer
efe1a423cc We dont have to copy html files
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:02:34 +01:00
Sebastian Waldbauer
9e90069aad Fixed docker-compose, no networks are used anymore
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-29 10:01:00 +01:00
Sebastian Waldbauer
23fa348319 [FIX] Exporting variables now
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-27 17:59:43 +01:00
Sebastian Waldbauer
35484688e7 Using git submodules instead of copying files
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-27 11:25:36 +01:00
Sebastian Waldbauer
263bd3cdaa Moved static ENV_VAR to entrypoint
Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-27 10:30:24 +01:00
Birger Schacht
44f3eff9e2 DOC: fix typos 2021-01-25 09:19:03 +01:00
Sebastian Waldbauer
0082f38a2f [ENH] Updated IntelMQ-Full
Now we're using the api instead of the manager.
This is future proof & will be updated constantly.

Removed manager config & added api config

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

[NGINX] Added default webserver (nginx)

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Updated intelmq-full docker image

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Changed build process

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Updated utils

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Fixed entrypoint

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Updated docker-compose

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>

Misc

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
2021-01-24 15:19:04 +01:00
38 changed files with 996 additions and 1829 deletions

View File

@@ -0,0 +1,25 @@
FROM certat/intelmq-full:latest
ENV LANG C.UTF-8
LABEL maintainer="Einar <elanfranco@csirtamericas.org>"
LABEL maintainer="Jeremias <jpretto@cert.unlp.edu.ar>"
LABEL maintainer="Mateo <mdurante@cert.unlp.edu.ar>"
RUN sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
git \
vim \
ssh \
&& sudo rm -rf /var/lib/apt/lists/*
WORKDIR /opt
ADD entrypoint-dev.sh /opt/entrypoint-dev.sh
ADD install_reqs_and_deploy_bots /opt/install_reqs_and_deploy_bots.sh
RUN sudo chmod +x /opt/entrypoint-dev.sh \
&& sudo chown intelmq:intelmq /opt/entrypoint-dev.sh
RUN sudo chmod +x /opt/install_reqs_and_deploy_bots.sh \
&& sudo chown intelmq:intelmq /opt/install_reqs_and_deploy_bots.sh
RUN usermod -aG intelmq www-data
USER intelmq
ENTRYPOINT [ "/opt/entrypoint-dev.sh" ]

View File

@@ -0,0 +1,30 @@
#!/bin/bash
export INTELMQ_IS_DOCKER=1
if [[ ${IS_DEV} == "true" ]]
then
/opt/install_reqs_and_deploy_bots.sh
fi
sudo chown -R intelmq:intelmq /etc/intelmq
sudo chown -R intelmq:intelmq /opt/intelmq
intelmqctl upgrade-config
intelmqctl check
intelmq_user="${INTELMQ_API_USER:=intelmq}"
intelmq_pass="${INTELMQ_API_PASS:=intelmq}"
intelmq-api-adduser --user "$intelmq_user" --password "$intelmq_pass"
if [[ ${ENABLE_BOTNET_AT_BOOT} == "true" ]]; then
intelmqctl start
fi
if [[ $1 == "selftest" ]]
then
export INTELMQ_TEST_EXOTIC=1
pytest-3 /opt/intelmq/intelmq/tests
else
cd /opt/intelmq-api && uvicorn intelmq_api.main:app --port 8080 --host 0.0.0.0
fi

View File

@@ -0,0 +1,13 @@
#!/bin/bash
sudo cp -r $MY_FORK/$MY_BOTS_FOLDER/* /opt/intelmq/intelmq/bots/
sudo rm -f /tmp/orderfullrequirements.txt /tmp/fullrequirements.txt
for req in $(find $MY_FORK/$MY_BOTS_FOLDER -name "*REQUIREMENTS.txt"); do
cat $req >> /tmp/fullrequirements.txt
echo "" >> /tmp/fullrequirements.txt
done
cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt
sudo pip3 install -r /tmp/orderfullrequirements.txt;
cd /opt/intelmq
sudo pip3 install --no-cache-dir -e .
sudo intelmqsetup

View File

@@ -0,0 +1,79 @@
FROM debian:bullseye-slim
ENV LANG C.UTF-8
ARG BUILD_DATE
ARG VCS_REF
ARG BUILD_VERSION
LABEL maintainer="IntelMQ Team <intelmq-team@cert.at>" \
org.opencontainers.image.authors="IntelMQ-Team <intelmq-team@cert.at>" \
org.opencontainers.image.title="intelmq-full" \
org.opencontainers.image.description="IntelMQ with core & api" \
org.opencontainers.image.url="https://intelmq.org/" \
org.opencontainers.image.source="https://github.com/certtools/intelmq.git" \
org.opencontainers.image.documentation="https://intelmq.readthedocs.io/en/latest/" \
org.opencontainers.image.vendor="intelmq-team"
### libfuzzy-dev is used for pydeep
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo \
gcc \
rsync \
ssh \
python3-pika \
python3-dev \
python3-setuptools \
python3-pip \
python3-ruamel.yaml \
python3-bs4 \
python3-validators \
python3-lxml \
python3-xmltodict \
python3-cerberus \
python3-requests-mock \
python3-pytest \
python3-pytest-cov \
python3-shodan \
python3-elasticsearch \
python3-pymongo \
libfuzzy-dev \
&& rm -rf /var/lib/apt/lists/*
LABEL org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.version=$BUILD_VERSION
COPY ./intelmq /opt/intelmq
COPY ./intelmq-api /opt/intelmq-api
RUN useradd -d /opt/intelmq -U -s /bin/bash intelmq \
&& adduser intelmq sudo \
&& echo "intelmq ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/intelmq \
&& sudo chown -R intelmq:intelmq /opt/intelmq \
&& mkdir -p /opt/intelmq_persistence \
&& sudo chown -R intelmq:intelmq /opt/intelmq_persistence
### Install IntelMQ
RUN pip3 install url-normalize geolib imbox jinja2 pyasn textx tld time-machine otxv2 pendulum \
&& pip3 install --force pymisp[fileobjects,openioc,virustotal]
RUN cd /opt/intelmq \
&& pip3 install .
RUN cd /opt/intelmq \
&& intelmqsetup
### Install IntelMQ-API
RUN cd /opt/intelmq-api \
&& pip3 install .
ADD entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh \
&& chown intelmq:intelmq /opt/entrypoint.sh
WORKDIR /opt
#USER intelmq:intelmq
ENTRYPOINT [ "/opt/entrypoint.sh" ]

25
.docker/nginx/Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM nginx:1.13-alpine
ENV LANG C.UTF-8
ARG BUILD_DATE
ARG VCS_REF
ARG BUILD_VERSION
LABEL maintainer="IntelMQ-Team <intelmq-team@cert.at>" \
org.opencontainers.image.authors="IntelMQ-Team <intelmq-team@cert.at>" \
org.opencontainers.image.title="intelmq-nginx" \
org.opencontainers.image.description="Modified NGINX Server for intelmq" \
org.opencontainers.image.url="https://github.com/certtools/intelmq/issues" \
org.opencontainers.image.source="https://github.com/certtools/intelmq.git" \
org.opencontainers.image.documentation="https://intelmq.readthedocs.io/en/latest/" \
org.opencontainers.image.vendor="intelmq-team"
LABEL org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.version=$BUILD_VERSION
WORKDIR /www
COPY .docker/nginx/config/app.conf /etc/nginx/conf.d/default.conf
COPY .docker/nginx/config/nginx.conf /etc/nginx/nginx.conf
COPY intelmq-manager/html/ /www/

View File

@@ -0,0 +1,20 @@
upstream intelmq_api {
server intelmq:8080;
}
server {
listen 80 default_server;
server_name localhost;
root /www;
location / {
index index.html;
try_files $uri /index.html =404;
}
location /intelmq/ {
proxy_pass http://intelmq_api/;
}
}

View File

@@ -0,0 +1,27 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
intelmq_logs/
intelmq_persistence/
my_fork_of_intelmq/

12
.gitmodules vendored Normal file
View File

@@ -0,0 +1,12 @@
[submodule "intelmq"]
path = intelmq
url = https://github.com/certtools/intelmq.git
branch = maintenance
[submodule "intelmq-manager"]
path = intelmq-manager
url = https://github.com/certtools/intelmq-manager.git
branch = maintenance
[submodule "intelmq-api"]
path = intelmq-api
url = https://github.com/certtools/intelmq-api.git
branch = maintenance

90
DEVELOP-GUIDE.md Normal file
View File

@@ -0,0 +1,90 @@
# intelmq-docker
## Run & deploy containers in dev mode:
### Install docker and docker-compose
```
sudo apt update && sudo apt upgrade -y && sudo apt install docker.io git docker-compose
```
### Clone this repo
```
git clone https://github.com/certat/intelmq-docker.git --recursive
cd intelmq-docker
docker-compose -f docker-compose-dev.yml up
```
### Open your favourite browser -> Go to `http://127.0.0.1:1337/`
Default user/password: intelmq/intelmq
## Docker-compose-dev.yml file
Docker dev shares almost all volumes and environment variables from intelmq-full image. But some are new:
### Volumes:
- **./example_bots:/my_bots** -> this is the folder where your bots source code need to be.
### Environment
* Two variables to indicate where the source code of your bots is located:
#Volume in the container where you clone your repository
MY_FORK: "/my_bots"
#Subfolder in MY_FORK where your where bots are located
MY_BOTS_FOLDER: "bots"
* Another thing, you could make your bots to be running when container startup, just setting
ENABLE_BOTNET_AT_BOOT: "true"*
### Add your own bots
Just start coding or pull your bots repository in some folder like, for example, ./my_bots in a subfolder bots, then you have for example my_bots/bots/[collectors,parsers,experts,output,parsers]
You could take a look at the folder and files in https://github.com/certtools/intelmq/tree/develop/intelmq/bots to start.
```
git clone https://github.com/AAAAA/BBBB.git my_bots
```
After doing this, you need to change in docker-compose-dev.yml the volume definition from **./example_bots:/my_bots** to **./my_bots:/my_bots**
### How to install and look yours bots running
After you change some bot or add something new just run command **install_reqs_and_deploy_bots.sh** in the running container
```
docker-compose -f docker-compose-dev.yml exec intelmq bash /opt/install_reqs_and_deploy_bots.sh
```
When you do this:
* Yours bots REQUERIMENTS.txt and yout bots will be installed or updated from **MY_FORK**.
* Keep in mind that before being installed they will be mixed with the originals of the intelmq project, so it is important not to use the same names, neither for the bot nor for the .py files.
## Dependencies problems
Some dependencies from defaults bots are missing in original intelmq image, so we fix it in our Dockerfile build process. Nevertheless, we still facing some issues.
### Known isues
#### Blueliv problem:
This bot has 2 problems:
1- It doesn't install:
pip3 install git+git://github.com/Blueliv/api-python-sdk doesn't work because git+git is deprecated, to fix it you need to replace git+git with git+https
2- But if you fix and install it you would cause a dependency conflict with pymisp:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavior is the source of the following dependency conflicts.
pymisp 2.4.148 requires requests<3.0.0,>=2.25.1, but you have requests 2.5.1 which is incompatible.
If you don't need blueliv, just don't fix git+git with git+https.

View File

@@ -1,59 +0,0 @@
FROM debian:buster
ENV LANG C.UTF-8
ARG BUILD_DATE
ARG VCS_REF
ARG BUILD_VERSION
LABEL maintainer="IntelMQ Team <intelmq-team@cert.at>" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="certat/intelmq-full" \
org.label-schema.description="IntelMQ with core & manager" \
org.label-schema.url="https://intelmq.org/" \
org.label-schema.vcs-url="https://github.com/certat/intelmq-docker.git" \
org.label-schema.vendor="CERT.AT"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo \
gcc \
python3-nose \
python3-yaml \
python3-cerberus \
python3-requests-mock \
python3-dev \
python3-setuptools \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.version=$BUILD_VERSION
COPY ./intelmq /opt/intelmq
COPY ./intelmq-manager /opt/intelmq-manager
WORKDIR /opt
RUN useradd -d /opt/intelmq -U -s /bin/bash intelmq \
&& adduser intelmq sudo \
&& echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& sudo chown -R intelmq:intelmq /opt/intelmq
### Install IntelMQ
RUN cd /opt/intelmq \
&& pip3 install --no-cache-dir -e . \
&& intelmqsetup
### Install IntelMQ-Manager (python)
RUN cd /opt/intelmq-manager \
&& pip3 install hug mako \
&& pip3 install --no-cache-dir -e .
ADD entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
USER intelmq
ENTRYPOINT [ "/opt/entrypoint.sh" ]

View File

@@ -11,30 +11,33 @@ If you do have any questions / feedback / questions, please open an issue :)
## Fastest way to run & deploy ## Fastest way to run & deploy
1. `cd ~` 1. `cd ~`
0. `mkdir intelmq_logs`
0. `sudo apt update && sudo apt upgrade -y && sudo apt install docker.io git docker-compose` 0. `sudo apt update && sudo apt upgrade -y && sudo apt install docker.io git docker-compose`
0. `git clone https://github.com/certat/intelmq-docker.git` 0. `git clone https://github.com/certat/intelmq-docker.git --recursive`
0. `cd intelmq-docker` 0. `cd intelmq-docker`
0. `sudo docker pull certat/intelmq-full:1.0` 0. `docker-compose pull`
0. `chown -R $USER:$USER example_config` 2. `docker-compose up`
0. `sudo docker-compose up` 3. Open your favourite browser -> Go to `http://127.0.0.1:1337/`
0. Open your favourite browser -> Go to `http://127.0.0.1:1337/`
## For developers
Please take a look to DEVELOP-GUIDE.md
## Build and deploy new images
If you want to build/deploy/test this container run If you want to build/deploy/test this container run
1. `chmod +x build.sh` 1. `chmod +x build.sh`
0. `chmod +x test.sh` 0. `chmod +x test.sh`
0. `chmod +x publish.sh` 0. `chmod +x publish.sh`
**!ATTENTATION!** Only [CERT.AT](https://cert.at/) employee's/maintainer can publish on `cerat/` repository. Change this in `publish.sh` **!ATTENTION!** Only [CERT.AT](https://cert.at/) employee's/maintainer can publish on the `certat/` repository. Change this in `publish.sh`
## How to develop new features & build containers? ## How to develop new features & build containers?
**ATTENTION** Make sure to change `certat/intelmq-full:1.0` to `intelmq-full:1.0` in `docker-compose.yml` **ATTENTION** Make sure to change `certat/intelmq-full:1.0` to `intelmq-full:1.0` in `docker-compose.yml`
1. `cd ~` Start making your changes in `intelmq`, `intelmq-api` or `intelmq-manager`.
0. `git clone https://github.com/certtools/intelmq.git`
0. `git clone https://github.com/certtools/intelmq-manager`
Now you can start making changes to source code. If you're finished and ready to test within your docker enviroment If you're finished and ready to test within your docker enviroment
1. `cd ~/intelmq-docker` 1. `cd ~/intelmq-docker`
0. `sudo ./build.sh` 0. `sudo ./build.sh`

View File

@@ -1,19 +1,27 @@
#!/bin/bash #!/bin/bash
build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ') build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
git_ref_core=$(cd ../intelmq && git rev-parse --short HEAD) git_ref_core=$(git -C ./intelmq describe --long --always)
git_ref_manager=$(cd ../intelmq-manager && git rev-parse --short HEAD) git_ref_manager=$(git -C ./intelmq-manager describe --long --always)
build_version="1.0" git_ref_api=$(git -C ./intelmq-api describe --long --always)
build_version=$(git -C ./intelmq describe --always)
echo Building new IntelMQ-Image v$build_version echo Building new IntelMQ-Image v$build_version
echo Core : $git_ref_core echo Core : $git_ref_core
echo Manager : $git_ref_manager echo Manager : $git_ref_manager
echo Api : $git_ref_api
echo Build_date: $build_date echo Build_date: $build_date
cp -r ../intelmq ./intelmq # build static html
cp -r ../intelmq-manager ./intelmq-manager cd ./intelmq-manager && python3 -m pip install . && intelmq-manager-build && cd ..
docker build --build-arg BUILD_DATE=$build_date \ docker build --build-arg BUILD_DATE=$build_date \
--build-arg VCS_REF="IntelMQ=$git_ref_core, IntelMQ-Manager=$git_ref_manager" \ --build-arg VCS_REF="IntelMQ-Manager=$git_ref_manager" \
--build-arg BUILD_VERSION=$build_version \ --build-arg BUILD_VERSION=$build_version \
-f Dockerfile \ -f ./.docker/nginx/Dockerfile \
-t intelmq-full:$build_version . -t intelmq-nginx:latest .
docker build --build-arg BUILD_DATE=$build_date \
--build-arg VCS_REF="IntelMQ=$git_ref_core, IntelMQ-API=$git_ref_api, IntelMQ-Manager=$git_ref_manager" \
--build-arg BUILD_VERSION=$build_version \
-f ./.docker/intelmq-full/Dockerfile \
-t intelmq-full:latest .

46
docker-compose-dev.yml Normal file
View File

@@ -0,0 +1,46 @@
version: "3"
services:
redis:
image: redis:latest
volumes:
- ./example_config/redis/redis.conf:/usr/local/etc/redis/redis.conf
command:
- redis-server
- /usr/local/etc/redis/redis.conf
networks:
- intelmq-internal
nginx:
image: certat/intelmq-nginx:latest
ports:
- 1337:80
depends_on:
- intelmq
networks:
- intelmq-internal
intelmq:
build: .docker/intelmq-full-dev
volumes:
- ./example_config/intelmq/etc/:/opt/intelmq/etc/
- ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json
- ./intelmq_logs:/opt/intelmq/var/log
- ./intelmq_output:/opt/intelmq/var/lib/bots
- ./example_bots:/my_bots
depends_on:
- redis
environment:
ENABLE_BOTNET_AT_BOOT: "false"
IS_DEV: "true"
INTELMQ_SOURCE_PIPELINE_BROKER: "redis"
INTELMQ_PIPELINE_BROKER: "redis"
INTELMQ_DESTIONATION_PIPELINE_BROKER: "redis"
INTELMQ_PIPELINE_HOST: redis
INTELMQ_SOURCE_PIPELINE_HOST: redis
INTELMQ_DESTINATION_PIPELINE_HOST: redis
INTELMQ_REDIS_CACHE_HOST: redis
MY_FORK: "/my_bots/"
MY_BOTS_FOLDER: "bots"
networks:
- intelmq-internal
networks:
intelmq-internal:
driver: bridge

View File

@@ -9,43 +9,36 @@ services:
- /usr/local/etc/redis/redis.conf - /usr/local/etc/redis/redis.conf
restart: always restart: always
networks: networks:
- intelmq-network - intelmq-internal
postgres: nginx:
image: postgres:latest image: certat/intelmq-nginx:latest
restart: always restart: always
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: root
POSTGRES_DB: test
networks:
- intelmq-database
# IntelMQ with IntelMQ-Manager!
intelmq-full:
image: certat/intelmq-full:1.0
volumes:
- ./example_config/intelmq/etc:/opt/intelmq/etc
- ./example_config/intelmq-manager:/opt/intelmq-manager/config
- ./intelmq_logs:/opt/intelmq/var/log
- ./example_config/intelmq/var/lib/bot:/opt/intelmq/var/lib/bot
ports: ports:
- 127.0.0.1:1337:8080/tcp - 1337:80
depends_on:
- intelmq
networks:
- intelmq-internal
intelmq:
image: certat/intelmq-full:latest
volumes:
- ./example_config/intelmq/etc/:/opt/intelmq/etc/
- ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json
- ./intelmq_logs:/opt/intelmq/var/log
- ./intelmq_output:/opt/intelmq/var/lib/bots
depends_on: depends_on:
- redis - redis
- postgres
environment: environment:
INTELMQ_IS_DOCKER: "true" INTELMQ_SOURCE_PIPELINE_BROKER: "redis"
INTELMQ_PIPELINE_DRIVER: "redis" INTELMQ_PIPELINE_BROKER: "redis"
INTELMQ_DESTIONATION_PIPELINE_BROKER: "redis"
INTELMQ_PIPELINE_HOST: redis INTELMQ_PIPELINE_HOST: redis
INTELMQ_SOURCE_PIPELINE_HOST: redis
INTELMQ_DESTINATION_PIPELINE_HOST: redis
INTELMQ_REDIS_CACHE_HOST: redis INTELMQ_REDIS_CACHE_HOST: redis
INTELMQ_MANAGER_CONFIG: "/opt/intelmq-manager/config/config.json"
networks: networks:
- intelmq-network - intelmq-internal
- intelmq-database
networks: networks:
intelmq-network: intelmq-internal:
driver: bridge driver: bridge
intelmq-database:
driver: bridge

View File

@@ -1,7 +1,20 @@
#!/bin/bash #!/bin/bash
export INTELMQ_IS_DOCKER=1
sudo chown -R intelmq:intelmq /etc/intelmq
sudo chown -R intelmq:intelmq /opt/intelmq
intelmqctl upgrade-config
intelmqctl check
intelmq_user="${INTELMQ_API_USER:=intelmq}"
intelmq_pass="${INTELMQ_API_PASS:=intelmq}"
intelmq-api-adduser --user "$intelmq_user" --password "$intelmq_pass"
if [[ $1 == "selftest" ]] if [[ $1 == "selftest" ]]
then then
nosetests3 /opt/intelmq/intelmq/tests export INTELMQ_TEST_EXOTIC=1
pytest-3 /opt/intelmq/intelmq/tests
else else
hug -f /opt/intelmq-manager/intelmq_manager/serve.py -p8080 cd /opt/intelmq-api && uvicorn intelmq_api.main:app --port 8080 --host 0.0.0.0
fi fi

1
example_bots/.keep Normal file
View File

@@ -0,0 +1 @@
Link your bots repository here

View File

@@ -0,0 +1,8 @@
{
"intelmq_ctl_cmd": ["intelmqctl"],
"allowed_path": "/etc/intelmq/var/lib/bots/",
"session_store": "/etc/intelmq/api-session.sqlite",
"session_duration": 86400,
"allow_origins": ["*"],
"html_dir": ""
}

View File

@@ -1,4 +0,0 @@
{
"intelmq_ctl_cmd": ["/usr/local/bin/intelmqctl"],
"allowed_path": "/opt/intelmq/var/lib/"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +0,0 @@
{
"accuracy": 100,
"destination_pipeline_broker": "redis",
"destination_pipeline_db": 2,
"destination_pipeline_host": "127.0.0.1",
"destination_pipeline_password": null,
"destination_pipeline_port": 6379,
"error_dump_message": true,
"error_log_exception": true,
"error_log_message": false,
"error_max_retries": 3,
"error_procedure": "pass",
"error_retry_delay": 15,
"http_proxy": null,
"http_timeout_max_tries": 3,
"http_timeout_sec": 30,
"http_user_agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36",
"http_verify_cert": true,
"https_proxy": null,
"load_balance": false,
"log_processed_messages_count": 500,
"log_processed_messages_seconds": 900,
"logging_handler": "file",
"logging_level": "INFO",
"logging_path": "/opt/intelmq/var/log/",
"logging_syslog": "/dev/log",
"process_manager": "intelmq",
"rate_limit": 0,
"source_pipeline_broker": "redis",
"source_pipeline_db": 2,
"source_pipeline_host": "127.0.0.1",
"source_pipeline_password": null,
"source_pipeline_port": 6379,
"ssl_ca_certificate": null,
"statistics_database": 3,
"statistics_host": "127.0.0.1",
"statistics_password": null,
"statistics_port": 6379
}

View File

@@ -287,7 +287,7 @@ providers:
http_url: https://urlhaus.abuse.ch/feeds/tld/<TLD>/, http_url: https://urlhaus.abuse.ch/feeds/tld/<TLD>/,
https://urlhaus.abuse.ch/feeds/country/<CC>/, or https://urlhaus.abuse.ch/feeds/country/<CC>/, or
https://urlhaus.abuse.ch/feeds/asn/<ASN>/ https://urlhaus.abuse.ch/feeds/asn/<ASN>/
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -296,7 +296,7 @@ providers:
skip_header: false skip_header: false
default_url_protocol: http:// default_url_protocol: http://
type_translation: '{"malware_download": "malware-distribution"}' type_translation: '{"malware_download": "malware-distribution"}'
delimeter: "," delimiter: ","
columns: columns:
- time.source - time.source
- source.url - source.url
@@ -406,7 +406,7 @@ providers:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt http_url: https://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -429,7 +429,7 @@ providers:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt http_url: https://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -542,11 +542,11 @@ providers:
public: yes public: yes
Turris: Turris:
Greylist: Greylist:
description: The data are processed and clasified every week and behaviour of description: The data are processed and classified every week and behaviour of
IP addresses that accessed a larger number of Turris routers is evaluated. IP addresses that accessed a larger number of Turris routers is evaluated.
The result is a list of addresses that have tried to obtain information about The result is a list of addresses that have tried to obtain information about
services on the router or tried to gain access to them. We publish this so services on the router or tried to gain access to them. The list also
called "greylist" that also contains a list of tags for each address which contains a list of tags for each address which
indicate what behaviour of the address was observed. indicate what behaviour of the address was observed.
additional_information: additional_information:
bots: bots:
@@ -561,61 +561,72 @@ providers:
module: intelmq.bots.parsers.turris.parser module: intelmq.bots.parsers.turris.parser
parameters: parameters:
revision: 2018-01-20 revision: 2018-01-20
documentation: https://project.turris.cz/greylist-data/legend.txt documentation: https://project.turris.cz/en/greylist
public: yes public: yes
Malc0de: Greylist with PGP signature verification:
Bind Format: description: |
description: This feed includes FQDN's of malicious hosts, the file format is The data are processed and classified every week and behaviour of
in Bind file format. IP addresses that accessed a larger number of Turris routers is evaluated.
The result is a list of addresses that have tried to obtain information about
services on the router or tried to gain access to them. The list also
contains a list of tags for each address which
indicate what behaviour of the address was observed.
The Turris Greylist feed provides PGP signatures for the provided files.
You will need to import the public PGP key from the linked documentation
page, currently available at
https://pgp.mit.edu/pks/lookup?op=vindex&search=0x10876666
or from below.
See the URL Fetcher Collector documentation for more information on
PGP signature verification.
PGP Public key:
```
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: pgp.mit.edu
mQINBFRl7D8BEADaRFoDa/+r27Gtqrdn8sZL4aSYTU4Q3gDr3TfigK8H26Un/Y79a/DUL1o0
o8SRae3uwVcjJDHZ6KDnxThbqF7URfpuCcCYxOs8p/eu3dSueqEGTODHWF4ChIh2japJDc4t
3FQHbIh2e3GHotVqJGhvxMmWqBFoZ/mlWvhjs99FFBZ87qbUNk7l1UAGEXeWeECgz9nGox40
3YpCgEsnJJsKC53y5LD/wBf4z+z0GsLg2GMRejmPRgrkSE/d9VjF/+niifAj2ZVFoINSVjjI
8wQFc8qLiExdzwLdgc+ggdzk5scY3ugI5IBt1zflxMIOG4BxKj/5IWsnhKMG2NLVGUYOODoG
pKhcY0gCHypw1bmkp2m+BDVyg4KM2fFPgQ554DAX3xdukMCzzZyBxR3UdT4dN7xRVhpph3Y2
Amh1E/dpde9uwKFk1oRHkRZ3UT1XtpbXtFNY0wCiGXPt6KznJAJcomYFkeLHjJo3nMK0hISV
GSNetVLfNWlTkeo93E1innbSaDEN70H4jPivjdVjSrLtIGfr2IudUJI84dGmvMxssWuM2qdg
FSzoTHw9UE9KT3SltKPS+F7u9x3h1J492YaVDncATRjPZUBDhbvo6Pcezhup7XTnI3gbRQc2
oEUDb933nwuobHm3VsUcf9686v6j8TYehsbjk+zdA4BoS/IdCwARAQABtC5UdXJyaXMgR3Jl
eWxpc3QgR2VuZXJhdG9yIDxncmV5bGlzdEB0dXJyaXMuY3o+iQI4BBMBAgAiBQJUZew/AhsD
BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDAQrU3EIdmZoH4D/9Jo6j9RZxCAPTaQ9WZ
WOdb1Eqd/206bObEX+xJAago+8vuy+waatHYBM9/+yxh0SIg2g5whd6J7A++7ePpt5XzX6hq
bzdG8qGtsCRu+CpDJ40UwHep79Ck6O/A9KbZcZW1z/DhbYT3z/ZVWALy4RtgmyC67Vr+j/C7
KNQ529bs3kP9AzvEIeBC4wdKl8dUSuZIPFbgf565zRNKLtHVgVhiuDPcxKmBEl4/PLYF30a9
5Tgp8/PNa2qp1DV/EZjcsxvSRIZB3InGBvdKdSzvs4N/wLnKWedj1GGm7tJhSkJa4MLBSOIx
yamhTS/3A5Cd1qoDhLkp7DGVXSdgEtpoZDC0jR7nTS6pXojcgQaF7SfJ3cjZaLI5rjsx0YLk
G4PzonQKCAAQG1G9haCDniD8NrrkZ3eFiafoKEECRFETIG0BJHjPdSWcK9jtNCupBYb7JCiz
Q0hwLh2wrw/wCutQezD8XfsBFFIQC18TsJAVgdHLZnGYkd5dIbV/1scOcm52w6EGIeMBBYlB
J2+JNukH5sJDA6zAXNl2I1H1eZsP4+FSNIfB6LdovHVPAjn7qXCw3+IonnQK8+g8YJkbbhKJ
sPejfg+ndpe5u0zX+GvQCFBFu03muANA0Y/OOeGIQwU93d/akN0P1SRfq+bDXnkRIJQOD6XV
0ZPKVXlNOjy/z2iN2A==
=wjkM
-----END PGP PUBLIC KEY BLOCK-----
```
additional_information: additional_information:
bots: bots:
collector: collector:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://malc0de.com/bl/ZONES http_url: https://www.turris.cz/greylist-data/greylist-latest.csv
rate_limit: 10800 name: Greylist
name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
rate_limit: 43200
signature_url: https://www.turris.cz/greylist-data/greylist-latest.csv.asc
verify_pgp_signatures: false
parser: parser:
module: intelmq.bots.parsers.malc0de.parser module: intelmq.bots.parsers.turris.parser
parameters: parameters:
revision: 2018-01-20 revision: 2018-01-20
documentation: http://malc0de.com/dashboard/ documentation: https://project.turris.cz/en/greylist
public: yes
Windows Format:
description: This feed includes FQDN's of malicious hosts, the file format is
in Windows Hosts file format.
additional_information:
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: https://malc0de.com/bl/BOOT
rate_limit: 10800
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.malc0de.parser
parameters:
revision: 2018-01-20
documentation: http://malc0de.com/dashboard/
public: yes
IP Blacklist:
description: This feed includes IP Addresses of malicious hosts.
additional_information:
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: https://malc0de.com/bl/IP_Blacklist.txt
rate_limit: 10800
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.malc0de.parser
parameters:
revision: 2018-01-20
documentation: http://malc0de.com/dashboard/
public: yes public: yes
University of Toulouse: University of Toulouse:
Blacklist: Blacklist:
@@ -1008,6 +1019,50 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: http://www.blocklist.de/en/export.html documentation: http://www.blocklist.de/en/export.html
public: yes public: yes
CERT-Bund:
CB-Report Malware infections via IMAP:
description: CERT-Bund sends reports for the malware-infected hosts.
additional_information: Traffic from malware related hosts contacting
command-and-control servers is caught and sent to national CERT teams.
There are two e-mail feeds with identical CSV structure -- one reports on
general malware infections, the other on the Avalanche botnet.
bots:
collector:
module: intelmq.bots.collectors.mail.collector_mail_attach
parameters:
mail_host: __HOST__
mail_password: __PASSWORD__
mail_ssl: true
mail_user: __USERNAME__
attach_regex: events.csv
extract_files: false
rate_limit: 86400
subject_regex: ^\\[CB-Report#.* Malware infections (\\(Avalanche\\) )?in country
folder: INBOX
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.generic.parser_csv
parameters:
skip_header: true
default_url_protocol: http://
time_format: from_format|%Y-%m-%d %H:%M:%S
delimiter: ","
columns:
- source.asn
- source.ip
- time.source
- classification.type
- malware.name
- source.port
- destination.ip
- destination.port
- destination.fqdn
- protocol.transport
type: infected-system
revision: 2020-08-20
documentation:
public: no
CERT.PL: CERT.PL:
N6 Stomp Stream: N6 Stomp Stream:
description: N6 Collector - CERT.pl's N6 Collector - N6 feed via STOMP interface. description: N6 Collector - CERT.pl's N6 Collector - N6 feed via STOMP interface.
@@ -1081,7 +1136,7 @@ providers:
http_url: http://support.clean-mx.de/clean-mx/xmlviruses?response=alive&domain= http_url: http://support.clean-mx.de/clean-mx/xmlviruses?response=alive&domain=
http_timeout_sec: 120 http_timeout_sec: 120
http_user_agent: "{{ your user agent }}" http_user_agent: "{{ your user agent }}"
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -1101,7 +1156,7 @@ providers:
http_url: http://support.clean-mx.de/clean-mx/xmlphishing?response=alive&domain= http_url: http://support.clean-mx.de/clean-mx/xmlphishing?response=alive&domain=
http_timeout_sec: 120 http_timeout_sec: 120
http_user_agent: "{{ your user agent }}" http_user_agent: "{{ your user agent }}"
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -1110,24 +1165,6 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: http://clean-mx.de/ documentation: http://clean-mx.de/
public: no public: no
Malware Domain List:
Blacklist:
description: No description provided by feed provider.
additional_information:
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: http://www.malwaredomainlist.com/updatescsv.php
rate_limit: 3600
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.malwaredomainlist.parser
parameters:
revision: 2018-01-20
documentation: http://www.malwaredomainlist.com/
public: yes
AnubisNetworks: AnubisNetworks:
Cyberfeed Stream: Cyberfeed Stream:
description: Fetches and parsers the Cyberfeed data stream. description: Fetches and parsers the Cyberfeed data stream.
@@ -1205,10 +1242,12 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: https://osint.bambenekconsulting.com/feeds/ documentation: https://osint.bambenekconsulting.com/feeds/
public: yes public: yes
DynDNS: cAPTure:
Infected Domains: Ponmocup Domains CIF Format:
description: DynDNS ponmocup. List of ponmocup malware redirection domains and description: List of ponmocup malware redirection domains and infected web-servers from cAPTure.
infected web-servers. See also http://security-research.dyndns.org/pub/botnet-links.html See also http://security-research.dyndns.org/pub/botnet-links.htm
and http://c-apt-ure.blogspot.com/search/label/ponmocup
The data in the CIF format is not equal to the Shadowserver CSV format. Reasons are unknown.
additional_information: additional_information:
bots: bots:
collector: collector:
@@ -1216,7 +1255,7 @@ providers:
parameters: parameters:
http_url: http://security-research.dyndns.org/pub/malware-feeds/ponmocup-infected-domains-CIF-latest.txt http_url: http://security-research.dyndns.org/pub/malware-feeds/ponmocup-infected-domains-CIF-latest.txt
rate_limit: 10800 rate_limit: 10800
name: __FEED__ name: Infected Domains
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
module: intelmq.bots.parsers.dyn.parser module: intelmq.bots.parsers.dyn.parser
@@ -1224,6 +1263,40 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: http://security-research.dyndns.org/pub/malware-feeds/ documentation: http://security-research.dyndns.org/pub/malware-feeds/
public: yes public: yes
Ponmocup Domains Shadowserver Format:
description: List of ponmocup malware redirection domains and infected web-servers from cAPTure.
See also http://security-research.dyndns.org/pub/botnet-links.htm
and http://c-apt-ure.blogspot.com/search/label/ponmocup
The data in the Shadowserver CSV is not equal to the CIF format format. Reasons are unknown.
additional_information:
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: http://security-research.dyndns.org/pub/malware-feeds/ponmocup-infected-domains-shadowserver.csv
rate_limit: 10800
name: Infected Domains
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.generic.parser_csv
parameters:
columns:
- time.source
- source.ip
- source.fqdn
- source.urlpath
- source.port
- protocol.application
- extra.tag
- extra.redirect_target
- extra.category
compose_fields: {"source.url": "http://{0}{1}"}
skip_header: true
delimiter: ","
type: malware-distribution
revision: 2020-07-08
documentation: http://security-research.dyndns.org/pub/malware-feeds/
public: yes
DShield: DShield:
Suspicious Domains: Suspicious Domains:
description: There are many suspicious domains on the internet. In an effort description: There are many suspicious domains on the internet. In an effort
@@ -1236,7 +1309,7 @@ providers:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://www.dshield.org/feeds/suspiciousdomains_High.txt http_url: https://www.dshield.org/feeds/suspiciousdomains_High.txt
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -1255,7 +1328,7 @@ providers:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://www.dshield.org/block.txt http_url: https://www.dshield.org/block.txt
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -1272,7 +1345,7 @@ providers:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
parameters: parameters:
http_url: https://dshield.org/asdetailsascii.html?as={{ AS Number }} http_url: https://dshield.org/asdetailsascii.html?as={{ AS Number }}
rate_limit: 129600 rate_limit: 86400
name: __FEED__ name: __FEED__
provider: __PROVIDER__ provider: __PROVIDER__
parser: parser:
@@ -1299,7 +1372,7 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: http://vxvault.net/ViriList.php documentation: http://vxvault.net/ViriList.php
public: yes public: yes
ShadowServer: Shadowserver:
Via IMAP: Via IMAP:
description: Shadowserver sends out a variety of reports (see https://www.shadowserver.org/wiki/pmwiki.php/Services/Reports). description: Shadowserver sends out a variety of reports (see https://www.shadowserver.org/wiki/pmwiki.php/Services/Reports).
additional_information: The configuration retrieves the data from a e-mails via IMAP from the attachments. additional_information: The configuration retrieves the data from a e-mails via IMAP from the attachments.
@@ -1356,6 +1429,28 @@ providers:
revision: 2018-01-20 revision: 2018-01-20
documentation: https://www.shadowserver.org/what-we-do/network-reporting/ documentation: https://www.shadowserver.org/what-we-do/network-reporting/
public: no public: no
Via API:
description: Shadowserver sends out a variety of reports to subscribers, see documentation.
additional_information: This configuration fetches user-configurable reports from the Shadowserver Reports API. For a list of reports, have a look at the Shadowserver collector and parser documentation.
bots:
collector:
module: intelmq.bots.collectors.shadowserver.collector_reports_api
parameters:
country: <CC>
api_key: <API key>
secret: <API secret>
types: <single report or list of reports>
rate_limit: 86400
redis_cache_db: 12
redis_cache_host: 127.0.0.1
redis_cache_port: 6379
redis_cache_ttl: 864000
parser:
module: intelmq.bots.parsers.shadowserver.parser_json
parameters:
revision: 2020-01-08
documentation: https://www.shadowserver.org/what-we-do/network-reporting/api-documentation/
public: no
Fraunhofer: Fraunhofer:
DGA Archive: DGA Archive:
description: Fraunhofer DGA collector fetches data from Fraunhofer's domain description: Fraunhofer DGA collector fetches data from Fraunhofer's domain
@@ -1417,7 +1512,7 @@ providers:
documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange
public: no public: no
CTIP via Interflow: CTIP via Interflow:
description: Collects CTIP (Sinkhole data) files from the Interflow API.The feed is available via Microsofts Government Security Program (GSP). description: Collects the CTIP Infected feed (Sinkhole data for your country) files from the Interflow API.The feed is available via Microsofts Government Security Program (GSP).
additional_information: Depending on the file sizes you may need to increase the parameter 'http_timeout_sec' of the collector. As many IPs occur very often in the data, you may want to use a deduplicator specifically for the feed. additional_information: Depending on the file sizes you may need to increase the parameter 'http_timeout_sec' of the collector. As many IPs occur very often in the data, you may want to use a deduplicator specifically for the feed.
bots: bots:
collector: collector:
@@ -1436,8 +1531,8 @@ providers:
revision: 2018-03-06 revision: 2018-03-06
documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange
public: no public: no
CTIP via Azure: CTIP Infected via Azure:
description: Collects CTIP (Sinkhole data) files from a shared Azure Storage. The feed is available via Microsofts Government Security Program (GSP). description: Collects the CTIP (Sinkhole data) from a shared Azure Storage. The feed is available via Microsofts Government Security Program (GSP).
additional_information: The cache is needed for memorizing which files have already been processed, the TTL should be higher than the oldest file available in the storage (currently the last three days are available). The connection string contains endpoint as well as authentication information. additional_information: The cache is needed for memorizing which files have already been processed, the TTL should be higher than the oldest file available in the storage (currently the last three days are available). The connection string contains endpoint as well as authentication information.
bots: bots:
collector: collector:
@@ -1458,6 +1553,28 @@ providers:
revision: 2020-05-29 revision: 2020-05-29
documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange
public: no public: no
CTIP C2 via Azure:
description: Collects the CTIP C2 feed from a shared Azure Storage. The feed is available via Microsofts Government Security Program (GSP).
additional_information: The cache is needed for memorizing which files have already been processed, the TTL should be higher than the oldest file available in the storage (currently the last three days are available). The connection string contains endpoint as well as authentication information.
bots:
collector:
module: intelmq.bots.collectors.microsoft.collector_azure
parameters:
connection_string: "{{your connection string}}"
container_name: "ctip-c2"
name: __FEED__
provider: __PROVIDER__
rate_limit: 3600
redis_cache_db: 5
redis_cache_host: 127.0.0.1
redis_cache_port: 6379
redis_cache_ttl: 864000
parser:
module: intelmq.bots.parsers.microsoft.parser_ctip
parameters:
revision: 2020-05-29
documentation: https://docs.microsoft.com/en-us/security/gsp/informationsharingandexchange
public: no
Threatminer: Threatminer:
Recent domains: Recent domains:
description: Latest malicious domains. description: Latest malicious domains.
@@ -1595,7 +1712,7 @@ providers:
DailyIOC: DailyIOC:
description: Daily IOC from tweets and articles description: Daily IOC from tweets and articles
additional_information: | additional_information: |
collector's `extra_fields` parameter may be any of fields from the github [content API response](https://developer.github.com/v3/repos/contents/) collector's `extra_fields` parameter may be any of fields from the github `content API response <https://developer.github.com/v3/repos/contents/>`_
bots: bots:
collector: collector:
module: intelmq.bots.collectors.github_api.collector_github_contents_api module: intelmq.bots.collectors.github_api.collector_github_contents_api
@@ -1612,7 +1729,7 @@ providers:
public: yes public: yes
CZ.NIC: CZ.NIC:
HaaS: HaaS:
description: SSH attackers against HaaS (Honeypot as a Sevice) provided by CZ.NIC, z.s.p.o. The dump is published once a day. description: SSH attackers against HaaS (Honeypot as a Service) provided by CZ.NIC, z.s.p.o. The dump is published once a day.
bots: bots:
collector: collector:
module: intelmq.bots.collectors.http.collector_http module: intelmq.bots.collectors.http.collector_http
@@ -1628,6 +1745,24 @@ providers:
revision: 2020-07-22 revision: 2020-07-22
documentation: https://haas.nic.cz/ documentation: https://haas.nic.cz/
public: yes public: yes
Proki:
description: Aggregation of various sources on malicious IP addresses (malware spreaders or C&C servers).
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: https://proki.csirt.cz/api/1/__APIKEY__/data/day/{time[%Y/%m/%d]}
http_url_formatting:
days: -1
rate_limit: 86400
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.cznic.parser_proki
parameters:
revision: 2020-08-17
documentation: https://csirt.cz/en/proki/
public: no
ESET: ESET:
ETI Domains: ETI Domains:
description: Domain data from ESET's TAXII API. description: Domain data from ESET's TAXII API.
@@ -1665,3 +1800,25 @@ providers:
revision: 2020-06-30 revision: 2020-06-30
documentation: https://www.eset.com/int/business/services/threat-intelligence/ documentation: https://www.eset.com/int/business/services/threat-intelligence/
public: no public: no
Shodan:
Country Stream:
description: Collects the Shodan stream for one or multiple countries from the Shodan API.
additional_information: A Shodan account with streaming permissions is needed.
bots:
collector:
module: intelmq.bots.collectors.shodan.collector_stream
parameters:
api_key: <API key>
countries: <comma-separated list of country codes>
error_retry_delay: 0
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.shodan.parser
parameters:
ignore_errors: false
error_retry_delay: 0
minimal_mode: false
revision: 2021-03-22
documentation: https://developer.shodan.io/api/stream
public: no

View File

@@ -1,16 +1,16 @@
{ {
"event": { "event": {
"classification.identifier": { "classification.identifier": {
"description": "The lowercase identifier defines the actual software or service (e.g. 'heartbleed' or 'ntp_version') or standardized malware name (e.g. 'zeus'). Note that you MAY overwrite this field during processing for your individual setup. This field is not standardized across IntelMQ setups/users.", "description": "The lowercase identifier defines the actual software or service (e.g. ``heartbleed`` or ``ntp_version``) or standardized malware name (e.g. ``zeus``). Note that you MAY overwrite this field during processing for your individual setup. This field is not standardized across IntelMQ setups/users.",
"type": "String" "type": "String"
}, },
"classification.taxonomy": { "classification.taxonomy": {
"description": "We recognize the need for the CSIRT teams to apply a static (incident) taxonomy to abuse data. With this goal in mind the type IOC will serve as a basis for this activity. Each value of the dynamic type mapping translates to a an element in the static taxonomy. The European CSIRT teams for example have decided to apply the eCSIRT.net incident classification. The value of the taxonomy key is thus a derivative of the dynamic type above. For more information about check [ENISA taxonomies](http://www.enisa.europa.eu/activities/cert/support/incident-management/browsable/incident-handling-process/incident-taxonomy/existing-taxonomies).", "description": "We recognize the need for the CSIRT teams to apply a static (incident) taxonomy to abuse data. With this goal in mind the type IOC will serve as a basis for this activity. Each value of the dynamic type mapping translates to a an element in the static taxonomy. The European CSIRT teams for example have decided to apply the eCSIRT.net incident classification. The value of the taxonomy key is thus a derivative of the dynamic type above. For more information about check `ENISA taxonomies <http://www.enisa.europa.eu/activities/cert/support/incident-management/browsable/incident-handling-process/incident-taxonomy/existing-taxonomies>`_.",
"length": 100, "length": 100,
"type": "LowercaseString" "type": "ClassificationTaxonomy"
}, },
"classification.type": { "classification.type": {
"description": "The abuse type IOC is one of the most crucial pieces of information for any given abuse event. The main idea of dynamic typing is to keep our ontology flexible, since we need to evolve with the evolving threatscape of abuse data. In contrast with the static taxonomy below, the dynamic typing is used to perform business decisions in the abuse handling pipeline. Furthermore, the value data set should be kept as minimal as possible to avoid \u201ctype explosion\u201d, which in turn dilutes the business value of the dynamic typing. In general, we normally have two types of abuse type IOC: ones referring to a compromised resource or ones referring to pieces of the criminal infrastructure, such as a command and control servers for example.", "description": "The abuse type IOC is one of the most crucial pieces of information for any given abuse event. The main idea of dynamic typing is to keep our ontology flexible, since we need to evolve with the evolving threatscape of abuse data. In contrast with the static taxonomy below, the dynamic typing is used to perform business decisions in the abuse handling pipeline. Furthermore, the value data set should be kept as minimal as possible to avoid *type explosion*, which in turn dilutes the business value of the dynamic typing. In general, we normally have two types of abuse type IOC: ones referring to a compromised resource or ones referring to pieces of the criminal infrastructure, such as a command and control servers for example.",
"type": "ClassificationType" "type": "ClassificationType"
}, },
"comment": { "comment": {
@@ -356,7 +356,7 @@
"type": "DateTime" "type": "DateTime"
}, },
"time.source": { "time.source": {
"description": "The time of occurence of the event as reported the feed (source).", "description": "The time of occurrence of the event as reported the feed (source).",
"type": "DateTime" "type": "DateTime"
}, },
"tlp": { "tlp": {

View File

@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2016 Sebastian Wagner
SPDX-License-Identifier: AGPL-3.0-or-later

View File

@@ -27,14 +27,6 @@
"x": -252, "x": -252,
"y": 243 "y": 243
}, },
"malc0de-parser": {
"x": 297,
"y": 24
},
"malc0de-windows-format-collector": {
"x": 433,
"y": 121
},
"malware-domain-list-collector": { "malware-domain-list-collector": {
"x": 465, "x": 465,
"y": -198 "y": -198

View File

@@ -1,86 +0,0 @@
{
"cymru-whois-expert": {
"source-queue": "cymru-whois-expert-queue",
"destination-queues": [
"file-output-queue"
]
},
"deduplicator-expert": {
"source-queue": "deduplicator-expert-queue",
"destination-queues": [
"taxonomy-expert-queue"
]
},
"feodo-tracker-browse-collector": {
"destination-queues": [
"feodo-tracker-browse-parser-queue"
]
},
"feodo-tracker-browse-parser": {
"source-queue": "feodo-tracker-browse-parser-queue",
"destination-queues": [
"deduplicator-expert-queue"
]
},
"file-output": {
"source-queue": "file-output-queue"
},
"gethostbyname-1-expert": {
"source-queue": "gethostbyname-1-expert-queue",
"destination-queues": [
"cymru-whois-expert-queue"
]
},
"gethostbyname-2-expert": {
"source-queue": "gethostbyname-2-expert-queue",
"destination-queues": [
"cymru-whois-expert-queue"
]
},
"malc0de-parser": {
"source-queue": "malc0de-parser-queue",
"destination-queues": [
"deduplicator-expert-queue"
]
},
"malc0de-windows-format-collector": {
"destination-queues": [
"malc0de-parser-queue"
]
},
"malware-domain-list-collector": {
"destination-queues": [
"malware-domain-list-parser-queue"
]
},
"malware-domain-list-parser": {
"source-queue": "malware-domain-list-parser-queue",
"destination-queues": [
"deduplicator-expert-queue"
]
},
"spamhaus-drop-collector": {
"destination-queues": [
"spamhaus-drop-parser-queue"
]
},
"spamhaus-drop-parser": {
"source-queue": "spamhaus-drop-parser-queue",
"destination-queues": [
"deduplicator-expert-queue"
]
},
"taxonomy-expert": {
"source-queue": "taxonomy-expert-queue",
"destination-queues": [
"url2fqdn-expert-queue"
]
},
"url2fqdn-expert": {
"source-queue": "url2fqdn-expert-queue",
"destination-queues": [
"gethostbyname-1-expert-queue",
"gethostbyname-2-expert-queue"
]
}
}

View File

@@ -1,230 +0,0 @@
{
"cymru-whois-expert": {
"bot_id": "cymru-whois-expert",
"description": "Cymru Whois (IP to ASN) is the bot responsible to add network information to the events (BGP, ASN, AS Name, Country, etc..).",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.cymru_whois.expert",
"name": "Cymru Whois",
"parameters": {
"overwrite": true,
"redis_cache_db": 5,
"redis_cache_password": null,
"redis_cache_port": 6379,
"redis_cache_ttl": 86400
},
"run_mode": "continuous"
},
"deduplicator-expert": {
"bot_id": "deduplicator-expert",
"description": "Deduplicator is the bot responsible for detection and removal of duplicate messages. Messages get cached for <redis_cache_ttl> seconds. If found in the cache, it is assumed to be a duplicate.",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.deduplicator.expert",
"name": "Deduplicator",
"parameters": {
"filter_keys": "raw,time.observation",
"filter_type": "blacklist",
"redis_cache_db": 6,
"redis_cache_port": 6379,
"redis_cache_ttl": 86400
},
"run_mode": "continuous"
},
"feodo-tracker-browse-collector": {
"description": "Generic URL Fetcher is the bot responsible to get the report from an URL.",
"enabled": true,
"group": "Collector",
"module": "intelmq.bots.collectors.http.collector_http",
"name": "URL Fetcher",
"parameters": {
"extract_files": false,
"http_password": null,
"http_url": "https://feodotracker.abuse.ch/browse",
"http_url_formatting": false,
"http_username": null,
"name": "Feodo Tracker Browse",
"provider": "Abuse.ch",
"rate_limit": 86400,
"ssl_client_certificate": null
},
"run_mode": "continuous",
"groupname": "collectors",
"bot_id": "feodo-tracker-browse-collector"
},
"feodo-tracker-browse-parser": {
"description": "HTML Table Parser is a bot configurable to parse different html table data.",
"enabled": true,
"group": "Parser",
"module": "intelmq.bots.parsers.html_table.parser",
"name": "HTML Table",
"parameters": {
"attribute_name": "",
"attribute_value": "",
"columns": "time.source,source.ip,malware.name,status,extra.SBL,source.as_name,source.geolocation.cc",
"default_url_protocol": "http://",
"ignore_values": ",,,,Not listed,,",
"skip_table_head": true,
"split_column": "",
"split_index": 0,
"split_separator": "",
"table_index": 0,
"time_format": null,
"type": "c2server"
},
"run_mode": "continuous",
"groupname": "parsers",
"bot_id": "feodo-tracker-browse-parser"
},
"file-output": {
"bot_id": "file-output",
"description": "File is the bot responsible to send events to a file.",
"enabled": true,
"group": "Output",
"groupname": "outputs",
"module": "intelmq.bots.outputs.file.output",
"name": "File",
"parameters": {
"file": "/opt/intelmq/var/lib/bots/file-output/events.txt",
"hierarchical_output": false,
"single_key": null
},
"run_mode": "continuous"
},
"gethostbyname-1-expert": {
"bot_id": "gethostbyname-1-expert",
"description": "fqdn2ip is the bot responsible to parsing the ip from the fqdn.",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.gethostbyname.expert",
"name": "Gethostbyname",
"parameters": {},
"run_mode": "continuous"
},
"gethostbyname-2-expert": {
"bot_id": "gethostbyname-2-expert",
"description": "fqdn2ip is the bot responsible to parsing the ip from the fqdn.",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.gethostbyname.expert",
"name": "Gethostbyname",
"parameters": {},
"run_mode": "continuous"
},
"malc0de-parser": {
"bot_id": "malc0de-parser",
"description": "Malc0de Parser is the bot responsible to parse the IP Blacklist and either Windows Format or Bind Format reports and sanitize the information.",
"enabled": true,
"group": "Parser",
"groupname": "parsers",
"module": "intelmq.bots.parsers.malc0de.parser",
"name": "Malc0de",
"parameters": {},
"run_mode": "continuous"
},
"malc0de-windows-format-collector": {
"bot_id": "malc0de-windows-format-collector",
"description": "",
"enabled": true,
"group": "Collector",
"groupname": "collectors",
"module": "intelmq.bots.collectors.http.collector_http",
"name": "Malc0de Windows Format",
"parameters": {
"http_password": null,
"http_url": "https://malc0de.com/bl/BOOT",
"http_username": null,
"name": "Windows Format",
"provider": "Malc0de",
"rate_limit": 10800,
"ssl_client_certificate": null
},
"run_mode": "continuous"
},
"malware-domain-list-collector": {
"bot_id": "malware-domain-list-collector",
"description": "Malware Domain List Collector is the bot responsible to get the report from source of information.",
"enabled": true,
"group": "Collector",
"groupname": "collectors",
"module": "intelmq.bots.collectors.http.collector_http",
"name": "Malware Domain List",
"parameters": {
"http_url": "http://www.malwaredomainlist.com/updatescsv.php",
"name": "Malware Domain List",
"provider": "Malware Domain List",
"rate_limit": 3600
},
"run_mode": "continuous"
},
"malware-domain-list-parser": {
"bot_id": "malware-domain-list-parser",
"description": "Malware Domain List Parser is the bot responsible to parse the report and sanitize the information.",
"enabled": true,
"group": "Parser",
"groupname": "parsers",
"module": "intelmq.bots.parsers.malwaredomainlist.parser",
"name": "Malware Domain List",
"parameters": {},
"run_mode": "continuous"
},
"spamhaus-drop-collector": {
"bot_id": "spamhaus-drop-collector",
"description": "",
"enabled": true,
"group": "Collector",
"groupname": "collectors",
"module": "intelmq.bots.collectors.http.collector_http",
"name": "Spamhaus Drop",
"parameters": {
"http_password": null,
"http_url": "https://www.spamhaus.org/drop/drop.txt",
"http_username": null,
"name": "Drop",
"provider": "Spamhaus",
"rate_limit": 3600,
"ssl_client_certificate": null
},
"run_mode": "continuous"
},
"spamhaus-drop-parser": {
"bot_id": "spamhaus-drop-parser",
"description": "Spamhaus Drop Parser is the bot responsible to parse the DROP, EDROP, DROPv6, and ASN-DROP reports and sanitize the information.",
"enabled": true,
"group": "Parser",
"groupname": "parsers",
"module": "intelmq.bots.parsers.spamhaus.parser_drop",
"name": "Spamhaus Drop",
"parameters": {},
"run_mode": "continuous"
},
"taxonomy-expert": {
"bot_id": "taxonomy-expert",
"description": "Taxonomy is the bot responsible to apply the eCSIRT Taxonomy to all events.",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.taxonomy.expert",
"name": "Taxonomy",
"parameters": {},
"run_mode": "continuous"
},
"url2fqdn-expert": {
"bot_id": "url2fqdn-expert",
"description": "url2fqdn is the bot responsible to parsing the fqdn from the url.",
"enabled": true,
"group": "Expert",
"groupname": "experts",
"module": "intelmq.bots.experts.url2fqdn.expert",
"name": "URL2FQDN",
"parameters": {
"load_balance": true,
"overwrite": false
},
"run_mode": "continuous"
}
}

View File

@@ -0,0 +1,179 @@
cymru-whois-expert:
bot_id: cymru-whois-expert
description: Cymru Whois (IP to ASN) is the bot responsible to add network information
to the events (BGP, ASN, AS Name, Country, etc..).
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.cymru_whois.expert
name: Cymru Whois
parameters:
destination_queues:
_default: [file-output-queue]
overwrite: true
redis_cache_db: 5
redis_cache_host: 127.0.0.1
redis_cache_password: null
redis_cache_port: 6379
redis_cache_ttl: 86400
run_mode: continuous
deduplicator-expert:
bot_id: deduplicator-expert
description: Deduplicator is the bot responsible for detection and removal of duplicate
messages. Messages get cached for <redis_cache_ttl> seconds. If found in the cache,
it is assumed to be a duplicate.
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.deduplicator.expert
name: Deduplicator
parameters:
destination_queues:
_default: [taxonomy-expert-queue]
filter_keys: raw,time.observation
filter_type: blacklist
redis_cache_db: 6
redis_cache_host: 127.0.0.1
redis_cache_port: 6379
redis_cache_ttl: 86400
run_mode: continuous
feodo-tracker-browse-collector:
description: Generic URL Fetcher is the bot responsible to get the report from an
URL.
enabled: true
group: Collector
module: intelmq.bots.collectors.http.collector_http
name: URL Fetcher
parameters:
destination_queues:
_default: [feodo-tracker-browse-parser-queue]
extract_files: false
http_password: null
http_url: https://feodotracker.abuse.ch/browse
http_url_formatting: false
http_username: null
name: Feodo Tracker Browse
provider: Abuse.ch
rate_limit: 86400
ssl_client_certificate: null
run_mode: continuous
feodo-tracker-browse-parser:
description: HTML Table Parser is a bot configurable to parse different html table
data.
enabled: true
group: Parser
module: intelmq.bots.parsers.html_table.parser
name: HTML Table
parameters:
attribute_name: ''
attribute_value: ''
columns: time.source,source.ip,malware.name,status,source.as_name,source.geolocation.cc
default_url_protocol: http://
destination_queues:
_default: [deduplicator-expert-queue]
ignore_values: ',,,,,'
skip_table_head: true
split_column: ''
split_index: 0
split_separator: ''
table_index: 0
time_format: null
type: c2-server
run_mode: continuous
file-output:
bot_id: file-output
description: File is the bot responsible to send events to a file.
enabled: true
group: Output
groupname: outputs
module: intelmq.bots.outputs.file.output
name: File
parameters: {file: /opt/intelmq/var/lib/bots/file-output/events.txt, hierarchical_output: false,
single_key: null}
run_mode: continuous
gethostbyname-1-expert:
bot_id: gethostbyname-1-expert
description: fqdn2ip is the bot responsible to parsing the ip from the fqdn.
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.gethostbyname.expert
name: Gethostbyname
parameters:
destination_queues:
_default: [cymru-whois-expert-queue]
run_mode: continuous
gethostbyname-2-expert:
bot_id: gethostbyname-2-expert
description: fqdn2ip is the bot responsible to parsing the ip from the fqdn.
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.gethostbyname.expert
name: Gethostbyname
parameters:
destination_queues:
_default: [cymru-whois-expert-queue]
run_mode: continuous
global: {destination_pipeline_broker: redis, process_manager: intelmq, source_pipeline_broker: redis,
ssl_ca_certificate: null, statistics_database: 3, statistics_host: 127.0.0.1, statistics_password: null,
statistics_port: 6379, destination_pipeline_host: redis, source_pipeline_host: redis}
spamhaus-drop-collector:
bot_id: spamhaus-drop-collector
description: ''
enabled: true
group: Collector
groupname: collectors
module: intelmq.bots.collectors.http.collector_http
name: Spamhaus Drop
parameters:
destination_queues:
_default: [spamhaus-drop-parser-queue]
http_password: null
http_url: https://www.spamhaus.org/drop/drop.txt
http_username: null
name: Drop
provider: Spamhaus
rate_limit: 3600
ssl_client_certificate: null
run_mode: continuous
spamhaus-drop-parser:
bot_id: spamhaus-drop-parser
description: Spamhaus Drop Parser is the bot responsible to parse the DROP, EDROP,
DROPv6, and ASN-DROP reports and sanitize the information.
enabled: true
group: Parser
groupname: parsers
module: intelmq.bots.parsers.spamhaus.parser_drop
name: Spamhaus Drop
parameters:
destination_queues:
_default: [deduplicator-expert-queue]
run_mode: continuous
taxonomy-expert:
bot_id: taxonomy-expert
description: Taxonomy is the bot responsible to apply the eCSIRT Taxonomy to all
events.
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.taxonomy.expert
name: Taxonomy
parameters:
destination_queues:
_default: [url2fqdn-expert-queue]
run_mode: continuous
url2fqdn-expert:
bot_id: url2fqdn-expert
description: url2fqdn is the bot responsible to parsing the fqdn from the url.
enabled: true
group: Expert
groupname: experts
module: intelmq.bots.experts.url2fqdn.expert
name: URL2FQDN
parameters:
destination_queues:
_default: [gethostbyname-1-expert-queue, gethostbyname-2-expert-queue]
load_balance: true
overwrite: false
run_mode: continuous

View File

@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2021 Birger Schacht
SPDX-License-Identifier: AGPL-3.0-or-later

34
inspect-container.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
base_path=$(pwd)
echo $base_path
echo [START] Creating new network
network_id=$(docker network create -d bridge intelmq-testing-network)
echo [DONE ] Network created
echo [START] Setting up redis container
redis_id=$(docker run --rm -d --network=intelmq-testing-network -p 6379:6379 -v $base_path/intelmq_docker/example_config/redis/redis.conf:/redis.conf redis:latest)
redis_ip=$(docker inspect -f '{{ range.NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' $redis_id)
echo [DONE ] Redis container running $redis_ip:6379
echo [START] IntelMQ
intelmq_id=$(docker run --network=intelmq-testing-network --cap-add=SYS_PTRACE -p 8080:8080 --rm -d -v $base_path/intelmq_persistence:/opt/intelmq_persistence -v $base_path/example_config/intelmq/etc:/opt/intelmq/etc -v $base_path/example_config/intelmq-api/config.json:/etc/intelmq/api-config.json:ro -v $base_path/intelmq_logs:/opt/intelmq/var/log -v $base_path/example_config/intelmq/var/lib:/opt/intelmq/var/lib -e "INTELMQ_IS_DOCKER=true" -e "INTELMQ_SOURCE_PIPELINE_BROKER=redis" -e "INTELMQ_PIPELINE_BROKER=redis" -e "INTELMQ_DESTIONATION_PIPELINE_BROKER=redis" -e "INTELMQ_PIPELINE_HOST=$redis_ip" -e "INTELMQ_SOURCE_PIPELINE_HOST=$redis_ip" -e "INTELMQ_DESTINATION_PIPELINE_HOST=$redis_ip" -e "INTELMQ_REDIS_CACHE_HOST=$redis_ip" intelmq-full:latest)
intelmq_ip=$(docker inspect -f '{{ range.NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' $intelmq_id)
echo [DONE ] IntelMQ running
echo [START] IntelMQ-Manager
intelmq_manager_id=$(docker run --rm -d -p 1337:80 --network=intelmq-testing-network --add-host intelmq:$intelmq_ip intelmq-nginx:latest)
echo [DONE ] IntelMQ-Manager running
echo [START] Preparing profiling
docker exec -it $intelmq_id bash -c 'sudo apt update && sudo apt install -y htop && sudo pip3 install py-spy shodan'
echo [DONE ] All profiling installed
echo Execing into intelmq instance
docker exec -it $intelmq_id /bin/bash
echo Killing all containers
docker container kill $redis_id $intelmq_id $intelmq_manager_id
echo Removing network
docker network rm intelmq-testing-network

1
intelmq Submodule

Submodule intelmq added at 633cf7b4d4

1
intelmq-api Submodule

Submodule intelmq-api added at 6d4f34a37a

1
intelmq-manager Submodule

Submodule intelmq-manager added at 1367ea86ba

1
intelmq_output/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

View File

@@ -1,8 +1,17 @@
#!/bin/bash #!/bin/bash
build_version="1.0" build_version="3.2.1"
namespace="certat"
docker login docker login
docker tag intelmq-full:$build_version certat/intelmq-full:$build_version docker tag intelmq-nginx:latest $namespace/intelmq-nginx:latest
docker push certat/intelmq-full:$build_version docker push $namespace/intelmq-nginx:latest
docker tag intelmq-full:latest $namespace/intelmq-full:latest
docker tag intelmq-full:latest $namespace/intelmq-full:1.0
docker tag intelmq-full:latest $namespace/intelmq-full:$build_version
docker push $namespace/intelmq-full:latest
docker push $namespace/intelmq-full:1.0
docker push $namespace/intelmq-full:$build_version

61
test.sh
View File

@@ -1,16 +1,53 @@
#!/bin/bash #!/bin/bash
redis_id=$(sudo docker run --rm -d -p 6379:6379 -v ~/intelmq-docker/example_config/redis/redis.conf:/redis.conf redis:latest) echo RUNNING TESTS WITH REDIS
echo Setting up redis container
redis_id=$(docker run --rm -d -p 6379:6379 -v ~/example_config/redis/redis.conf:/redis.conf redis:latest)
redis_ip=$(docker inspect -f '{{ range.NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' $redis_id)
redis_ip=$(sudo docker inspect -f '{{ range.NetworkSettings.Networks }}{{ .IPAddress }}{{ end }}' $redis_id) echo Setting up IntelMQ-Container
docker run --rm -v $(pwd)/example_config/intelmq/etc/:/etc/intelmq/etc/ \
sudo docker run --rm -v ~/intelmq-docker/example_config/intelmq/etc:/opt/intelmq/etc \ -v $(pwd)/example_config/intelmq-api:/etc/intelmq-api/config \
-v ~/intelmq-docker/example_config/intelmq-manager:/opt/intelmq-manager/config \ -v $(pwd)/intelmq_logs:/etc/intelmq/var/log \
-v ~/intelmq-docker/intelmq_logs:/opt/intelmq/var/log \ -v $(pwd)/intelmq_output:/etc/intelmq/var/lib/bots \
-v ~/intelmq-docker/example_config/intelmq/var/lib:/opt/intelmq/var/lib \ -v $(pwd)/example_config/intelmq/var/lib/bot:/etc/intelmq/var/lib/bot \
-e "INTELMQ_IS_DOCKER=\"true\"" \ -v $(pwd)/intelmq_persistence:/opt/intelmq_persistence \
-e "INTELMQ_PIPELINE_DRIVER=\"redis\"" \ -e "INTELMQ_PIPELINE_DRIVER=redis" \
-e "INTELMQ_PIPELINE_HOST=$redis_ip" \ -e "INTELMQ_PIPELINE_HOST=$redis_ip" \
-e "INTELMQ_SOURCE_PIPELINE_HOST=$redis_ip" \
-e "INTELMQ_DESTINATION_PIPELINE_HOST=$redis_ip" \
-e "INTELMQ_REDIS_CACHE_HOST=$redis_ip" \ -e "INTELMQ_REDIS_CACHE_HOST=$redis_ip" \
-e "INTELMQ_MANAGER_CONFIG=\"/opt/intelmq-manager/config/config.json\"" \ intelmq-full:latest selftest
intelmq-full:1.0 selftest
sudo docker container stop $redis_id echo Removing redis container
docker container kill $redis_id
echo RUNNING TESTS WITH AMQP
echo Setting up AMQP container
amq_id=$(docker run --rm -d -p 5672:5672 -p 15672:15672 rabbitmq:latest)
amp_ip=$(docker inspect -f '{{ range.NetworkSettings.Networks}}{{ .IPAddress }}{{ end }}' $amq_id)
echo Setting up IntelMQ-Container
docker run --rm -v $(pwd)/example_config/intelmq/etc/:/etc/intelmq/etc/ \
-v $(pwd)/example_config/intelmq-api:/etc/intelmq-api/config \
-v $(pwd)/intelmq_logs:/etc/intelmq/var/log \
-v $(pwd)/intelmq_output:/etc/intelmq/var/lib/bots \
-v $(pwd)/example_config/intelmq/var/lib/bot:/etc/intelmq/var/lib/bot \
-v $(pwd)/intelmq_persistence:/opt/intelmq_persistence \
-e "INTELMQ_PIPELINE_DRIVER=\"amqp\"" \
-e "INTELMQ_PIPELINE_HOST=$amq_id" \
-e "INTELMQ_SOURCE_PIPELINE_HOST=$amq_ip" \
-e "INTELMQ_DESTINATION_PIPELINE_HOST=$amq_ip" \
-e "INTELMQ_REDIS_CACHE_HOST=$redis_ip" \
intelmq-full:latest selftest
echo Removing AMQP container
docker container kill $amq_id
# restore broke priviliges
for mounted_dir in example_config intelmq_logs intelmq_output intelmq_persistence;
do
echo "Restoring broken privelages to `whoami` for directory $mounted_dir"
sudo chown -R `whoami`:`whoami` $(pwd)/$mounted_dir
done

3
update_submodules.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
git submodule update --remote
git pull --recurse-submodules

11
versions.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
intelmq_full_built=$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.created" }}' intelmq-full:latest)
intelmq_full_vers=$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.version" }}' intelmq-full:latest)
intelmq_full_rev=$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.revision" }}' intelmq-full:latest)
echo IntelMQ built at \"$intelmq_full_built\" \(Version $intelmq_full_vers\)
revisions=$(echo $intelmq_full_rev | tr "," "\n")
for rev in $revisions
do
echo "> $rev"
done