Merge pull request #1 from MISP/2.4

Update fetch upstream
pull/1940/head
devnull- 2017-01-04 15:09:15 +01:00 committed by GitHub
commit 719baf6220
709 changed files with 100875 additions and 14182 deletions

192
.gitchangelog.rc Normal file
View File

@ -0,0 +1,192 @@
##
## Format
##
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
##
## Description
##
## ACTION is one of 'chg', 'fix', 'new'
##
## Is WHAT the change is about.
##
## 'chg' is for refactor, small improvement, cosmetic changes...
## 'fix' is for bug fixes
## 'new' is for new features, big improvement
##
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
##
## Is WHO is concerned by the change.
##
## 'dev' is for developpers (API changes, refactors...)
## 'usr' is for final users (UI changes)
## 'pkg' is for packagers (packaging changes)
## 'test' is for testers (test only related changes)
## 'doc' is for doc guys (doc only changes)
##
## COMMIT_MSG is ... well ... the commit message itself.
##
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
##
## They are preceded with a '!' or a '@' (prefer the former, as the
## latter is wrongly interpreted in github.) Commonly used tags are:
##
## 'refactor' is obviously for refactoring code only
## 'minor' is for a very meaningless change (a typo, adding a comment)
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
## 'wip' is for partial functionality but complete subfunctionality.
##
## Example:
##
## new: usr: support of bazaar implemented
## chg: re-indentend some lines !cosmetic
## new: dev: updated code to be compatible with last version of killer lib.
## fix: pkg: updated year of licence coverage.
## new: test: added a bunch of test around user usability of feature X.
## fix: typo in spelling my name in comment. !minor
##
## Please note that multi-line commit message are supported, and only the
## first line will be considered as the "summary" of the commit message. So
## tags, and other rules only applies to the summary. The body of the commit
## message will be displayed in the changelog without reformatting.
##
## ``ignore_regexps`` is a line of regexps
##
## Any commit having its full commit message matching any regexp listed here
## will be ignored and won't be reported in the changelog.
##
ignore_regexps = [
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
]
## ``section_regexps`` is a list of 2-tuples associating a string label and a
## list of regexp
##
## Commit messages will be classified in sections thanks to this. Section
## titles are the label, and a commit is classified under this section if any
## of the regexps associated is matching.
##
section_regexps = [
('New', [
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Changes', [
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Fix', [
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Other', None ## Match all lines
),
]
## ``body_process`` is a callable
##
## This callable will be given the original body and result will
## be used in the changelog.
##
## Available constructs are:
##
## - any python callable that take one txt argument and return txt argument.
##
## - ReSub(pattern, replacement): will apply regexp substitution.
##
## - Indent(chars=" "): will indent the text with the prefix
## Please remember that template engines gets also to modify the text and
## will usually indent themselves the text if needed.
##
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
##
## - noop: do nothing
##
## - ucfirst: ensure the first letter is uppercase.
## (usually used in the ``subject_process`` pipeline)
##
## - final_dot: ensure text finishes with a dot
## (usually used in the ``subject_process`` pipeline)
##
## - strip: remove any spaces before or after the content of the string
##
## Additionally, you can `pipe` the provided filters, for instance:
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
## ``subject_process`` is a callable
##
## This callable will be given the original subject and result will
## be used in the changelog.
##
## Available constructs are those listed in ``body_process`` doc.
subject_process = (strip |
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
ucfirst | final_dot)
## ``tag_filter_regexp`` is a regexp
##
## Tags that will be used for the changelog must match this regexp.
##
tag_filter_regexp = r'^v[0-9]+\.[0-9]+\.[0-9]+$'
## ``unreleased_version_label`` is a string
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
unreleased_version_label = "%%version%% (unreleased)"
## ``output_engine`` is a callable
##
## This will change the output format of the generated changelog file
##
## Available choices are:
##
## - rest_py
##
## Legacy pure python engine, outputs ReSTructured text.
## This is the default.
##
## - mustache(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mustache/*.tpl``.
## Requires python package ``pystache``.
## Examples:
## - mustache("markdown")
## - mustache("restructuredtext")
##
## - makotemplate(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mako/*.tpl``.
## Requires python package ``mako``.
## Examples:
## - makotemplate("restructuredtext")
##
output_engine = rest_py
#output_engine = mustache("restructuredtext")
#output_engine = mustache("markdown")
#output_engine = makotemplate("restructuredtext")
## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = True

35
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,35 @@
# This template is meant for bug reports, if you have a feature request, please be as descriptive as possible and delete the template
*If you would like to report a bug, please fill the template bellow*
### Work environment
| Questions | Answers
|---------------------------|--------------------
| Type of issue | Bug, Question, Feature Request, support...
| OS version (server) | Debian, ubuntu, CentOS, RedHat, ...
| OS version (client) | XP, Seven, 10, Ubuntu, ...
| PHP version | 5.4, 5.5, 5.6, 7.0, 7.1...
| MISP version / git hash | 2.4.XX, hash of the commit
| Browser | If applicable
### Expected behavior
### Actual behavior
### Steps to reproduce the behavior
### Logs, screenshots, configuration dump, ...

23
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,23 @@
## Generic requirements in order to contribute to MISP:
* One Pull Request per fix/feature/change/...
* Keep the amount of commits per PR as small as possible: if for any reason, you need to fix your commit after the pull request, please squash the changes in one single commit (or tell us why not)
* Always make sure it is mergeable in the default branch (as of today 2016-06-03: branch 2.4)
* Please make sure Travis CI works on this request, or update the test cases if needed
* Any major changes adding a functionality should be disabled by default in the config
#### What does it do?
If it fixes an existing issue, please use github syntax: `#<IssueID>`
#### Questions
- [ ] Does it require a DB change?
- [ ] Are you using it in production?
- [ ] Does it require a change in the API (PyMISP for example)?
#### Release Type:
- [ ] Major
- [ ] Minor
- [X] Patch

12
.gitignore vendored
View File

@ -5,6 +5,7 @@
/.project
/.settings
/.buildpath
/.idea
.DS_Store
/.htaccess
/app/Vendor
@ -17,8 +18,13 @@
/app/tmp/cache/persistent/myapp*
/app/tmp/cache/views/myapp*
/app/files/*
/app/tmp/cache/feeds/*.cache
!/app/files/empty
!/app/files/scripts/
!/app/files/warninglists
!/app/files/warninglists/*
!/app/files/misp-galaxy
!/app/files/misp-galaxy/*
/app/files/scripts/python-stix/
/app/files/scripts/python-cybox/
/app/files/scripts/*.pyc
@ -57,4 +63,10 @@
/app/tmp/cached_exports/sha1/*
/app/tmp/cached_exports/csv_all/*
/app/tmp/cached_exports/csv_sig/*
/app/tmp/cached_exports/stix/*
/app/tmp/cached_exports/sha256/*
/app/tmp/cached_exports/bro/*
.gnupg
.smime
*.swp
*.iml

14
.gitmodules vendored Executable file → Normal file
View File

@ -1,7 +1,7 @@
[submodule "app/Lib/cakephp"]
path = app/Lib/cakephp
url = https://github.com/cakephp/cakephp.git
branch = 2.7
branch = 2.x
[submodule "PyMISP"]
path = PyMISP
url = https://github.com/MISP/PyMISP.git
@ -9,3 +9,15 @@
[submodule "app/files/taxonomies"]
path = app/files/taxonomies
url = https://github.com/MISP/misp-taxonomies.git
branch = master
[submodule "app/files/warninglists"]
path = app/files/warninglists
url = https://github.com/MISP/misp-warninglists.git
branch = master
[submodule "app/Lib/random_compat"]
path = app/Lib/random_compat
url = https://github.com/paragonie/random_compat
branch = master
[submodule "app/files/misp-galaxy"]
path = app/files/misp-galaxy
url = https://github.com/MISP/misp-galaxy

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

View File

@ -1,11 +1,13 @@
language: php
php:
- 5.5
- 5.6
- 7.0
- nightly
services:
- redis
- mysql
sudo: required
dist: trusty
@ -20,44 +22,38 @@ addons:
- localhost
apt:
packages:
- mysql-server
- python-dev
- python-pip
- python3-dev
- python3-pip
- libxml2-dev
- zlib1g-dev
- php5-dev
- php5-cli
- apache2
- libapache2-mod-php5
- curl
- python-virtualenv
- python-pip
- php5-mysql
cache: pip
before_install:
- git config --global user.name "TravisCI"
install:
- sudo apt-get install python3-pip python3-nose
- git pull --recurse-submodules && git submodule update
- pip install --user pyzmq
- pip install --user coveralls
- pip install --user codecov
- pip install --user git+https://github.com/CybOXProject/python-cybox.git@v2.1.0.12#egg=Package
- pip install --user git+https://github.com/stixproject/python-stix.git@v1.2.0.0#egg=Package
- pip install --user git+https://github.com/MISP/PyMISP.git#egg=Package
- pip3 install --user pip -U
- pip3 install --user pyzmq
- pip3 install --user coveralls
- pip3 install --user codecov
- pip3 install --user git+https://github.com/CybOXProject/python-cybox.git@v2.1.0.12#egg=Package
- pip3 install --user git+https://github.com/stixproject/python-stix.git@v1.2.0.0#egg=Package
- pip3 install --user git+https://github.com/MISP/PyMISP.git#egg=Package
- pear install Crypt_GPG
- pear install Net_GeoIP
- phpenv rehash
- pushd app
- curl -s https://getcomposer.org/installer | php
- php composer.phar require kamisama/cake-resque:4.1.2
- php composer.phar config vendor-dir Vendor
- php composer.phar install
- composer install
- popd
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse"
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty universe" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe"
- sudo apt-get update -qq
- sudo apt-get install libapache2-mod-fastcgi php5-redis
- phpenv config-add travis/myphpconfig.ini
- cp -fa INSTALL/setup/config.php app/Plugin/CakeResque/Config/config.php
# Set perms
@ -128,7 +124,17 @@ script:
- ./curl_tests.sh $AUTH
- popd
- pushd PyMISP
- coverage run setup.py test
- pip3 install -U nose
- pip3 install coveralls
- pip3 install codecov
- pip3 install requests-mock
- pip3 install .
- nosetests --with-coverage --cover-package=pymisp tests/test_offline.py
- python3 tests/test.py
- popd
- cp PyMISP/tests/keys.py PyMISP/examples/events/
- pushd PyMISP/examples/events/
- python3 ./create_massive_dummy_events.py -l 5 -a 30
- popd
after_failure:
@ -142,6 +148,13 @@ after_failure:
- sudo cat /var/log/apache2/misp.local_access.log
- pwd
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/05e30284086a8e948d31
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
after_success:
- coveralls

View File

@ -8,6 +8,7 @@ Contributors
------------
Aaron Kaplan
Airbus Group CERT (AiG CERT)
Alexander J
Alexandre Dulaunoy
Alexandru Ciobanu
@ -31,8 +32,8 @@ remg427
Copyright (C) 2012 Christophe Vandeplas
Copyright (C) 2012 Belgian Defence
Copyright (C) 2012 NATO / NCIRC
Copyright (C) 2013-2015 Andras Iklody
Copyright (C) 2015 CIRCL - Computer Incident Response Center Luxembourg
Copyright (C) 2013-2016 Andras Iklody
Copyright (C) 2015-2016 CIRCL - Computer Incident Response Center Luxembourg
MISP is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE version 3.

View File

@ -1,9 +1,5 @@
#SMIME patch
## Update the database schema
mysql -u misp -p misp < INSTALL/patch_smime.sql
## Create SMIME directory
mkdir /var/www/MISP/.smime
@ -33,23 +29,4 @@ Due to this action, the MISP users will be able to download your public certific
chown www-data:www-data /var/www/MISP/app/webroot/public_certificate.pem
chmod 440 /var/www/MISP/app/webroot/public_certificate.pem
## Configure the section "SMIME" in file /var/www/MISP/app/Config/config.php
Fill out the section "SMIME"
```
'SMIME' =>
array (
'onlyencrypted' => false,
'email' => 'email@address.com',
'cert_public_sign' => '/var/www/MISP/.smime/email@address.com.pem',
'key_sign' => '/var/www/MISP/.smime/email@address.com.key',
'password' => 'XXXXXXXXXXXXXXXXXXXXXX',
```
## Copy a specific transport class to send SMIME with CakePHP (add SMIME headers)
cp -fa /var/www/MISP/INSTALL/setup/SmimeTransport.php /var/www/MISP/app/Lib/cakephp/lib/Cake/Network/Email/SmimeTransport.php
chown www-data:www-data /var/www/MISP/app/Lib/cakephp/lib/Cake/Network/Email/SmimeTransport.php
chmod 750 /var/www/MISP/app/Lib/cakephp/lib/Cake/Network/Email/SmimeTransport.php
## Configure the section "SMIME" in the server settings (Administration -> Server settings -> Encryption tab)

View File

@ -1,10 +1,10 @@
INSTALLATION INSTRUCTIONS
------------------------- for debian-server
------------------------- for Debian 7 "wheezy" server
1/ Minimal debian install
-------------------------
Install a minimal debian-server system with the software:
Install a minimal Debian 7 "wheezy" server system with the software:
- OpenSSH server
- LAMP server (don't forget php5-mysql)
@ -26,18 +26,25 @@ Once the system is installed you can perform the following steps as root:
# Because vim is just so practical
apt-get install vim
# Note that the php5-redis package in Debian oldstable (wheezy) only exists in the backports repository: http://backports.debian.org/Instructions/
# Install the dependencies:
apt-get install gcc zip php-pear git redis-server make python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev php5-dev libapache2-mod-php5 php5-mysql curl
pear install Crypt_GPG # we need version >1.3.0
apt-get install gcc zip php-pear git redis-server make python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev php5-dev libapache2-mod-php5 php5-mysql php5-json php5-redis curl
pear install Crypt_GPG # we need version >1.3.0
#if you are using a proxy do:
pear config-set http_proxy http://username:password@yourproxy:80
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
cd /var/www/
git clone https://github.com/MISP/MISP.git
# Download MISP using git in the /var/www/ directory.
mkdir /var/www/MISP
cd /var/www/MISP
git clone https://github.com/MISP/MISP.git /var/www/MISP
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# if you are behind a proxy:
git config --global http.proxy http://username:password@yourproxy:80
@ -74,14 +81,8 @@ php composer.phar require kamisama/cake-resque:4.1.2
php composer.phar config vendor-dir Vendor
php composer.phar install
# CakeResque normally uses phpredis to connect to redis, but it has a (buggy) fallback connector through Redisent. It is highly advised to install phpredis
pecl install redis
apt-get install php5-redis
# Note that the php5-redis package in Debian oldstable (wheezy) only exists in the backports repository: http://backports.debian.org/Instructions/
# After installing it, enable it in your php.ini file
vim /etc/php5/apache2/php.ini
# add the following line:
extension=redis.so
# Enable CakeResque with php5-redis
sudo php5enmod redis
# To use the scheduler worker for scheduled tasks, do the following:
cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
@ -108,7 +109,7 @@ mysql> exit
cd /var/www/MISP
# Import the empty MySQL database from MYSQL.sql
# Import the empty MySQL database from MYSQL.sql
mysql -u misp -p misp < INSTALL/MYSQL.sql
#enter the password you set previously
@ -120,10 +121,10 @@ mysql -u misp -p misp < INSTALL/MYSQL.sql
cp /var/www/MISP/INSTALL/apache.misp.ubuntu /etc/apache2/sites-available/misp.conf
# Be aware that the configuration files for apache 2.4 and up have changed.
# Be aware that the configuration files for apache 2.4 and up have changed.
# The configuration file has to have the .conf extension in the sites-available directory
# For more information, visit http://httpd.apache.org/docs/2.4/upgrading.html
a2dissite 000-default
# 000-default can be called default based on distribution, in which case run a2dissite default
a2ensite misp
@ -134,7 +135,7 @@ a2enmod rewrite
# Restart apache
service apache2 reload
# We seriously recommend using only SSL !
# We seriously recommend using only SSL !
# Check out the /var/www/MISP/INSTALL/apache.misp.ssl file for an example
@ -146,14 +147,14 @@ cp -a bootstrap.default.php bootstrap.php
cp -a database.default.php database.php
cp -a core.default.php core.php
cp -a config.default.php config.php
# Configure the fields in the newly created files:
# database.php : login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The salt key must be an at least 32 byte long string.
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# Change base url in config.php
@ -182,7 +183,7 @@ sudo vim /etc/rc.local
su www-data -c 'bash /var/www/MISP/app/Console/worker/start.sh'
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!

301
INSTALL/INSTALL.debian8.txt Normal file
View File

@ -0,0 +1,301 @@
INSTALLATION INSTRUCTIONS
------------------------- for Debian 8 "jessie" server
1/ Minimal Debian install
-------------------------
# Install a minimal Debian 8 "jessie" server system with the software:
- OpenSSH server
# Make sure your system is up2date:
sudo apt-get update
sudo apt-get upgrade
# install postfix, there will be some questions.
sudo apt-get install postfix
# Postfix Configuration: Satellite system
# change the relay server later with:
sudo postconf -e 'relayhost = example.com'
sudo postfix reload
2/ Install LAMP & dependencies
------------------------------
Once the system is installed you can perform the following steps:
# Install the dependencies: (some might already be installed)
sudo apt-get install curl gcc git gnupg-agent make python openssl redis-server sudo vim zip
# Install MariaDB (a MySQL fork/alternative)
sudo apt-get install mariadb-client mariadb-server
# Secure the MariaDB installation (especially by setting a strong root password)
sudo mysql_secure_installation
# Install Apache2
sudo apt-get install apache2 apache2-doc apache2-utils
# Enable modules, settings, and default of SSL in Apache
sudo a2dismod status
sudo a2enmod ssl rewrite
sudo a2dissite 000-default
sudo a2ensite default-ssl
# Install PHP and dependencies
sudo apt-get install libapache2-mod-php5 php5 php5-cli php-crypt-gpg php5-dev php5-json php5-mysql php5-readline php5-redis
# Apply all changes
sudo systemctl restart apache2
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
sudo mkdir /var/www/MISP
sudo chown www-data:www-data /var/www/MISP
cd /var/www/MISP
sudo -u www-data git clone https://github.com/MISP/MISP.git /var/www/MISP
sudo -u www-data git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# Make git ignore filesystem permission differences
sudo -u www-data git config core.filemode false
# install Mitre's STIX and its dependencies by running the following commands:
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev
cd /var/www/MISP/app/files/scripts
sudo -u www-data git clone https://github.com/CybOXProject/python-cybox.git
sudo -u www-data git clone https://github.com/STIXProject/python-stix.git
cd /var/www/MISP/app/files/scripts/python-cybox
sudo -u www-data git checkout v2.1.0.12
sudo python setup.py install
cd /var/www/MISP/app/files/scripts/python-stix
sudo -u www-data git checkout v1.1.1.4
sudo python setup.py install
4/ CakePHP
-----------
# CakePHP is included as a submodule of MISP, execute the following commands to let git fetch it:
cd /var/www/MISP
sudo -u www-data git submodule init
sudo -u www-data git submodule update
# Once done, install CakeResque along with its dependencies if you intend to use the built in background jobs:
cd /var/www/MISP/app
sudo -u www-data wget https://getcomposer.org/download/1.2.1/composer.phar -O composer.phar
sudo -u www-data php composer.phar require kamisama/cake-resque:4.1.2
sudo -u www-data php composer.phar config vendor-dir Vendor
sudo -u www-data php composer.phar install
# Enable CakeResque with php-redis
sudo php5enmod redis
# To use the scheduler worker for scheduled tasks, do the following:
sudo -u www-data cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
5/ Set the permissions
----------------------
# Check if the permissions are set correctly using the following commands:
sudo chown -R www-data:www-data /var/www/MISP
sudo chmod -R 750 /var/www/MISP
sudo chmod -R g+ws /var/www/MISP/app/tmp
sudo chmod -R g+ws /var/www/MISP/app/files
sudo chmod -R g+ws /var/www/MISP/app/files/scripts/tmp
6/ Create a database and user
-----------------------------
# Enter the mysql shell
sudo mysql -u root -p
MariaDB [(none)]> create database misp;
MariaDB [(none)]> grant usage on *.* to misp@localhost identified by 'XXXXdbpasswordhereXXXXX';
MariaDB [(none)]> grant all privileges on misp.* to misp@localhost;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
# Import the empty MISP database from MYSQL.sql
sudo -u www-data sh -c "mysql -u misp -p misp < /var/www/MISP/INSTALL/MYSQL.sql"
# enter the password you set previously
7/ Apache configuration
-----------------------
# Now configure your Apache webserver with the DocumentRoot /var/www/MISP/app/webroot/
sudo cp /var/www/MISP/INSTALL/apache.misp.ssl /etc/apache2/sites-available/misp-ssl.conf
# Be aware that the configuration files for Apache 2.4 and up have changed.
# The configuration file has to have the .conf extension in the sites-available directory
# For more information, visit http://httpd.apache.org/docs/2.4/upgrading.html
# If a valid SSL certificate is not already created for the server, create a self-signed certificate:
openssl req -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/C=<Country>/ST=<State>/L=<Locality>/O=<Organization>/OU=<Organizational Unit Name>/CN=<your.FQDN.here>/emailAddress=admin@<your.FQDN.here>" \
-keyout /etc/ssl/private/misp.local.key -out /etc/ssl/private/misp.local.crt
# Otherwise, copy the SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile to /etc/ssl/private/. (Modify path and config to fit your environment)
============================================= Begin sample working SSL config for MISP
<VirtualHost <IP, FQDN, or *>:80>
ServerName <your.FQDN.here>
Redirect permanent / https://<your.FQDN.here>
LogLevel warn
ErrorLog /var/log/apache2/misp.local_error.log
CustomLog /var/log/apache2/misp.local_access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost <IP, FQDN, or *>:443>
ServerAdmin admin@<your.FQDN.here>
ServerName <your.FQDN.here>
DocumentRoot /var/www/MISP/app/webroot
<Directory /var/www/MISP/app/webroot>
Options -Indexes
AllowOverride all
Order allow,deny
allow from all
</Directory>
SSLEngine On
SSLCertificateFile /etc/ssl/private/misp.local.crt
SSLCertificateKeyFile /etc/ssl/private/misp.local.key
# SSLCertificateChainFile /etc/ssl/private/misp-chain.crt
LogLevel warn
ErrorLog /var/log/apache2/misp.local_error.log
CustomLog /var/log/apache2/misp.local_access.log combined
ServerSignature Off
</VirtualHost>
============================================= End sample working SSL config for MISP
# activate new vhost
sudo a2dissite default-ssl
sudo a2ensite misp-ssl
# Restart apache
sudo systemctl restart apache2
8/ MISP configuration
---------------------
# There are 4 sample configuration files in /var/www/MISP/app/Config that need to be copied
sudo -u www-data cp -a /var/www/MISP/app/Config/bootstrap.default.php /var/www/MISP/app/Config/bootstrap.php
sudo -u www-data cp -a /var/www/MISP/app/Config/database.default.php /var/www/MISP/app/Config/database.php
sudo -u www-data cp -a /var/www/MISP/app/Config/core.default.php /var/www/MISP/app/Config/core.php
sudo -u www-data cp -a /var/www/MISP/app/Config/config.default.php /var/www/MISP/app/Config/config.php
# Configure the fields in the newly created files:
sudo -u www-data vim /var/www/MISP/app/Config/database.php
# login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The salt key must be a string at least 32 bytes long.
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# Change base url in config.php
sudo -u www-data vim /var/www/MISP/app/Config/config.php
# example: 'baseurl' => 'https://<your.FQDN.here>',
# alternatively, you can leave this field empty if you would like to use relative pathing in MISP
# 'baseurl' => '',
# and make sure the file permissions are still OK
sudo chown -R www-data:www-data /var/www/MISP/app/Config
sudo chmod -R 750 /var/www/MISP/app/Config
# Generate a GPG encryption key.
sudo -u www-data mkdir /var/www/MISP/.gnupg
sudo chmod 700 /var/www/MISP/.gnupg
sudo -u www-data gpg --homedir /var/www/MISP/.gnupg --gen-key
# The email address should match the one set in the config.php / set in the configuration menu in the administration menu configuration file
# And export the public key to the webroot
sudo -u www-data sh -c "gpg --homedir /var/www/MISP/.gnupg --export --armor YOUR-KEYS-EMAIL-HERE > /var/www/MISP/app/webroot/gpg.asc"
# To make the background workers start on boot
sudo chmod +x /var/www/MISP/app/Console/worker/start.sh
sudo vim /etc/rc.local
# Add the following line before the last line (exit 0). Make sure that you replace www-data with your apache user:
sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!
# start the workers by navigating to the workers tab and clicking restart all workers
# Don't forget to change the email, password and authentication key after installation.
# Once done, have a look at the diagnostics
# If any of the directories that MISP uses to store files is not writeable to the apache user, change the permissions
# you can do this by running the following commands:
sudo chmod -R 750 /var/www/MISP/<directory path with an indicated issue>
sudo chown -R www-data:www-data /var/www/MISP/<directory path with an indicated issue>
# Make sure that the STIX libraries and GnuPG work as intended, if not, refer to INSTALL.txt's paragraphs dealing with these two items
# If anything goes wrong, make sure that you check MISP's logs for errors:
# /var/www/MISP/app/tmp/logs/error.log
# /var/www/MISP/app/tmp/logs/resque-worker-error.log
# /var/www/MISP/app/tmp/logs/resque-scheduler-error.log
# /var/www/MISP/app/tmp/logs/resque-2015-01-01.log // where the actual date is the current date
Recommended actions
-------------------
- By default CakePHP exposes its name and version in email headers. Apply a patch to remove this behavior.
- You should really harden your OS
- You should really harden the configuration of Apache
- You should really harden the configuration of MySQL/MariaDB
- Keep your software up2date (OS, MISP, CakePHP and everything else)
- Log and audit
Optional features
-------------------
# MISP has a new pub/sub feature, using ZeroMQ. To enable it, simply run the following commands
# ZeroMQ depends on the Python client for Redis
sudo pip install redis
# Debian has an ancient version of ZeroMQ, so manually install a current version
## Install ZeroMQ and prerequisites
sudo apt-get install pkg-config
cd /usr/local/src/
sudo git clone git://github.com/jedisct1/libsodium.git
cd libsodium
sudo ./autogen.sh
sudo ./configure
sudo make check
sudo make
sudo make install
sudo ldconfig
cd /usr/local/src/
sudo wget https://archive.org/download/zeromq_4.1.5/zeromq-4.1.5.tar.gz
sudo tar -xvf zeromq-4.1.5.tar.gz
cd zeromq-4.1.5/
sudo ./autogen.sh
sudo ./configure
sudo make check
sudo make
sudo make install
sudo ldconfig
## install pyzmq
sudo pip install pyzmq

View File

@ -0,0 +1,100 @@
INSTALLATION INSTRUCTIONS
------------------------- for Debian 8 "jessie" server + PostgreSQL
######### WARNING #########
PostgreSQL support in MISP is experimental.
We strongly discourage you from use on production systems.
Testing & development: most recent MISP codebase on Debian 8 "jessie" (PHP 5.6 & PostgreSQL 9.4).
There may be serious bugs!
We also don't support updates (e.g. 2.4.49 -> 2.4.50) on PostgreSQL yet, so your installation may break.
If you want to help improving PostgreSQL-support,
Please make sure you have tried the newest commit from GitHub first.
Also, please activate debug mode.
After that, you may open an issue on Github and provide us with as much information on the issue as possible.
###########################
please follow Debian 8 install instructions - INSTALL.debian8.txt
-------------------------
# when it comes to installing mariadb in step 2, skip that part, instead:
sudo apt-get install postgresql
# instead of installing the php5-mysql package in step 2, install php5-pgsql
sudo apt-get install php5-pgsql
# activate the module
sudo php5enmod pgsql
# restart apache
sudo service apache2 restart
# in step 6 of the Debian install, you skip creating a mysql user, instead:
# create user
sudo -u postgres createuser misp
# create database
sudo -u postgres createdb -O misp misp
# set password
sudo -u postgres psql -U postgres
postgres=# ALTER USER misp with password 'XXXXXXXXX';
postgres=# \q
# after that, load the basic database structure
psql -U misp -d misp -f /var/www/MISP/INSTALL/POSTGRESQL-structure.sql -h localhost -W
# ATTENTION: skip this step if you want to migrate from MySQL/MariaDB!
# and load initial data
psql -U misp -d misp -f /var/www/MISP/INSTALL/POSTGRESQL-data-initial.sql -h localhost -W
# in step 8 of the Debian install, you configure Postgres instead of MySQL
# the necessary lines are already there, you just have to activate them instead of the MySQL-lines
# file: /var/www/MISP/app/Config/database.php
# necessary changes:
# 'datasource' => 'Database/Postgres',
# 'port' => 5432,
# ATTENTION: skip this step if you want to migrate from MySQL/MariaDB!
# perhaps you accidently installed MySQL/MariaDB, too - but you can clean it up like this
sudo apt-get remove mysql-server mysql-client mariadb-client mariadb-server php5-mysql
### MIGRATION from MySQL/MariaDB
# migration of data is done using latest "pgloader" release (3.2.2 at the time of writing)
# add official postgres repository to apt sources
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# make sure packages from official postgres repository aren't used by default, only when explicitly specifying it
sudo cat <<EOF > /etc/apt/preferences.d/pgdg.pref
Package: *
Pin: release o=apt.postgresql.org
Pin-Priority: 200
EOF
# install some dependencies
sudo apt-get install wget ca-certificates
# add repository signing key
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# update cache
sudo apt-get update
# install pgloader
sudo apt-get -t $(lsb_release -cs)-pgdg install pgloader
# migrate data (replace XXX and YYY with the correct passwords)
pgloader --type mysql --with "reset sequences" --with "data only" --set "maintenance_work_mem = '128MB'" --set "work_mem = '12MB'" --cast "type tinyint when (= precision 1) to smallint" mysql://misp:XXX@localhost/misp postgresql://misp:YYY@localhost/misp
# afterwards, you have to change your MISP database configuration (see above)
# maybe you want to remove mysql (see command above) in the end
# if you only want to stop&disable it:
systemctl stop mysql
systemctl disable mysql

View File

@ -1,10 +0,0 @@
MAINTENANCE INSTRUCTION
-----------------------
To supply the NATO STANAG AACP-2 VOLUME 9
MISP writes (audit) log lines to syslog.
The log lines are of level LOG_NOTICE.
The format is 'description' and 'change'
conform the MISP MySQL log table format.

View File

@ -27,17 +27,22 @@ Once the system is installed you can perform the following steps as root:
apt-get install vim
# Install the dependencies:
apt-get install gcc zip php-pear git redis-server make python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev php5-dev libapache2-mod-php5 php5-mysql curl gnupg-agent
pear install Crypt_GPG # we need version >1.3.0
apt-get install gcc zip php-pear git redis-server make python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev php5-dev libapache2-mod-php5 php5-mysql php5-json php5-redis curl gnupg-agent
pear install Crypt_GPG # we need version >1.3.0
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
cd /var/www/
git clone https://github.com/MISP/MISP.git
# Download MISP using git in the /var/www/ directory.
mkdir /var/www/MISP
cd /var/www/MISP
git clone https://github.com/MISP/MISP.git /var/www/MISP
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# Make git ignore filesystem permission differences
cd /var/www/MISP
git config core.filemode false
# install Mitre's STIX and its dependencies by running the following commands:
@ -67,14 +72,8 @@ php composer.phar require kamisama/cake-resque:4.1.2
php composer.phar config vendor-dir Vendor
php composer.phar install
# CakeResque normally uses phpredis to connect to redis, but it has a (buggy) fallback connector through Redisent. It is highly advised to install phpredis
pecl install redis
apt-get install php5-redis
# Note that the php5-redis package in Debian oldstable (wheezy) only exists in the backports repository: http://backports.debian.org/Instructions/
# After installing it, enable it in your php.ini file
vim /etc/php5/apache2/php.ini
# add the following line:
extension=redis.so
# Enable CakeResque with php5-redis
sudo php5enmod redis
# To use the scheduler worker for scheduled tasks, do the following:
cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
@ -101,7 +100,7 @@ mysql> exit
cd /var/www/MISP
# Import the empty MySQL database from MYSQL.sql
# Import the empty MySQL database from MYSQL.sql
mysql -u misp -p misp < INSTALL/MYSQL.sql
#enter the password you set previously
@ -113,10 +112,10 @@ mysql -u misp -p misp < INSTALL/MYSQL.sql
cp /var/www/MISP/INSTALL/apache.misp.ubuntu /etc/apache2/sites-available/misp.conf
# Be aware that the configuration files for apache 2.4 and up have changed.
# Be aware that the configuration files for apache 2.4 and up have changed.
# The configuration file has to have the .conf extension in the sites-available directory
# For more information, visit http://httpd.apache.org/docs/2.4/upgrading.html
a2dissite 000-default
# 000-default can be called default based on distribution, in which case run a2dissite default
a2ensite misp
@ -127,7 +126,7 @@ a2enmod rewrite
# Restart apache
service apache2 reload
# We seriously recommend using only SSL !
# We seriously recommend using only SSL !
# Check out the apache.misp.ssl file for an example
@ -139,14 +138,14 @@ cp -a bootstrap.default.php bootstrap.php
cp -a database.default.php database.php
cp -a core.default.php core.php
cp -a config.default.php config.php
# Configure the fields in the newly created files:
# database.php : login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The salt key must be an at least 32 byte long string.
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# Change base url in config.php
@ -178,7 +177,7 @@ sudo vim /etc/rc.local
sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!

View File

@ -0,0 +1,274 @@
INSTALLATION INSTRUCTIONS
------------------------- for Ubuntu 16.04-server
1/ Minimal Ubuntu install
-------------------------
# Install a minimal Ubuntu 16.04-server system with the software:
- OpenSSH server
# Make sure your system is up2date:
sudo apt-get update
sudo apt-get upgrade
# install postfix, there will be some questions.
sudo apt-get install postfix
# Postfix Configuration: Satellite system
# change the relay server later with:
sudo postconf -e 'relayhost = example.com'
sudo postfix reload
2/ Install LAMP & dependencies
------------------------------
Once the system is installed you can perform the following steps:
# Install the dependencies: (some might already be installed)
sudo apt-get install curl gcc git gnupg-agent make python openssl redis-server sudo vim zip
# Install MariaDB (a MySQL fork/alternative)
sudo apt-get install mariadb-client mariadb-server
# Secure the MariaDB installation (especially by setting a strong root password)
sudo mysql_secure_installation
# Install Apache2
sudo apt-get install apache2 apache2-doc apache2-utils
# Enable modules, settings, and default of SSL in Apache
sudo a2dismod status
sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2dissite 000-default
sudo a2ensite default-ssl
# Install PHP and dependencies
sudo apt-get install libapache2-mod-php php php-cli php-crypt-gpg php-dev php-json php-mysql php-opcache php-readline php-redis
# Apply all changes
sudo systemctl restart apache2
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
sudo mkdir /var/www/MISP
sudo chown www-data:www-data /var/www/MISP
cd /var/www/MISP
sudo -u www-data git clone https://github.com/MISP/MISP.git /var/www/MISP
sudo -u www-data git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# Make git ignore filesystem permission differences
sudo -u www-data git config core.filemode false
# install Mitre's STIX and its dependencies by running the following commands:
sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev python-setuptools
cd /var/www/MISP/app/files/scripts
sudo -u www-data git clone https://github.com/CybOXProject/python-cybox.git
sudo -u www-data git clone https://github.com/STIXProject/python-stix.git
cd /var/www/MISP/app/files/scripts/python-cybox
sudo -u www-data git checkout v2.1.0.12
sudo python setup.py install
cd /var/www/MISP/app/files/scripts/python-stix
sudo -u www-data git checkout v1.1.1.4
sudo python setup.py install
4/ CakePHP
-----------
# CakePHP is included as a submodule of MISP, execute the following commands to let git fetch it:
cd /var/www/MISP
sudo -u www-data git submodule init
sudo -u www-data git submodule update
# Once done, install CakeResque along with its dependencies if you intend to use the built in background jobs:
cd /var/www/MISP/app
sudo -u www-data wget https://getcomposer.org/download/1.2.1/composer.phar -O composer.phar
sudo -u www-data php composer.phar require kamisama/cake-resque:4.1.2
sudo -u www-data php composer.phar config vendor-dir Vendor
sudo -u www-data php composer.phar install
# Enable CakeResque with php-redis
sudo phpenmod redis
# To use the scheduler worker for scheduled tasks, do the following:
sudo -u www-data cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
5/ Set the permissions
----------------------
# Check if the permissions are set correctly using the following commands:
sudo chown -R www-data:www-data /var/www/MISP
sudo chmod -R 750 /var/www/MISP
sudo chmod -R g+ws /var/www/MISP/app/tmp
sudo chmod -R g+ws /var/www/MISP/app/files
sudo chmod -R g+ws /var/www/MISP/app/files/scripts/tmp
6/ Create a database and user
-----------------------------
# Enter the mysql shell
sudo mysql -u root -p
MariaDB [(none)]> create database misp;
MariaDB [(none)]> grant usage on *.* to misp@localhost identified by 'XXXXdbpasswordhereXXXXX';
MariaDB [(none)]> grant all privileges on misp.* to misp@localhost;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
# Import the empty MISP database from MYSQL.sql
sudo -u www-data sh -c "mysql -u misp -p misp < /var/www/MISP/INSTALL/MYSQL.sql"
# enter the password you set previously
7/ Apache configuration
-----------------------
# Now configure your Apache webserver with the DocumentRoot /var/www/MISP/app/webroot/
sudo cp /var/www/MISP/INSTALL/apache.misp.ssl /etc/apache2/sites-available/misp-ssl.conf
# Be aware that the configuration files for apache 2.4 and up have changed.
# The configuration file has to have the .conf extension in the sites-available directory
# For more information, visit http://httpd.apache.org/docs/2.4/upgrading.html
# If a valid SSL certificate is not already created for the server, create a self-signed certificate:
sudo openssl req -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/C=<Country>/ST=<State>/L=<Locality>/O=<Organization>/OU=<Organizational Unit Name>/CN=<QDN.here>/emailAddress=admin@<your.FQDN.here>" \
-keyout /etc/ssl/private/misp.local.key -out /etc/ssl/private/misp.local.crt
# Otherwise, copy the SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile to /etc/ssl/private/. (Modify path and config to fit your environment)
============================================= Begin sample working SSL config for MISP
<VirtualHost <IP, FQDN, or *>:80>
ServerName <your.FQDN.here>
Redirect permanent / https://<your.FQDN.here>
LogLevel warn
ErrorLog /var/log/apache2/misp.local_error.log
CustomLog /var/log/apache2/misp.local_access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost <IP, FQDN, or *>:443>
ServerAdmin admin@<your.FQDN.here>
ServerName <your.FQDN.here>
DocumentRoot /var/www/MISP/app/webroot
<Directory /var/www/MISP/app/webroot>
Options -Indexes
AllowOverride all
Order allow,deny
allow from all
</Directory>
SSLEngine On
SSLCertificateFile /etc/ssl/private/misp.local.crt
SSLCertificateKeyFile /etc/ssl/private/misp.local.key
# SSLCertificateChainFile /etc/ssl/private/misp-chain.crt
LogLevel warn
ErrorLog /var/log/apache2/misp.local_error.log
CustomLog /var/log/apache2/misp.local_access.log combined
ServerSignature Off
</VirtualHost>
============================================= End sample working SSL config for MISP
# activate new vhost
sudo a2dissite default-ssl
sudo a2ensite misp-ssl
# Restart apache
sudo systemctl restart apache2
8/ MISP configuration
---------------------
# There are 4 sample configuration files in /var/www/MISP/app/Config that need to be copied
sudo -u www-data cp -a /var/www/MISP/app/Config/bootstrap.default.php /var/www/MISP/app/Config/bootstrap.php
sudo -u www-data cp -a /var/www/MISP/app/Config/database.default.php /var/www/MISP/app/Config/database.php
sudo -u www-data cp -a /var/www/MISP/app/Config/core.default.php /var/www/MISP/app/Config/core.php
sudo -u www-data cp -a /var/www/MISP/app/Config/config.default.php /var/www/MISP/app/Config/config.php
# Configure the fields in the newly created files:
sudo -u www-data vim /var/www/MISP/app/Config/database.php
# login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The salt key must be a string at least 32 bytes long.
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# Change base url in config.php
sudo -u www-data vim /var/www/MISP/app/Config/config.php
# example: 'baseurl' => 'https://<your.FQDN.here>',
# alternatively, you can leave this field empty if you would like to use relative pathing in MISP
# 'baseurl' => '',
# and make sure the file permissions are still OK
sudo chown -R www-data:www-data /var/www/MISP/app/Config
sudo chmod -R 750 /var/www/MISP/app/Config
# Generate a GPG encryption key.
sudo -u www-data mkdir /var/www/MISP/.gnupg
sudo chmod 700 /var/www/MISP/.gnupg
sudo -u www-data gpg --homedir /var/www/MISP/.gnupg --gen-key
# The email address should match the one set in the config.php / set in the configuration menu in the administration menu configuration file
# And export the public key to the webroot
sudo -u www-data sh -c "gpg --homedir /var/www/MISP/.gnupg --export --armor YOUR-KEYS-EMAIL-HERE > /var/www/MISP/app/webroot/gpg.asc"
# To make the background workers start on boot
sudo chmod +x /var/www/MISP/app/Console/worker/start.sh
sudo vim /etc/rc.local
# Add the following line before the last line (exit 0). Make sure that you replace www-data with your apache user:
sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!
# start the workers by navigating to the workers tab and clicking restart all workers
# Don't forget to change the email, password and authentication key after installation.
# Once done, have a look at the diagnostics
# If any of the directories that MISP uses to store files is not writeable to the apache user, change the permissions
# you can do this by running the following commands:
sudo chmod -R 750 /var/www/MISP/<directory path with an indicated issue>
sudo chown -R www-data:www-data /var/www/MISP/<directory path with an indicated issue>
# Make sure that the STIX libraries and GnuPG work as intended, if not, refer to INSTALL.txt's paragraphs dealing with these two items
# If anything goes wrong, make sure that you check MISP's logs for errors:
# /var/www/MISP/app/tmp/logs/error.log
# /var/www/MISP/app/tmp/logs/resque-worker-error.log
# /var/www/MISP/app/tmp/logs/resque-scheduler-error.log
# /var/www/MISP/app/tmp/logs/resque-2015-01-01.log // where the actual date is the current date
Recommended actions
-------------------
- By default CakePHP exposes its name and version in email headers. Apply a patch to remove this behavior.
- You should really harden your OS
- You should really harden the configuration of Apache
- You should really harden the configuration of MySQL/MariaDB
- Keep your software up2date (OS, MISP, CakePHP and everything else)
- Log and audit
Optional features
-------------------
# MISP has a new pub/sub feature, using ZeroMQ. To enable it, simply run the following command
sudo pip install pyzmq
# ZeroMQ depends on the Python client for Redis
sudo pip install redis

View File

@ -24,18 +24,19 @@ CREATE TABLE IF NOT EXISTS `attributes` (
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`value1` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`value2` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`to_ids` tinyint(1) NOT NULL DEFAULT 1,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`timestamp` int(11) NOT NULL DEFAULT '0',
`distribution` tinyint(4) NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL DEFAULT 0,
`distribution` tinyint(4) NOT NULL DEFAULT 0,
`sharing_group_id` int(11) NOT NULL,
`comment` text COLLATE utf8_bin NOT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `event_id` (`event_id`),
INDEX `value1` (`value1`(255)),
INDEX `value2` (`value2`(255)),
INDEX `sharing_group_id` (`sharing_group_id`),
UNIQUE KEY `uuid` (`uuid`)
UNIQUE INDEX `uuid` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -60,7 +61,8 @@ CREATE TABLE IF NOT EXISTS `cake_sessions` (
`id` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`data` text COLLATE utf8_bin NOT NULL,
`expires` int(11) NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
INDEX `expires` (`expires`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -84,6 +86,7 @@ CREATE TABLE IF NOT EXISTS `correlations` (
`date` date NOT NULL,
`info` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT INDEX `value` (`value`),
INDEX `event_id` (`event_id`),
INDEX `1_event_id` (`1_event_id`),
INDEX `attribute_id` (`attribute_id`),
@ -106,24 +109,24 @@ CREATE TABLE IF NOT EXISTS `events` (
`info` text COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`published` tinyint(1) NOT NULL DEFAULT '0',
`published` tinyint(1) NOT NULL DEFAULT 0,
`analysis` tinyint(4) NOT NULL,
`attribute_count` int(11) unsigned DEFAULT NULL,
`orgc_id` int(11) NOT NULL,
`timestamp` int(11) NOT NULL DEFAULT '0',
`distribution` tinyint(4) NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL DEFAULT 0,
`distribution` tinyint(4) NOT NULL DEFAULT 0,
`sharing_group_id` int(11) NOT NULL,
`proposal_email_lock` tinyint(1) NOT NULL DEFAULT '0',
`locked` tinyint(1) NOT NULL DEFAULT '0',
`proposal_email_lock` tinyint(1) NOT NULL DEFAULT 0,
`locked` tinyint(1) NOT NULL DEFAULT 0,
`threat_level_id` int(11) NOT NULL,
`publish_timestamp` int(11) NOT NULL,
`publish_timestamp` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uuid` (`uuid`),
FULLTEXT KEY `info` (`info`),
UNIQUE INDEX `uuid` (`uuid`),
FULLTEXT INDEX `info` (`info`(255)),
INDEX `sharing_group_id` (`sharing_group_id`),
INDEX `org_id` (`org_id`),
INDEX `orgc_id` (`orgc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- -------------------------------------------------------
@ -137,11 +140,11 @@ CREATE TABLE IF NOT EXISTS `event_delegations` (
`requester_org_id` int(11) NOT NULL,
`event_id` int(11) NOT NULL,
`message` text,
`distribution` tinyint(4) NOT NULL DEFAULT '-1',
`distribution` tinyint(4) NOT NULL DEFAULT -1,
`sharing_group_id` int(11),
PRIMARY KEY (`id`),
KEY `org_id` (`org_id`),
KEY `event_id` (`event_id`)
INDEX `org_id` (`org_id`),
INDEX `event_id` (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------
@ -157,7 +160,22 @@ CREATE TABLE IF NOT EXISTS `event_tags` (
PRIMARY KEY (`id`),
INDEX `event_id` (`event_id`),
INDEX `tag_id` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- -------------------------------------------------------
--
-- Table structure for `favourite_tags`
--
CREATE TABLE IF NOT EXISTS `favourite_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
INDEX `user_id` (`user_id`),
INDEX `tag_id` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------
@ -170,15 +188,95 @@ CREATE TABLE IF NOT EXISTS `feeds` (
`name` varchar(255) COLLATE utf8_bin NOT NULL,
`provider` varchar(255) COLLATE utf8_bin NOT NULL,
`url` varchar(255) COLLATE utf8_bin NOT NULL,
`rules` text COLLATE utf8_bin NOT NULL,
`rules` text COLLATE utf8_bin DEFAULT NULL,
`enabled` BOOLEAN NOT NULL,
`distribution` tinyint(4) NOT NULL,
`sharing_group_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
`sharing_group_id` int(11) NOT NULL DEFAULT 0,
`tag_id` int(11) NOT NULL DEFAULT 0,
`default` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------
--
-- Table structure for `galaxies`
--
CREATE TABLE IF NOT EXISTS galaxies (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) COLLATE utf8_bin NOT NULL,
`name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` varchar(255) COLLATE utf8_bin NOT NULL,
`description` text COLLATE utf8_bin NOT NULL,
`version` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (id),
INDEX `name` (`name`),
INDEX `uuid` (`uuid`),
INDEX `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_clusters`
--
CREATE TABLE IF NOT EXISTS galaxy_clusters (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uuid` varchar(255) COLLATE utf8_bin NOT NULL,
`type` varchar(255) COLLATE utf8_bin NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`tag_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`description` text COLLATE utf8_bin NOT NULL,
`galaxy_id` int(11) NOT NULL,
`source` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`authors` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (id),
INDEX `value` (`value`(255)),
INDEX `uuid` (`uuid`),
INDEX `tag_name` (`tag_name`),
INDEX `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_elements`
--
CREATE TABLE IF NOT EXISTS galaxy_elements (
`id` int(11) NOT NULL AUTO_INCREMENT,
`galaxy_cluster_id` int(11) NOT NULL,
`key` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`value` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
INDEX `key` (`key`),
INDEX `value` (`value`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_reference`
--
CREATE TABLE IF NOT EXISTS galaxy_reference (
`id` int(11) NOT NULL AUTO_INCREMENT,
`galaxy_cluster_id` int(11) NOT NULL,
`referenced_galaxy_cluster_id` int(11) NOT NULL,
`referenced_galaxy_cluster_uuid` varchar(255) COLLATE utf8_bin NOT NULL,
`referenced_galaxy_cluster_type` text COLLATE utf8_bin NOT NULL,
`referenced_galaxy_cluster_value` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (id),
INDEX `galaxy_cluster_id` (`galaxy_cluster_id`),
INDEX `referenced_galaxy_cluster_id` (`referenced_galaxy_cluster_id`),
INDEX `referenced_galaxy_cluster_value` (`referenced_galaxy_cluster_value`(255)),
INDEX `referenced_galaxy_cluster_type` (`referenced_galaxy_cluster_type`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
@ -190,16 +288,16 @@ CREATE TABLE IF NOT EXISTS `jobs` (
`worker` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`job_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`job_input` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`retries` int(11) NOT NULL DEFAULT '0',
`status` tinyint(4) NOT NULL DEFAULT 0,
`retries` int(11) NOT NULL DEFAULT 0,
`message` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`progress` int(11) NOT NULL DEFAULT '0',
`org_id` int(11) NOT NULL,
`process_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`progress` int(11) NOT NULL DEFAULT 0,
`org_id` int(11) NOT NULL DEFAULT 0,
`process_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`date_created` datetime NOT NULL,
`date_modified` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -209,18 +307,33 @@ CREATE TABLE IF NOT EXISTS `jobs` (
CREATE TABLE IF NOT EXISTS `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_bin NOT NULL,
`title` text CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`created` datetime NOT NULL,
`model` varchar(20) COLLATE utf8_bin NOT NULL,
`model_id` int(11) NOT NULL,
`action` varchar(20) COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`change` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`change` text CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`email` varchar(255) COLLATE utf8_bin NOT NULL,
`org` varchar(255) COLLATE utf8_bin NOT NULL,
`description` varchar(255) COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `news`
--
CREATE TABLE IF NOT EXISTS `news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` text COLLATE utf8_bin NOT NULL,
`title` text COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`date_created` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@ -237,14 +350,14 @@ CREATE TABLE `organisations` (
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`nationality` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`sector` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`created_by` int(11) NOT NULL,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`created_by` int(11) NOT NULL DEFAULT 0,
`uuid` varchar(40) COLLATE utf8_bin DEFAULT NULL,
`contacts` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`local` tinyint(1) NOT NULL DEFAULT '0',
`local` tinyint(1) NOT NULL DEFAULT 0,
`landingpage` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`),
KEY `uuid` (`uuid`),
INDEX `name` (`name`)
INDEX `uuid` (`uuid`),
FULLTEXT INDEX `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -259,12 +372,12 @@ CREATE TABLE IF NOT EXISTS `posts` (
`date_modified` datetime NOT NULL,
`user_id` int(11) NOT NULL,
`contents` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`post_id` int(11) NOT NULL DEFAULT '0',
`thread_id` int(11) NOT NULL DEFAULT '0',
`post_id` int(11) NOT NULL DEFAULT 0,
`thread_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `post_id` (`post_id`),
INDEX `thread_id` (`thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -278,7 +391,7 @@ CREATE TABLE IF NOT EXISTS `regexp` (
`replacement` varchar(255) COLLATE utf8_bin NOT NULL,
`type` varchar(100) COLLATE utf8_bin NOT NULL DEFAULT 'ALL',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -295,19 +408,21 @@ CREATE TABLE IF NOT EXISTS `roles` (
`perm_modify` tinyint(1) DEFAULT NULL,
`perm_modify_org` tinyint(1) DEFAULT NULL,
`perm_publish` tinyint(1) DEFAULT NULL,
`perm_delegate` tinyint(1) NOT NULL DEFAULT 0,
`perm_sync` tinyint(1) DEFAULT NULL,
`perm_admin` tinyint(1) DEFAULT NULL,
`perm_audit` tinyint(1) DEFAULT NULL,
`perm_full` tinyint(1) DEFAULT NULL,
`perm_auth` tinyint(1) NOT NULL DEFAULT '0',
`perm_site_admin` tinyint(1) NOT NULL DEFAULT '0',
`perm_regexp_access` tinyint(1) NOT NULL DEFAULT '0',
`perm_tagger` tinyint(1) NOT NULL DEFAULT '0',
`perm_template` tinyint(1) NOT NULL,
`perm_sharing_group` tinyint(1) NOT NULL DEFAULT '0',
`perm_tag_editor` tinyint(1) NOT NULL DEFAULT '0',
`perm_auth` tinyint(1) NOT NULL DEFAULT 0,
`perm_site_admin` tinyint(1) NOT NULL DEFAULT 0,
`perm_regexp_access` tinyint(1) NOT NULL DEFAULT 0,
`perm_tagger` tinyint(1) NOT NULL DEFAULT 0,
`perm_template` tinyint(1) NOT NULL DEFAULT 0,
`perm_sharing_group` tinyint(1) NOT NULL DEFAULT 0,
`perm_tag_editor` tinyint(1) NOT NULL DEFAULT 0,
`default_role` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -323,7 +438,6 @@ CREATE TABLE IF NOT EXISTS `servers` (
`org_id` int(11) NOT NULL,
`push` tinyint(1) NOT NULL,
`pull` tinyint(1) NOT NULL,
`lastfetchedid` int(11) NOT NULL,
`lastpulledid` int(11) DEFAULT NULL,
`lastpushedid` int(11) DEFAULT NULL,
`organization` varchar(10) COLLATE utf8_bin DEFAULT NULL,
@ -331,11 +445,13 @@ CREATE TABLE IF NOT EXISTS `servers` (
`self_signed` tinyint(1) NOT NULL,
`pull_rules` text COLLATE utf8_bin NOT NULL,
`push_rules` text COLLATE utf8_bin NOT NULL,
`cert_file` varchar(255) COLLATE utf8_bin NOT NULL,
`cert_file` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`client_cert_file` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`internal` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `org_id` (`org_id`),
INDEX `remote_org_id` (`remote_org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -350,17 +466,17 @@ CREATE TABLE IF NOT EXISTS `shadow_attributes` (
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`category` varchar(255) COLLATE utf8_bin NOT NULL,
`value1` text COLLATE utf8_bin,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`to_ids` tinyint(1) NOT NULL DEFAULT 1,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`value2` text COLLATE utf8_bin,
`org_id` int(11) NOT NULL,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`event_org_id` int(11) NOT NULL,
`comment` text COLLATE utf8_bin NOT NULL,
`event_uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL DEFAULT '0',
`proposal_to_delete` BOOLEAN NOT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT 0,
`timestamp` int(11) NOT NULL DEFAULT 0,
`proposal_to_delete` BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `event_id` (`event_id`),
INDEX `event_uuid` (`event_uuid`),
@ -369,7 +485,7 @@ CREATE TABLE IF NOT EXISTS `shadow_attributes` (
INDEX `old_id` (`old_id`),
INDEX `value1` (`value1`(255)),
INDEX `value2` (`value2`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -391,13 +507,13 @@ CREATE TABLE IF NOT EXISTS `shadow_attribute_correlations` (
`1_event_id` int(11) NOT NULL,
`info` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `org_id` (`org_id`),
KEY `attribute_id` (`attribute_id`),
KEY `a_sharing_group_id` (`a_sharing_group_id`),
KEY `event_id` (`event_id`),
KEY `1_event_id` (`event_id`),
KEY `sharing_group_id` (`sharing_group_id`),
KEY `1_shadow_attribute_id` (`1_shadow_attribute_id`)
INDEX `org_id` (`org_id`),
INDEX `attribute_id` (`attribute_id`),
INDEX `a_sharing_group_id` (`a_sharing_group_id`),
INDEX `event_id` (`event_id`),
INDEX `1_event_id` (`1_event_id`),
INDEX `sharing_group_id` (`sharing_group_id`),
INDEX `1_shadow_attribute_id` (`1_shadow_attribute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@ -410,7 +526,7 @@ CREATE TABLE `sharing_group_orgs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sharing_group_id` int(11) NOT NULL,
`org_id` int(11) NOT NULL,
`extend` tinyint(1) NOT NULL DEFAULT '0',
`extend` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `org_id` (`org_id`),
INDEX `sharing_group_id` (`sharing_group_id`)
@ -446,11 +562,12 @@ CREATE TABLE `sharing_groups` (
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`organisation_uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`org_id` int(11) NOT NULL,
`sync_user_id` int(11) NOT NULL DEFAULT '0',
`sync_user_id` int(11) NOT NULL DEFAULT 0,
`active` tinyint(1) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`local` tinyint(1) NOT NULL,
`roaming` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `org_id` (`org_id`),
INDEX `sync_user_id` (`sync_user_id`),
@ -460,6 +577,24 @@ CREATE TABLE `sharing_groups` (
-- --------------------------------------------------------
--
-- Table structure for table sightings
--
CREATE TABLE IF NOT EXISTS sightings (
id int(11) NOT NULL AUTO_INCREMENT,
attribute_id int(11) NOT NULL,
event_id int(11) NOT NULL,
org_id int(11) NOT NULL,
date_sighting bigint(20) NOT NULL,
PRIMARY KEY (id),
INDEX attribute_id (attribute_id),
INDEX event_id (event_id),
INDEX org_id (org_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `tags`
--
@ -469,8 +604,11 @@ CREATE TABLE IF NOT EXISTS `tags` (
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`colour` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`exportable` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
`org_id` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
FULLTEXT INDEX `name` (`name`),
INDEX `org_id` (`org_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -484,12 +622,59 @@ CREATE TABLE IF NOT EXISTS `tasks` (
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`timer` int(11) NOT NULL,
`scheduled_time` varchar(8) NOT NULL DEFAULT '6:00',
`job_id` int(11) NOT NULL,
`process_id` varchar(32) DEFAULT NULL,
`description` varchar(255) NOT NULL,
`next_execution_time` int(11) NOT NULL,
`message` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `taxonomies`
--
CREATE TABLE IF NOT EXISTS `taxonomies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`namespace` varchar(255) COLLATE utf8_bin NOT NULL,
`description` text COLLATE utf8_bin NOT NULL,
`version` int(11) NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `taxonomy_entries`
--
CREATE TABLE IF NOT EXISTS `taxonomy_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_predicate_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin,
`colour` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
INDEX `taxonomy_predicate_id` (`taxonomy_predicate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `taxonomy_predicates`
--
CREATE TABLE IF NOT EXISTS `taxonomy_predicates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin,
`colour` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
INDEX `taxonomy_id` (`taxonomy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
@ -504,7 +689,7 @@ CREATE TABLE IF NOT EXISTS `templates` (
`org` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`share` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -518,7 +703,7 @@ CREATE TABLE IF NOT EXISTS `template_elements` (
`position` int(11) NOT NULL,
`element_definition` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -531,14 +716,14 @@ CREATE TABLE IF NOT EXISTS `template_element_attributes` (
`template_element_id` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`to_ids` tinyint(1) NOT NULL DEFAULT 1,
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`complex` tinyint(1) NOT NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -556,7 +741,7 @@ CREATE TABLE IF NOT EXISTS `template_element_files` (
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -570,7 +755,7 @@ CREATE TABLE IF NOT EXISTS `template_element_texts` (
`template_element_id` int(11) NOT NULL,
`text` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -583,7 +768,7 @@ CREATE TABLE IF NOT EXISTS `template_tags` (
`template_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -607,7 +792,7 @@ CREATE TABLE IF NOT EXISTS `threads` (
INDEX `event_id` (`event_id`),
INDEX `org_id` (`org_id`),
INDEX `sharing_group_id` (`sharing_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -621,7 +806,7 @@ CREATE TABLE IF NOT EXISTS `threat_levels` (
`description` varchar(255) DEFAULT NULL,
`form_description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
@ -633,28 +818,73 @@ CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(40) COLLATE utf8_bin NOT NULL,
`org_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL DEFAULT 0,
`email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`autoalert` tinyint(1) NOT NULL,
`authkey` varchar(40) COLLATE utf8_bin NOT NULL,
`invited_by` int(11) NOT NULL,
`gpgkey` longtext COLLATE utf8_bin NOT NULL,
`nids_sid` int(15) NOT NULL,
`termsaccepted` tinyint(1) NOT NULL,
`newsread` date NOT NULL,
`role_id` int(11) NOT NULL,
`change_pw` tinyint(4) NOT NULL,
`contactalert` tinyint(1) NOT NULL,
`disabled` BOOLEAN NOT NULL,
`autoalert` tinyint(1) NOT NULL DEFAULT 0,
`authkey` varchar(40) COLLATE utf8_bin DEFAULT NULL,
`invited_by` int(11) NOT NULL DEFAULT 0,
`gpgkey` longtext COLLATE utf8_bin,
`certif_public` longtext COLLATE utf8_bin,
`nids_sid` int(15) NOT NULL DEFAULT 0,
`termsaccepted` tinyint(1) NOT NULL DEFAULT 0,
`newsread` int(11) unsigned DEFAULT 0,
`role_id` int(11) NOT NULL DEFAULT 0,
`change_pw` tinyint(4) NOT NULL DEFAULT 0,
`contactalert` tinyint(1) NOT NULL DEFAULT 0,
`disabled` BOOLEAN NOT NULL DEFAULT 0,
`expiration` datetime DEFAULT NULL,
`current_login` INT(11) DEFAULT 0,
`last_login` INT(11) DEFAULT 0,
`current_login` int(11) DEFAULT 0,
`last_login` int(11) DEFAULT 0,
`force_logout` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `email` (`email`),
INDEX `org_id` (`org_id`),
INDEX `server_id` (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Table structure for table `warninglists`
--
CREATE TABLE IF NOT EXISTS `warninglists` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_bin NOT NULL,
`type` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT 'string',
`description` text COLLATE utf8_bin NOT NULL,
`version` int(11) NOT NULL DEFAULT '1',
`enabled` tinyint(1) NOT NULL DEFAULT 0,
`warninglist_entry_count` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `warninglist_entries`
--
CREATE TABLE IF NOT EXISTS `warninglist_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`value` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`warninglist_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
INDEX `warninglist_id` (`warninglist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `warninglist_types`
--
CREATE TABLE IF NOT EXISTS `warninglist_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) COLLATE utf8_bin NOT NULL,
`warninglist_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@ -670,45 +900,12 @@ CREATE TABLE IF NOT EXISTS `whitelist` (
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`namespace` varchar(255) COLLATE utf8_bin NOT NULL,
`description` text COLLATE utf8_bin NOT NULL,
`version` int(11) NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomy_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_predicate_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `taxonomy_predicate_id` (`taxonomy_predicate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomy_predicates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `taxonomy_id` (`taxonomy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
--
-- Default values for initial installation
--
INSERT INTO `admin_settings` (`id`, `setting`, `value`) VALUES
(1, 'db_version', '2.4.33');
(1, 'db_version', '2.4.51');
INSERT INTO `feeds` (`id`, `provider`, `name`, `url`, `distribution`, `default`, `enabled`) VALUES
(1, 'CIRCL', 'CIRCL OSINT Feed', 'https://www.circl.lu/doc/misp/feed-osint', 3, 1, 0),
@ -753,31 +950,29 @@ INSERT INTO `feeds` (`id`, `provider`, `name`, `url`, `distribution`, `default`,
-- 1. Admin - has full access
-- 2. Org Admin - read/write/publish/audit/admin/sync/auth/tagger
-- 3. User - User - Read / Write, no other permissions (default)
-- 4. Sync user - read/write/publish/sync/auth
-- 5. Automation user - read/write/publish/auth
-- 6. Read Only - read
-- 4. Publisher
-- 5. Sync user - read/write/publish/sync/auth
-- 6. Automation user - read/write/publish/auth
-- 7. Read Only - read
--
INSERT INTO `roles` (`id` ,`name` ,`created` ,`modified` ,`perm_add` ,`perm_modify` ,`perm_modify_org` ,`perm_publish` ,`perm_sync` ,`perm_admin` ,`perm_audit` ,`perm_full` ,`perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('1', 'admin', NOW() , NOW() , '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (1, 'admin', NOW(), NOW(), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0);
INSERT INTO `roles` (`id` ,`name` ,`created` ,`modified` ,`perm_add` ,`perm_modify` ,`perm_modify_org` ,`perm_publish` ,`perm_sync` ,`perm_admin` ,`perm_audit` ,`perm_full` ,`perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('2', 'Org Admin', NOW() , NOW() , '1', '1', '1' , '1', '1', '1', '1', '0' , '1', '0', '1', '0', '1', '1', '1');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (2, 'Org Admin', NOW(), NOW(), 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0);
INSERT INTO `roles` (`id` ,`name` ,`created` ,`modified` ,`perm_add` ,`perm_modify` ,`perm_modify_org` ,`perm_publish` ,`perm_sync` ,`perm_admin` ,`perm_audit` ,`perm_full` ,`perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('3', 'User', NOW() , NOW() , '1', '1', '1' , '0' , '0' , '0' , '0' , '0' , '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (3, 'User', NOW(), NOW(), 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `roles` (`id` ,`name` ,`created` ,`modified` ,`perm_add` ,`perm_modify` ,`perm_modify_org` ,`perm_publish` ,`perm_sync` ,`perm_admin` ,`perm_audit` ,`perm_full` ,`perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('4', 'Publisher', NOW() , NOW() , '1', '1', '1' , '1' , '0' , '0' , '0' , '0' , '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (4, 'Publisher', NOW(), NOW(), 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0);
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('5', 'Sync user', NOW(), NOW(), '1', '1', '1', '1', '1', '0', '0', '0', '1', '0', '0', '0', '0', '1', '0');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (5, 'Sync user', NOW(), NOW(), 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0);
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('6', 'Automation user', NOW(), NOW(), '1', '1', '1', '1', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`)
VALUES ('7', 'Read Only', NOW(), NOW(), '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `roles` (`id`, `name`, `created`, `modified`, `perm_add`, `perm_modify`, `perm_modify_org`, `perm_publish`, `perm_sync`, `perm_admin`, `perm_audit`, `perm_full`, `perm_auth`, `perm_regexp_access`, `perm_tagger`, `perm_site_admin`, `perm_template`, `perm_sharing_group`, `perm_tag_editor`, `perm_delegate`, `default_role`)
VALUES (6, 'Read Only', NOW(), NOW(), 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
-- --------------------------------------------------------
@ -785,16 +980,12 @@ VALUES ('7', 'Read Only', NOW(), NOW(), '0', '0', '0', '0', '0', '0', '0', '0',
-- Initial threat levels
--
INSERT INTO `threat_levels` (`id`, `name`, `description`, `form_description`)
VALUES
(1,'High','*high* means sophisticated APT malware or 0-day attack','Sophisticated APT malware or 0-day attack'),
(2,'Medium','*medium* means APT malware','APT malware'),
(3,'Low','*low* means mass-malware','Mass-malware'),
(4,'Undefined','*undefined* no risk','No risk');
-- --------------------------------------------------------
(1, 'High', '*high* means sophisticated APT malware or 0-day attack', 'Sophisticated APT malware or 0-day attack'),
(2, 'Medium', '*medium* means APT malware', 'APT malware'),
(3, 'Low', '*low* means mass-malware', 'Mass-malware'),
(4, 'Undefined', '*undefined* no risk', 'No risk');
-- --------------------------------------------------------
@ -905,8 +1096,3 @@ INSERT INTO `template_element_texts` (`id`, `name`, `template_element_id`, `text
(10, 'Other Network Activity', 33, 'If any other Network activity (such as an internet connection test) was detected during the analysis, please specify it using the following fields'),
(11, 'Persistence mechanism', 41, 'The following fields allow you to describe the persistence mechanism used by the malware'),
(12, 'Indicators', 45, 'Just paste your list of indicators based on type into the appropriate field. All of the fields are optional, so inputting a list of IP addresses into the Network indicator field for example is sufficient to complete this template.');
INSERT INTO `tasks` (`id`, `type`, `timer`, `scheduled_time`, `job_id`, `description`, `next_execution_time`, `message`) VALUES
(1, 'cache_exports', 0, '12:00', 0, 'Generates export caches for every export type and for every organisation. This process is heavy, schedule so it might be a good idea to schedule this outside of working hours and before your daily automatic imports on connected services are scheduled.', 1391601600, 'Not scheduled yet.'),
(2, 'pull_all', 0, '12:00', 0, 'Initiates a full pull for all eligible instances.', 1391601600, 'Not scheduled yet.'),
(3, 'push_all', 0, '12:00', 0, 'Initiates a full push for all eligible instances.', 1391601600, 'Not scheduled yet.');

View File

@ -1,137 +1,97 @@
-- Copyright (c) 2009 www.cryer.co.uk
-- Script is free to use provided this copyright header is included.
drop procedure if exists AddColumnUnlessExists;
delimiter '//'
create procedure AddColumnUnlessExists(
IN dbName tinytext,
IN tableName tinytext,
IN fieldName tinytext,
IN fieldDef text)
begin
IF NOT EXISTS (
SELECT * FROM information_schema.COLUMNS
WHERE column_name=fieldName
and table_name=tableName
and table_schema=dbName
)
THEN
set @ddl=CONCAT('ALTER TABLE ',dbName,'.',tableName,
' ADD COLUMN ',fieldName,' ',fieldDef);
prepare stmt from @ddl;
execute stmt;
END IF;
end;
//
delimiter ';'
call AddColumnUnlessExists(Database(), 'roles', 'perm_template', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'deleted', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'timestamp', 'INT( 11 ) NOT NULL DEFAULT 0');
-- --------------------------------------------------------
--
-- Table structure for table `templates`
-- Default values for initial installation
--
CREATE TABLE IF NOT EXISTS `templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`org` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`share` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO admin_settings (id, setting, value) VALUES
(1, 'db_version', '2.4.51');
SELECT SETVAL('admin_settings_id_seq', (SELECT MAX(id) FROM admin_settings));
INSERT INTO feeds (id, provider, name, url, distribution, "default", enabled) VALUES
(1, 'CIRCL', 'CIRCL OSINT Feed', 'https://www.circl.lu/doc/misp/feed-osint', 3, 1, 0),
(2, 'Botvrij.eu', 'The Botvrij.eu Data', 'http://www.botvrij.eu/data/feed-osint', 3, 1, 0);
SELECT SETVAL('feeds_id_seq', (SELECT MAX(id) FROM feeds));
INSERT INTO regexp (id, regexp, replacement, type) VALUES
(1, '/.:.ProgramData./i', '%ALLUSERSPROFILE%\\\\', 'ALL'),
(2, '/.:.Documents and Settings.All Users./i', '%ALLUSERSPROFILE%\\\\', 'ALL'),
(3, '/.:.Program Files.Common Files./i', '%COMMONPROGRAMFILES%\\\\', 'ALL'),
(4, '/.:.Program Files (x86).Common Files./i', '%COMMONPROGRAMFILES(x86)%\\\\', 'ALL'),
(5, '/.:.Users\\\\(.*?)\\\\AppData.Local.Temp./i', '%TEMP%\\\\', 'ALL'),
(6, '/.:.ProgramData./i', '%PROGRAMDATA%\\\\', 'ALL'),
(7, '/.:.Program Files./i', '%PROGRAMFILES%\\\\', 'ALL'),
(8, '/.:.Program Files (x86)./i', '%PROGRAMFILES(X86)%\\\\', 'ALL'),
(9, '/.:.Users.Public./i', '%PUBLIC%\\\\', 'ALL'),
(10, '/.:.Documents and Settings\\\\(.*?)\\\\Local Settings.Temp./i', '%TEMP%\\\\', 'ALL'),
(11, '/.:.Users\\\\(.*?)\\\\AppData.Local.Temp./i', '%TEMP%\\\\', 'ALL'),
(12, '/.:.Users\\\\(.*?)\\\\AppData.Local./i', '%LOCALAPPDATA%\\\\', 'ALL'),
(13, '/.:.Users\\\\(.*?)\\\\AppData.Roaming./i', '%APPDATA%\\\\', 'ALL'),
(14, '/.:.Users\\\\(.*?)\\\\Application Data./i', '%APPDATA%\\\\', 'ALL'),
(15, '/.:.Windows\\\\(.*?)\\\\Application Data./i', '%APPDATA%\\\\', 'ALL'),
(16, '/.:.Users\\\\(.*?)\\\\/i', '%USERPROFILE%\\\\', 'ALL'),
(17, '/.:.DOCUME~1.\\\\(.*?)\\\\/i', '%USERPROFILE%\\\\', 'ALL'),
(18, '/.:.Documents and Settings\\\\(.*?)\\\\/i', '%USERPROFILE%\\\\', 'ALL'),
(19, '/.:.Windows./i', '%WINDIR%\\\\', 'ALL'),
(20, '/.:.Windows./i', '%WINDIR%\\\\', 'ALL'),
(21, '/.REGISTRY.USER.S(-[0-9]{1}){2}-[0-9]{2}(-[0-9]{9}){1}(-[0-9]{10}){1}-[0-9]{9}-[0-9]{4}/i', 'HKCU', 'ALL'),
(22, '/.REGISTRY.USER.S(-[0-9]{1}){2}-[0-9]{2}(-[0-9]{10}){2}-[0-9]{9}-[0-9]{4}/i', 'HKCU', 'ALL'),
(23, '/.REGISTRY.USER.S(-[0-9]{1}){2}-[0-9]{2}(-[0-9]{10}){3}-[0-9]{4}/i', 'HKCU', 'ALL'),
(24, '/.REGISTRY.MACHINE./i', 'HKLM\\\\', 'ALL'),
(25, '/.Registry.Machine./i', 'HKLM\\\\', 'ALL'),
(26, '/%USERPROFILE%.Application Data.Microsoft.UProof/i', '', 'ALL'),
(27, '/%USERPROFILE%.Local Settings.History/i', '', 'ALL'),
(28, '/%APPDATA%.Microsoft.UProof/i ', '', 'ALL'),
(29, '/%LOCALAPPDATA%.Microsoft.Windows.Temporary Internet Files/i', '', 'ALL');
SELECT SETVAL('regexp_id_seq', (SELECT MAX(id) FROM regexp));
-- --------------------------------------------------------
--
-- Table structure for table `template_elements`
-- Creating initial roles
--
-- 1. Admin - has full access
-- 2. Org Admin - read/write/publish/audit/admin/sync/auth/tagger
-- 3. User - User - Read / Write, no other permissions (default)
-- 4. Publisher
-- 5. Sync user - read/write/publish/sync/auth
-- 6. Automation user - read/write/publish/auth
-- 7. Read Only - read
--
CREATE TABLE IF NOT EXISTS `template_elements` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`position` int(11) NOT NULL,
`element_definition` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES (1, 'admin', NOW(), NOW(), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0);
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES ('2', 'Org Admin', NOW(), NOW(), 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0);
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES ('3', 'User', NOW(), NOW(), 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES ('4', 'Publisher', NOW(), NOW(), 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0);
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES ('5', 'Sync user', NOW(), NOW(), 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0);
INSERT INTO roles (id, name, created, modified, perm_add, perm_modify, perm_modify_org, perm_publish, perm_sync, perm_admin, perm_audit, perm_full, perm_auth, perm_regexp_access, perm_tagger, perm_site_admin, perm_template, perm_sharing_group, perm_tag_editor, perm_delegate, default_role)
VALUES ('6', 'Read Only', NOW(), NOW(), 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
SELECT SETVAL('roles_id_seq', (SELECT MAX(id) FROM roles));
-- --------------------------------------------------------
--
-- Table structure for table `template_element_attributes`
-- Initial threat levels
--
CREATE TABLE IF NOT EXISTS `template_element_attributes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_element_id` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`complex` tinyint(1) NOT NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_element_files`
--
CREATE TABLE IF NOT EXISTS `template_element_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_element_id` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`malware` tinyint(1) NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_element_texts`
--
CREATE TABLE IF NOT EXISTS `template_element_texts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`template_element_id` int(11) NOT NULL,
`text` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_tags`
--
CREATE TABLE IF NOT EXISTS `template_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Change in the servers table and the logs table, addressing
-- hotfixes 2.3.57 and 2.3.78
--
ALTER TABLE `servers` MODIFY COLUMN `organization` varchar(255) NOT NULL;
ALTER TABLE `logs` MODIFY COLUMN `title` text, MODIFY COLUMN `change` text;
INSERT INTO threat_levels (id, name, description, form_description)
VALUES
(1, 'High', '*high* means sophisticated APT malware or 0-day attack', 'Sophisticated APT malware or 0-day attack'),
(2, 'Medium', '*medium* means APT malware', 'APT malware'),
(3, 'Low', '*low* means mass-malware', 'Mass-malware'),
(4, 'Undefined', '*undefined* no risk', 'No risk');
SELECT SETVAL('threat_levels_id_seq', (SELECT MAX(id) FROM threat_levels));
-- --------------------------------------------------------
@ -139,13 +99,14 @@ ALTER TABLE `logs` MODIFY COLUMN `title` text, MODIFY COLUMN `change` text;
-- Default templates
--
INSERT INTO `templates` (`id`, `name`, `description`, `org`, `share`) VALUES
INSERT INTO templates (id, name, description, org, share) VALUES
(1, 'Phishing E-mail', 'Create a MISP event about a Phishing E-mail.', 'MISP', 1),
(2, 'Phishing E-mail with malicious attachment', 'A MISP event based on Spear-phishing containing a malicious attachment. This event can include anything from the description of the e-mail itself, the malicious attachment and its description as well as the results of the analysis done on the malicious f', 'MISP', 1),
(3, 'Malware Report', 'This is a template for a generic malware report. ', 'MISP', 1),
(4, 'Indicator List', 'A simple template for indicator lists.', 'MISP', 1);
SELECT SETVAL('templates_id_seq', (SELECT MAX(id) FROM templates));
INSERT INTO `template_elements` (`id`, `template_id`, `position`, `element_definition`) VALUES
INSERT INTO template_elements (id, template_id, position, element_definition) VALUES
(1, 1, 2, 'attribute'),
(2, 1, 3, 'attribute'),
(3, 1, 1, 'text'),
@ -191,8 +152,9 @@ INSERT INTO `template_elements` (`id`, `template_id`, `position`, `element_defin
(45, 4, 1, 'text'),
(46, 4, 2, 'attribute'),
(47, 4, 3, 'attribute');
SELECT SETVAL('template_elements_id_seq', (SELECT MAX(id) FROM template_elements));
INSERT INTO `template_element_attributes` (`id`, `template_element_id`, `name`, `description`, `to_ids`, `category`, `complex`, `type`, `mandatory`, `batch`) VALUES
INSERT INTO template_element_attributes (id, template_element_id, name, description, to_ids, category, complex, type, mandatory, batch) VALUES
(1, 1, 'From address', 'The source address from which the e-mail was sent.', 1, 'Payload delivery', 0, 'email-src', 1, 1),
(2, 2, 'Malicious url', 'The malicious url in the e-mail body.', 1, 'Payload delivery', 0, 'url', 1, 1),
(3, 4, 'E-mail subject', 'The subject line of the e-mail.', 0, 'Payload delivery', 0, 'email-subject', 1, 0),
@ -223,14 +185,16 @@ INSERT INTO `template_element_attributes` (`id`, `template_element_id`, `name`,
(28, 44, 'Persistence Mechanism (Registry key and value)', 'Paste any registry keys together with the values contained within created or modified by the persistence mechanism', 1, 'Persistence mechanism', 0, 'regkey|value', 0, 1),
(29, 46, 'Network Indicators', 'Paste any combination of IP addresses, hostnames, domains or URL', 1, 'Network activity', 1, 'CnC', 0, 1),
(30, 47, 'File Indicators', 'Paste any file hashes that you have (MD5, SHA1, SHA256) or filenames below. You can also add filename and hash pairs by using the following syntax for each applicable column: filename|hash ', 1, 'Payload installation', 1, 'File', 0, 1);
SELECT SETVAL('template_element_attributes_id_seq', (SELECT MAX(id) FROM template_element_attributes));
INSERT INTO `template_element_files` (`id`, `template_element_id`, `name`, `description`, `category`, `malware`, `mandatory`, `batch`) VALUES
INSERT INTO template_element_files (id, template_element_id, name, description, category, malware, mandatory, batch) VALUES
(1, 14, 'Malicious Attachment', 'The file (or files) that was (were) attached to the e-mail itself.', 'Payload delivery', 1, 0, 1),
(2, 21, 'Payload installation', 'Payload installation detected during the analysis', 'Payload installation', 1, 0, 1),
(3, 30, 'Malware sample', 'The sample that the report is based on', 'Payload delivery', 1, 0, 0),
(4, 40, 'Artifacts dropped (Sample)', 'Upload any files that were dropped during the analysis.', 'Artifacts dropped', 1, 0, 1);
SELECT SETVAL('template_element_files_id_seq', (SELECT MAX(id) FROM template_element_files));
INSERT INTO `template_element_texts` (`id`, `name`, `template_element_id`, `text`) VALUES
INSERT INTO template_element_texts (id, name, template_element_id, text) VALUES
(1, 'Required fields', 3, 'The fields below are mandatory.'),
(2, 'Optional information', 5, 'All of the fields below are optional, please fill out anything that''s applicable.'),
(4, 'Required Fields', 11, 'The following fields are mandatory'),
@ -242,5 +206,4 @@ INSERT INTO `template_element_texts` (`id`, `name`, `template_element_id`, `text
(10, 'Other Network Activity', 33, 'If any other Network activity (such as an internet connection test) was detected during the analysis, please specify it using the following fields'),
(11, 'Persistence mechanism', 41, 'The following fields allow you to describe the persistence mechanism used by the malware'),
(12, 'Indicators', 45, 'Just paste your list of indicators based on type into the appropriate field. All of the fields are optional, so inputting a list of IP addresses into the Network indicator field for example is sufficient to complete this template.');
SELECT SETVAL('template_element_texts_id_seq', (SELECT MAX(id) FROM template_element_texts));

View File

@ -0,0 +1,817 @@
-- --------------------------------------------------------
--
-- Table structure for table admin_settings
--
CREATE TABLE IF NOT EXISTS admin_settings (
id bigserial NOT NULL,
setting varchar(255) NOT NULL,
value text NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table attributes
--
CREATE TABLE IF NOT EXISTS attributes (
id bigserial NOT NULL,
event_id bigint NOT NULL,
category varchar(255) NOT NULL,
type varchar(100) NOT NULL,
value1 text NOT NULL,
value2 text NOT NULL,
to_ids smallint NOT NULL DEFAULT 1,
uuid varchar(40) NOT NULL,
timestamp bigint NOT NULL DEFAULT 0,
distribution smallint NOT NULL DEFAULT 0,
sharing_group_id bigint NOT NULL,
comment text NOT NULL,
deleted smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id),
UNIQUE (uuid)
);
CREATE INDEX idx_attributes_event_id ON attributes (event_id);
CREATE INDEX idx_attributes_sharing_group_id ON attributes (sharing_group_id);
CREATE INDEX idx_attributes_value1 ON attributes (value1);
CREATE INDEX idx_attributes_value2 ON attributes (value2);
-- --------------------------------------------------------
--
-- Table structure for table bruteforces
--
CREATE TABLE IF NOT EXISTS bruteforces (
ip varchar(255) NOT NULL,
username varchar(255) NOT NULL,
expire timestamp NOT NULL
);
-- --------------------------------------------------------
--
-- Table structure for table cake_sessions
--
CREATE TABLE IF NOT EXISTS cake_sessions (
id varchar(255) NOT NULL DEFAULT '',
data text NOT NULL,
expires bigint NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_cake_sessions_expires ON cake_sessions (expires);
-- --------------------------------------------------------
--
-- Table structure for table correlations
--
CREATE TABLE IF NOT EXISTS correlations (
id bigserial NOT NULL,
value text NOT NULL,
"1_event_id" bigint NOT NULL,
"1_attribute_id" bigint NOT NULL,
event_id bigint NOT NULL,
attribute_id bigint NOT NULL,
org_id bigint NOT NULL,
distribution smallint NOT NULL,
a_distribution smallint NOT NULL,
sharing_group_id bigint NOT NULL,
a_sharing_group_id bigint NOT NULL,
date date NOT NULL,
info text NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_correlations_event_id ON correlations (event_id);
CREATE INDEX idx_correlations_1_event_id ON correlations ("1_event_id");
CREATE INDEX idx_correlations_attribute_id ON correlations (attribute_id);
CREATE INDEX idx_correlations_1_attribute_id ON correlations ("1_attribute_id");
CREATE INDEX idx_correlations_org_id ON correlations (org_id);
CREATE INDEX idx_correlations_sharing_group_id ON correlations (sharing_group_id);
CREATE INDEX idx_correlations_a_sharing_group_id ON correlations (a_sharing_group_id);
-- --------------------------------------------------------
--
-- Table structure for table events
--
CREATE TABLE IF NOT EXISTS events (
id bigserial NOT NULL,
org_id bigint NOT NULL,
date date NOT NULL,
info text NOT NULL,
user_id bigint NOT NULL,
uuid varchar(40) NOT NULL,
published smallint NOT NULL DEFAULT 0,
analysis smallint NOT NULL,
attribute_count bigint CHECK (attribute_count >= 0) DEFAULT NULL,
orgc_id bigint NOT NULL,
timestamp bigint NOT NULL DEFAULT 0,
distribution smallint NOT NULL DEFAULT 0,
sharing_group_id bigint NOT NULL,
proposal_email_lock smallint NOT NULL DEFAULT 0,
locked smallint NOT NULL DEFAULT 0,
threat_level_id bigint NOT NULL,
publish_timestamp bigint NOT NULL DEFAULT 0,
PRIMARY KEY (id),
UNIQUE (uuid)
);
CREATE INDEX idx_events_info ON events (info);
CREATE INDEX idx_events_sharing_group_id ON events (sharing_group_id);
CREATE INDEX idx_events_org_id ON events (org_id);
CREATE INDEX idx_events_orgc_id ON events (orgc_id);
-- -------------------------------------------------------
--
-- Table structure for event_delegations
--
CREATE TABLE IF NOT EXISTS event_delegations (
id bigserial NOT NULL,
org_id bigint NOT NULL,
requester_org_id bigint NOT NULL,
event_id bigint NOT NULL,
message text,
distribution smallint NOT NULL DEFAULT -1,
sharing_group_id bigint,
PRIMARY KEY (id)
);
CREATE INDEX idx_event_delegations_org_id ON event_delegations (org_id);
CREATE INDEX idx_event_delegations_event_id ON event_delegations (event_id);
-- -------------------------------------------------------
--
-- Table structure for event_tags
--
CREATE TABLE IF NOT EXISTS event_tags (
id bigserial NOT NULL,
event_id bigint NOT NULL,
tag_id bigint NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_event_tags_event_id ON event_tags (event_id);
CREATE INDEX idx_event_tags_tag_id ON event_tags (tag_id);
-- -------------------------------------------------------
--
-- Table structure for favourite_tags
--
CREATE TABLE IF NOT EXISTS favourite_tags (
id bigserial NOT NULL,
tag_id bigint NOT NULL,
user_id bigint NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_favourite_tags_user_id ON favourite_tags (user_id);
CREATE INDEX idx_favourite_tags_tag_id ON favourite_tags (tag_id);
-- -------------------------------------------------------
--
-- Table structure for feeds
--
CREATE TABLE IF NOT EXISTS feeds (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
provider varchar(255) NOT NULL,
url varchar(255) NOT NULL,
rules text DEFAULT NULL,
enabled smallint NOT NULL,
distribution smallint NOT NULL,
sharing_group_id bigint NOT NULL DEFAULT 0,
tag_id bigint NOT NULL DEFAULT 0,
"default" smallint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table jobs
--
CREATE TABLE IF NOT EXISTS jobs (
id bigserial NOT NULL,
worker varchar(32) NOT NULL,
job_type varchar(32) NOT NULL,
job_input text NOT NULL,
status smallint NOT NULL DEFAULT 0,
retries bigint NOT NULL DEFAULT 0,
message text NOT NULL,
progress bigint NOT NULL DEFAULT 0,
org_id bigint NOT NULL DEFAULT 0,
process_id varchar(32) DEFAULT NULL,
date_created timestamp NOT NULL,
date_modified timestamp NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table logs
--
CREATE TABLE IF NOT EXISTS logs (
id bigserial NOT NULL,
title text DEFAULT NULL,
created timestamp NOT NULL,
model varchar(20) NOT NULL,
model_id bigint NOT NULL,
action varchar(20) NOT NULL,
user_id bigint NOT NULL,
change text DEFAULT NULL,
email varchar(255) NOT NULL,
org varchar(255) NOT NULL,
description text DEFAULT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table news
--
CREATE TABLE IF NOT EXISTS news (
id bigserial NOT NULL,
message text NOT NULL,
title text NOT NULL,
user_id bigint NOT NULL,
date_created bigint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table organisations
--
CREATE TABLE organisations (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
date_created timestamp NOT NULL,
date_modified timestamp NOT NULL,
description text,
type varchar(255),
nationality varchar(255),
sector varchar(255),
created_by bigint NOT NULL DEFAULT 0,
uuid varchar(40) DEFAULT NULL,
contacts text,
local smallint NOT NULL DEFAULT 0,
landingpage text,
PRIMARY KEY (id)
);
CREATE INDEX idx_organisations_uuid ON organisations (uuid);
CREATE INDEX idx_organisations_name ON organisations (name);
-- --------------------------------------------------------
--
-- Table structure for table posts
--
CREATE TABLE IF NOT EXISTS posts (
id bigserial NOT NULL,
date_created timestamp NOT NULL,
date_modified timestamp NOT NULL,
user_id bigint NOT NULL,
contents text NOT NULL,
post_id bigint NOT NULL DEFAULT 0,
thread_id bigint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX idx_posts_post_id ON posts (post_id);
CREATE INDEX idx_posts_thread_id ON posts (thread_id);
-- --------------------------------------------------------
--
-- Table structure for table regexp
--
CREATE TABLE IF NOT EXISTS regexp (
id bigserial NOT NULL,
regexp varchar(255) NOT NULL,
replacement varchar(255) NOT NULL,
type varchar(100) NOT NULL DEFAULT 'ALL',
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table roles
--
CREATE TABLE IF NOT EXISTS roles (
id bigserial NOT NULL,
name varchar(100) NOT NULL,
created timestamp DEFAULT NULL,
modified timestamp DEFAULT NULL,
perm_add smallint DEFAULT NULL,
perm_modify smallint DEFAULT NULL,
perm_modify_org smallint DEFAULT NULL,
perm_publish smallint DEFAULT NULL,
perm_delegate smallint NOT NULL DEFAULT 0,
perm_sync smallint DEFAULT NULL,
perm_admin smallint DEFAULT NULL,
perm_audit smallint DEFAULT NULL,
perm_full smallint DEFAULT NULL,
perm_auth smallint NOT NULL DEFAULT 0,
perm_site_admin smallint NOT NULL DEFAULT 0,
perm_regexp_access smallint NOT NULL DEFAULT 0,
perm_tagger smallint NOT NULL DEFAULT 0,
perm_template smallint NOT NULL DEFAULT 0,
perm_sharing_group smallint NOT NULL DEFAULT 0,
perm_tag_editor smallint NOT NULL DEFAULT 0,
default_role smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table servers
--
CREATE TABLE IF NOT EXISTS servers (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
url varchar(255) NOT NULL,
authkey varchar(40) NOT NULL,
org_id bigint NOT NULL,
push smallint NOT NULL,
pull smallint NOT NULL,
lastpulledid bigint DEFAULT NULL,
lastpushedid bigint DEFAULT NULL,
organization varchar(10) DEFAULT NULL,
remote_org_id bigint NOT NULL,
self_signed smallint NOT NULL,
pull_rules text NOT NULL,
push_rules text NOT NULL,
cert_file varchar(255) DEFAULT NULL,
client_cert_file varchar(255) DEFAULT NULL,
internal smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX idx_servers_org_id ON servers (org_id);
CREATE INDEX idx_servers_remote_org_id ON servers (remote_org_id);
-- --------------------------------------------------------
--
-- Table structure for table shadow_attributes
--
CREATE TABLE IF NOT EXISTS shadow_attributes (
id bigserial NOT NULL,
old_id bigint NOT NULL,
event_id bigint NOT NULL,
type varchar(100) NOT NULL,
category varchar(255) NOT NULL,
value1 text,
to_ids smallint NOT NULL DEFAULT 1,
uuid varchar(40) NOT NULL,
value2 text,
org_id bigint NOT NULL,
email varchar(255) DEFAULT NULL,
event_org_id bigint NOT NULL,
comment text NOT NULL,
event_uuid varchar(40) NOT NULL,
deleted smallint NOT NULL DEFAULT 0,
timestamp bigint NOT NULL DEFAULT 0,
proposal_to_delete BOOLEAN NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_shadow_attributes_event_id ON shadow_attributes (event_id);
CREATE INDEX idx_shadow_attributes_event_uuid ON shadow_attributes (event_uuid);
CREATE INDEX idx_shadow_attributes_event_org_id ON shadow_attributes (event_org_id);
CREATE INDEX idx_shadow_attributes_uuid ON shadow_attributes (uuid);
CREATE INDEX idx_shadow_attributes_old_id ON shadow_attributes (old_id);
CREATE INDEX idx_shadow_attributes_value1 ON shadow_attributes (value1);
CREATE INDEX idx_shadow_attributes_value2 ON shadow_attributes (value2);
-- --------------------------------------------------------
--
-- Table structure for table shadow_attribute_correlations
--
CREATE TABLE IF NOT EXISTS shadow_attribute_correlations (
id bigserial NOT NULL,
org_id bigint NOT NULL,
value text NOT NULL,
distribution smallint NOT NULL,
a_distribution smallint NOT NULL,
sharing_group_id bigint,
a_sharing_group_id bigint,
attribute_id bigint NOT NULL,
"1_shadow_attribute_id" bigint NOT NULL,
event_id bigint NOT NULL,
"1_event_id" bigint NOT NULL,
info text NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_shadow_attribute_correlations_org_id ON shadow_attribute_correlations (org_id);
CREATE INDEX idx_shadow_attribute_correlations_attribute_id ON shadow_attribute_correlations (attribute_id);
CREATE INDEX idx_shadow_attribute_correlations_a_sharing_group_id ON shadow_attribute_correlations (a_sharing_group_id);
CREATE INDEX idx_shadow_attribute_correlations_event_id ON shadow_attribute_correlations (event_id);
CREATE INDEX idx_shadow_attribute_correlations_1_event_id ON shadow_attribute_correlations ("1_event_id");
CREATE INDEX idx_shadow_attribute_correlations_sharing_group_id ON shadow_attribute_correlations (sharing_group_id);
CREATE INDEX idx_shadow_attribute_correlations_1_shadow_attribute_id ON shadow_attribute_correlations ("1_shadow_attribute_id");
-- --------------------------------------------------------
--
-- Table structure for table sharing_group_orgs
--
CREATE TABLE sharing_group_orgs (
id bigserial NOT NULL,
sharing_group_id bigint NOT NULL,
org_id bigint NOT NULL,
extend smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX idx_sharing_group_orgs_org_id ON sharing_group_orgs (org_id);
CREATE INDEX idx_sharing_group_orgs_sharing_group_id ON sharing_group_orgs (sharing_group_id);
-- --------------------------------------------------------
--
-- Table structure for table sharing_group_servers
--
CREATE TABLE sharing_group_servers (
id bigserial NOT NULL,
sharing_group_id bigint NOT NULL,
server_id bigint NOT NULL,
all_orgs smallint NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_sharing_group_servers_server_id ON sharing_group_servers (server_id);
CREATE INDEX idx_sharing_group_servers_sharing_group_id ON sharing_group_servers (sharing_group_id);
-- --------------------------------------------------------
--
-- Table structure for table sharing_groups
--
CREATE TABLE sharing_groups (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
releasability text NOT NULL,
description text NOT NULL,
uuid varchar(40) NOT NULL,
organisation_uuid varchar(40) NOT NULL,
org_id bigint NOT NULL,
sync_user_id bigint NOT NULL DEFAULT 0,
active smallint NOT NULL,
created timestamp NOT NULL,
modified timestamp NOT NULL,
local smallint NOT NULL,
roaming smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id),
UNIQUE (uuid)
);
CREATE INDEX idx_sharing_groups_org_id ON sharing_groups (org_id);
CREATE INDEX idx_sharing_groups_sync_user_id ON sharing_groups (sync_user_id);
CREATE INDEX idx_sharing_groups_organisation_uuid ON sharing_groups (organisation_uuid);
-- --------------------------------------------------------
--
-- Table structure for table sightings
--
CREATE TABLE IF NOT EXISTS sightings (
id int(11) NOT NULL AUTO_INCREMENT,
attribute_id int(11) NOT NULL,
event_id int(11) NOT NULL,
org_id int(11) NOT NULL,
date_sighting bigint(20) NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_sightings_attribute_id ON sightings (attribute_id);
CREATE INDEX idx_sightings_event_id ON sightings (event_id);
CREATE INDEX idx_sightings_org_id ON sightings (org_id);
-- --------------------------------------------------------
--
-- Table structure for table tags
--
CREATE TABLE IF NOT EXISTS tags (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
colour varchar(7) NOT NULL,
exportable smallint NOT NULL,
org_id smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX idx_tags_org_id ON tags (org_id);
-- --------------------------------------------------------
--
-- Table structure for table tasks
--
CREATE TABLE IF NOT EXISTS tasks (
id bigserial NOT NULL,
type varchar(100) NOT NULL,
timer bigint NOT NULL,
scheduled_time varchar(8) NOT NULL DEFAULT '6:00',
process_id varchar(32) DEFAULT NULL,
description varchar(255) NOT NULL,
next_execution_time bigint NOT NULL,
message varchar(255) NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table taxonomies
--
CREATE TABLE IF NOT EXISTS taxonomies (
id bigserial NOT NULL,
namespace varchar(255) NOT NULL,
description text NOT NULL,
version bigint NOT NULL,
enabled smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table taxonomy_entries
--
CREATE TABLE IF NOT EXISTS taxonomy_entries (
id bigserial NOT NULL,
taxonomy_predicate_id bigint NOT NULL,
value text NOT NULL,
expanded text,
colour varchar(7) NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_taxonomy_entries_taxonomy_predicate_id ON taxonomy_entries (taxonomy_predicate_id);
-- --------------------------------------------------------
--
-- Table structure for table taxonomy_predicates
--
CREATE TABLE IF NOT EXISTS taxonomy_predicates (
id bigserial NOT NULL,
taxonomy_id bigint NOT NULL,
value text NOT NULL,
expanded text,
colour varchar(7) NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_taxonomy_predicates_taxonomy_id ON taxonomy_predicates (taxonomy_id);
-- --------------------------------------------------------
--
-- Table structure for table templates
--
CREATE TABLE IF NOT EXISTS templates (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
description varchar(255) NOT NULL,
org varchar(255) NOT NULL,
share smallint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table template_elements
--
CREATE TABLE IF NOT EXISTS template_elements (
id bigserial NOT NULL,
template_id bigint NOT NULL,
position bigint NOT NULL,
element_definition varchar(255) NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table template_element_attributes
--
CREATE TABLE IF NOT EXISTS template_element_attributes (
id bigserial NOT NULL,
template_element_id bigint NOT NULL,
name varchar(255) NOT NULL,
description text NOT NULL,
to_ids smallint NOT NULL DEFAULT 1,
category varchar(255) NOT NULL,
complex smallint NOT NULL,
type varchar(255) NOT NULL,
mandatory smallint NOT NULL,
batch smallint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table template_element_files
--
CREATE TABLE IF NOT EXISTS template_element_files (
id bigserial NOT NULL,
template_element_id bigint NOT NULL,
name varchar(255) NOT NULL,
description text NOT NULL,
category varchar(255) NOT NULL,
malware smallint NOT NULL,
mandatory smallint NOT NULL,
batch smallint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table template_element_texts
--
CREATE TABLE IF NOT EXISTS template_element_texts (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
template_element_id bigint NOT NULL,
text text NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table template_tags
--
CREATE TABLE IF NOT EXISTS template_tags (
id bigserial NOT NULL,
template_id bigint NOT NULL,
tag_id bigint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table threads
--
CREATE TABLE IF NOT EXISTS threads (
id bigserial NOT NULL,
date_created timestamp NOT NULL,
date_modified timestamp NOT NULL,
distribution smallint NOT NULL,
user_id bigint NOT NULL,
post_count bigint NOT NULL,
event_id bigint NOT NULL,
title varchar(255) NOT NULL,
org_id bigint NOT NULL,
sharing_group_id bigint NOT NULL,
PRIMARY KEY (id)
);
CREATE INDEX idx_threads_user_id ON threads (user_id);
CREATE INDEX idx_threads_event_id ON threads (event_id);
CREATE INDEX idx_threads_org_id ON threads (org_id);
CREATE INDEX idx_threads_sharing_group_id ON threads (sharing_group_id);
-- --------------------------------------------------------
--
-- Table structure for table threat_levels
--
CREATE TABLE IF NOT EXISTS threat_levels (
id bigserial NOT NULL,
name varchar(50) NOT NULL,
description varchar(255) DEFAULT NULL,
form_description varchar(255) NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table users
--
CREATE TABLE IF NOT EXISTS users (
id bigserial NOT NULL,
password varchar(40) NOT NULL,
org_id bigint NOT NULL,
server_id bigint NOT NULL DEFAULT 0,
email varchar(255) NOT NULL,
autoalert smallint NOT NULL DEFAULT 0,
authkey varchar(40) DEFAULT NULL,
invited_by bigint NOT NULL DEFAULT 0,
gpgkey text,
certif_public text,
nids_sid bigint NOT NULL DEFAULT 0,
termsaccepted smallint NOT NULL DEFAULT 0,
newsread bigint DEFAULT 0,
role_id bigint NOT NULL DEFAULT 0,
change_pw smallint NOT NULL DEFAULT 0,
contactalert smallint NOT NULL DEFAULT 0,
disabled BOOLEAN NOT NULL DEFAULT false,
expiration timestamp DEFAULT NULL,
current_login bigint DEFAULT 0,
last_login bigint DEFAULT 0,
force_logout smallint NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
CREATE INDEX idx_users_email ON users (email);
CREATE INDEX idx_users_org_id ON users (org_id);
CREATE INDEX idx_users_server_id ON users (server_id);
-- --------------------------------------------------------
--
-- Table structure for table warninglists
--
CREATE TABLE IF NOT EXISTS warninglists (
id bigserial NOT NULL,
name varchar(255) NOT NULL,
type varchar(255) NOT NULL DEFAULT 'string',
description text NOT NULL,
version bigint NOT NULL DEFAULT '1',
enabled smallint NOT NULL DEFAULT 0,
warninglist_entry_count bigint DEFAULT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table warninglist_entries
--
CREATE TABLE IF NOT EXISTS warninglist_entries (
id bigserial NOT NULL,
value text NOT NULL,
warninglist_id bigint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table warninglist_types
--
CREATE TABLE IF NOT EXISTS warninglist_types (
id bigserial NOT NULL,
type varchar(255) NOT NULL,
warninglist_id bigint NOT NULL,
PRIMARY KEY (id)
);
-- --------------------------------------------------------
--
-- Table structure for table whitelist
--
CREATE TABLE IF NOT EXISTS whitelist (
id bigserial NOT NULL,
name text NOT NULL,
PRIMARY KEY (id)
);

View File

@ -1,31 +1,55 @@
# After installing MISP you can keep it up to date by periodically running the commands below.
# use this between hotfix versions (such as 2.4.3 -> 2.4.13)
# In general, updating MISP between point releases (for exampe 2.4.50 -> 2.4.53) happens with one of the following two options (both are to be executed as root):
# Option 1: To update to the latest commit from the 2.4 branch simply pull the latest commit
cd /var/www/MISP
git pull origin 2.4
git submodule update --init --force
# Option 2: If you want to stick to a point release instead of pulling the latest commit directly:
cd /var/www/MISP
git fetch
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
git submodule update --init --force
# If you would like to upgrade from a minor version to another, look at the UPGRADE.txt file instead (such as 2.3.142 -> 2.4.13)
# 1. Update the MISP code to the latest hotfix. If a new major version (2.4.x) has been released, refer to UPGRADE.txt instead.
# If for any reason something goes wrong with the above instructions, walk through the following manual upgrade
# 1. Update the MISP code to the latest hotfix.
As user root, do the following:
cd /var/www/MISP
git pull
git fetch
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# 2. Update CakePHP to the latest supported version (if for some reason it doesn't get updated automatically with git submodule
rm -R /var/www/MISP/app/Lib/cakephp
# 2. Update CakePHP to the latest supported version (if for some reason it doesn't get updated automatically with git submodule)
cd /var/www/MISP
git submodule init
git submodule update
git submodule update --init --force
# 3. Update Mitre's STIX and its dependencies
cd /var/www/MISP/app/files/scripts/python-cybox
git checkout v2.1.0.10
python setup.py install
cd /var/www/MISP/app/files/scripts/python-stix
git checkout v1.1.1.4
cd /var/www/MISP/app/files/scripts/
rm -rf python-cybox
rm -rf python-stix
sudo -u www-data git clone https://github.com/CybOXProject/python-cybox.git
sudo -u www-data git clone https://github.com/STIXProject/python-stix.git
cd /var/www/MISP/app/files/scripts/python-cybox
sudo -u www-data git checkout v2.1.0.12
python setup.py install
cd /var/www/MISP/app/files/scripts/python-stix
sudo -u www-data git checkout v1.1.1.4
python setup.py install
# 4. Update CakeResque and it's dependencies
# 4. Update CakeResque and its dependencies
cd /var/www/MISP/app
@ -34,23 +58,28 @@ cd /var/www/MISP/app
vim composer.json
php composer.phar self-update
# if behind a proxy use HTTP_PROXY="http://yourproxy:port" php composer.phar self-update
php composer.phar update
# To use the scheduler worker for scheduled tasks, do the following:
cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
# 5. Make sure all file permissions are set correctly
find /var/www/MISP -type d -exec chmod g=rx {} \;
chmod -R g+r,o= /var/www/MISP
chown -R www-data:www-data /var/www/MISP
# 6. Restart the CakeResque workers
su www-data -c 'bash /var/www/MISP/app/Console/worker/start.sh'
su - www-data -s /bin/bash -c 'bash /var/www/MISP/app/Console/worker/start.sh'
# You can also do this using the MISP application by navigating to the workers tab in the server settings and clicking on the "Restart all workers" button.
# 7. Add any new dependencies that might have been added since you've last updated (shown below)
# 7.a requirements for the pubsub optional feature

29
INSTALL/UPGRADE.txt Executable file → Normal file
View File

@ -2,26 +2,35 @@
# it is assumed that the upgrade happens from an up-to-date 2.3 instance
# It is a good idea to back up your MISP installation and data before upgrading to a new release.
# - git pull the latest version of MISP from https://github.com/MISP/MISP.git
# 2. git pull the latest version of MISP from https://github.com/MISP/MISP.git
cd /var/www/MISP
git pull
git checkout 2.4
git submodule init
git submodule update
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# delete everything from MISP's cache directory to get rid of the cached models
# 3. Update CakePHP to the latest supported version
cd /var/www/MISP
rm -rf app/Lib/cakephp/
git submodule update --init --force
# 4. delete everything from MISP's cache directory to get rid of the cached models
find /var/www/MISP/app/tmp/cache/ -type f -not -name 'empty' -delete
# clear the old submodule cached entry for CakeResque
# 5. clear the old submodule cached entry for CakeResque
cd /var/www/MISP
git rm --cached app/Plugin/CakeResque/
# make sure that your database is backed up
# 6. make sure that your database is backed up
mysqldump -u [misp_mysql_user] -p [misp_database] > /home/[my_user]/misp_db_pre_migration.sql
# upgrade your database with the new tables / fields introduces in 2.4
# 7. upgrade your database with the new tables / fields introduced in 2.4
cd /var/www/MISP/INSTALL
mysql -u [misp_mysql_user] -p [misp_database] < upgrade_2.4.sql
# After this run the upgrade script from within the application
# 8. run the upgrade script from within the application
# simply navigate to Administration -> Administrative Tools -> "Upgrade to 2.4"
# Once that has completed successfully run the 2.3->2.4 cleanup script
# simply navigate to Administration -> Administrative Tools -> "2.3->2.4 cleanup script"
@ -29,7 +38,7 @@ mysql -u [misp_mysql_user] -p [misp_database] < upgrade_2.4.sql
# If everything went fine, switch the system to live:
# Administration -> Server Settings -> MISP Settings -> MISP.live -> True
# NOTE: if nothing happens, please check the permissions of the config files in /var/www/MISP/app/Config/
# and make sure the webserver has the write permissions on them:
# and make sure the webserver has the write permissions on them:
# chown -R www-data:www-data /var/www/MISP/app/Config/
# Let us know if you run into any issues during or after the upgrade

View File

@ -1,52 +0,0 @@
dir=`dirname $0`
FILE_PATH=`cd $dir;pwd`
cd ..
MISP_PATH=`pwd`
clear
printf '=========================================================\n'
printf '| |\n'
printf '| \e[34mM\e[39malware \e[34mI\e[39mnformation \e[34mS\e[39mharing \e[34mP\e[39mlatform |\n'
printf '| |\n'
printf '| 2.2 Installation |\n'
printf '| |\n'
printf '=========================================================\n\n'
YUM_CMD=$(which yum)
APT_GET_CMD=$(which apt-get)
BREW_CMD=$(which brew)
if [[ ! -z $APT_GET_CMD ]]
then
printf '\n\nInstalling Redis using apt-get'
apt-get install vim zip php-pear git redis-server
elif [[ ! -z $YUM_CMD ]]
then
printf '\n\nNo redis package with yum, please download and install Redis manually.'
yum install vim zip php-pear git
elif [[ ! -z $OTHER_CMD ]]
then
printf '\n\nInstalling Redis using brew'
brew install vim zip php-pear git redis-server
else
echo "Error, you need either apt-get, yum or brew to install zip, php-pear, git, redis using this script. Please install them manually.";
fi
pear install Crypt_GPG
pear install Net_GeoIP
git config core.filemode false
cd "$MISP_PATH"
git submodule init
git submodule update
cd "$MISP_PATH/app"
curl -s https://getcomposer.org/installer | php
php composer.phar require --no-update kamisama/cake-resque:4.1.0
php composer.phar config vendor-dir Vendor
php composer.phar install
cd "$MISP_PATH"
chown -R www-data:www-data "$MISP_PATH"
chmod -R 750 "$MISP_PATH"
chmod -R g+ws "$MISP_PATH/app/tmp"
chmod -R g+ws "$MISP_PATH/app/files"
cp -fa "$FILE_PATH/setup/config.php" "$MISP_PATH/app/Plugin/CakeResque/Config/config.php"
printf '\n\n=========================================================\n'
printf '| \e[34mI\e[39mnstallation \e[34mC\e[39momplete |\n'
printf '=========================================================\n\n'

View File

@ -1,69 +0,0 @@
dir=`dirname $0`
FILE_PATH=`cd $dir;pwd`
cd ..
MISP_PATH=`pwd`
printf '========================================================\n'
printf '| |\n'
printf '| \e[34mM\e[39malware \e[34mI\e[39mnformation \e[34mS\e[39mharing \e[34mP\e[39mlatform |\n'
printf '| |\n'
printf '| 2.1 => 2.2 upgrade |\n'
printf '| |\n'
printf '========================================================\n\n'
read -p 'Do you wish to upgrade your database now? [y/n] ' -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
printf '\n\nIn order to upgrade your MISP database to version 2.2, enter your database credentials.'
printf '\nUsername: '
read name
printf '\nPassword: '
read password
printf '\nDatabase: '
read database
cd "$FILE_PATH"
mysql -u $name -p$password $database < upgrade_2.2.sql
printf '\n\n'
else
printf '\n\nDatabase not updated. You will have to update it manually by executing\n\nmysql -u [username] -p[password] [database name] < upgrade_2.2.sql from the MISP/INSTALL directory\n\n'
fi
cd "$MISP_PATH"
git submodule init
git submodule update
YUM_CMD=$(which yum)
APT_GET_CMD=$(which apt-get)
BREW_CMD=$(which brew)
if [[ ! -z $APT_GET_CMD ]]
then
printf '\n\nInstalling Redis using apt-get'
apt-get install redis-server
elif [[ ! -z $YUM_CMD ]]
then
printf '\n\nNo Redis package available with yum, please install it manually.'
yum install redis
elif [[ ! -z $OTHER_CMD ]]
then
printf '\n\nInstalling Redis using brew'
brew install redis-server
else
echo "Error, you need either apt-get, yum or brew to install Redis using this script. Please install it manually.";
fi
cd "$MISP_PATH/app"
curl -s https://getcomposer.org/installer | php
php composer.phar require --no-update kamisama/cake-resque:4.1.0
php composer.phar config vendor-dir Vendor
php composer.phar install
cd "$MISP_PATH"
chown -R www-data:www-data "$MISP_PATH"
chmod -R 750 "$MISP_PATH"
chmod -R g+ws "$MISP_PATH/app/tmp"
chmod -R g+ws "$MISP_PATH/app/files"
rm app/tmp/cache/*/*
cp -fa "$FILE_PATH/setup/config.php" "$MISP_PATH/app/Plugin/CakeResque/Config/config.php"
printf '\n\n=========================================================\n'
printf '| \e[34mI\e[39mnstallation \e[34mC\e[39momplete |\n'
printf '=========================================================\n\n'

View File

@ -1,32 +0,0 @@
Upgrade procedure from v2.1 to v2.2
- git pull the latest version of MISP from https://github.com/MISP/MISP.git
- execute UPGRADE.SH in the MISP/INSTALL folder (this also includes the installation of Redis for CakeResque)
- cd /var/www/MISP/INSTALL
- ./UPGRADE.SH
- Replace your current bootstrap.php file found in /MISP/app/Config/ with bootstrap.default.php and change set your instance up to your liking
- Log in with the site admin credentials and execute the following commands by changing the url
(where <MISP> is the address of your instance):
- https://<MISP>/events/generateThreatLevelFromRisk
================================================================================================================================================
Enabling background jobs via CakeResque
(assuming /var/www/MISP as your installation directory)
- Enable CakeResque in MISP
- vim /var/www/MISP/app/Config/bootstrap.php
- set Configure::write('MISP.background_jobs', false); to Configure::write('MISP.background_jobs', true);
- uncomment CakePlugin::load('CakeResque', array('bootstrap' => true));
- in Core.php (if you have just recently updated MISP, just add this line at the end of the file): require_once dirname(__DIR__) . '/Vendor/autoload.php';
- start the background workers
- cd /var/www/MISP/app/Console/worker/
- ./start.sh
Make sure you configure your OS to start this script as boot time !
================================================================================================================================================

View File

@ -1,178 +0,0 @@
-- Copyright (c) 2009 www.cryer.co.uk
-- Script is free to use provided this copyright header is included.
drop procedure if exists AddColumnUnlessExists;
delimiter '//'
create procedure AddColumnUnlessExists(
IN dbName tinytext,
IN tableName tinytext,
IN fieldName tinytext,
IN fieldDef text)
begin
IF NOT EXISTS (
SELECT * FROM information_schema.COLUMNS
WHERE column_name=fieldName
and table_name=tableName
and table_schema=dbName
)
THEN
set @ddl=CONCAT('ALTER TABLE ',dbName,'.',tableName,
' ADD COLUMN ',fieldName,' ',fieldDef);
prepare stmt from @ddl;
execute stmt;
END IF;
end;
//
delimiter ';'
call AddColumnUnlessExists(Database(), 'roles', 'perm_site_admin', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'roles', 'perm_regexp_access', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'roles', 'perm_tagger', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
CREATE TABLE IF NOT EXISTS `threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date_created` datetime NOT NULL,
`date_modified` datetime NOT NULL,
`distribution` tinyint(4) NOT NULL,
`user_id` int(11) NOT NULL,
`post_count` int(11) NOT NULL,
`event_id` int(11) NOT NULL,
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`org` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date_created` datetime NOT NULL,
`date_modified` datetime NOT NULL,
`user_id` int(11) NOT NULL,
`contents` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`post_id` int(11) NOT NULL DEFAULT '0',
`thread_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `event_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`event_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`colour` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `threat_levels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`form_description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`timer` int(11) NOT NULL,
`scheduled_time` varchar(8) NOT NULL DEFAULT '6:00',
`job_id` int(11) NOT NULL,
`description` varchar(255) NOT NULL,
`next_execution_time` int(11) NOT NULL,
`message` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`worker` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`job_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`job_input` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
`retries` int(11) NOT NULL DEFAULT '0',
`message` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`progress` int(11) NOT NULL DEFAULT '0',
`org` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`process_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
call AddColumnUnlessExists(Database(), 'attributes', 'comment', 'TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'events', 'threat_level_id', 'int(11) NOT NULL');
call AddColumnUnlessExists(Database(), 'events', 'publish_timestamp', 'int(11) NOT NULL');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'event_org', 'VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'comment', 'TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'event_uuid', 'varchar(40) COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'servers', 'self_signed', ' tinyint(1) NOT NULL');
call AddColumnUnlessExists(Database(), 'servers', 'cert_file', 'varchar(255) COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'regexp', 'type', 'COLLATE utf8_bin NOT NULL DEFAULT "ALL"');
drop procedure AddColumnUnlessExists;
UPDATE `regexp` SET `type` = 'ALL';
UPDATE `roles` SET `perm_site_admin` = 1 WHERE `id` = 1;
UPDATE `roles` SET `perm_tagger` = 1 WHERE `id` = 1;
UPDATE `roles` SET `perm_regexp_access` = 1 WHERE `id` = 1;
INSERT IGNORE INTO `threat_levels` (`id`, `name`, `description`, `form_description`)
VALUES
(1,'High','*high* means sophisticated APT malware or 0-day attack','Sophisticated APT malware or 0-day attack'),
(2,'Medium','*medium* means APT malware','APT malware'),
(3,'Low','*low* means mass-malware','Mass-malware'),
(4,'Undefined','*undefined* no risk','No risk');
INSERT IGNORE INTO `tasks` (`id`, `type`, `timer`, `scheduled_time`, `job_id`, `description`, `next_execution_time`, `message`) VALUES
(1, 'cache_exports', 0, '12:00', 0, 'Generates export caches for every export type and for every organisation. This process is heavy, schedule so it might be a good idea to schedule this outside of working hours and before your daily automatic imports on connected services are scheduled.', 1391601600, 'Not scheduled yet.'),
(2, 'pull_all', 0, '12:00', 0, 'Initiates a full pull for all eligible instances.', 1391601600, 'Not scheduled yet.'),
(3, 'push_all', 0, '12:00', 0, 'Initiates a full push for all eligible instances.', 1391601600, 'Not scheduled yet.');
CREATE TABLE IF NOT EXISTS `templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`org` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`share` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `template_elements` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`position` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `template_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `template_element_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_element_id` int(11) NOT NULL,
`type` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -1,83 +0,0 @@
# 1. Upgrade procedure from v2.2 to v2.3
# - git pull the latest version of MISP from https://github.com/MISP/MISP.git
# delete everything from MISP's cache directory to get rid of the cached models
find /var/www/MISP/app/tmp/cache/ -type f -not -name 'empty' -delete
# clear the old submodule cached entry for CakeResque
cd /var/www/MISP
git rm --cached app/Plugin/CakeResque/
# Check if the permissions are set correctly using the following commands as root:
chown -R www-data:www-data /var/www/MISP
chmod -R 750 /var/www/MISP
chmod -R g+ws /var/www/MISP/app/tmp
chmod -R g+ws /var/www/MISP/app/files
chmod -R g+ws /var/www/MISP/app/files/scripts/tmp
# 2. Get the new dependencies introduced in version 2.3
# install Mitre's STIX and its dependencies by running the following commands:
apt-get install python-dev python-pip libxml2-dev libxslt-dev zlib1g-dev
cd /var/www/MISP/app/files/scripts
git clone https://github.com/CybOXProject/python-cybox.git
git clone https://github.com/STIXProject/python-stix.git
cd /var/www/MISP/app/files/scripts/python-cybox
git checkout v2.1.0.10
python setup.py install
cd /var/www/MISP/app/files/scripts/python-stix
git checkout v1.1.1.4
python setup.py install
# install / update CakeResque (using the background workers is optional buy highly recommended)
cd /var/www/MISP/app
curl -s https://getcomposer.org/installer | php
php composer.phar require kamisama/cake-resque:4.1.2
php composer.phar config vendor-dir Vendor
php composer.phar install
# To use the scheduler worker for scheduled tasks, do the following:
cp -fa /var/www/MISP/INSTALL/setup/config.php /var/www/MISP/app/Plugin/CakeResque/Config/config.php
# 3. Update the database and settings to be compatible with MISP 2.3
# Update the database of MISP by running the following command
mysql -u <database login> -p<database password> <misp table name> < /var/www/MISP/INSTALL/upgrade_2.3.sql
# MISP has moved to a new configuration system. It might be a good idea to note down the old settings before removing them.
# Wherever applicable, you can remove .b from the default configuration file's name to get the non-background worker enabled version, however this is not recommended
mv /var/www/MISP/app/Config/bootstrap.b.default.php /var/www/MISP/app/Config/bootstrap.php
mv /var/www/MISP/app/Config/core.b.default.php /var/www/MISP/app/Config/core.php
mv /var/www/MISP/app/Config/config.default.php /var/www/MISP/app/Config/config.php
# Enable the background workers by uncommenting CakePlugin::loadall(array('CakeResque' => array('bootstrap' => true))); in /var/www/MISP/app/Config/bootstrap.php
# Make sure that the files in config are owned by the apache user
chown -R www-data:www-data /var/www/MISP/app/Config/*
# Log into MISP using your site admin credentials
# navigate to Administration -> Server settings
# Make sure that all of settings related tabs are filled out correctly.
# The tool will tell you about any potential issues and remedies, just follow the instructions
# Once done, have a look at the diagnostics
# If any of the directories that MISP uses to store files is not writeable to the apache user, change the permissions
# you can do this by running the following commands:
chmod -R 750 /var/www/MISP/<directory path with an indicated issue>
chown -R www-data:www-data /var/www/MISP/<directory path with an indicated issue>
# Make sure that the STIX libraries and GnuPG work as intended, if not, refer to INSTALL.txt's paragraphs dealing with these two items
# If you still have the background workers started from before the upgrade, the interface will not allow you to restart the workers
# This is because according to the install script in the previous version the background workers were advised to be started after boot in rc.local using the root user
# If this is the case for you, make sure that you stop the workers using the command line with the following command:
/var/www/MISP/app/Console/cake CakeResque.CakeResque stop --all
# Amend your rc.local using the following command to always start the background workers using the apache user (substitute www-data with your apache user)
su www-data -c 'bash /var/www/MISP/app/Console/worker/start.sh'
# Start the background workers using the application by navigating to the workers tab in the server settings and clicking on the "Restart all workers" button.

3
INSTALL/ansible/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
tmp
.DS_Store
*.retry

48
INSTALL/ansible/README.md Normal file
View File

@ -0,0 +1,48 @@
MISP - Ansible installation script
----------------------------------------
- V0.1
* Nginx support only
* Backup script provided
Instructions
----------------------------------------
- From the ansible repository, run the following command:
```bash
ansible-playbook -i <host>, misp.yml -K -u <user>
```
- Update the self-signed certificate in /etc/nginx/ssl
- Create and export your GPG key:
```bash
sudo -u www-data gpg --homedir /opt/misp-server/misp/.gnupg --gen-key
sudo -u www-data gpg --homedir /opt/misp-server/misp/.gnupg --export --armor YOUR-EMAIL > /opt/misp-server/misp/app/webroot/gpg.asc
```
- Login with:
* user: admin@admin.test
* password: admin
and update the admin password
- Configure MISP in administration panel, server settings
Notes
----------------------------------------
- the user must have admin rights
- a self-signed certificate is generated to allow you to test the installation
- installation directory is: /opt/misp-server/misp
- backup directory is: /opt/misp-server/backup
Backup script
----------------------------------------
If enabled, a backup script create each day a new archive with a MySQL misp database dump and misp files to allow easy restore.
- these archives are created in: /opt/misp-server/backup
- a script to easy restore MISP from an archive is provided in the same directory
- to use the restore script, login as misp user and run the following command:
```bash
./misp_restore <archive_timestamp>.tar.gz
```

View File

@ -0,0 +1,3 @@
[ssh_connection]
ssh_args = -F ssh.cfg
pipelining = True

30
INSTALL/ansible/misp.yml Normal file
View File

@ -0,0 +1,30 @@
---
- hosts: all
become: true
roles:
- { role: mysql}
- { role: misp}
- { role: nginx}
vars_prompt:
- name: "proxy_host"
prompt: "Enter the proxy host (e.g. myproxy.be)"
private: no
- name: "proxy_port"
prompt: "Enter the proxy port (e.g. 3128)"
private: no
- name: "servername"
prompt: "Enter the servername address to use for the webserver (e.g. misp.com)"
private: no
- name: "mysql_root_old_pass"
prompt: "MySQL root password (current or default/empty)"
private: yes
- name: "mysql_root_new_pass"
prompt: "MySQL root password (new/current)"
private: yes
- name: mysql_misp_password
prompt: "Enter the mysql misp user password"
private: yes
- name: enable_auto_backup
prompt: "Do you want to enable automatic backup everyday ? (y/n)"
private: no

View File

@ -0,0 +1,2 @@
---
# default lower priority variables for this role

View File

@ -0,0 +1,2 @@
---
# Handlers file

View File

@ -0,0 +1,2 @@
---
# Role dependancies

View File

@ -0,0 +1,364 @@
---
# Install basic packages
- name: Create misp user
user:
name: misp
state: present
- name: Create Ansible directory
file:
path: "/home/misp/ansible"
owner: misp
group: misp
mode: 0775
state: directory
- name: Install all needed packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
with_items:
- gcc
- zip
- php-pear
- git
- redis-server
- make
- python-dev
- python-pip
- libxml2-dev
- libxslt1-dev
- zlib1g-dev
- php5-dev
- curl
- gnupg-agent
- php5-mysql
- php5-redis
######### MISP users and groups #########
- name: Add MISP group
group:
name: "{{ item }}"
state: present
system: yes
with_items:
- "misp-server"
- name: Add misp in misp-server
user:
name: misp
append: yes
groups: misp-server
state: present
- name: Add www-data in misp-server
user:
name: www-data
append: yes
groups: misp-server
######### MISP directories #########
- name: Create MISP server directory
file:
path: "{{ item }}"
owner: misp
group: misp-server
mode: 02775
state: directory
with_items:
- "/opt/misp-server"
- "/opt/misp-server/misp"
- "/opt/misp-server/tmp"
- "/opt/misp-server/backup"
######### PEAR: CRYPTPGP #########
- name: Configure PEAR proxy
shell: "{{ item }}"
args:
creates: /home/misp/ansible/ansible_shell_pear_configure_proxy.log
with_items:
- "pear config-set http_proxy http://{{proxy_host}}:{{proxy_port}} > /home/misp/ansible/ansible_shell_pear_configure_proxy.log"
- name: Configure PEAR tmp
shell: "{{ item }}"
args:
creates: /home/misp/ansible/ansible_shell_pear_configure_tmp.log
with_items:
- pear config-set temp_dir /opt/misp-server/tmp/ > /home/misp/ansible/ansible_shell_pear_configure_tmp.log
- name: Install CryptGPG
pear:
name: Crypt_GPG
state: present
######### MISP REPOSITORY #########
- name: Clone MISP repository
become: true
become_user: misp
git:
repo: "https://github.com/MISP/MISP.git"
dest: "/opt/misp-server/misp"
recursive: yes
force: no
update: no
version: v2.4.49
accept_hostkey: yes
- name: Configure Git
git_config:
name: core.filemode
scope: global
value: false
- name: Create scripts directories
file:
path: "{{ item }}"
owner: misp
group: misp-server
mode: 02775
state: directory
with_items:
- "/opt/misp-server/misp/app/files/scripts/python-cybox"
- "/opt/misp-server/misp/app/files/scripts/python-stix"
- name: Clone MISP depedencies | Python-Cybox
become: true
become_user: misp
git:
repo: "https://github.com/CybOXProject/python-cybox.git"
dest: "/opt/misp-server/misp/app/files/scripts/python-cybox"
force: no
update: no
version: v2.1.0.12
accept_hostkey: yes
- name: Clone MISP depedencies | Python-Stix
become: true
become_user: misp
git:
repo: "https://github.com/STIXProject/python-stix.git"
dest: "/opt/misp-server/misp/app/files/scripts/python-stix"
force: no
update: no
version: v1.1.1.4
accept_hostkey: yes
- name: Install MISP depedencies | Python-Cybox
become: true
shell: "{{ item }}"
args:
chdir: /opt/misp-server/misp/app/files/scripts/python-cybox
creates: /home/misp/ansible/ansible_shell_pythoncybox_setup.log
with_items:
- python setup.py install > /home/misp/ansible/ansible_shell_pythoncybox_setup.log
- name: Install MISP depedencies | Python-Stix
become: true
shell: "{{ item }}"
args:
chdir: /opt/misp-server/misp/app/files/scripts/python-stix
creates: /home/misp/ansible/ansible_shell_pythonstix_setup.log
with_items:
- python setup.py install > /home/misp/ansible/ansible_shell_pythonstix_setup.log
######### CAKE PHP #########
- name: Curl PHP installer
shell: "{{ item }}"
args:
chdir: /opt/misp-server/misp/app/
creates: /home/misp/ansible/ansible_shell_curl_php.log
with_items:
- curl -s https://getcomposer.org/installer | php > /home/misp/ansible/ansible_shell_curl_php.log
- name: Install COMPOSER in /bin
copy:
remote_src: True
src: /opt/misp-server/misp/app/composer.phar
dest: /usr/local/bin/composer
owner: root
group: root
mode: 0755
- name: Cake-resque installation
composer:
command: "require"
arguments: "kamisama/cake-resque:4.1.2"
working_dir: "/opt/misp-server/misp/app"
register: cakeresque_install
- name: Vendor configure
composer:
command: "config"
arguments: "vendor-dir Vendor"
working_dir: "/opt/misp-server/misp/app"
when: cakeresque_install.changed
- name: PHP composer install
composer:
command: "install"
arguments: ""
working_dir: "/opt/misp-server/misp/app"
- name: Copy CakeResque config file
copy:
remote_src: True
src: /opt/misp-server/misp/INSTALL/setup/config.php
dest: /opt/misp-server/misp/app/Plugin/CakeResque/Config/config.php
force: yes
owner: misp
group: misp-server
mode: 0774
######### MISP CONFIGURATION #########
- name: Copy MISP configuration files
template:
src: "misp/config/{{item}}"
dest: "/opt/misp-server/misp/app/Config/{{item}}"
force: yes
owner: misp
group: misp-server
mode: 0774
with_items:
- bootstrap.php
- config.php
- core.php
- database.php
######### GNUPG #########
- name: Create the directory for GNUPG
file:
path: "/opt/misp-server/misp/.gnupg"
owner: misp
group: misp-server
mode: 0770
state: directory
######### MISP WORKERS #########
- name: Check MISP worker launcher permissions
file:
path: /opt/misp-server/misp/app/Console/worker/start.sh
owner: misp
group: misp-server
mode: 0764
- name: Check MISP worker autolaunch at boot
lineinfile:
state: present
dest: /etc/rc.local
insertbefore: "exit 0"
line: "sudo -u www-data bash /opt/misp-server/misp/app/Console/worker/start.sh"
######### ADD-ON #########
- name: Install ZeroMQ
pip:
name: pyzmq
state: latest
- name: Install Python client for Redis
pip:
name: redis
state: latest
######### MYSQL CONFIGURATION #########
- name: MySQL | Create MISP database
become: true
mysql_db:
login_user: root
login_password: "{{ mysql_root_new_pass }}"
name: misp
state: present
register: mysql_init
- name: MySQL | Create MISP user
become: true
mysql_user:
login_user: root
login_password: "{{ mysql_root_new_pass }}"
name: misp
password: "{{mysql_misp_password}}"
priv: "misp.*:ALL,GRANT"
state: present
register: mysql_init
- name: MySQL | Create password file
template:
src: "mysql/{{item}}"
dest: "/home/misp/{{item}}"
force: no
owner: misp
group: misp
mode: 0600
with_items:
- .my.cnf
- name: MySQL | Create password file for root
template:
src: "mysql/{{item}}"
dest: "/root/{{item}}"
force: no
owner: root
group: root
mode: 0600
with_items:
- .my.cnf
- name: MySQL | Initialize MISP database
shell: "{{ item }}"
with_items:
- mysql -D misp < /opt/misp-server/misp/INSTALL/MYSQL.sql
when: mysql_init.changed
######### PERMISSIONS #########
- name: Fix all files permissions
file:
path: /opt/misp-server/misp
recurse: yes
state: directory
mode: "g=u"
############################################
##### BACKUP ####
############################################
- name: Copy backup script
become: true
template:
src: misp/{{item}}
dest: /bin/{{item}}
mode: 0755
with_items:
- misp_backup
when: enable_auto_backup == 'y'
- name: Copy restore script
template:
src: misp/{{item}}
dest: /opt/misp-server/backup/{{item}}
mode: 0755
owner: misp
group: misp
with_items:
- misp_backup
when: enable_auto_backup == 'y'
- name: Create backup cronjob
become: true
become_user: misp
cron:
name: "misp backup cronjob"
minute: "0"
hour: "4"
job: "sh /bin/misp_backup"
when: enable_auto_backup == 'y'

View File

@ -87,9 +87,17 @@ Configure::load('config');
if (!Configure::read('MISP.baseurl')) {
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
Configure::write('MISP.baseurl', sprintf('https://%s:%d', $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']));
if ($_SERVER['SERVER_PORT'] == 443) {
Configure::write('MISP.baseurl', sprintf('https://%s', $_SERVER['SERVER_ADDR']));
} else {
Configure::write('MISP.baseurl', sprintf('https://%s:%d', $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']));
}
} else {
Configure::write('MISP.baseurl', sprintf('http://%s:%d', $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']));
if ($_SERVER['SERVER_PORT'] == 80) {
Configure::write('MISP.baseurl', sprintf('http://%s', $_SERVER['SERVER_ADDR']));
} else {
Configure::write('MISP.baseurl', sprintf('http://%s:%d', $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']));
}
}
}
@ -108,6 +116,12 @@ CakePlugin::load('Assets'); // having Logable
CakePlugin::load('SysLogLogable');
CakePlugin::load('UrlCache');
/**
* Uncomment the following line to enable client SSL certificate authentication.
* It's also necessary to configure the plugin for more information, please read app/Plugin/CertAuth/reame.md
*/
// CakePlugin::load('CertAuth');
/**
* You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
*
@ -144,6 +158,7 @@ CakeLog::config('error', array(
'file' => 'error',
));
// comment the following out if you do not with to use the background processing (not recommended)
CakePlugin::loadAll(array(
'CakeResque' => array('bootstrap' => true)
));
));

View File

@ -0,0 +1,83 @@
<?php
$config = array (
'debug' => 0,
'Security' =>
array (
'level' => 'medium',
'salt' => 'juFghZsg7128Eeyo<Qu2eeNfterd-dd+',
'cipherSeed' => '',
//'auth'=>array('CertAuth.Certificate'), // additional authentication methods
),
'MISP' =>
array (
'baseurl' => 'https://{{servername}}',
'footermidleft' => '',
'footermidright' => '',
'org' => '',
'showorg' => true,
'background_jobs' => true,
'cached_attachments' => true,
'email' => '',
'contact' => '',
'cveurl' => 'http://cve.circl.lu/cve/',
'disablerestalert' => false,
'default_event_distribution' => '1',
'default_attribute_distribution' => 'event',
'tagging' => true,
'full_tags_on_event_index' => true,
'footer_logo' => '',
'take_ownership_xml_import' => false,
'unpublishedprivate' => false,
'disable_emailing' => false,
),
'GnuPG' =>
array (
'onlyencrypted' => false,
'email' => '',
'homedir' => '/opt/misp-server/misp/.gnupg',
'password' => '',
'bodyonlyencrypted' => false,
),
'Proxy' =>
array (
'host' => '{{proxy_host}}',
'port' => '{{proxy_port}}',
'method' => '',
'user' => '',
'password' => '',
),
'SecureAuth' =>
array (
'amount' => 5,
'expire' => 300,
),
// Uncomment the following to enable client SSL certificate authentication
/*
'CertAuth' =>
array(
'ca' => array( 'FIRST.Org' ), // allowed CAs
'caId' => 'O', // which attribute will be used to verify the CA
'userModel' => 'User', // name of the User class to check if user exists
'userModelKey' => 'nids_sid', // User field that will be used for querying
'map' => array( // maps client certificate attributes to User properties
'O' => 'org',
'emailAddress'=>'email',
),
'syncUser' => true, // should the User be synchronized with an external REST API
'userDefaults'=> array( // default user attributes, only used when creating new users
'role_id' => 4,
),
'restApi' => array( // API parameters
'url' => 'https://example.com/data/users', // URL to query
'headers' => array(), // additional headers, used for authentication
'param' => array( 'email' => 'email'), // query parameters to add to the URL, mapped to USer properties
'map' => array( // maps REST result to the User properties
'uid' => 'nids_sid',
'team' => 'org',
'email' => 'email',
'pgp_public'=> 'gpgkey',
),
),
),
*/
);

View File

@ -73,7 +73,10 @@
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true
'log' => true,
'skipLog' => array(
'NotFoundException',
)
));
/**
@ -278,4 +281,6 @@ Cache::config('_cake_model_', array(
'duration' => $duration
));
//Comment the following out if you do not with to use the background workers (not recommended)
require_once dirname(__DIR__) . '/Vendor/autoload.php';

View File

@ -0,0 +1,73 @@
<?php
/**
* This is core configuration file.
*
* Use it to configure core behaviour of Cake.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* In this file you set up your database connection details.
*
* @package cake.config
*/
/**
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
*
* datasource => The name of a supported datasource; valid options are as follows:
* Database/Mysql - MySQL 4 & 5,
* Database/Sqlite - SQLite (PHP5 only),
* Database/Postgres - PostgreSQL 7 and higher,
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
*
* You can add custom database datasources (or override existing datasources) by adding the
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
*
*
* persistent => true / false
* Determines whether or not the database should use a persistent connection
*
* host =>
* the host you connect to the database. To add a socket or port number, use 'port' => #
*
* prefix =>
* Uses the given prefix for all the tables in this database. This setting can be overridden
* on a per-table basis with the Model::$tablePrefix property.
*
* schema =>
* For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
*
* encoding =>
* For MySQL, Postgres specifies the character encoding to use when connecting to the
* database. Uses database default not specified.
*
* unix_socket =>
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
*/
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'misp',
'port' => 3306,
'password' => '{{mysql_misp_password}}',
'database' => 'misp',
'prefix' => '',
//'encoding' => 'utf8',
);
}

