Compare commits

..

4 Commits

Author SHA1 Message Date
Guillaume Emorine
6e55f7e8b6 Modifications apportées au dossier des vagrantfiles, ainsi qu'au
vagrantfile template.
2025-02-07 08:23:01 +01:00
Guillaume Emorine
6b64852985 Légère mise à jour du dépôt. 2025-01-23 09:30:34 +01:00
Guillaume Emorine
41f54f1d4a Ajout des vagrantfiles de K8s, Terraform, ModSecurity, Ansible, devsec
et la vagrantfile template.
2024-12-13 10:00:04 +01:00
b023300795 Actualiser bts_annee_2/README.md
Correction de la syntaxe MarkDown.
2024-11-29 11:44:18 +01:00
64 changed files with 869 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#Dépôt de seconde année de BTS.
##Le premier répertoire est dédié au côté SISR des TPs.
##Le deuxième répertoire est dédié au côté Cybersécurité des TPs.
##Le troisième répertoire est dédié aux ateliers de professionalisation, mais les effectifs du BTS font que le seul présent (sur le SDIS 29) sera le dernier en mode "piscine".
##Le quatrième répertoire est dédié aux Vagrantfiles utilisés lors des TPs, que ce soit en cybersécurité ou en SISR.
##Le cinquième répertoire est dédié au contrôle sur les logs, tel qu'il a été rendu.
## Dépôt de seconde année de BTS.
### Le premier répertoire est dédié au côté SISR des TPs.
### Le deuxième répertoire est dédié au côté Cybersécurité des TPs.
### Le troisième répertoire est dédié aux ateliers de professionalisation, mais les effectifs du BTS font que le seul présent (SDIS 29) sera le dernier en mode "piscine".
### Le quatrième répertoire est dédié aux Vagrantfiles utilisés lors des TPs, que ce soit en cybersécurité ou en SISR.
### Le cinquième répertoire est dédié au contrôle sur les logs, tel qu'il a été rendu.

View File

@ -1 +1,2 @@
# Ce répertoire contient les vagrantfiles et répertoires de celles-ci utilisés lors de TPs et des séances, que ce soit en SISR ou en Cyber.
# Ce répertoire contient les vagrantfiles et répertoires de celles-ci utilisés lors de TPs et des séances, que ce soit en SISR ou en Cyber.
Le fichier Vagrantfile dans la racine est une base "universelle" qu'il faut modifier en fonction des besoins.

79
bts_annee_2/vagrantfiles/Vagrantfile vendored Normal file
View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "remplacer"
config.vm.hostname = "renommer"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git neofetch
SHELL
end

View File

@ -0,0 +1 @@
1.5:27ce5f9b-8a53-4204-bf63-0c86f4eeea0d

View File

@ -0,0 +1 @@
{"name":"debian/bookworm64","version":"12.20241217.1","provider":"virtualbox","directory":"boxes/debian-VAGRANTSLASH-bookworm64/12.20241217.1/amd64/virtualbox"}

View File

@ -0,0 +1 @@
27ce5f9b-8a53-4204-bf63-0c86f4eeea0d

View File

@ -0,0 +1 @@
8a76f4c8f236403186de238ea4ebc2cf

View File

@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACA+vKTzZM7ragTvooE9Qo65sdiheOsGax0xOFyD
Rlh4bwAAAJAu+ANpLvgDaQAAAAtzc2gtZWQyNTUxOQAAACA+vKTzZM7ragTv
ooE9Qo65sdiheOsGax0xOFyDRlh4bwAAAEA0my83DFtuXQZSmNX4Hw+r7mat
Wi1kPnSnxcQxXhhKoj68pPNkzutqBO+igT1Cjrmx2KF46wZrHTE4XINGWHhv
AAAAB3ZhZ3JhbnQBAgMEBQY=
-----END OPENSSH PRIVATE KEY-----

View File

@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/guillaume.emorine/vagrant/glpi-nginx","disabled":false,"__vagrantfile":true}}}

View File

@ -0,0 +1 @@
/home/guillaume.emorine/vagrant/glpi-nginx

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1 @@
Ce vagrantfile a été créé lors du travail sur la situation GLPI de l'E6 sur GSB, lorsqu'il y avait plusieurs soucis à résoudre avec Nginx et GLPI dans les playbooks.

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "glpi"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git
SHELL
end

View File

@ -0,0 +1 @@
1.5:9cf9dbdc-932d-4347-8376-a635a52efc63

View File

@ -0,0 +1 @@
{"name":"debian/bookworm64","version":"12.20240905.1","provider":"virtualbox","directory":"boxes/debian-VAGRANTSLASH-bookworm64/12.20240905.1/virtualbox"}

View File

@ -0,0 +1 @@
9cf9dbdc-932d-4347-8376-a635a52efc63

View File

@ -0,0 +1 @@
5f104f0a5e054a46acb8fd97f702e8e4

View File

