mirror of https://github.com/MISP/misp-packer
tout fonctionne
parent
a87b0bab62
commit
6b51981aba
27
checkDeps.sh
27
checkDeps.sh
|
@ -1,38 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
#GOT_PACKER=$(which packer > /dev/null 2>&1; echo $?)
|
||||
#if [[ "${GOT_PACKER}" == 0 ]]; then
|
||||
# echo "Packer detected, version: $(packer -v)"
|
||||
# PACKER_RUN=$(which packer)
|
||||
#else
|
||||
# echo "No packer binary detected, please make sure you installed it from: https://www.packer.io/downloads.html"
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
#GOT_RHASH=$(which rhash > /dev/null 2>&1; echo $?)
|
||||
#if [[ "${GOT_RHASH}" == 0 ]]; then
|
||||
# echo "rhash detected, version: $(rhash --version)"
|
||||
# RHASH_RUN=$(which rhash)
|
||||
#else
|
||||
# echo "No rhash binary detected, please make sure you installed it."
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
|
||||
GOT_PACKER=$(which packer > /dev/null 2>&1; echo $?)
|
||||
if [[ "${GOT_PACKER}" == 0 ]]; then
|
||||
echo "Packer détecté, version : $(packer -v)"
|
||||
echo "Packer detected, version: $(packer -v)"
|
||||
PACKER_RUN=$(which packer)
|
||||
else
|
||||
echo "Aucun binaire packer détecté, veuillez vous assurer de l'avoir installé à partir de : https://www.packer.io/downloads.html"
|
||||
echo "No packer binary detected, please make sure you installed it from: https://www.packer.io/downloads.html"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GOT_RHASH=$(which rhash > /dev/null 2>&1; echo $?)
|
||||
if [[ "${GOT_RHASH}" == 0 ]]; then
|
||||
echo "rhash détecté, version : $(rhash --version)"
|
||||
echo "rhash detected, version: $(rhash --version)"
|
||||
RHASH_RUN=$(which rhash)
|
||||
else
|
||||
echo "Aucun binaire rhash détecté, veuillez vous assurer de l'avoir installé."
|
||||
echo "No rhash binary detected, please make sure you installed it."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Ubuntu 20.04.6 LTS \n \l
|
||||
Ubuntu 18.04.1 LTS \n \l
|
||||
|
||||
Welcome to the MISP Threat Sharing VM.
|
||||
---
|
||||
|
|
26
config.sh
26
config.sh
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Laissez vide pour désactiver les messages de débogage. S'il est exécuté avec set -x ou bash -x, il activera le mode DEBUG par défaut.
|
||||
# Leave empty for NO debug messages, if run with set -x or bash -x it will enable DEBUG by default
|
||||
DEBUG=
|
||||
|
||||
case "$-" in
|
||||
|
@ -8,12 +8,12 @@ case "$-" in
|
|||
*) NO_PROGRESS=0 ;;
|
||||
esac
|
||||
|
||||
# Nom du packer
|
||||
# Name of the packer
|
||||
PACKER_NAME="misp"
|
||||
PACKER_VM="MISP"
|
||||
NAME="${PACKER_NAME}-packer"
|
||||
|
||||
# Configurez votre utilisateur et serveur distant
|
||||
# Configure your user and remote server
|
||||
REMOTE=1
|
||||
REL_USER="${PACKER_NAME}-release"
|
||||
REL_SERVER="cpab"
|
||||
|
@ -22,16 +22,16 @@ REL_SERVER="cpab"
|
|||
GPG_ENABLED=1
|
||||
GPG_KEY="0x34F20B13"
|
||||
|
||||
# Activer le débogage pour packer, omettre -debug pour le désactiver
|
||||
# Enable debugging for packing, omit -debug to disable it
|
||||
##PACKER_DEBUG="-debug"
|
||||
|
||||
# Activer l'enregistrement et le débogage pour packer
|
||||
# Enable logging and debug for packer
|
||||
export PACKER_LOG=1
|
||||
|
||||
REPO="MISP/MISP"
|
||||
BRANCH="2.4"
|
||||
|
||||
# SOMmes de contrôle à calculer, notez la notation -- pour faciliter l'utilisation avec rhash
|
||||
# SHAsums to be computed, note the -- notatiation is for ease of use with rhash
|
||||
SHA_SUMS="--sha1 --sha256 --sha384 --sha512"
|
||||
|
||||
NAME_OF_INSTALLER="INSTALL.sh"
|
||||
|
@ -39,15 +39,15 @@ PATH_TO_INSTALLER="scripts/${NAME_OF_INSTALLER}"
|
|||
URL_TO_INSTALLER="https://raw.githubusercontent.com/${REPO}/${BRANCH}/INSTALL/${NAME_OF_INSTALLER}"
|
||||
URL_TO_LICENSE="https://raw.githubusercontent.com/${REPO}/${BRANCH}/LICENSE"
|
||||
|
||||
UBUNTU_VERSION="20.04" # Mettez à jour vers Ubuntu 20.04
|
||||
UBUNTU_VERSION="20.04" # Upgrade to Ubuntu 20.04.
|
||||
|
||||
if [[ ! -z $DEBUG ]]; then
|
||||
echo "Mode de débogage activé."
|
||||
echo "Debug mode enabled."
|
||||
echo "-------------------"
|
||||
echo ""
|
||||
echo "Informations de configuration :"
|
||||
echo "Utilisation de : $NAME"
|
||||
[[ ! -z $GPG_ENABLED ]] && echo "GnuPG activé avec la clé $GPG_KEY"
|
||||
[[ ! -z $PACKER_LOG ]] && echo "Enregistrement Packer activé."
|
||||
[[ ! -z $REMOTE ]] && echo "Déploiement distant activé avec la chaîne de connexion : $REL_USER@$REL_SERVER"
|
||||
echo "Some config info:"
|
||||
echo "Using: $NAME"
|
||||
[[ ! -z $GPG_ENABLED ]] && echo "GnuPG enabled with key $GPG_KEY"
|
||||
[[ ! -z $PACKER_LOG ]] && echo "Packer Log enabled."
|
||||
[[ ! -z $REMOTE ]] && echo "Remote deploy enabled with connection string: $REL_USER@$REL_SERVER"
|
||||
fi
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
"ssh_pass": "Password1234",
|
||||
"update": "true",
|
||||
"vm_description": "MISP, is an open source software solution for collecting, storing, distributing and sharing cyber security indicators and threat about cyber security incidents analysis and malware analysis. MISP is designed by and for incident analysts, security and ICT professionals or malware reverser to support their day-to-day operations to share structured informations efficiently.",
|
||||
"vm_name": "1",
|
||||
"vm_name": "rawane",
|
||||
"vm_version": "2.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
mv /tmp/issue /etc/issue
|
||||
mv /tmp/crontab /etc/cron.d/misp
|
||||
|
||||
|
@ -33,3 +35,4 @@ rm /etc/apt/apt.conf.d/99progressbar
|
|||
echo "VM cleaned and rebooting for automagic reas0ns."
|
||||
reboot
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
## As a quick reference, you cat generate with xsnippet:
|
||||
# $ xsnippet /tmp/ $PATH_TO_MISP/docs/generic/ethX.md
|
||||
# $ cp /tmp/interfaces.sh .
|
||||
|
||||
echo "--- Using old style name (ethX) for interfaces"
|
||||
sed -i 's/^\(GRUB_CMDLINE_LINUX=\).*/\1"net.ifnames=0 biosdevname=0"/' /etc/default/grub
|
||||
|
||||
|
@ -17,14 +16,10 @@ sudo apt install ifupdown -qqy
|
|||
# enable eth0
|
||||
echo "--- Configuring eth0"
|
||||
|
||||
cat >> /etc/netplan/01-netcfg.yaml << EOF
|
||||
network:
|
||||
version: 2
|
||||
renderer: networkd
|
||||
ethernets:
|
||||
eth0:
|
||||
dhcp4: true
|
||||
cat >> /etc/network/interfaces << EOF
|
||||
# The primary network interface
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
EOF
|
||||
|
||||
netplan apply
|
||||
|
||||
update-grub > /dev/null 2>&1
|
||||
|
|
|
@ -1,40 +1,5 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
##echo "--- Creating thehive user"
|
||||
##useradd -U -G sudo -m -s /bin/bash thehive
|
||||
##echo -e "thehive1234\nthehive1234" | passwd thehive
|
||||
|
||||
#echo "--- Configuring sudo "
|
||||
##echo %thehive ALL=NOPASSWD:ALL > /etc/sudoers.d/thehive
|
||||
#echo "%misp ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/misp
|
||||
##chmod 0440 /etc/sudoers.d/thehive
|
||||
#chmod 0440 /etc/sudoers.d/misp
|
||||
|
||||
# Disable fancy progressbar
|
||||
#echo 'Dpkg::Progress-Fancy "0";' > /etc/apt/apt.conf.d/99progressbar
|
||||
#echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99progressbar
|
||||
|
||||
#echo "--- Configuring sudo"
|
||||
#echo "misp ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/misp
|
||||
#chmod 0440 /etc/sudoers.d/misp
|
||||
|
||||
#echo 'APT::ProgressBar::Fancy "0";' > /etc/apt/apt.conf.d/99progressbar
|
||||
#echo 'APT::Use-Pty "0";' >> /etc/apt/apt.conf.d/99progressbar
|
||||
|
||||
|
||||
#echo "--- Creating thehive user"
|
||||
#useradd -U -G sudo -m -s /bin/bash thehive
|
||||
#echo -e "thehive1234\nthehive1234" | passwd thehive
|
||||
|
||||
#echo "--- Configuring sudo"
|
||||
#echo "thehive ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/thehive
|
||||
#echo "misp ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/misp
|
||||
#chmod 0440 /etc/sudoers.d/thehive
|
||||
#chmod 0440 /etc/sudoers.d/misp
|
||||
|
||||
#echo 'APT::ProgressBar::Fancy "0";' > /etc/apt/apt.conf.d/99progressbar
|
||||
#echo 'APT::Use-Pty "0";' >> /etc/apt/apt.conf.d/99progressbar
|
||||
|
||||
|
||||
echo "--- Creating thehive user"
|
||||
useradd -U -G sudo -m -s /bin/bash thehive
|
||||
|
|
Loading…
Reference in New Issue