mirror of https://github.com/MISP/misp-packer
new: [core] Initial split up of some of the scripts.
new: [core] Added issue file. new: [eth0] Added script to rename weird Network name to ethXpull/11/head
parent
f8c5c0f21d
commit
18bdcddae4
|
@ -0,0 +1,28 @@
|
||||||
|
Ubuntu 18.04.1 LTS \n \l
|
||||||
|
|
||||||
|
Welcome to the MISP Threat Sharing VM.
|
||||||
|
---
|
||||||
|
|
||||||
|
IP address: \4{eth0}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
MISP http://\4{eth0} admin@admin.test / admin
|
||||||
|
https://\4{eth0}
|
||||||
|
MISP-modules (API) http://\4{eth0}:6666 (no credentials)
|
||||||
|
MISP-dashboard http://\4{eth0}:8001 (no credentials)
|
||||||
|
Viper-web http://\4{eth0}:8888 admin / Password1234
|
||||||
|
jupyter-notebook http://\4{eth0}:8889
|
||||||
|
|
||||||
|
The default system credentials are: misp / Password1234
|
||||||
|
|
||||||
|
On VirtualBox port-forwarding from your host to the guest is in place.
|
||||||
|
Below are the forwards as we need to use ports >1024 for some.
|
||||||
|
|
||||||
|
MISP -> 8080 and :8443
|
||||||
|
ssh -> 2222
|
||||||
|
misp-modules -> 1666
|
||||||
|
|
||||||
|
If this fails, make sure the host machine is not occupying one of the forwarded ports or a firewall is active.
|
||||||
|
|
||||||
|
----
|
23
misp.json
23
misp.json
|
@ -147,12 +147,33 @@
|
||||||
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
|
"echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||||
|
"script": "scripts/users.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||||
|
"script": "scripts/interfaces.sh"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||||
"script": "scripts/bootstrap.sh",
|
"script": "scripts/bootstrap.sh",
|
||||||
"pause_before": "10s"
|
"pause_before": "10s"
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"source" : "conffiles/issue",
|
||||||
|
"destination": "/tmp/issue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"execute_command" : "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||||
|
"script": "scripts/clean.sh"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
"post-processors":[{
|
"post-processors":[{
|
||||||
"keep_input_artifact": "false",
|
"keep_input_artifact": "false",
|
||||||
|
|
|
@ -94,14 +94,6 @@ PHP_INI='/etc/php/7.2/apache2/php.ini'
|
||||||
|
|
||||||
echo "--- Installing MISP… ---"
|
echo "--- Installing MISP… ---"
|
||||||
|
|
||||||
# echo "--- Configuring GRUB ---"
|
|
||||||
#
|
|
||||||
# for key in GRUB_CMDLINE_LINUX
|
|
||||||
# do
|
|
||||||
# sudo sed -i "s/^\($key\)=.*/\1=\"$(eval echo \${$key})\"/" $DEFAULT_GRUB
|
|
||||||
# done
|
|
||||||
# sudo grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
|
|
||||||
echo "--- Updating packages list ---"
|
echo "--- Updating packages list ---"
|
||||||
sudo apt-get -qq update > /dev/null 2>&1
|
sudo apt-get -qq update > /dev/null 2>&1
|
||||||
|
|
||||||
|
@ -790,9 +782,6 @@ echo "--- Ignoring filemode on all submodules ---"
|
||||||
cd $PATH_TO_MISP
|
cd $PATH_TO_MISP
|
||||||
sudo -u www-data git submodule foreach --recursive git config core.filemode false > /dev/null 2>&1
|
sudo -u www-data git submodule foreach --recursive git config core.filemode false > /dev/null 2>&1
|
||||||
|
|
||||||
echo "--- autoremove for apt ---"
|
|
||||||
apt-get autoremove > /dev/null 2>&1
|
|
||||||
|
|
||||||
echo "--- Setting Baseurl and making sure Sessions do NOT auto regenerate ---"
|
echo "--- Setting Baseurl and making sure Sessions do NOT auto regenerate ---"
|
||||||
$CAKE Baseurl "" > /dev/null 2>&1
|
$CAKE Baseurl "" > /dev/null 2>&1
|
||||||
$CAKE Admin setSetting "Session.autoRegenerate" 0 > /dev/null 2>&1
|
$CAKE Admin setSetting "Session.autoRegenerate" 0 > /dev/null 2>&1
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
cp /tmp/issue /etc/issue
|
||||||
|
|
||||||
|
# package
|
||||||
|
echo "--- autoremove for apt ---"
|
||||||
|
apt-get -y autoremove > /dev/null 2>&1
|
||||||
|
|
||||||
|
echo "--- Cleaning packages"
|
||||||
|
apt-get -y clean > /dev/null 2>&1
|
||||||
|
|
||||||
|
# End Cleaning
|
||||||
|
echo "VM cleaned"
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
echo "--- Using old style name (ethX) for interfaces"
|
||||||
|
sed -r 's/^(GRUB_CMDLINE_LINUX=).*/\1\"net\.ifnames=0\ biosdevname=0\"/' /etc/default/grub | sudo tee /etc/default/grub > /dev/null
|
||||||
|
|
||||||
|
|
||||||
|
# install ifupdown since ubuntu 18.04
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y ifupdown
|
||||||
|
|
||||||
|
|
||||||
|
# enable eth0
|
||||||
|
echo "--- Configuring eth0"
|
||||||
|
|
||||||
|
cat >> /etc/network/interfaces << EOF
|
||||||
|
# The primary network interface
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet dhcp
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
update-grub > /dev/null 2>&1
|
|
@ -0,0 +1,12 @@
|
||||||
|
#! /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=NOPASSWD:ALL > /etc/sudoers.d/misp
|
||||||
|
##chmod 0440 /etc/sudoers.d/thehive
|
||||||
|
chmod 0440 /etc/sudoers.d/misp
|
||||||
|
|
Loading…
Reference in New Issue