@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACCYILH3XIv6eFpL1r4A6I8dRGpDlYQqsAqU1o3Y
MmnL+AAAAJAXHrdFFx63RQAAAAtzc2gtZWQyNTUxOQAAACCYILH3XIv6eFpL
1r4A6I8dRGpDlYQqsAqU1o3YMmnL+AAAAEDoVzDwOjhTUVHCJqYT2TSYNkb/
KZEKQd1kekQA5H8zkpggsfdci/p4WkvWvgDojx1EakOVhCqwCpTWjdgyacv4
AAAAB3ZhZ3JhbnQBAgMEBQY=
-----END OPENSSH PRIVATE KEY-----

View File

@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/guillaume.emorine/vagrant/kubernetes","disabled":false,"__vagrantfile":true}}}

View File

@ -0,0 +1 @@
/home/guillaume.emorine/vagrant/kubernetes

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1,84 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "kubernetes-k3s"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "6144"
# Amount of cores for the VM:
vb.cpus = 2
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git
export http_proxy=http://10.121.38.1:8080
export https_proxy=http://10.121.38.1:8080
SHELL
end

View File

@ -0,0 +1 @@
1.5:1639f9f3-ba4b-4fa4-81fe-740684fc82e1

View File

@ -0,0 +1 @@
{"name":"debian/bookworm64","version":"12.20240905.1","provider":"virtualbox","directory":"boxes/debian-VAGRANTSLASH-bookworm64/12.20240905.1/virtualbox"}

View File

@ -0,0 +1 @@
1639f9f3-ba4b-4fa4-81fe-740684fc82e1

View File

@ -0,0 +1 @@
dc8b423f3f2542ddb6f499b6a7109d71

View File

@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACDaSd4UME4d+Ru7lGHn3vbkeunGCbXd9RSuDYKF
8K2qWgAAAJBDe2qbQ3tqmwAAAAtzc2gtZWQyNTUxOQAAACDaSd4UME4d+Ru7
lGHn3vbkeunGCbXd9RSuDYKF8K2qWgAAAEA8KrXiI13mCEf0xXogttRVTO1R
RbcjiDBwgoJlylt3ltpJ3hQwTh35G7uUYefe9uR66cYJtd31FK4NgoXwrapa
AAAAB3ZhZ3JhbnQBAgMEBQY=
-----END OPENSSH PRIVATE KEY-----

View File

@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/guillaume.emorine/vagrant/kubernetes/awx_client","disabled":false,"__vagrantfile":true}}}

View File

@ -0,0 +1 @@
/home/guillaume.emorine/vagrant/kubernetes/awx_client

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "awx-cli"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git
SHELL
end

View File

@ -0,0 +1,15 @@
# Questions sur Manutan et DopperPaymer
L'AD n'était pas nettoyé donc possiblement des portes dérobées cachées dedans. Pour l'attaque, un employé clique sur un lien de phishing, et un bot vient, puis deux, puis trois, etc. Ils ont ensuite espionné le réseau après être entré par hasard, et ont déterminé que Manutan était une bonne cible.
Il a fallu 10 jours et 10 nuits non-stop pour restaurer 80% des serveurs, les 20 autres pourcents = près de trois mois.
L'AD était le premier serveur Windows à être restauré. 400 serveurs Unix pas touchés par le ransomware.
Pour eux, ils utilisent Rubrik pour des sauvegardes immuables, qu'on ne peut pas supprimer ni modifier tant qu'une date de péremption n'est pas passée. D'ailleurs, Manutan n'ont pas parlé de comment ils ont fait pour gérer le problème des serveurs de sauvegarde pleins par les doubles sauvegardes Rubrik.
75% de leurs serveurs sont Microsoft chez Manutan, et cela offre une grande surface d'attaque. Les serveurs partagent aussi leur stockage en réseau, donc ça créé des passerelles vecteurs de propagation. Ils vont mettre une plateforme d'intermédiation. Leurs applications ne sont aussi pas sécurisées par elle-même donc elles doivent être reconstruites et réécrites avec la sécurité inclue dans le design. Enfin, ils se séparent de deux autres outils de sauvegarde qui ne les ont pas aidés, qui sont Veeam et NetBackup. Dans leur cas, trois méthodes de restauration ajoute beaucoup de complexité face à certains incidents comme ceux récent.
Ils vont devoir faire une refonte totale du SI en incluant aucune version de Windows inférieure à Serveur 2016 ou RHEL 7.9, et ce sera cher. Ils se séparent de VMWare pour leurs clusters.
Enfin, ils ont mis un proxy web entre leurs serveurs et les accès direct au cloud, car ils pensent que la prochaine infection ou attaque viendra d'un partenaire.
La faiblesse du système de sites en mirroir est qu'il suffit qu'un des sites soit infecté pour que celle-ci se propage au reste du SI, ce qui est moins qu'optimal.

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "devsec"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git
SHELL
end

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "srv"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update
apt-get install -y vim wget curl neovim mc git
SHELL
end