View File

@ -0,0 +1,35 @@
#!/bin/bash
###########################################
####### MISP BACKUP SCRIPT #######
###########################################
TIMESTAMP=`date +%m%d%Y%H%M`
BACKUP_PATH='/opt/misp-server/backup'
BACKUP_DIR="$BACKUP_PATH/$TIMESTAMP"
BACKUP_MYSQL_DIR="$BACKUP_DIR/mysql"
BACKUP_FILES_DIR="$BACKUP_DIR/misp"
MISP_FILES="/opt/misp-server/misp/app/files"
MISP_CONF="/opt/misp-server/misp/app/Config"
mkdir "$BACKUP_DIR"
mkdir "$BACKUP_MYSQL_DIR"
mkdir "$BACKUP_FILES_DIR"
#### 1 | MYSQL ####
mysqldump -u misp --opt --single-transaction misp > "$BACKUP_MYSQL_DIR/mysql_dump.sql"
#### 2 | CONFIGURATION FILES ####
cp -R $MISP_CONF $BACKUP_FILES_DIR
#### 3 | FILES ####
cp -R $MISP_FILES $BACKUP_FILES_DIR
cd $BACKUP_PATH
tar -cpzf ${TIMESTAMP}.tar.gz ./${TIMESTAMP}
rm -rf $BACKUP_DIR
#### Remove old backups ####
find . -mtime +30 -exec rm {} \;