View File

@ -0,0 +1 @@
1.5:b9aeb3d1-4407-4d82-80b9-86c7b87e3ed9

View File

@ -0,0 +1 @@
{"name":"debian/bookworm64","version":"12.20240905.1","provider":"virtualbox","directory":"boxes/debian-VAGRANTSLASH-bookworm64/12.20240905.1/virtualbox"}

View File

@ -0,0 +1 @@
b9aeb3d1-4407-4d82-80b9-86c7b87e3ed9

View File

@ -0,0 +1 @@
e9b668cf954346fea75c8148eb78fcc7

View File

@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACARgX8gJRfa6oFNsshyAxHz+1PWlsbpG+KrEsbx
LPQgIgAAAJAGI+l2BiPpdgAAAAtzc2gtZWQyNTUxOQAAACARgX8gJRfa6oFN
sshyAxHz+1PWlsbpG+KrEsbxLPQgIgAAAECjMGeE018GlW9SHQFsDb0szA4z
K1XNkHPEZEKf75hY5xGBfyAlF9rqgU2yyHIDEfP7U9aWxukb4qsSxvEs9CAi
AAAAB3ZhZ3JhbnQBAgMEBQY=
-----END OPENSSH PRIVATE KEY-----

View File

@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/guillaume.emorine/vagrant/terraform","disabled":false,"__vagrantfile":true}}}

View File

@ -0,0 +1 @@
/home/guillaume.emorine/vagrant/terraform

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "terraform"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# # vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update && apt-get upgrade
apt-get install -y gpg vim wget curl neovim mc git
SHELL
end

View File

@ -0,0 +1 @@
1.5:3b6256ab-67ca-4d72-9280-2f3d496867cc

View File

@ -0,0 +1 @@
{"name":"debian/bookworm64","version":"12.20240905.1","provider":"virtualbox","directory":"boxes/debian-VAGRANTSLASH-bookworm64/12.20240905.1/virtualbox"}

View File

@ -0,0 +1 @@
3b6256ab-67ca-4d72-9280-2f3d496867cc

View File

@ -0,0 +1 @@
48536ea7a68c4d07b248826db13f98cb

View File

@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAA
AAtzc2gtZWQyNTUxOQAAACBS9gznrYoh8+E0NWVW3GQkiz2qR/h+jgajI1L1
SN18pQAAAJBh5Ct2YeQrdgAAAAtzc2gtZWQyNTUxOQAAACBS9gznrYoh8+E0
NWVW3GQkiz2qR/h+jgajI1L1SN18pQAAAED+YwoKm7T6WR+NiVl1drxikMUx
ZQ24vE6tCd9c+aqzkFL2DOetiiHz4TQ1ZVbcZCSLPapH+H6OBqMjUvVI3Xyl
AAAAB3ZhZ3JhbnQBAgMEBQY=
-----END OPENSSH PRIVATE KEY-----

View File

@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/guillaume.emorine/vagrant/waf-modsecurity","disabled":false,"__vagrantfile":true}}}

View File

@ -0,0 +1 @@
/home/guillaume.emorine/vagrant/waf-modsecurity

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1,79 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.hostname = "modsecurity"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessable to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# # vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
timedatectl set-timezone Europe/Paris
apt-get update && apt-get upgrade
apt-get install -y vim wget curl neovim mc apache2 libapache2-mod-security2
SHELL
end

View File

@ -0,0 +1,12 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end

View File

@ -0,0 +1,56 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Base VM OS configuration.
config.vm.box = "alvistack/ubuntu-24.04"
config.ssh.insert_key = false
config.vm.synced_folder '.', '/vagrant', disabled: true
# General VirtualBox VM configuration.
config.vm.provider :virtualbox do |v|
v.memory = 1024
v.cpus = 1
v.linked_clone = true
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
# wazuh.
config.vm.define "wazuh" do |wazuh|
wazuh.vm.hostname = "wazuh"
wazuh.vm.network :private_network, ip: "192.168.56.5"
wazuh.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 4096]
v.cpus = 2
end
wazuh.vm.provision "shell",
inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget"
wazuh.vm.provision "ansible" do |ansible|
ansible.extra_vars = {
wazuh_db_name: "wazuh",
wazuh_db_user: "wazuh-server",
wazuh_db_passwd: "wazuh-passwd",
}
ansible.playbook = "provision/setup-wazuh.yml"
end
end
# wazuh-cli.
config.vm.define "wazucli" do |wazucli|
wazucli.vm.hostname = "wazu-cli"
wazucli.vm.network :private_network, ip: "192.168.56.2"
wazucli.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
end
wazucli.vm.provision "shell",
inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget"
wazucli.vm.provision "ansible" do |ansible|
ansible.extra_vars = {
srv_name: "wazu-cli",
srv_ip: "192.168.56.2",
}
ansible.playbook = "provision/setup-wazu-cli.yml"
end
end
end