View File

@ -0,0 +1,45 @@
#!/bin/bash
###########################################
####### MISP RESTORE SCRIPT #######
###########################################
ARCHIVE=$1
EXTRACTION=${ARCHIVE::-7}
BACKUP_MYSQL_DUMP_FILE="./$EXTRACTION/mysql/mysql_dump.sql"
BACKUP_CONFIG_DIR="./$EXTRACTION/misp/Config/"
BACKUP_FILES_DIR="./$EXTRACTION/misp/files/"
MISP_INSTALL_DIR="/opt/misp-server/misp/"
MISP_INSTALL_APP_DIR="$MISP_INSTALL_DIR/app/"
MYSQL_USER="misp"
MYSQL_DATABASE="misp"
echo "------ MISP RESTORE SCRIPT ------"
#### 0 | OPEN BACKUP ARCHIVE ####
echo "*** Unpacking $1 ***"
tar -xf $ARCHIVE
echo "Done."
#### 1 | RESTORE MYSQL ####
echo "*** Restoring MySQL misp database ***"
echo "Connecting to MySQL database:"
echo "database:$MYSQL_DATABASE"
echo "user:$MYSQL_USER"
mysql -u $MYSQL_USER -p $MYSQL_DATABASE < $BACKUP_MYSQL_DUMP_FILE
echo "Done."
#### 2 | RESTORE CONFIGURATION FILES ####
echo "*** Restoring MISP configuration files ***"
cp -R $BACKUP_CONFIG_DIR $MISP_INSTALL_APP_DIR
echo "Done."
#### 3 | RESTORE MISP FILES ####
echo "*** Restoring MISP files ***"
cp -R $BACKUP_FILES_DIR $MISP_INSTALL_APP_DIR
echo "Done."
echo "------ COMPLETE ------"

View File

@ -0,0 +1,7 @@
[client]
user=misp
password="{{mysql_misp_password}}"
[mysqldump]
user=misp
password="{{mysql_misp_password}}"

View File

@ -0,0 +1,2 @@
---

View File

@ -0,0 +1,2 @@
---
# default lower priority variables for this role

View File

@ -0,0 +1,3 @@
---
# Handlers file

View File

@ -0,0 +1,2 @@
---
# Role dependancies

View File

@ -0,0 +1,45 @@
---
- name: mysql-server - installation
apt:
pkg: mysql-server-5.6
state: present
- name: python-mysqldb - installation
apt:
pkg: python-mysqldb
state: present
- name: MySQL - Update mysql root passwd
mysql_user:
name: root
host: "{{item}}"
password: "{{mysql_root_new_pass}}"
login_user: root
login_password: "{{mysql_root_old_pass}}"
with_items:
- "{{ansible_hostname}}"
- 127.0.0.1
- ::1
- localhost
when: mysql_root_new_pass != mysql_root_old_pass and
mysql_root_new_pass != ""
- name: MySQL - Delete anonymous mysql user
mysql_user:
name: ""
state: absent
login_user: root
login_password: "{{mysql_root_new_pass}}"
- name: MySQL - Remove mysql test database
mysql_db:
name: test
state: absent
login_user: root
login_password: "{{mysql_root_new_pass}}"
- name: Restart MySQL
service:
name: mysql
state: restarted

View File

@ -0,0 +1,2 @@
---
# Variables associated with this role

View File

@ -0,0 +1,2 @@
---
# default lower priority variables for this role

View File

@ -0,0 +1,3 @@
---
# Handlers file

View File

@ -0,0 +1,2 @@
---
# Role dependancies

View File

@ -0,0 +1,59 @@
---
- name: Install all needed packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
with_items:
- nginx
- php5-fpm
######### WEB-SERVER CONFIGURATION #########
- name: Make NGINX SSL directory
file:
path: /etc/nginx/ssl
state: directory
owner: root
group: root
mode: 0644
register: nginx_init
- name: Remove default NGINX configuration
file:
path: /etc/nginx/{{item}}
state: absent
with_items:
- sites-enabled/default
- sites-available/default
register: nginx_init
- name: Copy Nginx site configurations
template:
src: nginx/{{item}}
dest: /etc/nginx/sites-available/{{item}}
force: no
mode: 0644
with_items:
- misp
register: nginx_init
- name: Create NGINX configuration symlinks
file:
src: /etc/nginx/sites-available/{{item}}
dest: /etc/nginx/sites-enabled/{{item}}
state: link
with_items:
- misp
register: nginx_init
- name: Create self-signed SSL certificate for Nginx
command: openssl req -new -nodes -x509 -subj "/C=XX/ST=AAAAAAA/L=BBBBBB/O=Organization/CN={{servername}}" -days 3650 -newkey rsa:4096 -keyout /etc/nginx/ssl/misp.key -out /etc/nginx/ssl/misp.crt
when: nginx_init.changed
- name: Restart Nginx
service:
name: mysql
state: restarted
when: nginx_init.changed

View File

@ -0,0 +1,27 @@
# MISP WEB SERVER CONFIGURATION
server {
server_name {{servername}};
listen 443 ssl spdy;
root /opt/misp-server/misp/app/webroot;
index index.php;
# Configure Crypto Keys/Certificates/DH
ssl_certificate /etc/nginx/ssl/misp.crt;
ssl_certificate_key /etc/nginx/ssl/misp.key;
# enable HSTS
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains";
add_header X-Frame-Options SAMEORIGIN;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}

View File

@ -0,0 +1,2 @@
---
# Variables associated with this role

2
INSTALL/ansible/ssh.cfg Normal file
View File

@ -0,0 +1,2 @@

View File

@ -10,6 +10,7 @@
</Directory>
<IfModule !mod_php5.c>
SetEnvIfNoCase Authorization "(.*)" HTTP_AUTHORIZATION=$1
DirectoryIndex /index.php index.php
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/MISP/app/webroot/$1
</IfModule>

View File

@ -10,6 +10,7 @@
</Directory>
<IfModule !mod_php5.c>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
DirectoryIndex /index.php index.php
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"

View File

@ -1,4 +1,4 @@
<VirtualHost 192.168.1.1:443>
<VirtualHost *:443>
ServerAdmin me@me.local
ServerName misp.local
DocumentRoot /var/www/MISP/app/webroot

View File

@ -1,16 +0,0 @@
ACL Technical Design (TD)
To use Access Control in CakePHP we use its own AclComponent.
http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html
http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/part-two.html
CakePHP example, just telling how to populate and connect the CakePHP AclController.
http://stackoverflow.com/questions/6154285/aros-table-in-cakephp-is-still-including-users-even-after-bindnode
If ACL on Role level add this small correction, to just only add Roles to CakePHP ACL tables and not to add the Users.
http://bakery.cakephp.org/articles/theshz/2006/11/28/user-permissions-and-cakephp-acl
Calling the ACL from within a controller.

2
INSTALL/build/technical_design/TD-Audit.txt Executable file → Normal file
View File

@ -6,7 +6,7 @@ to write to a log database table.
https://github.com/eskil-saatvedt/CakePHP-Assets/blob/master/models/behaviors/LogableBehavior.php
Adds the logable Model Behavior.
http://bakery.cakephp.org/articles/rikdc/2010/06/07/syslog-component
Adds the syslog capability.

View File

@ -1,12 +0,0 @@
Forum Technical Design (TD)
We use a plugin giving Forum use in CakePHP.
http://milesj.me/code/cakephp/forum
Alternative PhpBB in conjunction with CakePHP Users and Roles tables.
http://bakery.cakephp.org/articles/wilsonsheldon/2009/01/13/phpbb3-api-bridge
http://www.phpbb.com/community/viewtopic.php?f=71&t=993475
CakePHP and a PhpBB3 forum.

Binary file not shown.

View File

@ -20,4 +20,3 @@ request.add_header('Authorization', API_KEY)
data = urllib2.urlopen(request).read()
f.write(data)
f.close()

BIN
INSTALL/logos/hackathon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -0,0 +1,287 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 212.6 212.6" style="enable-background:new 0 0 212.6 212.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#456D81;stroke-width:0.8329;stroke-linecap:square;stroke-miterlimit:10;}
.st1{fill:#DF2E39;}
.st2{display:none;fill:none;stroke:#456D81;stroke-width:0.8301;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:0.1876,1.8762;}
.st3{fill:#FFFFFF;}
.st4{fill:#456D81;}
.st5{opacity:0.3;fill:none;stroke:#456D81;stroke-width:0.535;stroke-miterlimit:10;}
</style>
<path class="st0" d="M19.2,99.7c3-45.5,40.9-81.5,87.1-81.5c46.2,0,84.1,36,87.1,81.4"/>
<g>
<path class="st1" d="M193.1,109.5c-2.1,46.1-40.2,82.9-86.8,82.9c-46.6,0-84.7-36.8-86.8-82.9H-19c2.1,67.3,57.5,121.4,125.3,121.4
c67.8,0,123.2-54.1,125.3-121.4H193.1z"/>
</g>
<circle class="st2" cx="106.3" cy="106.8" r="87"/>
<g>
<path class="st3" d="M38.9,168.2l1.8,1.7l-2.6,4.1l4.2-2.6l1.8,1.7l-2.3,4.3l3.9-2.8l1.8,1.7l-7.2,4.9l-1.9-1.8l2.6-4.9l-4.7,2.9
l-1.9-1.8L38.9,168.2z"/>
<path class="st3" d="M48.4,176.9l5.6,4.2l-1.1,1.4l-3.5-2.6l-0.8,1.1l3.3,2.4l-1,1.4l-3.3-2.4l-1,1.3l3.6,2.7L49,188l-5.7-4.3
L48.4,176.9z"/>
<path class="st3" d="M59.2,184.5l3.4,1.9c0.7,0.4,1.2,0.8,1.5,1.2c0.3,0.4,0.5,0.9,0.6,1.3s0.1,1-0.1,1.5c-0.1,0.5-0.3,1-0.6,1.5
c-0.4,0.8-0.9,1.4-1.3,1.7c-0.4,0.3-0.9,0.6-1.4,0.7c-0.5,0.1-0.9,0.1-1.4,0c-0.6-0.1-1.1-0.3-1.5-0.5l-3.4-1.9L59.2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.6-0.9,0.7-1.9c0.1-0.8,0-1.4-0.2-1.8c-0.3-0.4-0.7-0.7-1.2-0.7c-0.5-0.1-1,0.1-1.3,0.4C91.2,198.9,91,199.5,90.9,200.3z
"/>
<path class="st3" d="M98.7,201.3c0-1.4,0.5-2.5,1.2-3.2c0.8-0.8,1.9-1.1,3.2-1.1c1.4,0,2.5,0.4,3.2,1.2c0.7,0.8,1.1,1.9,1.1,3.2
c0,1-0.2,1.8-0.6,2.4c-0.4,0.6-0.8,1.1-1.5,1.4c-0.6,0.3-1.4,0.5-2.4,0.5c-1,0-1.7-0.2-2.4-0.5c-0.6-0.3-1.1-0.8-1.5-1.5
C98.8,203.2,98.7,202.3,98.7,201.3z M101.3,201.4c0,0.9,0.1,1.5,0.4,1.9c0.3,0.4,0.7,0.6,1.3,0.6c0.6,0,1-0.2,1.3-0.5
c0.3-0.4,0.5-1,0.5-2c0-0.8-0.1-1.4-0.4-1.8c-0.3-0.4-0.7-0.6-1.3-0.6c-0.5,0-1,0.2-1.3,0.5C101.5,199.9,101.3,200.5,101.3,201.4z"
/>
<path class="st3" d="M113.5,201.4l3.4-0.3l0.2,1.8l-3.4,0.3L113.5,201.4z"/>
<path class="st3" d="M125.7,195l2.6-0.6l1,4.5c0.2,0.9,0.3,1.7,0.2,2.2s-0.3,1-0.7,1.5c-0.4,0.5-1,0.8-1.8,0.9
c-0.8,0.2-1.5,0.2-2,0.1c-0.5-0.1-0.9-0.4-1.3-0.8c-0.3-0.4-0.6-0.9-0.8-1.5l2.4-0.9c0.1,0.4,0.2,0.6,0.3,0.8
c0.1,0.2,0.2,0.3,0.4,0.4c0.1,0,0.3,0.1,0.4,0c0.3-0.1,0.5-0.2,0.6-0.5c0.1-0.2,0.1-0.6,0-1.1L125.7,195z"/>
<path class="st3" d="M131.2,198.1c-0.4-1.3-0.4-2.5,0.1-3.4s1.4-1.7,2.7-2.1c1.3-0.4,2.5-0.4,3.4,0.1c1,0.5,1.7,1.4,2.1,2.7
c0.3,0.9,0.4,1.8,0.3,2.5s-0.4,1.3-0.9,1.9c-0.5,0.5-1.2,0.9-2.1,1.2c-0.9,0.3-1.7,0.4-2.4,0.3c-0.7-0.1-1.3-0.4-1.9-0.9
C132,199.8,131.5,199,131.2,198.1z M133.7,197.3c0.3,0.8,0.6,1.3,1,1.6c0.4,0.3,0.9,0.3,1.4,0.1c0.5-0.2,0.9-0.5,1.1-0.9
c0.2-0.4,0.1-1.1-0.2-2c-0.2-0.8-0.6-1.3-1-1.5c-0.4-0.2-0.9-0.3-1.4-0.1c-0.5,0.2-0.8,0.5-1,0.9
C133.4,195.8,133.5,196.5,133.7,197.3z"/>
<path class="st3" d="M139.9,190.6l2.4-1l3.3,7.8l-2.4,1L139.9,190.6z"/>
<path class="st3" d="M144.4,188.7l2.2-1.1l5,2.7l-2.2-4.2l2.2-1.1l3.9,7.5l-2.2,1.1l-5-2.7l2.2,4.1l-2.2,1.1L144.4,188.7z"/>
<path class="st3" d="M161.3,178.3l2.1-1.6l3,4c0.3,0.4,0.5,0.8,0.7,1.3s0.2,0.9,0.1,1.4c-0.1,0.5-0.2,0.9-0.4,1.2
c-0.3,0.5-0.7,0.9-1.3,1.3c-0.3,0.2-0.7,0.5-1.1,0.7c-0.4,0.2-0.8,0.4-1.2,0.5c-0.4,0.1-0.8,0-1.2,0c-0.4-0.1-0.8-0.2-1-0.5
c-0.5-0.3-0.8-0.7-1.1-1l-3-4l2.1-1.6l3.1,4.1c0.3,0.4,0.6,0.6,1,0.6c0.4,0.1,0.7-0.1,1.1-0.3c0.4-0.3,0.6-0.6,0.6-0.9
c0.1-0.4-0.1-0.7-0.3-1.1L161.3,178.3z"/>
<path class="st3" d="M168.4,179.9l1.7-1.8c0.3,0.3,0.6,0.4,0.9,0.5c0.4,0.1,0.8-0.1,1.2-0.4c0.3-0.3,0.4-0.5,0.5-0.8
c0-0.3,0-0.5-0.2-0.7c-0.1-0.2-0.4-0.2-0.6-0.2c-0.3,0-0.7,0.2-1.3,0.5c-1,0.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.4-0.1-0.9-0.4-1.3-0.7c-0.4-0.3-0.7-0.7-1-1.1
c-0.2-0.4-0.4-0.8-0.4-1.2c0-0.4,0-0.9,0.1-1.3c0.1-0.4,0.4-0.9,0.7-1.3c0.1-0.1,0.2-0.3,0.4-0.4c0.1-0.1,0.3-0.3,0.5-0.4
c0.2-0.1,0.4-0.2,0.6-0.3c0.2-0.1,0.4-0.1,0.7-0.1L31.3,44.4z"/>
<path class="st4" d="M33.8,38.9l1.8-1.8c0.2-0.2,0.5-0.4,0.7-0.6c0.3-0.2,0.5-0.3,0.8-0.3c0.3-0.1,0.5,0,0.8,0
c0.3,0.1,0.5,0.3,0.8,0.5c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.4,0,0.8-0.3,1.2l3.1,0.7l-1.2,1.2l-2.8-0.8l-0.5,0.5l1.9,1.8l-1,1
L33.8,38.9z M36.7,39.8l0.6-0.6c0.1-0.1,0.2-0.2,0.3-0.3c0.1-0.1,0.2-0.2,0.2-0.3c0-0.1,0.1-0.2,0-0.4c0-0.1-0.1-0.2-0.2-0.4
c-0.1-0.1-0.2-0.2-0.4-0.2c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.2,0.2-0.3,0.3l-0.7,0.7L36.7,39.8z"/>
<path class="st4" d="M40.6,32.2l1.1-1l4.3,4.9l-1.1,0.9L40.6,32.2z"/>
<path class="st4" d="M45.5,28l1.8-1.3l3.7,2.6l0,0L49.7,25l1.8-1.3l3.8,5.3l-1.2,0.8l-2.9-4.1l0,0l1.5,5.1l-0.9,0.6l-4.3-3.1l0,0
l2.9,4.1l-1.2,0.8L45.5,28z"/>
<path class="st4" d="M55.7,21.1l1.2-0.7l3.3,5.6L59,26.7L55.7,21.1z"/>
<path class="st4" d="M61.3,18l1.8-0.8l4.4,2.9l0,0l-1.9-4.1l1.3-0.6l2.8,5.9L68,22l-4.6-3l0,0l2,4.2l-1.3,0.6L61.3,18z"/>
<path class="st4" d="M73.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l1.2,0.3l1.3,7l-1.6-0.4l-0.2-1.5l-2.5-0.6l-0.8,1.2l-1.5-0.3L127,9.5z M127.1,11.5l-1.2,1.8l1.6,0.4
L127.1,11.5z"/>
<path class="st4" d="M135.1,11.6l2.4,0.8c0.3,0.1,0.6,0.2,0.9,0.4c0.3,0.2,0.5,0.3,0.6,0.6s0.3,0.5,0.3,0.7c0,0.3,0,0.6-0.1,1
c-0.1,0.4-0.4,0.8-0.7,1c-0.3,0.2-0.7,0.3-1.2,0.2l0.7,3.1l-1.6-0.5l-0.5-2.9l-0.7-0.2l-0.8,2.5l-1.4-0.5L135.1,11.6z M135.6,14.6
l0.8,0.3c0.1,0,0.3,0.1,0.4,0.1c0.1,0,0.3,0.1,0.4,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.2-0.4c0.1-0.2,0.1-0.3,0-0.4
c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.2-0.3-0.2c-0.1-0.1-0.2-0.1-0.4-0.2l-0.9-0.3L135.6,14.6z"/>
<path class="st4" d="M144.2,14.9l4,1.8l-0.5,1.2l-2.7-1.2l-0.5,1.1l2.6,1.2l-0.5,1.2l-2.6-1.2l-0.5,1.2l2.9,1.3l-0.5,1.2l-4.2-1.9
L144.2,14.9z"/>
<path class="st4" d="M158.5,23.9l-1.6-1l0.7-1.1l4.3,2.8l-0.7,1.1l-1.6-1l-2.9,4.4l-1.2-0.8L158.5,23.9z"/>
<path class="st4" d="M165.5,27.3l1.1,0.9l-1.5,1.9l2.2,1.8l1.5-1.9l1.1,0.9l-4.1,5.1l-1.1-0.9l1.8-2.2l-2.2-1.7l-1.8,2.2l-1.1-0.9
L165.5,27.3z"/>
<path class="st4" d="M173.7,34.3l3.1,3.1l-0.9,0.9l-2.1-2.1l-0.9,0.9l2,2L174,40l-2-2l-0.9,0.9l2.2,2.2l-0.9,0.9l-3.3-3.2
L173.7,34.3z"/>
<path class="st4" d="M180.2,41l0.9,1.1l-5,4.3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
c1.4,0,2.1,0.7,2.5,1.3h0l0.1-1.1H164.1z M162.6,153.5c0-0.2,0-0.4-0.1-0.6c-0.3-0.8-1-1.4-2-1.4c-1.4,0-2.4,1.1-2.4,2.7
c0,1.4,0.8,2.6,2.3,2.6c0.9,0,1.7-0.5,2-1.3c0.1-0.2,0.1-0.5,0.1-0.7V153.5z"/>
</g>
<g>
<g>
<path class="st4" d="M108.8,46.6l14.4,8.3l-14.4,8.3V46.6 M115,75.2c-2.1,0.2-4.2,0-6.2-0.5V64.5L115,75.2z M130.6,43.4
c0.2,0.3,0.5,0.7,0.7,1.1c0.9,1.5,1.5,3,2,4.6l-8.9,5.1L130.6,43.4z M94.8,45.9c0.9-1.9,2.1-3.7,3.6-5.3l9.2,5.3H94.8z"/>
<g>
<path class="st1" d="M119,80.4C134,77.2,143,61.7,138.4,47l-29,16.8L119,80.4"/>
</g>
<path class="st1" d="M126.6,32.3c-10.8-6.2-24.2-3.9-32.3,4.9L123.4,54l9.6-16.6C131.2,35.5,129,33.7,126.6,32.3"/>
<g>
<path class="st1" d="M100.5,77.5c2.4,1.4,4.9,2.3,7.4,2.9V46.8H88.7C84.9,58.3,89.6,71.2,100.5,77.5"/>
</g>
</g>
<rect x="118.1" y="48.7" transform="matrix(0.8656 -0.5007 0.5007 0.8656 -17.2344 80.8338)" class="st1" width="47.7" height="47.7"/>
<circle class="st3" cx="142" cy="72.5" r="20.7"/>
<g>
<path class="st4" d="M155,66.3h-0.8v9.1c0,1.4-0.8,2.7-2.5,2.7h-16.3v0.4c0,1.3,1.4,2.5,2.9,2.5h12.5l4.8,2.8l-0.7-2.8h0.2
c1.5,0,2.1-1.3,2.1-2.5V68.4C157.2,67.2,156.5,66.3,155,66.3z"/>
<path class="st4" d="M149.3,59.9h-18.9c-1.7,0-3.6,1.5-3.6,2.9v11.5c0,1.3,1.6,2.3,3.2,2.4l-1,3.8l6.5-3.8h13.8
c1.7,0,3.2-1,3.2-2.4V65v-2.2C152.5,61.4,150.9,59.9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l-1.3-4.4H80.4z"/>
<path class="st4" d="M86.6,174.5c0-0.5,0.3-0.8,0.8-0.8c0.5,0,0.8,0.3,0.8,0.8c0,0.5-0.3,0.8-0.8,0.8C87,175.3,86.6,175,86.6,174.5
z"/>
<path class="st4" d="M93.3,175.1c-0.2,0.1-0.7,0.2-1.2,0.2c-1.4,0-2.3-0.9-2.3-2.2c0-1.3,0.9-2.3,2.5-2.3c0.4,0,0.8,0.1,1,0.2
l-0.2,1c-0.2-0.1-0.4-0.1-0.8-0.1c-0.7,0-1.2,0.5-1.2,1.2c0,0.8,0.5,1.2,1.2,1.2c0.3,0,0.6-0.1,0.8-0.1L93.3,175.1z"/>
<path class="st4" d="M96.3,169.6c0,0.4-0.3,0.7-0.7,0.7c-0.4,0-0.7-0.3-0.7-0.7c0-0.4,0.3-0.7,0.7-0.7S96.3,169.2,96.3,169.6z
M94.9,175.2v-4.4h1.4v4.4H94.9z"/>
<path class="st4" d="M98.3,172.3c0-0.6,0-1.1,0-1.4h1.2l0,0.8h0c0.2-0.6,0.8-0.9,1.2-0.9c0.1,0,0.2,0,0.3,0v1.3c-0.1,0-0.2,0-0.4,0
c-0.5,0-0.8,0.3-0.9,0.7c0,0.1,0,0.2,0,0.3v2.2h-1.4V172.3z"/>
<path class="st4" d="M105.8,175.1c-0.2,0.1-0.7,0.2-1.2,0.2c-1.4,0-2.3-0.9-2.3-2.2c0-1.3,0.9-2.3,2.5-2.3c0.4,0,0.8,0.1,1,0.2
l-0.2,1c-0.2-0.1-0.4-0.1-0.8-0.1c-0.7,0-1.2,0.5-1.2,1.2c0,0.8,0.5,1.2,1.2,1.2c0.3,0,0.6-0.1,0.8-0.1L105.8,175.1z"/>
<path class="st4" d="M107.5,168.8h1.4v6.4h-1.4V168.8z"/>
<path class="st4" d="M110.6,174.5c0-0.5,0.3-0.8,0.8-0.8c0.5,0,0.8,0.3,0.8,0.8c0,0.5-0.3,0.8-0.8,0.8
C111,175.3,110.6,175,110.6,174.5z"/>
<path class="st4" d="M114,168.8h1.4v6.4H114V168.8z"/>
<path class="st4" d="M121.5,173.8c0,0.6,0,1,0,1.4h-1.2l-0.1-0.6h0c-0.2,0.3-0.6,0.7-1.4,0.7c-0.9,0-1.5-0.6-1.5-1.9v-2.6h1.4v2.4
c0,0.6,0.2,1,0.7,1c0.4,0,0.6-0.3,0.7-0.5c0-0.1,0-0.2,0-0.3v-2.6h1.4V173.8z"/>
<path class="st4" d="M123.1,175.6l1.9-6.5h0.9l-1.9,6.5H123.1z"/>
<path class="st4" d="M127.3,172.2c0-0.5,0-1,0-1.4h1.2l0.1,0.6h0c0.2-0.3,0.6-0.7,1.3-0.7c0.6,0,1,0.3,1.2,0.7h0
c0.2-0.2,0.4-0.4,0.6-0.5c0.2-0.1,0.5-0.2,0.8-0.2c0.8,0,1.5,0.6,1.5,1.9v2.6h-1.3v-2.4c0-0.6-0.2-1-0.6-1c-0.3,0-0.5,0.2-0.6,0.5
c0,0.1-0.1,0.2-0.1,0.4v2.6H130v-2.5c0-0.6-0.2-0.9-0.6-0.9c-0.4,0-0.6,0.3-0.6,0.5c0,0.1-0.1,0.2-0.1,0.3v2.6h-1.3V172.2z"/>
<path class="st4" d="M137.4,169.6c0,0.4-0.3,0.7-0.7,0.7c-0.4,0-0.7-0.3-0.7-0.7c0-0.4,0.3-0.7,0.7-0.7S137.4,169.2,137.4,169.6z
M136,175.2v-4.4h1.4v4.4H136z"/>
<path class="st4" d="M139.3,174c0.3,0.2,0.8,0.3,1.2,0.3c0.4,0,0.6-0.1,0.6-0.4c0-0.2-0.1-0.3-0.6-0.5c-0.9-0.3-1.3-0.8-1.2-1.3
c0-0.8,0.7-1.4,1.8-1.4c0.5,0,1,0.1,1.2,0.3l-0.2,0.9c-0.2-0.1-0.6-0.3-1-0.3c-0.3,0-0.5,0.1-0.5,0.4c0,0.2,0.2,0.3,0.7,0.5
c0.8,0.3,1.2,0.7,1.2,1.4c0,0.8-0.6,1.4-1.9,1.4c-0.6,0-1.1-0.1-1.4-0.3L139.3,174z"/>
<path class="st4" d="M144.1,172.3c0-0.6,0-1.1,0-1.5h1.2l0.1,0.6h0c0.3-0.5,0.8-0.7,1.5-0.7c1,0,1.8,0.8,1.8,2.2c0,1.6-1,2.4-2,2.4
c-0.5,0-0.9-0.2-1.1-0.5h0v2.2h-1.4V172.3z M145.5,173.3c0,0.1,0,0.2,0,0.3c0.1,0.4,0.4,0.6,0.8,0.6c0.6,0,0.9-0.5,0.9-1.2
c0-0.7-0.3-1.2-0.9-1.2c-0.4,0-0.7,0.3-0.8,0.7c0,0.1,0,0.2,0,0.2V173.3z"/>
</g>
<line class="st5" x1="77.6" y1="164.1" x2="134.5" y2="164.1"/>
</svg>

After

Width:  |  Height:  |  Size: 25 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 342 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 212.6 212.6" style="enable-background:new 0 0 212.6 212.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{display:none;fill:none;stroke:#456D81;stroke-width:0.8301;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:0.1876,1.8762;}
.st2{clip-path:url(#SVGID_2_);}
.st3{fill:#33A1DB;}
.st4{fill:#616263;}
</style>
<g id="Layer_1">
<path class="st0" d="M106.3,212.7C47.6,212.7,0,165.1,0,106.4S47.6,0.1,106.3,0.1c58.7,0,106.3,47.6,106.3,106.3
S165.1,212.7,106.3,212.7z"/>
<circle class="st1" cx="106.3" cy="106.8" r="87"/>
<g>
<defs>
<path id="SVGID_1_" d="M106.3,212.7C47.6,212.7,0,165.1,0,106.4S47.6,0.1,106.3,0.1c58.7,0,106.3,47.6,106.3,106.3
S165.1,212.7,106.3,212.7z"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g class="st2">
<path class="st3" d="M106.1,9.9c53.3,0,96.6,43.3,96.6,96.6s-43.3,96.6-96.6,96.6S9.5,159.8,9.5,106.5S52.8,9.9,106.1,9.9
M106.1,4.5C49.8,4.5,4.1,50.2,4.1,106.5s45.6,101.9,101.9,101.9S208,162.8,208,106.5S162.4,4.5,106.1,4.5L106.1,4.5z"/>
</g>
<g class="st2">
<path class="st3" d="M106.1,14.3c50.8,0,92.2,41.4,92.2,92.2s-41.4,92.2-92.2,92.2s-92.2-41.4-92.2-92.2S55.2,14.3,106.1,14.3
M106.1,13.3c-51.5,0-93.2,41.7-93.2,93.2s41.7,93.2,93.2,93.2s93.2-41.7,93.2-93.2S157.5,13.3,106.1,13.3L106.1,13.3z"/>
</g>
<g class="st2">
<path class="st4" d="M63.6,180c-0.6,0-1.1-0.2-1.6-0.4c-0.5-0.2-1-0.4-1.5-0.7c-0.5-0.3-0.9-0.7-1.2-1.1
c-0.3-0.4-0.5-0.9-0.7-1.4c-0.1-0.5-0.1-1-0.1-1.5c0.1-0.5,0.3-1,0.6-1.6c0.3-0.5,0.7-0.9,1.1-1.2c0.4-0.3,0.9-0.5,1.4-0.6
c0.5-0.1,1-0.1,1.5,0s1,0.3,1.5,0.6c0.5,0.3,0.9,0.7,1.3,1.1c0.4,0.4,0.6,0.8,0.7,1.4l-1.7,0.5c-0.1-0.3-0.2-0.6-0.4-0.9
c-0.2-0.3-0.4-0.5-0.8-0.7c-0.3-0.2-0.6-0.3-0.9-0.4c-0.3-0.1-0.6,0-0.9,0c-0.3,0.1-0.6,0.2-0.8,0.4c-0.3,0.2-0.5,0.4-0.7,0.7
c-0.2,0.3-0.3,0.6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.5,0.7c0.2,0.2,0.5,0.4,0.8,0.4
c0.3,0.1,0.6,0.1,1,0.1c0.4,0,0.7-0.1,1-0.3c0.3-0.1,0.5-0.3,0.7-0.6c0.2-0.2,0.3-0.5,0.4-0.8c0.1-0.3,0.1-0.6,0.1-1
c0-0.3-0.1-0.7-0.2-1c-0.1-0.3-0.3-0.5-0.5-0.7c-0.2-0.2-0.5-0.4-0.8-0.5c-0.3-0.1-0.6-0.1-1-0.1c-0.4,0-0.7,0.1-1,0.3
s-0.5,0.3-0.7,0.6s-0.3,0.5-0.4,0.8C109.6,187.2,109.5,187.6,109.6,187.9z"/>
<path class="st4" d="M116.5,183.5l2.5-0.5l2.6,4.5l0,0l0.8-5.2l2.5-0.5l1.4,7.4l-1.6,0.3l-1.1-5.7l0,0l-0.9,6.1l-1.3,0.2l-3-5.3
l0,0l1.1,5.7l-1.6,0.3L116.5,183.5z"/>
<path class="st4" d="M128.3,180.3l1.3,0l-0.8,8.9l-1.3,0L128.3,180.3z"/>
<path class="st4" d="M130.1,180.4l2.4-0.9l3.4,4l0,0l-0.1-5.2l2.3-0.9l2.7,7.1l-1.6,0.6l-2.1-5.4l0,0l0.2,6.1l-1.2,0.5l-3.9-4.7
l0,0l2.1,5.4l-1.6,0.6L130.1,180.4z"/>
<path class="st4" d="M139.2,176.7l1.5-0.7l3.3,6.8l-1.5,0.7L139.2,176.7z"/>
<path class="st4" d="M146.1,175.2c-0.2-0.1-0.4-0.1-0.7-0.1c-0.2,0-0.5,0.1-0.6,0.2c-0.1,0.1-0.2,0.1-0.3,0.2
c-0.1,0.1-0.2,0.2-0.3,0.3s-0.1,0.2-0.1,0.3s0,0.2,0.1,0.4c0.1,0.2,0.3,0.3,0.5,0.3c0.2,0,0.4,0,0.7,0c0.3-0.1,0.6-0.1,0.9-0.2
c0.3-0.1,0.6-0.1,0.9-0.1c0.3,0,0.6,0.1,0.9,0.2c0.3,0.1,0.5,0.4,0.7,0.8c0.2,0.4,0.3,0.7,0.3,1.1c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<g>
<polygon class="st4" points="27.1,93.5 38.6,93.5 45.6,105.1 52.7,93.5 64.2,93.5 64.2,126.4 53.2,126.4 53.2,110.1
45.6,121.8 45.4,121.8 37.9,110.1 37.9,126.4 27.1,126.4 "/>
</g>
</g>
<g>
<g>
<rect x="69.6" y="93.5" class="st4" width="11" height="32.9"/>
</g>
</g>
<g>
<g>
<g>
<g>
<path class="st4" d="M83.4,120.9l5.9-7c3.6,2.7,7.7,3.9,11.5,3.9c2,0,2.8-0.5,2.8-1.4v-0.1c0-0.9-1-1.5-4.6-2.2
c-7.4-1.5-13.9-3.6-13.9-10.6v-0.1c0-6.3,4.9-11.1,14-11.1c6.3,0,11.1,1.5,14.9,4.5l-5.4,7.4c-3.1-2.3-6.8-3.2-9.9-3.2
c-1.6,0-2.4,0.6-2.4,1.4v0.1c0,0.9,0.9,1.5,4.4,2.1c8.4,1.6,14.1,4,14.1,10.6v0.1c0,6.9-5.7,11.1-14.5,11.1
C93.6,126.4,87.6,124.5,83.4,120.9"/>
</g>
</g>
<g>
<g>
<path class="st4" d="M132.2,109c2.8,0,4.7-1.3,4.7-3.6v-0.1c0-2.4-1.7-3.6-4.7-3.6h-3v7.3H132.2z M118.2,92.9H133
c8.7,0,14.7,3.9,14.7,11.7v0.1c0,7.9-6.1,12.2-15,12.2h-3.6v8.9h-11V92.9z"/>
</g>
</g>
</g>
</g>
<g>
<g>
<path class="st4" d="M34.8,132.7H31V130h10.7v2.6h-3.8v11.2h-3.1V132.7z"/>
</g>
<g>
<path class="st4" d="M44.7,129.3h3.1v5.7h0c0.3-0.4,0.7-0.8,1.2-1c0.5-0.2,1-0.4,1.6-0.4c2,0,3.5,1.4,3.5,4.4v5.9h-3.1v-5.5
c0-1.3-0.5-2.2-1.6-2.2c-0.8,0-1.3,0.5-1.6,1.1c-0.1,0.2-0.1,0.5-0.1,0.7v6h-3.1V129.3z"/>
</g>
<g>
<path class="st4" d="M58.2,137.1c0-1.5,0-2.4-0.1-3.3h2.7l0.1,1.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129.4,157.3,130.1,157.3,131z M154,143.9v-10.1h3.1v10.1H154z"/>
</g>
<g>
<path class="st4" d="M161.1,137c0-1.3,0-2.3-0.1-3.2h2.7l0.1,1.4h0.1c0.4-0.6,1.4-1.6,3.1-1.6c2.1,0,3.6,1.4,3.6,4.3v6h-3.1
v-5.6c0-1.3-0.5-2.2-1.6-2.2c-0.9,0-1.4,0.6-1.6,1.2c-0.1,0.2-0.1,0.5-0.1,0.8v5.8h-3.1V137z"/>
</g>
<g>
<path class="st4" d="M184.2,133.8c0,0.6-0.1,1.5-0.1,3v5.6c0,1.9-0.4,3.5-1.5,4.5c-1.1,0.9-2.6,1.2-4.1,1.2
c-1.3,0-2.7-0.3-3.6-0.8l0.6-2.4c0.6,0.4,1.7,0.8,2.9,0.8c1.5,0,2.6-0.8,2.6-2.7v-0.7h0c-0.6,0.8-1.6,1.3-2.7,1.3
c-2.5,0-4.3-2-4.3-4.9c0-3.2,2.1-5.3,4.6-5.3c1.4,0,2.2,0.6,2.8,1.4h0l0.1-1.2H184.2z M181,137.9c0-0.2,0-0.4-0.1-0.6
c-0.2-0.8-0.8-1.4-1.7-1.4c-1.1,0-2.1,1-2.1,2.9c0,1.5,0.7,2.7,2.1,2.7c0.8,0,1.4-0.5,1.6-1.3c0.1-0.2,0.1-0.6,0.1-0.8V137.9z"
/>
</g>
</g>
<g>
<g>
<g>
<g>
<path class="st3" d="M160.5,48.6h-2.1v23.3c0,3.6-2.1,6.9-6.4,6.9h-41.6v1.1c0,3.2,3.7,6.5,7.4,6.5h31.8l12.2,7.1l-1.8-7.1
h0.5c3.8,0,5.4-3.2,5.4-6.5V54.1C165.9,50.9,164.2,48.6,160.5,48.6"/>
</g>
</g>
<g>
<g>
<path class="st3" d="M137.4,57c-2.4,0-4.4-2-4.4-4.4c0-2.4,2-4.4,4.4-4.4c2.4,0,4.4,2,4.4,4.4C141.8,55.1,139.8,57,137.4,57
M121.2,57c-2.4,0-4.4-2-4.4-4.4c0-2.4,2-4.4,4.4-4.4c2.4,0,4.4,2,4.4,4.4C125.5,55.1,123.6,57,121.2,57 M104.9,57
c-2.4,0-4.4-2-4.4-4.4c0-2.4,2-4.4,4.4-4.4c2.4,0,4.4,2,4.4,4.4C109.2,55.1,107.3,57,104.9,57 M145.8,32.3H97.5
c-4.3,0-9.1,3.8-9.1,7.4V69c0,3.3,4.1,5.8,8.1,6.1L93.9,85l16.6-9.7h35.3c4.2,0,8.2-2.6,8.2-6.2V39.8
C153.9,36.1,150,32.3,145.8,32.3"/>
</g>
</g>
</g>
</g>
</g>
<g class="st2">
<path class="st3" d="M52.8,173.5l-3.1-2.2c-0.6-0.4-0.7-1.2-0.3-1.8l2.2-3.1c0.4-0.6,1.2-0.7,1.8-0.3l3.1,2.2
c0.6,0.4,0.7,1.2,0.3,1.8l-2.2,3.1C54.2,173.8,53.4,173.9,52.8,173.5z"/>
</g>
<g class="st2">
<path class="st3" d="M160.5,165.3l2.5,3c0.5,0.5,0.4,1.4-0.2,1.8l-3,2.5c-0.5,0.5-1.4,0.4-1.8-0.2l-2.5-3
c-0.5-0.5-0.4-1.4,0.2-1.8l3-2.5C159.3,164.7,160.1,164.7,160.5,165.3z"/>
</g>
</g>
</g>
<g id="Layer_2">
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -0,0 +1,385 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 212.6 212.6" style="enable-background:new 0 0 212.6 212.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{display:none;fill:none;stroke:#456D81;stroke-width:0.8301;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:0.1876,1.8762;}
.st2{clip-path:url(#SVGID_2_);}
.st3{fill:#456D81;}
.st4{fill:#DF2E39;}
</style>
<path class="st0" d="M106.3,212.7C47.6,212.7,0,165.1,0,106.4S47.6,0.1,106.3,0.1c58.7,0,106.3,47.6,106.3,106.3
S165,212.7,106.3,212.7z"/>
<circle class="st1" cx="106.3" cy="106.8" r="87"/>
<g>
<defs>
<path id="SVGID_1_" d="M106.3,212.7C47.6,212.7,0,165.1,0,106.4S47.6,0.1,106.3,0.1c58.7,0,106.3,47.6,106.3,106.3
S165,212.7,106.3,212.7z"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<g class="st2">
<path class="st3" d="M106.3,217.3c-61.2,0-111-49.8-111-111s49.8-111,111-111s111,49.8,111,111S167.5,217.3,106.3,217.3z M106.3,5
C50.4,5,5,50.4,5,106.3c0,55.9,45.5,101.3,101.3,101.3c55.9,0,101.3-45.5,101.3-101.3C207.7,50.4,162.2,5,106.3,5z"/>
</g>
<g class="st2">
<path class="st3" d="M13.8,101.1l-0.9-0.1l0.1-1.1l0.9,0.1L13.8,101.1z M198.7,99.4l-0.1-1.1l0.9-0.1l0.1,1.1L198.7,99.4z
M14,98.9l-0.9-0.1l0.1-1.1l0.9,0.1L14,98.9z M198.5,97.3l-0.1-1.1l0.9-0.1l0.1,1.1L198.5,97.3z M14.2,96.6l-0.9,0l0.1-1.1
l0.9,0.1L14.2,96.6z M198.2,95.1l-0.1-1.1l0.9-0.1l0.1,1.1L198.2,95.1z M14.5,94.5l-0.9-0.1l0.1-1.1l0.9,0.1L14.5,94.5z
M197.9,92.9l-0.2-1.1l0.9-0.1l0.2,1.1L197.9,92.9z M14.8,92.3l-0.9-0.1l0.2-1.1l0.9,0.1L14.8,92.3z M197.6,90.7l-0.2-1.1l0.9-0.2
l0.2,1.1L197.6,90.7z M15.2,90.2L14.3,90l0.2-1.1l0.9,0.2L15.2,90.2z M197.2,88.6l-0.2-1.1l0.9-0.2l0.2,1.1L197.2,88.6z M15.6,88
l-0.9-0.2l0.2-1.1l0.9,0.2L15.6,88z M196.7,86.4l-0.2-1l0.9-0.2l0.2,1.1L196.7,86.4z M16,85.9l-0.9-0.2l0.2-1.1l0.9,0.2L16,85.9z
M196.2,84.3l-0.3-1.1l0.9-0.2l0.3,1.1L196.2,84.3z M16.6,83.7l-0.9-0.2l0.3-1.1l0.9,0.2L16.6,83.7z M195.6,82.2l-0.3-1l0.9-0.2
l0.3,1.1L195.6,82.2z M17.1,81.6l-0.9-0.2l0.3-1l0.9,0.2L17.1,81.6z M195,80l-0.3-1l0.8-0.3l0.3,1L195,80z M17.8,79.5l-0.8-0.3
l0.3-1l0.8,0.3L17.8,79.5z M194.4,77.9l-0.3-1l0.8-0.3l0.3,1L194.4,77.9z M18.4,77.4l-0.8-0.3l0.4-1l0.8,0.3L18.4,77.4z
M193.7,75.9l-0.4-1l0.8-0.3l0.4,1L193.7,75.9z M19.2,75.2L18.3,75l0.3-0.9l0.9,0.2L19.2,75.2z M192.9,73.8l-0.4-1l0.8-0.3l0.4,1
L192.9,73.8z M20,73.2l-0.9-0.2l0.4-0.9l0.9,0.2L20,73.2z M192.1,71.8l-0.4-1l0.8-0.3l0.4,1L192.1,71.8z M20.8,71.2l-0.8-0.3
l0.4-1l0.8,0.3L20.8,71.2z M191.3,69.8l-0.4-1l0.8-0.4l0.4,1L191.3,69.8z M21.6,69.2l-0.8-0.4l0.4-1l0.8,0.4L21.6,69.2z
M190.4,67.8l-0.5-1l0.8-0.4l0.5,1L190.4,67.8z M22.6,67.1l-0.8-0.3l0.4-0.9l0.8,0.3L22.6,67.1z M189.4,65.8l-0.5-1l0.8-0.4l0.5,1
L189.4,65.8z M23.6,65.1l-0.8-0.3l0.5-1l0.8,0.4L23.6,65.1z M188.4,63.8l-0.5-0.9l0.7-0.5l0.5,0.9L188.4,63.8z M24.5,63.3
l-0.8-0.4l0.5-1l0.8,0.4L24.5,63.3z M187.4,61.9l-0.5-0.9l0.8-0.4l0.5,1L187.4,61.9z M25.6,61.3l-0.8-0.4l0.5-0.9l0.8,0.4
L25.6,61.3z M186.3,60l-0.6-0.9l0.8-0.5l0.6,0.9L186.3,60z M26.7,59.3L25.9,59l0.5-0.8l0.8,0.4L26.7,59.3z M185.2,58.1l-0.6-0.9
l0.8-0.5l0.6,0.9L185.2,58.1z M27.8,57.5l-0.7-0.5l0.6-0.9l0.7,0.5L27.8,57.5z M184,56.3l-0.6-0.9l0.7-0.5l0.6,0.9L184,56.3z
M29.1,55.6l-0.8-0.4l0.5-0.8l0.8,0.4L29.1,55.6z M182.7,54.4l-0.6-0.9l0.7-0.5l0.6,0.9L182.7,54.4z M30.3,53.9l-0.7-0.5l0.6-0.9
l0.7,0.5L30.3,53.9z M181.5,52.7l-0.6-0.9l0.7-0.5l0.6,0.9L181.5,52.7z M31.6,52.1l-0.7-0.5l0.6-0.9l0.7,0.5L31.6,52.1z
M180.2,50.9l-0.7-0.9l0.7-0.5l0.7,0.9L180.2,50.9z M32.9,50.3l-0.7-0.5l0.7-0.9l0.7,0.5L32.9,50.3z M178.8,49.2l-0.6-0.8l0.6-0.6
l0.6,0.8L178.8,49.2z M34.2,48.6L33.6,48l0.7-0.8l0.7,0.6L34.2,48.6z M177.5,47.5l-0.7-0.8l0.6-0.6l0.7,0.8L177.5,47.5z
M35.6,46.9L35,46.3l0.7-0.8l0.7,0.6L35.6,46.9z M176,45.8l-0.7-0.8l0.7-0.6l0.7,0.8L176,45.8z M37.1,45.3l-0.7-0.6l0.7-0.8
l0.7,0.6L37.1,45.3z M174.5,44.2l-0.7-0.8l0.6-0.6l0.7,0.8L174.5,44.2z M38.6,43.6L37.9,43l0.7-0.8l0.6,0.6L38.6,43.6z M173,42.6
l-0.8-0.8l0.6-0.6l0.8,0.8L173,42.6z M40.1,42l-0.6-0.6l0.8-0.8l0.6,0.6L40.1,42z M171.5,41l-0.8-0.8l0.6-0.6l0.8,0.8L171.5,41z
M41.6,40.5L41,39.8l0.8-0.8l0.6,0.6L41.6,40.5z M169.9,39.5l-0.7-0.7l0.5-0.7l0.7,0.7L169.9,39.5z M43.2,39l-0.6-0.7l0.8-0.7
l0.6,0.7L43.2,39z M168.3,38l-0.8-0.7l0.6-0.7l0.8,0.7L168.3,38z M44.9,37.5l-0.6-0.7l0.8-0.7l0.6,0.7L44.9,37.5z M166.7,36.5
l-0.8-0.7l0.6-0.7l0.8,0.7L166.7,36.5z M46.5,36.1l-0.6-0.7l0.8-0.7l0.6,0.7L46.5,36.1z M165,35.1l-0.9-0.7l0.6-0.7l0.8,0.7
L165,35.1z M48.2,34.7L47.7,34l0.8-0.7l0.6,0.7L48.2,34.7z M163.3,33.7l-0.9-0.7l0.5-0.7l0.9,0.7L163.3,33.7z M49.9,33.3l-0.5-0.7
l0.9-0.7l0.5,0.7L49.9,33.3z M161.5,32.4l-0.9-0.6l0.5-0.7l0.9,0.6L161.5,32.4z M51.7,32l-0.5-0.7l0.9-0.6l0.5,0.7L51.7,32z
M159.7,31.1l-0.9-0.6l0.5-0.8l0.9,0.6L159.7,31.1z M53.5,30.7L53,30l0.9-0.6l0.5,0.7L53.5,30.7z M157.9,29.9l-0.9-0.6l0.5-0.7
l0.9,0.6L157.9,29.9z M55.4,29.4l-0.6-0.7l0.8-0.5l0.6,0.7L55.4,29.4z M156.1,28.7l-0.9-0.6l0.5-0.8l0.9,0.6L156.1,28.7z
M57.1,28.3l-0.5-0.8l0.9-0.6l0.5,0.8L57.1,28.3z M154.2,27.5l-0.9-0.6l0.5-0.8l0.9,0.6L154.2,27.5z M59,27.1l-0.4-0.8l0.9-0.6
l0.5,0.8L59,27.1z M152.3,26.4l-0.9-0.5l0.4-0.8l1,0.5L152.3,26.4z M60.9,26.1l-0.4-0.8l1-0.5l0.4,0.8L60.9,26.1z M150.4,25.3
l-1-0.5l0.4-0.8l1,0.5L150.4,25.3z M62.9,25l-0.5-0.7l0.9-0.5l0.5,0.7L62.9,25z M148.4,24.3l-1-0.5l0.4-0.8l1,0.5L148.4,24.3z
M64.8,24l-0.4-0.8l1-0.5l0.4,0.8L64.8,24z M146.5,23.3l-1-0.5l0.4-0.8l1,0.5L146.5,23.3z M66.7,23l-0.4-0.8l1-0.5l0.4,0.8
L66.7,23z M144.5,22.4l-1-0.4l0.4-0.8l1,0.4L144.5,22.4z M68.7,22.1l-0.4-0.8l1-0.4l0.4,0.8L68.7,22.1z M142.5,21.5l-1-0.4
l0.3-0.8l1,0.4L142.5,21.5z M70.7,21.3l-0.3-0.8l1-0.4l0.3,0.8L70.7,21.3z M140.4,20.7l-1-0.4l0.3-0.8l1,0.4L140.4,20.7z
M72.8,20.4l-0.3-0.8l1-0.4l0.3,0.8L72.8,20.4z M138.4,19.9l-1-0.4l0.3-0.8l1,0.4L138.4,19.9z M74.8,19.7l-0.3-0.8l1-0.4l0.3,0.8
L74.8,19.7z M136.3,19.1l-1-0.3l0.3-0.8l1,0.3L136.3,19.1z M76.9,18.9l-0.3-0.8l1-0.3l0.3,0.8L76.9,18.9z M134.2,18.4l-1-0.3
l0.3-0.9l1,0.3L134.2,18.4z M79,18.3l-0.3-0.8l1-0.3L80,18L79,18.3z M132.1,17.8l-1-0.3l0.2-0.9l1,0.3L132.1,17.8z M81.2,17.6
l-0.3-0.8l1-0.3l0.3,0.8L81.2,17.6z M130,17.2l-1.1-0.3l0.2-0.9l1.1,0.3L130,17.2z M83.2,17.1L83,16.2l1.1-0.3l0.2,0.9L83.2,17.1z
M127.8,16.7l-1.1-0.2l0.2-0.9l1.1,0.2L127.8,16.7z M85.4,16.6l-0.2-0.9l1.1-0.2l0.2,0.9L85.4,16.6z M125.7,16.2l-1.1-0.2l0.2-0.9
l1.1,0.2L125.7,16.2z M87.5,16.1l-0.2-0.9l1.1-0.2l0.2,0.9L87.5,16.1z M123.5,15.8l-1-0.2l0.1-0.9l1.1,0.2L123.5,15.8z M89.7,15.7
l-0.2-0.9l1.1-0.2l0.1,0.9L89.7,15.7z M121.4,15.4l-1.1-0.2l0.1-0.9l1.1,0.2L121.4,15.4z M91.9,15.3l-0.2-0.9l1-0.2l0.2,0.9
L91.9,15.3z M119.2,15.1l-1.1-0.1l0.1-0.9l1.1,0.1L119.2,15.1z M94,15l-0.1-0.9L95,14l0.1,0.9L94,15z M117,14.8l-1.1-0.1l0.1-0.9
l1.1,0.1L117,14.8z M96.2,14.7l-0.1-0.9l1.1-0.1l0.1,0.9L96.2,14.7z M114.8,14.6l-1-0.1l0-0.9l1.1,0.1L114.8,14.6z M98.4,14.5
l-0.1-0.9l1.1-0.1l0.1,0.9L98.4,14.5z M112.6,14.4l-1.1-0.1l0.1-0.9l1.1,0.1L112.6,14.4z M100.6,14.4l-0.1-0.9l1.1-0.1l0,0.9
L100.6,14.4z M110.4,14.3l-1.1,0l0-0.9l1.1,0L110.4,14.3z M103,14.2l-0.2-0.9l1,0l0.1,0.9L103,14.2z M108.2,14.2l-1.1,0l0-0.9
l1.1,0L108.2,14.2z M105,14.2l0-0.9l1.1,0l0,0.9L105,14.2z"/>
</g>
<g class="st2">
<path class="st3" d="M16.1,113.1c0.1-0.1,0.3-0.3,0.3-0.5s0.1-0.4,0.1-0.6c0-0.1,0-0.2-0.1-0.3c0-0.1-0.1-0.2-0.1-0.3
c-0.1-0.1-0.1-0.2-0.2-0.2c-0.1-0.1-0.2-0.1-0.3-0.1c-0.2,0-0.4,0.1-0.5,0.3c-0.1,0.2-0.2,0.4-0.2,0.6c-0.1,0.2-0.1,0.5-0.2,0.8
c-0.1,0.3-0.2,0.5-0.3,0.8c-0.1,0.2-0.3,0.4-0.5,0.6c-0.2,0.2-0.5,0.3-0.9,0.3c-0.4,0-0.7,0-1-0.2c-0.3-0.1-0.5-0.3-0.7-0.5
c-0.2-0.2-0.4-0.5-0.5-0.8c-0.1-0.3-0.2-0.6-0.2-1c0-0.4,0-0.9,0.1-1.2c0.1-0.4,0.3-0.8,0.6-1.1l1.2,1c-0.2,0.2-0.3,0.4-0.4,0.6
c-0.1,0.2-0.1,0.5-0.1,0.7c0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.1-0.4l-0.3-0.9L18,130.9z"/>
<path class="st3" d="M22.1,134.5l0.5,1.4l-6.5,2.2l-0.5-1.4L22.1,134.5z"/>
<path class="st3" d="M22.9,137.1l0.8,1.9l-3.3,4.5l0,0l4.4-1.8l0.6,1.4l-6.3,2.6l-0.7-1.8l3.4-4.6l0,0l-4.5,1.8l-0.6-1.4
L22.9,137.1z"/>
<path class="st3" d="M22.9,152.5c-0.4-0.3-0.8-0.6-1.1-1s-0.6-0.8-0.8-1.2c-0.2-0.5-0.4-0.9-0.4-1.4c-0.1-0.5,0-0.9,0.1-1.4
s0.4-0.8,0.7-1.2c0.3-0.4,0.7-0.7,1.2-0.9s1-0.4,1.4-0.4c0.5,0,0.9,0,1.4,0.2c0.4,0.2,0.8,0.4,1.2,0.7c0.4,0.3,0.6,0.7,0.9,1.2
c0.2,0.5,0.4,1,0.5,1.4c0.1,0.5,0.1,0.9-0.1,1.4l-1.5-0.4c0.1-0.3,0.1-0.6,0.1-0.8c0-0.3-0.1-0.6-0.3-0.9
c-0.1-0.3-0.3-0.5-0.5-0.7c-0.2-0.2-0.5-0.3-0.7-0.4c-0.3-0.1-0.5-0.1-0.8-0.1c-0.3,0-0.6,0.1-0.8,0.3c-0.3,0.1-0.5,0.3-0.7,0.5
c-0.2,0.2-0.3,0.4-0.4,0.7c-0.1,0.3-0.1,0.5-0.1,0.8c0,0.3,0.1,0.6,0.2,0.8c0.1,0.3,0.3,0.5,0.5,0.7c0.2,0.2,0.3,0.3,0.5,0.4
l1-0.5l-0.6-1.1l1.2-0.6l1.2,2.4L22.9,152.5z"/>
<path class="st3" d="M27.4,157.2l-1.2-2l1-0.6l1.2,2L27.4,157.2z"/>
<path class="st3" d="M33.3,159.4l-1.1-1.6l1.1-0.8l3.2,4.3l-1.1,0.8l-1.1-1.6l-4.4,3.3l-0.9-1.2L33.3,159.4z"/>
<path class="st3" d="M33.9,163.8c0.4-0.4,0.9-0.6,1.3-0.8c0.5-0.1,0.9-0.2,1.4-0.2c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,0.3,0.2,0.5,0.3
c0.2,0.1,0.3,0.3,0.5,0.4c0.1,0.2,0.3,0.3,0.4,0.5c0.1,0.2,0.2,0.4,0.2,0.6L66.1,187.9z"/>
<path class="st3" d="M69.3,188.9l-1.8-0.8l0.5-1.2l4.9,2.2l-0.5,1.2l-1.8-0.8l-2.2,5l-1.4-0.6L69.3,188.9z"/>
<path class="st3" d="M78.2,191l1.2,0.4l0.7,7.4l-1.6-0.5l-0.1-1.6l-2.5-0.8l-1,1.2l-1.6-0.5L78.2,191z M78.1,193.1l-1.4,1.8
l1.6,0.5L78.1,193.1z"/>
<path class="st3" d="M82.6,192.4l2,0.5l1.7,5.3l0,0l1.1-4.6l1.5,0.4l-1.6,6.6l-1.9-0.5l-1.7-5.4l0,0l-1.1,4.7l-1.5-0.4L82.6,192.4
z"/>
<path class="st3" d="M90,194.2l2.2,0.3c0.5,0.1,1,0.2,1.5,0.4c0.5,0.2,0.9,0.5,1.2,0.8c0.3,0.3,0.6,0.7,0.7,1.2
c0.1,0.5,0.2,1,0.1,1.6c-0.1,0.5-0.3,1-0.5,1.4c-0.3,0.4-0.6,0.7-1,0.9s-0.8,0.4-1.3,0.5c-0.5,0.1-1,0.1-1.5,0l-2.4-0.4L90,194.2z
M90.7,199.8l0.8,0.1c0.3,0.1,0.7,0.1,1,0c0.3,0,0.6-0.1,0.8-0.2s0.4-0.3,0.6-0.6c0.2-0.2,0.3-0.6,0.3-0.9c0.1-0.3,0-0.6-0.1-0.9
c-0.1-0.3-0.2-0.5-0.4-0.7c-0.2-0.2-0.4-0.3-0.7-0.5c-0.3-0.1-0.6-0.2-0.9-0.3l-0.9-0.1L90.7,199.8z"/>
<path class="st3" d="M99.8,195.4l2.5,0.1c0.4,0,0.7,0.1,1,0.1s0.6,0.2,0.8,0.4c0.2,0.2,0.4,0.4,0.5,0.7c0.1,0.3,0.2,0.6,0.2,1
c0,0.4-0.1,0.7-0.2,1c-0.1,0.3-0.3,0.5-0.6,0.6s-0.5,0.2-0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2c-0.5,0-0.9-0.1-1.3-0.3c-0.4-0.2-0.8-0.5-1.1-0.9c-0.3-0.4-0.5-0.8-0.7-1.3
c-0.2-0.5-0.2-1-0.2-1.5c0-0.5,0.2-0.9,0.4-1.3c0.2-0.4,0.5-0.7,0.9-1c0.4-0.3,0.8-0.5,1.3-0.7c0.2-0.1,0.4-0.1,0.6-0.1
c0.2,0,0.4,0,0.6,0c0.2,0,0.4,0.1,0.6,0.1c0.2,0.1,0.4,0.2,0.6,0.3L135.1,192.8z"/>
<path class="st3" d="M138.2,191.3l-1.8,0.7l-0.5-1.2l5-1.9l0.5,1.2l-1.8,0.7l2,5.1l-1.4,0.5L138.2,191.3z"/>
<path class="st4" d="M144.9,186.5l2.1-1.1l4.1,8.3l-2.1,1.1L144.9,186.5z"/>
<path class="st3" d="M151.9,184.6l1-0.7l3.4,2.9l0,0l-1.2-4.3l1-0.6l3.5,2.8l0,0l-1.3-4.2l1-0.6l1.6,5.8l-0.9,0.6l-3.6-2.7l0,0
l1.2,4.3l-1,0.6L151.9,184.6z"/>
<path class="st3" d="M159.4,179.8l0.9-0.8l3.7,2.5l0,0l-1.6-4.2l0.9-0.7l3.8,2.4l0,0l-1.7-4.1l0.9-0.7l2.1,5.6l-0.9,0.7l-3.8-2.4
l0,0l1.6,4.2l-0.9,0.7L159.4,179.8z"/>
<path class="st3" d="M166.4,174.1l0.9-0.8l3.9,2.1l0,0l-2-4l0.8-0.8l4,2l0,0l-2.1-3.9l0.8-0.8l2.7,5.4l-0.8,0.8l-4.1-2l0,0l2,4
l-0.8,0.8L166.4,174.1z"/>
<path class="st3" d="M177.6,171c-0.1,0.2-0.3,0.2-0.5,0.3s-0.4-0.1-0.6-0.2c-0.2-0.1-0.2-0.3-0.3-0.5c0-0.2,0.1-0.4,0.2-0.6
c0.1-0.2,0.3-0.2,0.5-0.3c0.2,0,0.4,0.1,0.6,0.2c0.2,0.1,0.2,0.3,0.3,0.5S177.8,170.8,177.6,171z"/>
<path class="st3" d="M178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,0.4-0.4,0.9-0.3,1.3c0.1,0.4,0.4,0.8,0.9,1.1l2.4,1.6l-0.6,0.9L180.2,158.5z"/>
<path class="st3" d="M185.9,152.4c-0.3,0.1-0.5,0.2-0.7,0.3c-0.2,0.1-0.4,0.3-0.5,0.6c-0.2,0.3-0.2,0.5-0.3,0.7s0,0.5,0.1,0.7
c0.1,0.2,0.2,0.4,0.4,0.6c0.2,0.2,0.4,0.4,0.6,0.5c0.2,0.1,0.5,0.2,0.7,0.3c0.2,0,0.5,0,0.7,0c0.2,0,0.5-0.1,0.7-0.3
s0.4-0.3,0.5-0.6c0.2-0.3,0.2-0.5,0.3-0.8c0-0.2,0-0.5-0.1-0.8l1.1-0.3c0.1,0.4,0.1,0.8,0.1,1.2c-0.1,0.4-0.2,0.8-0.4,1.1
c-0.2,0.4-0.5,0.7-0.8,0.9c-0.3,0.2-0.6,0.4-1,0.5c-0.4,0.1-0.7,0.1-1.1,0s-0.8-0.2-1.1-0.4c-0.4-0.2-0.7-0.5-0.9-0.8
c-0.2-0.3-0.4-0.7-0.5-1c-0.1-0.4-0.1-0.7,0-1.1c0.1-0.4,0.2-0.8,0.4-1.2c0.2-0.4,0.5-0.7,0.8-0.9c0.3-0.2,0.7-0.4,1.1-0.5
L185.9,152.4z"/>
<path class="st3" d="M182.5,148.5l0.5-1l8,4.3l-0.5,0.9L182.5,148.5z"/>
<path class="st3" d="M192.3,149.5c-0.1,0.2-0.2,0.3-0.5,0.4c-0.2,0.1-0.4,0.1-0.6,0c-0.2-0.1-0.3-0.2-0.4-0.5
c-0.1-0.2-0.1-0.4,0-0.6c0.1-0.2,0.2-0.3,0.5-0.4c0.2-0.1,0.4-0.1,0.6,0c0.2,0.1,0.3,0.3,0.4,0.5
C192.4,149.1,192.4,149.3,192.3,149.5z"/>
<path class="st3" d="M185.1,143.2l0.5-1l8.3,3.8l-0.5,1L185.1,143.2z"/>
<path class="st3" d="M196.5,139.6l-0.4,1l-0.8-0.3l0,0c0.2,0.2,0.4,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,10.4V48.4 M108,84.4c-2.6,0.2-5.3,0-7.8-0.6V70.9L108,84.4z M127.5,44.5
c0.3,0.4,0.6,0.9,0.8,1.3c1.1,1.9,1.9,3.8,2.5,5.8L119.6,58L127.5,44.5z M82.7,47.6c1.1-2.4,2.7-4.7,4.5-6.6l11.5,6.6H82.7z"/>
</g>
<g>
<g>
<path class="st4" d="M112.9,90.8c18.9-4,30.2-23.4,24.4-41.8l-36.4,21L112.9,90.8"/>
</g>
</g>
<g>
<path class="st4" d="M122.5,30.6c-13.5-7.8-30.3-4.9-40.4,6.2l36.5,21.1l12-20.7C128.3,34.6,125.6,32.3,122.5,30.6"/>
</g>
<g>
<g>
<path class="st4" d="M89.8,87.2c3,1.7,6.1,2.9,9.3,3.6V48.7H75.1C70.3,63.1,76.2,79.3,89.8,87.2"/>
</g>
</g>
</g>
<g>
<rect x="111.9" y="51.1" transform="matrix(0.8656 -0.5007 0.5007 0.8656 -21.4856 81.8609)" class="st4" width="59.8" height="59.8"/>
</g>
<g>
<circle class="st0" cx="141.8" cy="81" r="25.9"/>
</g>
<g>
<g>
<path class="st3" d="M158.1,73.1h-1v11.5c0,1.8-1,3.4-3.1,3.4h-20.4v0.5c0,1.6,1.8,3.2,3.6,3.2h15.6l6,3.5l-0.9-3.5h0.2
c1.8,0,2.7-1.6,2.7-3.2V75.8C160.8,74.2,160,73.1,158.1,73.1z"/>
</g>
<g>
<path class="st3" d="M150.9,65.1h-23.7c-2.1,0-4.5,1.9-4.5,3.6v14.4c0,1.6,2,2.8,4,3l-1.3,4.8l8.1-4.8h17.3c2.1,0,4-1.3,4-3
V71.5v-2.7C154.9,67,153,65.1,150.9,65.1z M130.8,77.3c-1.2,0-2.1-1-2.1-2.1c0-1.2,1-2.1,2.1-2.1c1.2,0,2.1,1,2.1,2.1
C133,76.3,132,77.3,130.8,77.3z M138.8,77.3c-1.2,0-2.1-1-2.1-2.1c0-1.2,1-2.1,2.1-2.1c1.2,0,2.1,1,2.1,2.1
C141,76.3,140,77.3,138.8,77.3z M146.8,77.3c-1.2,0-2.1-1-2.1-2.1c0-1.2,1-2.1,2.1-2.1c1.2,0,2.1,1,2.1,2.1
C149,76.3,148,77.3,146.8,77.3z"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -23,21 +23,21 @@
*
* ## Mandatory indexes :
* Redis
* Redis server settings
* Redis server settings
* Worker
* Workers default settings
* Workers default settings
* Resque
* Default values used to init the php-resque library path
* Default values used to init the php-resque library path
*
* ## Optional indexes :
* Queues
* An array of queues to start with Resque::load()
* Used when you have multiple queues, as you don't need
* to start each queues individually each time you start Resque
* An array of queues to start with Resque::load()
* Used when you have multiple queues, as you don't need
* to start each queues individually each time you start Resque
* Env
* Additional environment variables to pass to Resque
* Additional environment variables to pass to Resque
* Log
* Log handler and its arguments, to save the log with Monolog
* Log handler and its arguments, to save the log with Monolog
*
*
* There are many ways to configure the plugin:
@ -77,13 +77,13 @@ $config['CakeResque'] = array(
'queue' => 'default', // Name of the default queue
'interval' => 5, // Number of second between each poll
'workers' => 1, // Number of workers to create
// 'user' => 'www-data' // User running the worker process
// 'user' => 'www-data' // User running the worker process
// Path to the log file
// Can be an
// - absolute path,
// - an relative path, that will be relative to
// app/tmp/logs folder
// app/tmp/logs folder
// - a simple filename, file will be created inside app/tmp/logs
'log' => TMP . 'logs' . DS . 'resque-worker-error.log',
@ -146,11 +146,11 @@ $config['CakeResque'] = array(
// As of now, the following handler are supported:
//
// [HANDLER] [TARGET]
// Cube Cube server address (e.g: udp://127.0.0.1:1180)
// RotatingFile Path to the log file (e.g: /path/to/resque.log)
// Syslog Facility name
// Socket Address (e.g: udp://127.0.0.1:23)
// MongoDB MongoDB server address (e.g: mongodb://localhost:27017)
// Cube Cube server address (e.g: udp://127.0.0.1:1180)
// RotatingFile Path to the log file (e.g: /path/to/resque.log)
// Syslog Facility name
// Socket Address (e.g: udp://127.0.0.1:23)
// MongoDB MongoDB server address (e.g: mongodb://localhost:27017)
'Log' => array(
'handler' => 'RotatingFile',
'target' => TMP . 'logs' . DS . 'resque.log'

View File

@ -1,123 +0,0 @@
-- Copyright (c) 2009 www.cryer.co.uk
-- Script is free to use provided this copyright header is included.
drop procedure if exists AddColumnUnlessExists;
delimiter '//'
create procedure AddColumnUnlessExists(
IN dbName tinytext,
IN tableName tinytext,
IN fieldName tinytext,
IN fieldDef text)
begin
IF NOT EXISTS (
SELECT * FROM information_schema.COLUMNS
WHERE column_name=fieldName
and table_name=tableName
and table_schema=dbName
)
THEN
set @ddl=CONCAT('ALTER TABLE ',dbName,'.',tableName,
' ADD COLUMN ',fieldName,' ',fieldDef);
prepare stmt from @ddl;
execute stmt;
END IF;
end;
//
delimiter ';'
call AddColumnUnlessExists(Database(), 'roles', 'perm_template', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
-- --------------------------------------------------------
--
-- Table structure for table `templates`
--
CREATE TABLE IF NOT EXISTS `templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`org` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`share` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_elements`
--
CREATE TABLE IF NOT EXISTS `template_elements` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`position` int(11) NOT NULL,
`element_definition` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_element_attributes`
--
CREATE TABLE IF NOT EXISTS `template_element_attributes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_element_id` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`to_ids` tinyint(1) NOT NULL DEFAULT '1',
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`complex` tinyint(1) NOT NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_element_files`
--
CREATE TABLE IF NOT EXISTS `template_element_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_element_id` int(11) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`category` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`malware` tinyint(1) NOT NULL,
`mandatory` tinyint(1) NOT NULL,
`batch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_element_texts`
--
CREATE TABLE IF NOT EXISTS `template_element_texts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`template_element_id` int(11) NOT NULL,
`text` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `template_tags`
--
CREATE TABLE IF NOT EXISTS `template_tags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL,
`tag_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -1,152 +0,0 @@
-- Copyright (c) 2009 www.cryer.co.uk
-- Script is free to use provided this copyright header is included.
drop procedure if exists AddColumnUnlessExists;
delimiter '//'
create procedure AddColumnUnlessExists(
IN dbName tinytext,
IN tableName tinytext,
IN fieldName tinytext,
IN fieldDef text)
begin
IF NOT EXISTS (
SELECT * FROM information_schema.COLUMNS
WHERE column_name=fieldName
and table_name=tableName
and table_schema=dbName
)
THEN
set @ddl=CONCAT('ALTER TABLE ',dbName,'.',tableName,
' ADD COLUMN ',fieldName,' ',fieldDef);
prepare stmt from @ddl;
execute stmt;
END IF;
end;
//
delimiter ';'
call AddColumnUnlessExists(Database(), 'attributes', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'events', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'events', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'events', 'orgc_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'jobs', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'jobs', 'date_created', 'datetime NOT NULL');
call AddColumnUnlessExists(Database(), 'jobs', 'date_modified', 'datetime NOT NULL');
call AddColumnUnlessExists(Database(), 'roles', 'perm_sharing_group', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'servers', 'pull_rules', 'TEXT( 11 ) COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'servers', 'push_rules', 'TEXT( 11 ) COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'servers', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'servers', 'remote_org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'servers', 'name', 'varchar(255) COLLATE utf8_bin NOT NULL');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'event_org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'shadow_attributes', 'proposal_to_delete', 'BOOLEAN NOT NULL');
call AddColumnUnlessExists(Database(), 'tags', 'exportable', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'threads', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'threads', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'users', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'users', 'server_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'users', 'disabled', 'BOOLEAN NOT NULL');
call AddColumnUnlessExists(Database(), 'users', 'expiration', 'datetime DEFAULT NULL');
call AddColumnUnlessExists(Database(), 'correlations', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'correlations', 'distribution', 'tinyint( 4 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'correlations', 'a_distribution', 'tinyint( 4 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'correlations', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'correlations', 'a_sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
CREATE TABLE IF NOT EXISTS `organisations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_bin NOT NULL,
`date_created` datetime NOT NULL,
`date_modified` datetime NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`nationality` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`sector` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`created_by` int(11) NOT NULL,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`contacts` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
`local` tinyint(1) NOT NULL DEFAULT '0',
`landingpage` text CHARACTER SET utf8 COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`),
KEY `uuid` (`uuid`),
INDEX `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `sharing_group_servers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sharing_group_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL,
`all_orgs` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `sharing_group_orgs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sharing_group_id` int(11) NOT NULL,
`org_id` int(11) NOT NULL,
`extend` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `sharing_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`releasability` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`organisation_uuid` varchar(40) COLLATE utf8_bin NOT NULL,
`org_id` int(11) NOT NULL,
`active` tinyint(1) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`local` tinyint(1) NOT NULL,
`sync_user_id` INT( 11 ) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomies` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`namespace` varchar(255) COLLATE utf8_bin NOT NULL,
`description` text COLLATE utf8_bin NOT NULL,
`version` int(11) NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomy_entries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_predicate_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `taxonomy_predicate_id` (`taxonomy_predicate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `taxonomy_predicates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taxonomy_id` int(11) NOT NULL,
`value` text COLLATE utf8_bin NOT NULL,
`expanded` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
KEY `taxonomy_id` (`taxonomy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- --------------------------------------------------------

View File

@ -33,7 +33,7 @@ yum install vim
yum install gcc git httpd zip redis mysql-server python-devel python-pip libxslt-devel zlib-devel
# Install PHP 5.6 from SCL, see https://www.softwarecollections.org/en/scls/rhscl/rh-php56/
yum install rh-php56 rh-php56-php-fpm rh-php56-php-devel rh-php56-php-mysqlnd rh-php56-php-mbstring
yum install rh-php56 rh-php56-php-fpm rh-php56-php-devel rh-php56-php-mysqlnd rh-php56-php-mbstring rh-php56-bcmath
# rh-php56-php only provided mod_php for httpd24-httpd from SCL
# if we want to use httpd from CentOS base we can use rh-php56-php-fpm instead
@ -48,7 +48,7 @@ scl enable rh-php56 bash
pear channel-update pear.php.net
pear install Crypt_GPG # we need version >1.3.0
pear install Crypt_GPG # we need version >1.3.0
# GPG needs lots of entropy, haveged provides entropy
yum install haveged
@ -61,9 +61,9 @@ service redis start
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
# Download MISP using git in the /var/www/ directory.
cd /var/www/
git clone https://github.com/MISP/MISP.git
git clone https://github.com/MISP/MISP.git
# Make git ignore filesystem permission differences
cd /var/www/MISP
@ -166,7 +166,7 @@ cp /var/www/MISP/INSTALL/apache.misp.centos6 /etc/httpd/conf.d/misp.conf
# Allow httpd to connect to the redis server and php-fpm over tcp/ip
setsebool -P httpd_can_network_connect on
# Enable and start the httpd service
# Enable and start the httpd service
chkconfig httpd on
service httpd start
@ -174,7 +174,7 @@ service httpd start
iptables -I INPUT 5 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
service iptables save
# We seriously recommend using only SSL !
# We seriously recommend using only SSL !
# Check out the apache.misp.ssl file for an example
@ -186,14 +186,14 @@ cp -a bootstrap.default.php bootstrap.php
cp -a database.default.php database.php
cp -a core.default.php core.php
cp -a config.default.php config.php
# Configure the fields in the newly created files:
# config.php : baseurl
# database.php : login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# If you want to be able to change configuration parameters from the webinterface:
@ -221,7 +221,7 @@ vi /etc/rc.local
su -s /bin/bash apache -c 'scl enable rh-php56 /var/www/MISP/app/Console/worker/start.sh'
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!

View File

@ -10,45 +10,42 @@ Install a minimal CentOS 7.x system with the software:
- LAMP server (actually, this is done below)
- Mail server
# Make sure you set your hostname CORRECTLY vs. like an animal (manually in /etc/hostname)
hostnamectl set-hostname misp # or whatever you want it to be
# Make sure your system is up2date:
yum update
2/ Dependencies *
----------------
Once the system is installed you can perform the following steps as root:
# We need some packages from the Extra Packages for Enterprise Linux repository
curl -o epel.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -Uvh epel.rpm
yum install epel-release
# Since MISP 2.4 PHP 5.5 is a minimal requirement, so we need a newer version than CentOS base provides
# Software Collections is a way do to this, see https://wiki.centos.org/AdditionalResources/Repositories/SCL
yum install centos-release-scl
# Because vim is just so practical
yum install vim
# Install the dependencies:
yum install gcc git httpd zip redis mysql-server python-devel python-pip libxslt-devel zlib-devel
yum install gcc git httpd zip redis mariadb mariadb-server python-devel python-pip libxslt-devel zlib-devel
# Install PHP 5.6 from SCL, see https://www.softwarecollections.org/en/scls/rhscl/rh-php56/
yum install rh-php56 rh-php56-php-fpm rh-php56-php-devel rh-php56-php-mysqlnd rh-php56-php-mbstring
yum install rh-php56 rh-php56-php-fpm rh-php56-php-devel rh-php56-php-mysqlnd rh-php56-php-mbstring rh-php56-bcmath
# rh-php56-php only provided mod_php for httpd24-httpd from SCL
# if we want to use httpd from CentOS base we can use rh-php56-php-fpm instead
systemctl enable rh-php56-php-fpm.service
systemctl start rh-php56-php-fpm.service
# php-fpm is accessed using the fcgi interface
yum install mod_fcgid
# Start a new shell with rh-php56 enabled
scl enable rh-php56 bash
pear channel-update pear.php.net
pear install Crypt_GPG # we need version >1.3.0
pear install Crypt_GPG # we need version >1.3.0
NOTE: if using rh-php56 the command needs to be run through its terminal: /usr/bin/scl enable rh-php56 "pear list | grep Crypt_GPG"
# GPG needs lots of entropy, haveged provides entropy
yum install haveged
@ -61,16 +58,22 @@ systemctl start redis.service
3/ MISP code
------------
# Download MISP using git in the /var/www/ directory.
# Download MISP using git in the /var/www/ directory.
cd /var/www/
git clone https://github.com/MISP/MISP.git
git clone https://github.com/MISP/MISP.git
cd /var/www/MISP
git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`)
# if the last shortcut doesn't work, specify the latest version manually
# example: git checkout tags/v2.4.XY
# the message regarding a "detached HEAD state" is expected behaviour
# (you only have to create a new branch, if you want to change stuff and do a pull request for example)
# Make git ignore filesystem permission differences
cd /var/www/MISP
git config core.filemode false
# install Mitre's STIX and its dependencies by running the following commands:
yum install python-importlib python-lxml python-dateutil python-six
pip install importlib
yum install python-lxml python-dateutil python-six
cd /var/www/MISP/app/files/scripts
git clone https://github.com/CybOXProject/python-cybox.git
git clone https://github.com/STIXProject/python-stix.git
@ -104,12 +107,14 @@ php composer.phar require kamisama/cake-resque:4.1.2
php composer.phar config vendor-dir Vendor
php composer.phar install
# CakeResque normally uses phpredis to connect to redis, but it has a (buggy) fallback connector through Redisent. It is highly advised to install phpredis
pecl install redis
# CakeResque normally uses phpredis to connect to redis, but it has a (buggy) fallback connector through Redisent. It is highly advised to install phpredis using "yum install php-redis"
pecl install redis-2.2.8
echo "extension=redis.so" > /etc/opt/rh/rh-php56/php-fpm.d/redis.ini
ln -s ../php-fpm.d/redis.ini /etc/opt/rh/rh-php56/php.d/99-redis.ini
systemctl restart rh-php56-php-fpm.service
Note: if using rh-php56 redis needs to be installed through its terminal: /usr/bin/scl enable rh-php56 "pecl install redis-2.2.8"
# If you have not yet set a timezone in php.ini
echo 'date.timezone = "Europe/Amsterdam"' > /etc/opt/rh/rh-php56/php-fpm.d/timezone.ini
ln -s ../php-fpm.d/timezone.ini /etc/opt/rh/rh-php56/php.d/99-timezone.ini
@ -134,8 +139,6 @@ chown -R apache:apache /var/www/MISP/app/webroot/img/custom
6/ Create a database and user
-----------------------------
yum install mariadb-server
# Enable, start and secure your mysql database server
systemctl enable mariadb.service
systemctl start mariadb.service
@ -168,18 +171,18 @@ mysql -u misp -p misp < INSTALL/MYSQL.sql
cp /var/www/MISP/INSTALL/apache.misp.centos7 /etc/httpd/conf.d/misp.conf
# Since SELinux is enabled, we need to allow httpd to write to certain directories
chcon -t httpd_sys_content_rw_t /var/www/MISP/app/files
chcon -t httpd_sys_content_rw_t /var/www/MISP/app/files/terms
chcon -t httpd_sys_content_rw_t /var/www/MISP/app/files/scripts/tmp
chcon -t httpd_sys_content_rw_t /var/www/MISP/app/Plugin/CakeResque/tmp
chcon -R -t httpd_sys_content_rw_t /var/www/MISP/app/tmp
chcon -R -t httpd_sys_content_rw_t /var/www/MISP/app/webroot/img/orgs
chcon -R -t httpd_sys_content_rw_t /var/www/MISP/app/webroot/img/custom
chcon -t httpd_sys_rw_content_t /var/www/MISP/app/files
chcon -t httpd_sys_rw_content_t /var/www/MISP/app/files/terms
chcon -t httpd_sys_rw_content_t /var/www/MISP/app/files/scripts/tmp
chcon -t httpd_sys_rw_content_t /var/www/MISP/app/Plugin/CakeResque/tmp
chcon -R -t httpd_sys_rw_content_t /var/www/MISP/app/tmp
chcon -R -t httpd_sys_rw_content_t /var/www/MISP/app/webroot/img/orgs
chcon -R -t httpd_sys_rw_content_t /var/www/MISP/app/webroot/img/custom
# Allow httpd to connect to the redis server and php-fpm over tcp/ip
setsebool -P httpd_can_network_connect on
# Enable and start the httpd service
# Enable and start the httpd service
systemctl enable httpd.service
systemctl start httpd.service
@ -187,7 +190,8 @@ systemctl start httpd.service
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
# We seriously recommend using only SSL !
# We seriously recommend using only HTTPS / SSL !
# Add SSL support by running: yum install mod_ssl
# Check out the apache.misp.ssl file for an example
@ -199,19 +203,20 @@ cp -a bootstrap.default.php bootstrap.php
cp -a database.default.php database.php
cp -a core.default.php core.php
cp -a config.default.php config.php
# Configure the fields in the newly created files:
# config.php : baseurl
# config.php : baseurl (example: 'baseurl' => 'http://misp',) - don't use "localhost" it causes issues when browsing externally
# config.php : Uncomment and set the timezone: `// date_default_timezone_set('UTC');`
# database.php : login, port, password, database
# Important! Change the salt key in /var/www/MISP/app/Config/config.php
# The admin user account will be generated on the first login, make sure that the salt is changed before you create that user
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# If you forget to do this step, and you are still dealing with a fresh installation, just alter the salt,
# delete the user from mysql and log in again using the default admin credentials (admin@admin.test / admin)
# If you want to be able to change configuration parameters from the webinterface:
chown apache:apache /var/www/MISP/app/Config/config.php
chcon -t httpd_sys_content_rw_t /var/www/MISP/app/Config/config.php
chcon -t httpd_sys_rw_content_t /var/www/MISP/app/Config/config.php
# Generate a GPG encryption key.
# If the following command gives an error message, try it as root from the console
@ -236,8 +241,8 @@ su -s /bin/bash apache -c 'scl enable rh-php56 /var/www/MISP/app/Console/worker/
# and make sure it will execute
chmod +x /etc/rc.local
# Now log in using the webinterface:
# The default user/pass = admin@admin.test/admin
# Now log in using the webinterface: http://misp/users/login
# The default user/pass = admin@admin.test/admin
# Using the server settings tool in the admin interface (Administration -> Server Settings), set MISP up to your preference
# It is especially vital that no critical issues remain!

0
LICENSE Executable file → Normal file
View File

2
PyMISP

@ -1 +1 @@
Subproject commit 3a2414bc8c01687290245f186cfa72d29b99d09e
Subproject commit 0511bd44867f5f7f74cb54d61b0df7d99b719118

View File

@ -1,7 +1,9 @@
[![Build Status](https://travis-ci.org/MISP/MISP.svg?branch=2.4)](https://travis-ci.org/MISP/MISP)
MISP - Malware Information Sharing Platform
-------------------------------------------
MISP - Malware Information Sharing Platform and Threat Sharing
--------------------------------------------------------------
[![Join the chat at https://gitter.im/MISP/MISP](https://badges.gitter.im/MISP/MISP.svg)](https://gitter.im/MISP/MISP?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![logo](./INSTALL/logos/misp-logo.png?raw=true "MISP")
@ -14,10 +16,10 @@ MISP, Malware Information Sharing Platform and Threat Sharing, core functionalit
- An **efficient IOC and indicators** database allowing to store technical and non-technical information about malware samples, incidents, attackers and intelligence.
- Automatic **correlation** finding relationships between attributes and indicators from malware, attacks campaigns or analysis.
- Built-in **sharing functionality** to ease data sharing using different model of distributions. MISP can synchronize automatically events and attributes among different MISP. Advanced filtering functionalities can be used to meet each organization sharing policy including a **flexible sharing group** capacity and an attribute level distribution mechanisms.
- An **intuitive user-interface** for end-users to create, update and collaborate on events and attributes/indicators. A **graphical interface** to navigate seamlessly between events and their correlations.
- An **intuitive user-interface** for end-users to create, update and collaborate on events and attributes/indicators. A **graphical interface** to navigate seamlessly between events and their correlations. Advanced filtering functionalities and [warning list](https://github.com/MISP/misp-warninglists) to help the analysts to contribute events and attributes.
- **storing data** in a structured format (allowing automated use of the database for various purposes) with an extensive support of cyber security indicators along fraud indicators as in the financial sector.
- **export**: generating IDS, OpenIOC, plain text, CSV, MISP XML or JSON output to integrate with other systems (network IDS, host IDS, custom tools)
- **import**: bulk-import, batch-import, import from OpenIOC, GFI sandbox, ThreatConnect CSV.
- **export**: generating IDS, OpenIOC, plain text, CSV, MISP XML or JSON output to integrate with other systems (network IDS, host IDS, custom tools), STIX (XML and JSON), NIDS export (Suricata, Snort and Bro) or RPZ zone. Many other formats easily added via the [misp-modules](https://github.com/MISP/misp-modules).
- **import**: bulk-import, batch-import, import from OpenIOC, GFI sandbox, ThreatConnect CSV. Many other formats easily added via the [misp-modules](https://github.com/MISP/misp-modules).
- Flexible **free text import** tool to ease the integration of unstructured reports into MISP.
- A gentle system to **collaborate** on events and attributes allowing MISP users to propose changes or updates to attributes/indicators.
- **data-sharing**: automatically exchange and synchronization with other parties and trust-groups using MISP.
@ -25,7 +27,9 @@ MISP, Malware Information Sharing Platform and Threat Sharing, core functionalit
- Flexible **API** to integrate MISP with your own solutions. MISP is bundled with [PyMISP](https://github.com/MISP/PyMISP) which is a flexible Python Library to fetch, add or update events attributes, handle malware samples or search for attributes.
- **Adjustable taxonomy** to classify and tag events following your own classification schemes or [existing classification](https://github.com/MISP/misp-taxonomies). The taxonomy can be local to your MISP but also shareable among MISP instances.
- **Expansion modules in Python** to expand MISP with your own services or activate already available [misp-modules](https://github.com/MISP/misp-modules).
- **STIX support**: export data in the STIX format (XML and JSON).
- **Sighting support** to get observations from organizations concerning shared indicators and attributes. Sighting [can be contributed](https://www.circl.lu/doc/misp/automation/index.html#sightings-api) via MISP user-interface, API as MISP document or STIX sighting documents.
- **STIX support**: export data in the STIX format (XML and JSON). Additional STIX import and export is supported by [MISP-STIX-Converter](https://github.com/MISP/MISP-STIX-Converter) or [MISP-Taxii-Server](https://github.com/MISP/MISP-Taxii-Server).
- **Integrated encryption and signing of the notifications** via PGP and/or S/MIME depending of the user preferences.
Exchanging info results in *faster detection* of targeted attacks and improves the detection ratio while reducing the false positives. We also avoid reversing similar malware as we know very fast that others team or organizations who already analyzed a specific malware.
@ -33,11 +37,7 @@ Exchanging info results in *faster detection* of targeted attacks and improves t
A sample event encoded in MISP:
![red october](http://3.bp.blogspot.com/-B3h0xbX7RjI/Uftvmq05rHI/AAAAAAAAApo/I0OEYOAFUI4/s1600/red-oct-1.jpg)
![red october](http://1.bp.blogspot.com/-LnMVhq4Rpyk/UftvmguodBI/AAAAAAAAAps/e22fomGL2MU/s1600/red-oct-2.jpg)
![MISP event view](./INSTALL/screenshots/event-view.png?raw=true "MISP")
Website / Support
------------------
@ -60,16 +60,22 @@ Feel free to fork the code, play with it, make some patches and send us the pull
Feel free to contact us, create [issues](https://github.com/MISP/MISP/issues), if you have questions, remarks or bug reports.
There are 2 branches:
There is one main branch:
- develop: (very active development) new features and improvements.
- 2.4 (current stable version): what we consider as stable with frequent updates as hot-fixes.
and features are developed in separated branches and then regularly merged into the 2.4 stable branch.
Feature Request
---------------
[![Feature Requests](http://feathub.com/MISP/MISP?format=svg)](http://feathub.com/MISP/MISP)
Roadmap
-------
To see the [[Roadmap](https://github.com/MISP/MISP/wiki/Planned-features-and-functionalities)](https://github.com/MISP/MISP/wiki/Planned-features-and-functionalities) for MISP have a look in the Wiki page
License
-------
@ -78,7 +84,7 @@ This software is licensed under [GNU Affero General Public License version 3](ht
* Copyright (C) 2012 Christophe Vandeplas
* Copyright (C) 2012 Belgian Defence
* Copyright (C) 2012 NATO / NCIRC
* Copyright (C) 2013-2015 Andras Iklody
* Copyright (C) 2015 CIRCL - Computer Incident Response Center Luxembourg
* Copyright (C) 2013-2016 Andras Iklody
* Copyright (C) 2015-2016 CIRCL - Computer Incident Response Center Luxembourg
For more information, [the list of authors and contributors](AUTHORS) is available.

View File

@ -1 +1 @@
{"major":2, "minor":4, "hotfix":33}
{"major":2, "minor":4, "hotfix":59}

0
app/.htaccess Executable file → Normal file
View File

View File

@ -1,72 +0,0 @@
<?php
/**
* This is Acl Schema file
*
* Use it to configure database for ACL
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/*
*
* Using the Schema command line utility
* cake schema run create DbAcl
*
*/
class DbAclSchema extends CakeSchema {
public $name = 'DbAcl';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $aros = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $aros_acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
);
}

View File

@ -1,40 +0,0 @@
# $Id$
#
# Copyright 2005-2012, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)
CREATE TABLE acos (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INTEGER(10) DEFAULT NULL,
model VARCHAR(255) DEFAULT '',
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
alias VARCHAR(255) DEFAULT '',
lft INTEGER(10) DEFAULT NULL,
rght INTEGER(10) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE aros_acos (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
aro_id INTEGER(10) UNSIGNED NOT NULL,
aco_id INTEGER(10) UNSIGNED NOT NULL,
_create CHAR(2) NOT NULL DEFAULT 0,
_read CHAR(2) NOT NULL DEFAULT 0,
_update CHAR(2) NOT NULL DEFAULT 0,
_delete CHAR(2) NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);
CREATE TABLE aros (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INTEGER(10) DEFAULT NULL,
model VARCHAR(255) DEFAULT '',
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
alias VARCHAR(255) DEFAULT '',
lft INTEGER(10) DEFAULT NULL,
rght INTEGER(10) DEFAULT NULL,
PRIMARY KEY (id)
);

View File

@ -1,52 +0,0 @@
<?php
/**
* This is i18n Schema file
*
* Use it to configure database for i18n
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
// @codingStandardsIgnoreStart
/*
*
* Using the Schema command line utility
* cake schema run create i18n
*/
class i18nSchema extends CakeSchema {
// @codingStandardsIgnoreEnd
public $name = 'i18n';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $i18n = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'content' => array('type' => 'text', 'null' => true, 'default' => null),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
);
}

View File

@ -1,26 +0,0 @@
# $Id$
#
# Copyright 2005-2012, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)
CREATE TABLE i18n (
id int(10) NOT NULL auto_increment,
locale varchar(6) NOT NULL,
model varchar(255) NOT NULL,
foreign_key int(10) NOT NULL,
field varchar(255) NOT NULL,
content mediumtext,
PRIMARY KEY (id),
# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
# INDEX I18N_LOCALE_MODEL(locale, model),
# INDEX I18N_FIELD(model, foreign_key, field),
# INDEX I18N_ROW(model, foreign_key),
INDEX locale (locale),
INDEX model (model),
INDEX row_id (foreign_key),
INDEX field (field)
);

View File

@ -1,16 +0,0 @@
0.1.0
+Events.uuid
+Attributes.uuid
0.2.0
Attributes.value -> Attributes.value1
0.2.0.1
+Attributes.value2
0.2.1
Servers.lastfetchedid -> Servers.lastpulledid
0.2.1.1
+Servers.lastpushedid
0.2.2
+Users.role_id
+Roles
+Logs
0.2.3

View File

@ -1,286 +0,0 @@
<?php
class AppSchema extends CakeSchema {
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $attributes = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'event_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
'category' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'type' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'value1' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'value2' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'to_ids' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'uuid' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'key' => 'index', 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'timestamp' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'distribution' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4),
'comment' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'event_id' => array('column' => 'event_id', 'unique' => 0),
'uuid' => array('column' => 'uuid', 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $bruteforces = array(
'ip' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'username' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'expire' => array('type' => 'datetime', 'null' => false, 'default' => null),
'indexes' => array(
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $event_tags = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'event_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'tag_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $events = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'date' => array('type' => 'date', 'null' => false, 'default' => null),
'info' => array('type' => 'text', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'published' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'uuid' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'key' => 'index', 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'attribute_count' => array('type' => 'integer', 'null' => false, 'default' => null),
'analysis' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 4),
'orgc' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'timestamp' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'distribution' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4),
'proposal_email_lock' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'locked' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'threat_level_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'publish_timestamp' => array('type' => 'integer', 'null' => false, 'default' => null),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'uuid' => array('column' => 'uuid', 'unique' => 0),
'info' => array('column' => 'info', 'type' => 'fulltext')
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $jobs = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'worker' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 32, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'job_type' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 32, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'job_input' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'status' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4),
'retries' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'message' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'progress' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'org' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'process_id' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 32, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $logs = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'title' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null),
'model' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 20, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'model_id' => array('type' => 'integer', 'null' => true, 'default' => null),
'action' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 20, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => true, 'default' => null),
'change' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'email' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'org' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'description' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $posts = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'date_created' => array('type' => 'datetime', 'null' => false, 'default' => null),
'date_modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'contents' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'post_id' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'thread_id' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $regexp = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'regexp' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'replacement' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'type' => array('type' => 'string', 'null' => false, 'default' => 'ALL', 'length' => 100, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $roles = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null),
'perm_add' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_modify' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_modify_org' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_publish' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_sync' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_admin' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_audit' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_full' => array('type' => 'boolean', 'null' => true, 'default' => null),
'perm_auth' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'perm_site_admin' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'perm_regexp_access' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'perm_tagger' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $servers = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'url' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'authkey' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'organization' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 10, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'push' => array('type' => 'boolean', 'null' => false, 'default' => null),
'pull' => array('type' => 'boolean', 'null' => false, 'default' => null),
'lastpulledid' => array('type' => 'integer', 'null' => false, 'default' => null),
'lastpushedid' => array('type' => 'integer', 'null' => false, 'default' => null),
'self_signed' => array('type' => 'boolean', 'null' => false, 'default' => null),
'cert_file' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $shadow_attributes = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'old_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
'event_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
'type' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'category' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'value1' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'to_ids' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'uuid' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'key' => 'index', 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'value2' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'email' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'event_org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'comment' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'event_uuid' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'event_id' => array('column' => 'event_id', 'unique' => 0),
'uuid' => array('column' => 'uuid', 'unique' => 0),
'old_id' => array('column' => 'old_id', 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $tags = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'colour' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 7, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $tasks = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'type' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'timer' => array('type' => 'integer', 'null' => false, 'default' => null),
'scheduled_time' => array('type' => 'string', 'null' => false, 'default' => '6:00', 'length' => 8, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'job_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'description' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'next_execution_time' => array('type' => 'integer', 'null' => false, 'default' => null),
'message' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $threads = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'date_created' => array('type' => 'datetime', 'null' => false, 'default' => null),
'date_modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
'distribution' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 4),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'post_count' => array('type' => 'integer', 'null' => false, 'default' => null),
'event_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'title' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $threat_levels = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 50, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'description' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'form_description' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'latin1_swedish_ci', 'charset' => 'latin1'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
public $users = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'password' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'key' => 'index', 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'org' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'email' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'autoalert' => array('type' => 'boolean', 'null' => false, 'default' => null),
'authkey' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'invited_by' => array('type' => 'integer', 'null' => false, 'default' => null),
'gpgkey' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'certif_public' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_bin', 'charset' => 'utf8'),
'nids_sid' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 15),
'termsaccepted' => array('type' => 'boolean', 'null' => false, 'default' => null),
'newsread' => array('type' => 'date', 'null' => false, 'default' => null),
'role_id' => array('type' => 'integer', 'null' => false, 'default' => null),
'change_pw' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 4),
'contactalert' => array('type' => 'boolean', 'null' => false, 'default' => null),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'email' => array('column' => 'email', 'unique' => 0),
'password' => array('column' => 'password', 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
public $whitelist = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'name' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_bin', 'engine' => 'MyISAM')
);
}

View File

@ -1,46 +0,0 @@
<?php
/**
* This is Sessions Schema file
*
* Use it to configure database for Sessions
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/*
*
* Using the Schema command line utility
* cake schema run create Sessions
*
*/
class SessionsSchema extends CakeSchema {
public $name = 'Sessions';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $cake_sessions = array(
'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'),
'data' => array('type' => 'text', 'null' => true, 'default' => null),
'expires' => array('type' => 'integer', 'null' => true, 'default' => null),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
}

View File

@ -1,16 +0,0 @@
# $Id$
#
# Copyright 2005-2012, Cake Software Foundation, Inc.
# 1785 E. Sahara Avenue, Suite 490-204
# Las Vegas, Nevada 89104
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)
CREATE TABLE cake_sessions (
id varchar(255) NOT NULL default '',
data text,
expires int(11) default NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

View File

@ -1,68 +0,0 @@
;<?php exit() ?>
;/**
; * ACL Configuration
; *
; *
; * PHP 5
; *
; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
; * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
; *
; * Licensed under The MIT License
; * Redistributions of files must retain the above copyright notice.
; *
; * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
; * @link http://cakephp.org CakePHP(tm) Project
; * @package app.Config
; * @since CakePHP(tm) v 0.10.0.1076
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
; */
; acl.ini.php - Cake ACL Configuration
; ---------------------------------------------------------------------
; Use this file to specify user permissions.
; aco = access control object (something in your application)
; aro = access request object (something requesting access)
;
; User records are added as follows:
;
; [uid]
; groups = group1, group2, group3
; allow = aco1, aco2, aco3
; deny = aco4, aco5, aco6
;
; Group records are added in a similar manner:
;
; [gid]
; allow = aco1, aco2, aco3
; deny = aco4, aco5, aco6
;
; The allow, deny, and groups sections are all optional.
; NOTE: groups names *cannot* ever be the same as usernames!
;
; ACL permissions are checked in the following order:
; 1. Check for user denies (and DENY if specified)
; 2. Check for user allows (and ALLOW if specified)
; 3. Gather user's groups
; 4. Check group denies (and DENY if specified)
; 5. Check group allows (and ALLOW if specified)
; 6. If no aro, aco, or group information is found, DENY
;
; ---------------------------------------------------------------------
;-------------------------------------
;Users
;-------------------------------------
[username-goes-here]
groups = group1, group2
deny = aco1, aco2
allow = aco3, aco4
;-------------------------------------
;Groups
;-------------------------------------
[groupname-goes-here]
deny = aco5, aco6
allow = aco7, aco8

View File

@ -1,134 +0,0 @@
<?php
/**
* This is the PHP base ACL configuration file.
*
* Use it to configure access control of your Cake application.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 2.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* Example
* -------
*
* Assumptions:
*
* 1. In your application you created a User model with the following properties:
* username, group_id, password, email, firstname, lastname and so on.
* 2. You configured AuthComponent to authorize actions via
* $this->Auth->authorize = array('Actions' => array('actionPath' => 'controllers/'),...)
*
* Now, when a user (i.e. jeff) authenticates successfully and requests a controller action (i.e. /invoices/delete)
* that is not allowed by default (e.g. via $this->Auth->allow('edit') in the Invoices controller) then AuthComponent
* will ask the configured ACL interface if access is granted. Under the assumptions 1. and 2. this will be
* done via a call to Acl->check() with
*
* array('User' => array('username' => 'jeff', 'group_id' => 4, ...))
*
* as ARO and
*
* '/controllers/invoices/delete'
*
* as ACO.
*
* If the configured map looks like
*
* $config['map'] = array(
* 'User' => 'User/username',
* 'Role' => 'User/group_id',
* );
*
* then PhpAcl will lookup if we defined a role like User/jeff. If that role is not found, PhpAcl will try to
* find a definition for Role/4. If the definition isn't found then a default role (Role/default) will be used to
* check rules for the given ACO. The search can be expanded by defining aliases in the alias configuration.
* E.g. if you want to use a more readable name than Role/4 in your definitions you can define an alias like
*
* $config['alias'] = array(
* 'Role/4' => 'Role/editor',
* );
*
* In the roles configuration you can define roles on the lhs and inherited roles on the rhs:
*
* $config['roles'] = array(
* 'Role/admin' => null,
* 'Role/accountant' => null,
* 'Role/editor' => null,
* 'Role/manager' => 'Role/editor, Role/accountant',
* 'User/jeff' => 'Role/manager',
* );
*
* In this example manager inherits all rules from editor and accountant. Role/admin doesn't inherit from any role.
* Lets define some rules:
*
* $config['rules'] = array(
* 'allow' => array(
* '*' => 'Role/admin',
* 'controllers/users/(dashboard|profile)' => 'Role/default',
* 'controllers/invoices/*' => 'Role/accountant',
* 'controllers/articles/*' => 'Role/editor',
* 'controllers/users/*' => 'Role/manager',
* 'controllers/invoices/delete' => 'Role/manager',
* ),
* 'deny' => array(
* 'controllers/invoices/delete' => 'Role/accountant, User/jeff',
* 'controllers/articles/(delete|publish)' => 'Role/editor',
* ),
* );
*
* Ok, so as jeff inherits from Role/manager he's matched every rule that references User/jeff, Role/manager,
* Role/editor, Role/accountant and Role/default. However, for jeff, rules for User/jeff are more specific than
* rules for Role/manager, rules for Role/manager are more specific than rules for Role/editor and so on.
* This is important when allow and deny rules match for a role. E.g. Role/accountant is allowed
* controllers/invoices/* but at the same time controllers/invoices/delete is denied. But there is a more
* specific rule defined for Role/manager which is allowed controllers/invoices/delete. However, the most specific
* rule denies access to the delete action explicitly for User/jeff, so he'll be denied access to the resource.
*
* If we would remove the role definition for User/jeff, then jeff would be granted access as he would be resolved
* to Role/manager and Role/manager has an allow rule.
*/
/**
* The role map defines how to resolve the user record from your application
* to the roles you defined in the roles configuration.
*/
$config['map'] = array(
'User' => 'User/username',
'Role' => 'User/group_id',
);
/**
* define aliases to map your model information to
* the roles defined in your role configuration.
*/
$config['alias'] = array(
'Role/4' => 'Role/editor',
);
/**
* role configuration
*/
$config['roles'] = array(
'Role/admin' => null,
);
/**
* rule configuration
*/
$config['rules'] = array(
'allow' => array(
'*' => 'Role/admin',
),
'deny' => array(),
);

61
app/Config/bootstrap.default.php Executable file → Normal file
View File

@ -15,29 +15,29 @@
*
* File storage engine.
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'File', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
* 'lock' => false, //[optional] use file locking
* 'serialize' => true, // [optional]
* 'mask' => 0666, // [optional] permission mask to use when creating cache files
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
* 'lock' => false, //[optional] use file locking
* 'serialize' => true, // [optional]
* 'mask' => 0666, // [optional] permission mask to use when creating cache files
* ));
*
* APC (http://pecl.php.net/package/APC)
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'Apc', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* ));
*
* Xcache (http://xcache.lighttpd.net/)
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'Xcache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
@ -48,21 +48,21 @@
*
* Memcache (http://memcached.org/)
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'Memcache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'servers' => array(
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'servers' => array(
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* ));
*
* Wincache (http://php.net/wincache)
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'Wincache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
@ -71,7 +71,7 @@
*
* Redis (http://http://redis.io/)
*
* Cache::config('default', array(
* Cache::config('default', array(
* 'engine' => 'Redis', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
@ -86,22 +86,23 @@ Cache::config('default', array('engine' => 'File'));
Configure::load('config');
$appendPort = true;
$relativePaths = false;
if (!Configure::read('MISP.baseurl')) {
if (!$relativePaths) {
if (isset($_SERVER['SERVER_NAME'])) $serverName = $_SERVER['SERVER_NAME'];
else if (isset($_SERVER['HTTP_HOST'])) $serverName = $_SERVER['HTTP_HOST'];
else $serverName = $_SERVER['SERVER_ADDR'];
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
if ($_SERVER['SERVER_PORT'] == 443 || !$appendPort) {
Configure::write('MISP.baseurl', sprintf('https://%s', $_SERVER['SERVER_ADDR']));
else if (isset($_SERVER['SERVER_ADDR'])) $serverName = $_SERVER['SERVER_ADDR'];
if (!Configure::read('MISP.baseurl') && isset($serverName)) {
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) {
$protocol = 'https';
} else {
Configure::write('MISP.baseurl', sprintf('https://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
$protocol = 'http';
}
} else {
if ($_SERVER['SERVER_PORT'] == 80 || !$appendPort) {
Configure::write('MISP.baseurl', sprintf('http://%s', $_SERVER['SERVER_ADDR']));
if (!isset($_SERVER['SERVER_PORT']) || in_array($_SERVER['SERVER_PORT'], array('443', '80')) || !$appendPort) {
Configure::write('MISP.baseurl', sprintf($protocol . '://%s', $serverName));
} else {
Configure::write('MISP.baseurl', sprintf('http://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
Configure::write('MISP.baseurl', sprintf($protocol . '://%s:%d', $serverName, $_SERVER['SERVER_PORT']));
}
}
}
@ -126,7 +127,7 @@ CakePlugin::load('UrlCache');
* It's also necessary to configure the plugin for more information, please read app/Plugin/CertAuth/reame.md
*/
// CakePlugin::load('CertAuth');
// CakePlugin::load('ShibbAuth');
/**
* You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters:
*
@ -138,7 +139,7 @@ CakePlugin::load('UrlCache');
* Configure::write('Dispatcher.filters', array(
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
*
* ));

View File

@ -1,91 +1,151 @@
<?php
$config = array (
'debug' => 0,
'Security' =>
array (
'level' => 'medium',
'salt' => 'Rooraenietu8Eeyo<Qu2eeNfterd-dd+',
'cipherSeed' => '',
//'auth'=>array('CertAuth.Certificate'), // additional authentication methods
),
'MISP' =>
array (
'baseurl' => '',
'footermidleft' => '',
'footermidright' => '',
'org' => 'ORGNAME',
'showorg' => true,
'background_jobs' => true,
'cached_attachments' => true,
'email' => 'email@address.com',
'contact' => 'email@address.com',
'cveurl' => 'http://cve.circl.lu/cve/',
'disablerestalert' => false,
'default_event_distribution' => '1',
'default_attribute_distribution' => 'event',
'tagging' => true,
'full_tags_on_event_index' => true,
'footer_logo' => '',
'take_ownership_xml_import' => false,
'unpublishedprivate' => false,
'disable_emailing' => false,
),
'GnuPG' =>
array (
'onlyencrypted' => false,
'email' => '',
'homedir' => '',
'password' => '',
'bodyonlyencrypted' => false,
),
'SMIME' =>
array (
'onlyencrypted' => false,
'email' => 'email@address.com',
'cert_public_sign' => '/var/www/MISP/.smime/email@address.com.pem',
'key_sign' => '/var/www/MISP/.smime/email@address.com.key',
'password' => 'XXXXXXXXXXXXXXXXXXXXXX',
),
'Proxy' =>
array (
'host' => '',
'port' => '',
'method' => '',
'user' => '',
'password' => '',
),
'SecureAuth' =>
array (
'amount' => 5,
'expire' => 300,
),
// Uncomment the following to enable client SSL certificate authentication
/*
'CertAuth' =>
array(
'ca' => array( 'FIRST.Org' ), // allowed CAs
'caId' => 'O', // which attribute will be used to verify the CA
'userModel' => 'User', // name of the User class to check if user exists
'userModelKey' => 'nids_sid', // User field that will be used for querying
'map' => array( // maps client certificate attributes to User properties
'O' => 'org',
'emailAddress'=>'email',
),
'syncUser' => true, // should the User be synchronized with an external REST API
'userDefaults'=> array( // default user attributes, only used when creating new users
'role_id' => 4,
),
'restApi' => array( // API parameters
'url' => 'https://example.com/data/users', // URL to query
'headers' => array(), // additional headers, used for authentication
'param' => array( 'email' => 'email'), // query parameters to add to the URL, mapped to USer properties
'map' => array( // maps REST result to the User properties
'uid' => 'nids_sid',
'team' => 'org',
'email' => 'email',
'pgp_public'=> 'gpgkey',
),
),
),
*/
$config = array(
'debug' => 0,
'Security' =>
array(
'level' => 'medium',
'salt' => '',
'cipherSeed' => '',
//'auth'=>array('CertAuth.Certificate'), // additional authentication methods
//'auth'=>array('ShibbAuth.ApacheShibb'),
),
'MISP' =>
array(
'baseurl' => '',
'footermidleft' => '',
'footermidright' => '',
'org' => 'ORGNAME',
'showorg' => true,
'threatlevel_in_email_subject' => true,
'email_subject_TLP_string' => 'TLP Amber',
'email_subject_tag' => 'tlp',
'email_subject_include_tag_name' => true,
'background_jobs' => true,
'cached_attachments' => true,
'email' => 'email@address.com',
'contact' => 'email@address.com',
'cveurl' => 'http://cve.circl.lu/cve/',
'disablerestalert' => false,
'default_event_distribution' => '1',
'default_attribute_distribution' => 'event',
'tagging' => true,
'full_tags_on_event_index' => true,
'footer_logo' => '',
'take_ownership_xml_import' => false,
'unpublishedprivate' => false,
'disable_emailing' => false,
),
'GnuPG' =>
array(
'onlyencrypted' => false,
'email' => '',
'homedir' => '',
'password' => '',
'bodyonlyencrypted' => false,
),
'SMIME' =>
array(
'enabled' => false,
'email' => '',
'cert_public_sign' => '',
'key_sign' => '',
'password' => '',
),
'Proxy' =>
array(
'host' => '',
'port' => '',
'method' => '',
'user' => '',
'password' => '',
),
'SecureAuth' =>
array(
'amount' => 5,
'expire' => 300,
),
// Uncomment the following to enable client SSL certificate authentication
/*
'CertAuth' =>
array(
'ca' => array('FIRST.Org'), // allowed CAs
'caId' => 'O', // which attribute will be used to verify the CA
'userModel' => 'User', // name of the User class to check if user exists
'userModelKey' => 'nids_sid', // User field that will be used for querying
'map' => array( // maps client certificate attributes to User properties
'O' => 'org',
'emailAddress' => 'email',
),
'syncUser' => true, // should the User be synchronized with an external REST API
'userDefaults' => array( // default user attributes, only used when creating new users
'role_id' => 4,
),
'restApi' => array( // API parameters
'url' => 'https://example.com/data/users', // URL to query
'headers' => array(), // additional headers, used for authentication
'param' => array('email' => 'email'), // query parameters to add to the URL, mapped to User properties
'map' => array( // maps REST result to the User properties
'uid' => 'nids_sid',
'team' => 'org',
'email' => 'email',
'pgp_public' => 'gpgkey',
),
),
'userDefaults' => array('role_id' => 3), // default attributes for new users
),
*/
/*
'ApacheShibbAuth' => // Configuration for shibboleth authentication
array(
'apacheEnv' => 'REMOTE_USER', // If proxy variable = HTTP_REMOTE_USER
'ssoAuth' => 'AUTH_TYPE',
'MailTag' => 'EMAIL_TAG',
'OrgTag' => 'FEDERATION_TAG',
'GroupTag' => 'GROUP_TAG',
'GroupSeparator' => ';',
'GroupRoleMatching' => array( // 3:User, 1:admin. May be good to set "1" for the first user
'group_three' => 3,
'group_two' => 2,
'group_one' => 1,
),
'DefaultRoleId' => 3,
'DefaultOrg' => 'DEFAULT_ORG',
),
*/
// Warning: The following is a 3rd party contribution and still untested (including security) by the MISP-project team.
// Feel free to enable it and report back to us if you run into any issues.
//
// Uncomment the following to enable Kerberos authentication
// needs PHP LDAP support enabled (e.g. compile flag --with-ldap or Debian package php5-ldap)
/*
'ApacheSecureAuth' => // Configuration for kerberos authentication
array(
'apacheEnv' => 'REMOTE_USER', // If proxy variable = HTTP_REMOTE_USER
'ldapServer' => 'ldap://example.com', // FQDN or IP
'ldapProtocol' => 3,
'ldapReaderUser' => 'cn=userWithReadAccess,ou=users,dc=example,dc=com', // DN ou RDN LDAP with reader user right
'ldapReaderPassword' => 'UserPassword', // the LDAP reader user password
'ldapDN' => 'dc=example,dc=com',
'ldapSearchFilter' => '', // Search filter to limit results from ldapsearh fx to specfic group. FX
//'ldapSearchFilter' => '(objectclass=InetOrgPerson)(!(nsaccountlock=True))(memberOf=cn=misp,cn=groups,cn=accounts,dc=example,dc=com)',
'ldapSearchAttribut' => 'uid', // filter for search
'ldapFilter' => array(
'mail',
// 'memberOf', //Needed filter if roles should be added depending on group membership.
),
'ldapDefaultRoleId' => 3, // 3:User, 1:admin. May be good to set "1" for the first user
//ldapDefaultRoleId can also be set as an array to support creating users into different group, depending on ldap membership.
//This will only work if the ldap server supports memberOf
//'ldapDefaultRoleId' => array(
// 'misp_admin' => 1,
// 'misp_orgadmin' => 2,
// 'misp_user' => 3,
// 'misp_publisher' => 4,
// 'misp_syncuser' => 5,
// 'misp_readonly' => 6,
// ),
//
'ldapDefaultOrg' => '1', // uses 1st local org in MISP if undefined
),
*/
);

View File

@ -23,16 +23,16 @@
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 0); // 0 = for production, 2 = full debug mode
Configure::write('debug', 0); // 0 = for production, 2 = full debug mode
/**
* Configure the Error handler used to handle errors for your application. By default
@ -48,11 +48,11 @@
*
* @see ErrorHandler for more information on error handling and configuration.
*/
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
/**
* Configure the Exception handler used for uncaught exceptions. By default,
@ -70,19 +70,19 @@
*
* @see ErrorHandler for more information on exception handling and configuration.
*/
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true,
'skipLog' => array(
'NotFoundException',
)
));
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true,
'skipLog' => array(
'NotFoundException',
)
));
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
Configure::write('App.encoding', 'UTF-8');
/**
* To configure CakePHP *not* to use mod_rewrite and to
@ -95,7 +95,7 @@
*
* And uncomment the App.baseUrl below:
*/
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP prefix routes.
@ -106,20 +106,20 @@
* Set to an array of prefixes you want to use in your application. Use for
* admin or other prefixed routes.
*
* Routing.prefixes = array('admin', 'manager');
* Routing.prefixes = array('admin', 'manager');
*
* Enables:
* `admin_index()` and `/admin/controller/index`
* `manager_index()` and `/manager/controller/index`
* `admin_index()` and `/admin/controller/index`
* `manager_index()` and `/manager/controller/index`
*
*/
Configure::write('Routing.prefixes', array('admin'));
Configure::write('Routing.prefixes', array('admin'));
/**
* Turn off all caching application-wide.
*
*/
Configure::write('Cache.disable', false);
Configure::write('Cache.disable', false);
/**
* Enable cache checking.
@ -130,13 +130,13 @@
* or in each action using $this->cacheAction = true.
*
*/
//Configure::write('Cache.check', true);
//Configure::write('Cache.check', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/
define('LOG_ERROR', LOG_ERR);
define('LOG_ERROR', LOG_ERR);
/**
* Session configuration.
@ -154,7 +154,7 @@
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
* - `Session.defaults` - The default configuration set to use as a basis for your session.
* There are four builtins: php, cake, cache, database.
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
* to the ini array.
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
@ -175,25 +175,26 @@
* the cake shell command: cake schema create Sessions
*
*/
Configure::write('Session', array(
'timeout' => 60, // Session timeout, default is 1 hour
'defaults' => 'database'
));
Configure::write('Session', array(
'timeout' => 60, // Session timeout, default is 1 hour
'defaults' => 'database',
'autoRegenerate' => true
));
/**
* The level of CakePHP security.
*/
Configure::write('Security.level', 'medium');
Configure::write('Security.level', 'medium');
/**
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'Rooraenietu8Eeyo<Qu2eeNfterd-dd+');
Configure::write('Security.salt', 'Rooraenietu8Eeyo<Qu2eeNfterd-dd+');
/**
* A random numeric string (digits only) used to encrypt/decrypt strings.
*/
Configure::write('Security.cipherSeed', '395786739573056621429506834955');
Configure::write('Security.cipherSeed', '395786739573056621429506834955');
/**
* Apply timestamps with the last modified time to static assets (js, css, images).
@ -203,7 +204,7 @@
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
//Configure::write('Asset.timestamp', true);
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
@ -212,7 +213,7 @@
*
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
*/
//Configure::write('Asset.filter.css', 'css.php');
//Configure::write('Asset.filter.css', 'css.php');
/**
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
@ -220,20 +221,20 @@
*
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
*/
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
/**
* The classname and database used in CakePHP's
* access control lists.
*/
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
* Uncomment this line and correct your server timezone to fix
* any date & time related errors.
*/
//date_default_timezone_set('UTC');
//date_default_timezone_set('UTC');
/**
* Pick the caching engine to use. If APC is enabled use it.
@ -262,11 +263,11 @@ $prefix = 'myapp_';
* object listings, and translation cache files are stored with this configuration.
*/
Cache::config('_cake_core_', array(
'engine' => $engine,
'prefix' => $prefix . 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'engine' => $engine,
'prefix' => $prefix . 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
'duration' => $duration
));
/**
@ -274,13 +275,13 @@ Cache::config('_cake_core_', array(
* is used to store schema descriptions, and table listings in connections.
*/
Cache::config('_cake_model_', array(
'engine' => $engine,
'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'engine' => $engine,
'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
'duration' => $duration
));
//Comment the following out if you do not with to use the background workers (not recommended)
require_once dirname(__DIR__) . '/Vendor/autoload.php';
require_once dirname(__DIR__) . '/Vendor/autoload.php';

Some files were not shown because too many files have changed in this diff Show More