2021-07-01 12:47:08 +02:00
-- db_version of this file: 61
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
2016-02-20 11:08:51 +01:00
--
-- Table structure for table `admin_settings`
--
CREATE TABLE IF NOT EXISTS ` admin_settings ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` setting ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` value ` text COLLATE utf8_bin NOT NULL ,
2020-11-14 14:26:00 +01:00
PRIMARY KEY ( ` id ` ) ,
2021-09-26 18:00:26 +02:00
UNIQUE INDEX ` setting ` ( ` setting ` )
2016-02-20 11:08:51 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS ` allowedlist ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
CREATE TABLE IF NOT EXISTS ` attachment_scans ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` type ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` attribute_id ` int ( 11 ) NOT NULL ,
` infected ` tinyint ( 1 ) NOT NULL ,
` malware_name ` varchar ( 191 ) NULL ,
` timestamp ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
INDEX ` index ` ( ` type ` , ` attribute_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ;
2016-02-20 11:08:51 +01:00
-- --------------------------------------------------------
2013-05-31 17:50:00 +02:00
--
-- Table structure for table `attributes`
--
CREATE TABLE IF NOT EXISTS ` attributes ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` event_id ` int ( 11 ) NOT NULL ,
2017-06-13 12:00:32 +02:00
` object_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` object_relation ` varchar ( 255 ) COLLATE utf8_bin ,
2013-05-31 17:50:00 +02:00
` category ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2013-06-24 12:36:52 +02:00
` 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 ,
2016-07-04 15:50:53 +02:00
` to_ids ` tinyint ( 1 ) NOT NULL DEFAULT 1 ,
2013-05-31 17:50:00 +02:00
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
2016-07-04 15:50:53 +02:00
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
2015-07-22 17:19:23 +02:00
` sharing_group_id ` int ( 11 ) NOT NULL ,
2020-11-18 11:19:00 +01:00
` comment ` text COLLATE utf8_unicode_ci ,
2016-07-04 15:50:53 +02:00
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-02-17 09:46:07 +01:00
` disable_correlation ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 15:14:19 +01:00
` first_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
` last_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` event_id ` ( ` event_id ` ) ,
2017-06-13 12:00:32 +02:00
INDEX ` object_id ` ( ` object_id ` ) ,
INDEX ` object_relation ` ( ` object_relation ` ) ,
2015-12-28 14:05:13 +01:00
INDEX ` value1 ` ( ` value1 ` ( 255 ) ) ,
INDEX ` value2 ` ( ` value2 ` ( 255 ) ) ,
2017-02-17 09:34:56 +01:00
INDEX ` type ` ( ` type ` ) ,
2017-02-17 09:46:07 +01:00
INDEX ` category ` ( ` category ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` sharing_group_id ` ( ` sharing_group_id ` ) ,
2020-11-14 15:14:19 +01:00
INDEX ` first_seen ` ( ` first_seen ` ) ,
INDEX ` last_seen ` ( ` last_seen ` ) ,
2016-07-05 04:42:29 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` )
2014-10-01 15:19:03 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
2016-09-29 16:52:06 +02:00
-- -------------------------------------------------------
--
-- Table structure for table `attribute_tags`
--
CREATE TABLE IF NOT EXISTS ` attribute_tags ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` attribute_id ` int ( 11 ) NOT NULL ,
2017-01-14 00:16:05 +01:00
` event_id ` int ( 11 ) NOT NULL ,
2016-09-29 16:52:06 +02:00
` tag_id ` int ( 11 ) NOT NULL ,
2019-09-29 22:20:31 +02:00
` local ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-09-29 16:52:06 +02:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` attribute_id ` ( ` attribute_id ` ) ,
2017-01-14 00:16:05 +01:00
INDEX ` event_id ` ( ` event_id ` ) ,
2016-09-29 16:52:06 +02:00
INDEX ` tag_id ` ( ` tag_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2023-03-19 11:52:52 +01:00
-- -------------------------------------------------------
--
-- Table structure for table `auth_keys`
--
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS ` auth_keys ` (
` id ` int ( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8mb4_unicode_ci NOT NULL ,
2020-11-18 11:37:23 +01:00
` authkey ` varchar ( 72 ) CHARACTER SET ascii NOT NULL ,
` authkey_start ` varchar ( 4 ) CHARACTER SET ascii NOT NULL ,
` authkey_end ` varchar ( 4 ) CHARACTER SET ascii NOT NULL ,
2020-11-14 14:26:00 +01:00
` created ` int ( 10 ) unsigned NOT NULL ,
` expiration ` int ( 10 ) unsigned NOT NULL ,
` user_id ` int ( 10 ) unsigned NOT NULL ,
` comment ` text COLLATE utf8mb4_unicode_ci ,
2023-03-19 11:52:52 +01:00
` allowed_ips ` text COLLATE utf8mb4_unicode_ci ,
` unique_ips ` text COLLATE utf8mb4_unicode_ci ,
2020-11-14 14:26:00 +01:00
PRIMARY KEY ( ` id ` ) ,
KEY ` authkey_start ` ( ` authkey_start ` ) ,
KEY ` authkey_end ` ( ` authkey_end ` ) ,
KEY ` created ` ( ` created ` ) ,
KEY ` expiration ` ( ` expiration ` ) ,
KEY ` user_id ` ( ` user_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `bruteforces`
--
CREATE TABLE IF NOT EXISTS ` bruteforces ` (
` ip ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` username ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` expire ` datetime NOT NULL
2014-10-01 15:19:03 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
2013-06-24 12:36:52 +02:00
--
-- Table structure for table `cake_sessions`
--
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 ,
2016-08-16 04:10:34 +02:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` expires ` ( ` expires ` )
2014-10-01 15:19:03 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-06-24 12:36:52 +02:00
-- --------------------------------------------------------
2013-05-31 17:50:00 +02:00
--
-- Table structure for table `correlations`
--
2013-06-24 11:46:37 +02:00
CREATE TABLE IF NOT EXISTS ` correlations ` (
2013-05-31 17:50:00 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2015-07-22 17:19:23 +02:00
` value ` text COLLATE utf8_bin NOT NULL ,
2013-05-31 17:50:00 +02:00
` 1 _event_id ` int ( 11 ) NOT NULL ,
` 1 _attribute_id ` int ( 11 ) NOT NULL ,
` event_id ` int ( 11 ) NOT NULL ,
` attribute_id ` int ( 11 ) NOT NULL ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
` distribution ` tinyint ( 4 ) NOT NULL ,
` a_distribution ` tinyint ( 4 ) NOT NULL ,
` sharing_group_id ` int ( 11 ) NOT NULL ,
` a_sharing_group_id ` int ( 11 ) NOT NULL ,
2013-07-12 10:18:48 +02:00
PRIMARY KEY ( ` id ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` 1 _event_id ` ( ` 1 _event_id ` ) ,
INDEX ` attribute_id ` ( ` attribute_id ` ) ,
2020-11-14 14:26:00 +01:00
INDEX ` 1 _attribute_id ` ( ` 1 _attribute_id ` )
2014-10-01 15:19:03 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-11-17 17:54:15 +01:00
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS dashboards (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` name ` varchar ( 191 ) NOT NULL ,
` description ` text ,
` default ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` selectable ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` user_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` restrict_to_org_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` restrict_to_role_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` restrict_to_permission_flag ` varchar ( 191 ) NOT NULL DEFAULT ' ' ,
` value ` text ,
` timestamp ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( id ) ,
INDEX ` name ` ( ` name ` ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` restrict_to_org_id ` ( ` restrict_to_org_id ` ) ,
INDEX ` restrict_to_permission_flag ` ( ` restrict_to_permission_flag ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ;
2019-09-29 22:20:31 +02:00
CREATE TABLE IF NOT EXISTS decaying_models (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` name ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` parameters ` text ,
` attribute_types ` text ,
` description ` text ,
` org_id ` int ( 11 ) ,
` enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` all_orgs ` tinyint ( 1 ) NOT NULL DEFAULT 1 ,
` ref ` text COLLATE utf8_unicode_ci ,
` formula ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` version ` varchar ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT ' ' ,
` default ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` name ` ( ` name ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` enabled ` ( ` enabled ` ) ,
INDEX ` all_orgs ` ( ` all_orgs ` ) ,
INDEX ` version ` ( ` version ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
CREATE TABLE IF NOT EXISTS decaying_model_mappings (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` attribute_type ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` model_id ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( id ) ,
INDEX ` model_id ` ( ` model_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `event_graph`
--
CREATE TABLE IF NOT EXISTS event_graph (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` event_id ` int ( 11 ) NOT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` network_name ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` network_json ` MEDIUMTEXT NOT NULL ,
` preview_img ` MEDIUMTEXT ,
PRIMARY KEY ( id ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` timestamp ` ( ` timestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS event_reports (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` event_id ` int ( 11 ) NOT NULL ,
` name ` varchar ( 255 ) NOT NULL ,
` content ` text ,
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
` sharing_group_id ` int ( 11 ) ,
` timestamp ` int ( 11 ) NOT NULL ,
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id ) ,
CONSTRAINT u_uuid UNIQUE ( uuid ) ,
2021-02-22 13:56:30 +01:00
INDEX ` name ` ( ` name ` ) ,
INDEX ` event_id ` ( ` event_id ` )
2020-11-14 14:26:00 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `events`
--
CREATE TABLE IF NOT EXISTS ` events ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
2013-05-31 17:50:00 +02:00
` date ` date NOT NULL ,
2015-07-22 17:19:23 +02:00
` info ` text COLLATE utf8_bin NOT NULL ,
2013-05-31 17:50:00 +02:00
` user_id ` int ( 11 ) NOT NULL ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
2016-07-04 15:50:53 +02:00
` published ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2013-05-31 17:50:00 +02:00
` analysis ` tinyint ( 4 ) NOT NULL ,
2017-03-07 17:39:44 +01:00
` attribute_count ` int ( 11 ) unsigned DEFAULT 0 ,
2015-07-22 17:19:23 +02:00
` orgc_id ` int ( 11 ) NOT NULL ,
2016-07-04 15:50:53 +02:00
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
2015-07-22 17:19:23 +02:00
` sharing_group_id ` int ( 11 ) NOT NULL ,
2016-07-04 15:50:53 +02:00
` proposal_email_lock ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` locked ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2014-02-05 17:06:49 +01:00
` threat_level_id ` int ( 11 ) NOT NULL ,
2016-07-04 15:50:53 +02:00
` publish_timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
2019-11-22 21:53:51 +01:00
` sighting_timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
2017-02-17 09:34:56 +01:00
` disable_correlation ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2018-06-20 06:30:01 +02:00
` extends_uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT ' ' ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` ) ,
2016-07-05 04:42:29 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2017-06-29 07:44:14 +02:00
INDEX ` info ` ( ` info ` ( 255 ) ) ,
2015-12-27 19:00:35 +01:00
INDEX ` sharing_group_id ` ( ` sharing_group_id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
2018-06-20 06:30:01 +02:00
INDEX ` orgc_id ` ( ` orgc_id ` ) ,
INDEX ` extends_uuid ` ( ` extends_uuid ` )
2016-08-31 11:01:44 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2014-02-05 17:06:49 +01:00
2018-06-20 06:30:01 +02:00
-- -------------------------------------------------------
--
-- Table structure for `event_blacklists`
--
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS ` event_blocklists ` (
2017-03-07 17:39:44 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` event_uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` created ` datetime NOT NULL ,
` event_info ` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
` comment ` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` event_orgc ` VARCHAR ( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
2021-08-02 12:20:55 +02:00
UNIQUE INDEX ` event_uuid ` ( ` event_uuid ` ) ,
2017-03-07 17:39:44 +01:00
INDEX ` event_orgc ` ( ` event_orgc ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2014-02-05 17:06:49 +01:00
-- -------------------------------------------------------
2017-02-15 15:59:05 +01:00
--
2018-06-20 06:30:01 +02:00
-- Table structure for `event_locks`
2017-02-15 15:59:05 +01:00
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` event_locks ` (
2017-02-15 15:59:05 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2018-06-20 06:30:01 +02:00
` event_id ` int ( 11 ) NOT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` timestamp ` ( ` timestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2017-02-15 15:59:05 +01:00
2014-02-05 17:06:49 +01:00
-- -------------------------------------------------------
2016-02-20 11:08:51 +01:00
--
-- Table structure for `event_delegations`
--
CREATE TABLE IF NOT EXISTS ` event_delegations ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` org_id ` int ( 11 ) NOT NULL ,
` requester_org_id ` int ( 11 ) NOT NULL ,
` event_id ` int ( 11 ) NOT NULL ,
` message ` text ,
2016-07-04 15:50:53 +02:00
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT - 1 ,
2016-02-20 11:08:51 +01:00
` sharing_group_id ` int ( 11 ) ,
PRIMARY KEY ( ` id ` ) ,
2016-07-05 04:42:29 +02:00
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` event_id ` ( ` event_id ` )
2016-02-20 11:08:51 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- -------------------------------------------------------
2014-02-05 17:06:49 +01:00
--
-- Table structure for `event_tags`
--
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 ,
2019-09-29 22:20:31 +02:00
` local ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
2015-12-28 14:05:13 +01:00
INDEX ` tag_id ` ( ` tag_id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-02-05 17:06:49 +01:00
2016-03-14 13:59:01 +01:00
-- -------------------------------------------------------
2016-04-28 18:13:56 +02:00
--
-- 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 ;
-- -------------------------------------------------------
2016-03-14 13:59:01 +01:00
--
-- Table structure for `feeds`
--
CREATE TABLE IF NOT EXISTS ` feeds ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` provider ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` url ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2016-04-12 22:34:48 +02:00
` rules ` text COLLATE utf8_bin DEFAULT NULL ,
2017-02-17 09:34:56 +01:00
` enabled ` tinyint ( 1 ) DEFAULT 0 ,
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
2016-07-04 15:50:53 +02:00
` sharing_group_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` tag_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2017-02-17 09:34:56 +01:00
` default ` tinyint ( 1 ) DEFAULT 0 ,
` source_format ` varchar ( 255 ) COLLATE utf8_bin DEFAULT ' misp ' ,
` fixed_event ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` delta_merge ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` event_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` publish ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` override_ids ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-02-24 11:12:30 +01:00
` settings ` text ,
2017-02-17 09:34:56 +01:00
` input_source ` varchar ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT " network " ,
` delete_local_file ` tinyint ( 1 ) DEFAULT 0 ,
2017-05-10 14:24:34 +02:00
` lookup_visible ` tinyint ( 1 ) DEFAULT 0 ,
2018-06-20 06:30:01 +02:00
` headers ` TEXT COLLATE utf8_bin ,
` caching_enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2019-09-29 22:20:31 +02:00
` force_to_ids ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 14:26:00 +01:00
` orgc_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2017-02-17 09:34:56 +01:00
PRIMARY KEY ( ` id ` ) ,
2020-11-14 14:26:00 +01:00
INDEX ` input_source ` ( ` input_source ` ) ,
INDEX ` orgc_id ` ( ` orgc_id ` )
2016-03-14 13:59:01 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2018-06-20 06:30:01 +02:00
-- -------------------------------------------------------
--
-- Table structure for `fuzzy_correlate_ssdeep`
--
CREATE TABLE IF NOT EXISTS ` fuzzy_correlate_ssdeep ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` chunk ` varchar ( 12 ) NOT NULL ,
` attribute_id ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
INDEX ` chunk ` ( ` chunk ` ) ,
INDEX ` attribute_id ` ( ` attribute_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2017-02-17 09:34:56 +01:00
2016-12-03 23:43:48 +01:00
-- -------------------------------------------------------
--
-- Table structure for `galaxies`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` galaxies ` (
2016-12-06 00:21:19 +01:00
` 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 ,
2017-10-08 15:32:26 +02:00
` icon ` VARCHAR ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT ' ' ,
2018-06-20 06:30:01 +02:00
` namespace ` varchar ( 255 ) COLLATE utf8_unicode_ci NOT NULL DEFAULT " misp " ,
2019-09-29 22:20:31 +02:00
` kill_chain_order ` text ,
2016-12-03 23:43:48 +01:00
PRIMARY KEY ( id ) ,
INDEX ` name ` ( ` name ` ) ,
2021-08-13 13:53:59 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2018-06-20 06:30:01 +02:00
INDEX ` type ` ( ` type ` ) ,
INDEX ` namespace ` ( ` namespace ` )
2016-12-03 23:43:48 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_clusters`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` galaxy_clusters ` (
2016-12-06 00:21:19 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2019-09-29 22:20:31 +02:00
` uuid ` varchar ( 255 ) COLLATE utf8_bin NOT NULL default ' ' ,
` collection_uuid ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2016-12-06 00:21:19 +01:00
` type ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` value ` text COLLATE utf8_bin NOT NULL ,
2021-02-22 10:33:16 +01:00
` tag_name ` varchar ( 255 ) COLLATE utf8_unicode_ci NOT NULL DEFAULT ' ' ,
2016-12-06 00:21:19 +01:00
` 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 ,
2017-08-16 22:18:32 +02:00
` version ` int ( 11 ) DEFAULT 0 ,
2016-12-03 23:43:48 +01:00
PRIMARY KEY ( id ) ,
2016-12-05 23:31:23 +01:00
INDEX ` value ` ( ` value ` ( 255 ) ) ,
2016-12-03 23:43:48 +01:00
INDEX ` uuid ` ( ` uuid ` ) ,
2019-09-29 22:20:31 +02:00
INDEX ` collection_uuid ` ( ` collection_uuid ` ) ,
2017-08-16 22:18:32 +02:00
INDEX ` galaxy_id ` ( ` galaxy_id ` ) ,
INDEX ` version ` ( ` version ` ) ,
2016-12-03 23:43:48 +01:00
INDEX ` tag_name ` ( ` tag_name ` ) ,
INDEX ` type ` ( ` type ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_elements`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` galaxy_elements ` (
2016-12-06 00:21:19 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` galaxy_cluster_id ` int ( 11 ) NOT NULL ,
` key ` varchar ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT ' ' ,
2016-12-06 00:02:32 +01:00
` value ` text COLLATE utf8_bin NOT NULL ,
2016-12-06 00:21:19 +01:00
PRIMARY KEY ( ` id ` ) ,
2016-12-03 23:43:48 +01:00
INDEX ` key ` ( ` key ` ) ,
2017-08-16 22:18:32 +02:00
INDEX ` value ` ( ` value ` ( 255 ) ) ,
2017-08-16 22:25:56 +02:00
INDEX ` galaxy_cluster_id ` ( ` galaxy_cluster_id ` )
2016-12-03 23:43:48 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- -------------------------------------------------------
--
-- Table structure for `galaxy_reference`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` galaxy_reference ` (
2016-12-06 00:21:19 +01:00
` 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 ,
2016-12-03 23:43:48 +01:00
PRIMARY KEY ( id ) ,
INDEX ` galaxy_cluster_id ` ( ` galaxy_cluster_id ` ) ,
INDEX ` referenced_galaxy_cluster_id ` ( ` referenced_galaxy_cluster_id ` ) ,
2016-12-06 00:38:11 +01:00
INDEX ` referenced_galaxy_cluster_value ` ( ` referenced_galaxy_cluster_value ` ( 255 ) ) ,
INDEX ` referenced_galaxy_cluster_type ` ( ` referenced_galaxy_cluster_type ` ( 255 ) )
2016-12-03 23:43:48 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS inbox (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` title ` varchar ( 191 ) NOT NULL ,
` type ` varchar ( 191 ) NOT NULL ,
` ip ` varchar ( 191 ) NOT NULL ,
` user_agent ` text ,
` user_agent_sha256 ` varchar ( 64 ) NOT NULL ,
` comment ` text ,
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` timestamp ` int ( 11 ) NOT NULL ,
` store_as_file ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` data ` longtext ,
PRIMARY KEY ( id ) ,
INDEX ` title ` ( ` title ` ) ,
INDEX ` type ` ( ` type ` ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` user_agent_sha256 ` ( ` user_agent_sha256 ` ) ,
INDEX ` ip ` ( ` ip ` ) ,
INDEX ` timestamp ` ( ` timestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ;
2014-02-05 17:06:49 +01:00
-- --------------------------------------------------------
--
-- Table structure for table `jobs`
--
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 ,
2016-07-04 15:50:53 +02:00
` status ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
` retries ` int ( 11 ) NOT NULL DEFAULT 0 ,
2014-02-05 17:06:49 +01:00
` message ` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
2016-07-04 15:50:53 +02:00
` progress ` int ( 11 ) NOT NULL DEFAULT 0 ,
` org_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2021-10-26 15:02:35 +02:00
` process_id ` varchar ( 36 ) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ,
2015-07-22 17:19:23 +02:00
` date_created ` datetime NOT NULL ,
` date_modified ` datetime NOT NULL ,
2014-02-05 17:06:49 +01:00
PRIMARY KEY ( ` id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `logs`
--
CREATE TABLE IF NOT EXISTS ` logs ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2016-04-12 22:31:58 +02:00
` title ` text CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL ,
2015-07-22 17:19:23 +02:00
` created ` datetime NOT NULL ,
2018-02-14 21:33:19 +01:00
` model ` varchar ( 80 ) COLLATE utf8_bin NOT NULL ,
2015-07-22 17:19:23 +02:00
` model_id ` int ( 11 ) NOT NULL ,
` action ` varchar ( 20 ) COLLATE utf8_bin NOT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
2017-02-24 11:17:10 +01:00
` change ` text COLLATE utf8_bin ,
2017-02-17 09:34:56 +01:00
` email ` varchar ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT " " ,
` org ` varchar ( 255 ) COLLATE utf8_bin NOT NULL DEFAULT " " ,
2017-02-24 11:17:10 +01:00
` description ` text CHARACTER SET utf8 COLLATE utf8_bin ,
2017-10-20 14:34:18 +02:00
` ip ` varchar ( 45 ) COLLATE utf8_bin NOT NULL DEFAULT " " ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
2016-05-20 09:00:04 +02:00
--
-- 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 ;
2017-02-15 15:59:05 +01:00
-- -------------------------------------------------------
2018-06-20 06:30:01 +02:00
--
-- Table structure for `noticelists`
--
CREATE TABLE IF NOT EXISTS ` noticelists ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` varchar ( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
` expanded_name ` text COLLATE utf8_unicode_ci NOT NULL ,
` ref ` text COLLATE utf8_unicode_ci ,
` geographical_area ` varchar ( 255 ) COLLATE utf8_unicode_ci ,
` version ` int ( 11 ) NOT NULL DEFAULT 1 ,
` enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
INDEX ` name ` ( ` name ` ) ,
INDEX ` geographical_area ` ( ` geographical_area ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- -------------------------------------------------------
--
-- Table structure for `noticelist_entries`
--
CREATE TABLE IF NOT EXISTS ` noticelist_entries ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` noticelist_id ` int ( 11 ) NOT NULL ,
` data ` text COLLATE utf8_unicode_ci NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
INDEX ` noticelist_id ` ( ` noticelist_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2019-09-29 22:20:31 +02:00
CREATE TABLE IF NOT EXISTS ` notification_logs ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` org_id ` int ( 11 ) NOT NULL ,
` type ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( ` id ` ) ,
KEY ` org_id ` ( ` org_id ` ) ,
KEY ` type ` ( ` type ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2016-05-20 09:00:04 +02:00
-- --------------------------------------------------------
2017-06-13 12:00:32 +02:00
--
-- Table structure for table `objects`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` objects ` (
2017-06-13 12:00:32 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` meta - category ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` description ` text CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
2017-07-02 00:05:15 +02:00
` template_uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` template_version ` int ( 11 ) NOT NULL ,
2017-06-13 12:00:32 +02:00
` event_id ` int ( 11 ) NOT NULL ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` distribution ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
` sharing_group_id ` int ( 11 ) ,
2020-11-18 11:19:00 +01:00
` comment ` text COLLATE utf8_unicode_ci NOT NULL ,
2017-09-19 09:50:05 +02:00
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 15:14:19 +01:00
` first_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
` last_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
2017-06-13 12:00:32 +02:00
PRIMARY KEY ( id ) ,
2017-07-02 00:05:15 +02:00
INDEX ` name ` ( ` name ` ) ,
INDEX ` template_uuid ` ( ` template_uuid ` ) ,
INDEX ` template_version ` ( ` template_version ` ) ,
INDEX ` meta - category ` ( ` meta - category ` ) ,
2017-06-13 12:00:32 +02:00
INDEX ` event_id ` ( ` event_id ` ) ,
2021-08-03 10:26:25 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2017-06-13 12:00:32 +02:00
INDEX ` timestamp ` ( ` timestamp ` ) ,
INDEX ` distribution ` ( ` distribution ` ) ,
2020-11-14 15:14:19 +01:00
INDEX ` sharing_group_id ` ( ` sharing_group_id ` ) ,
INDEX ` first_seen ` ( ` first_seen ` ) ,
INDEX ` last_seen ` ( ` last_seen ` )
2017-06-13 12:00:32 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `object_object_references`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` object_references ` (
2017-06-13 12:00:32 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
2017-08-06 18:23:24 +02:00
` object_id ` int ( 11 ) NOT NULL ,
2017-08-09 17:53:25 +02:00
` event_id ` int ( 11 ) NOT NULL ,
2017-09-01 17:42:54 +02:00
` source_uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
2017-09-07 14:00:18 +02:00
` referenced_uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
2017-08-06 18:23:24 +02:00
` referenced_id ` int ( 11 ) NOT NULL ,
2017-07-05 10:36:45 +02:00
` referenced_type ` int ( 11 ) NOT NULL DEFAULT 0 ,
` relationship_type ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
2017-06-13 12:00:32 +02:00
` comment ` text COLLATE utf8_bin NOT NULL ,
2019-09-29 22:20:31 +02:00
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-06-13 12:00:32 +02:00
PRIMARY KEY ( id ) ,
2021-11-01 08:03:50 +01:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2017-09-01 17:42:54 +02:00
INDEX ` source_uuid ` ( ` source_uuid ` ) ,
2017-09-07 14:00:18 +02:00
INDEX ` referenced_uuid ` ( ` referenced_uuid ` ) ,
2017-06-13 12:00:32 +02:00
INDEX ` timestamp ` ( ` timestamp ` ) ,
2017-09-01 17:42:54 +02:00
INDEX ` object_id ` ( ` object_id ` ) ,
2017-08-10 09:12:21 +02:00
INDEX ` referenced_id ` ( ` referenced_id ` ) ,
2017-07-05 10:36:45 +02:00
INDEX ` relationship_type ` ( ` relationship_type ` )
2017-06-13 12:00:32 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
2017-08-21 10:13:19 +02:00
--
-- Table structure for table `object_relationships`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` object_relationships ` (
2017-08-21 10:13:19 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` version ` int ( 11 ) NOT NULL ,
` name ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` description ` text COLLATE utf8_bin NOT NULL ,
` format ` text COLLATE utf8_bin NOT NULL ,
PRIMARY KEY ( id ) ,
INDEX ` name ` ( ` name ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
2017-06-13 12:00:32 +02:00
--
-- Table structure for table `object_templates`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` object_templates ` (
2017-06-13 12:00:32 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` user_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` name ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` meta - category ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
` description ` text COLLATE utf8_bin ,
` version ` int ( 11 ) NOT NULL ,
` requirements ` text COLLATE utf8_bin ,
2017-08-29 18:28:18 +02:00
` fixed ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-09-18 00:38:30 +02:00
` active ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-06-13 12:00:32 +02:00
PRIMARY KEY ( id ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` name ` ( ` name ` ) ,
INDEX ` meta - category ` ( ` meta - category ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `object_template_elements`
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` object_template_elements ` (
2017-06-13 12:00:32 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2017-08-03 14:26:11 +02:00
` object_template_id ` int ( 11 ) NOT NULL ,
2017-08-29 18:28:18 +02:00
` object_relation ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_bin ,
` type ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_bin ,
2017-08-03 14:26:11 +02:00
` ui - priority ` int ( 11 ) NOT NULL ,
` categories ` text COLLATE utf8_bin ,
` sane_default ` text COLLATE utf8_bin ,
` values_list ` text COLLATE utf8_bin ,
2017-08-03 14:44:33 +02:00
` description ` text COLLATE utf8_bin ,
2020-11-14 14:26:00 +01:00
` disable_correlation ` tinyint ( 1 ) ,
2017-08-03 14:26:11 +02:00
` multiple ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-06-13 12:00:32 +02:00
PRIMARY KEY ( id ) ,
2017-08-29 18:28:18 +02:00
INDEX ` object_relation ` ( ` object_relation ` ) ,
2017-08-03 14:26:11 +02:00
INDEX ` type ` ( ` type ` )
2017-06-13 12:00:32 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
2015-07-22 17:19:23 +02:00
--
-- Table structure for table `organisations`
--
2019-07-30 16:52:29 +02:00
CREATE TABLE IF NOT EXISTS ` organisations ` (
2015-07-22 17:19:23 +02:00
` 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 ,
2016-01-06 21:10:57 +01:00
` 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 ,
2016-07-04 15:50:53 +02:00
` created_by ` int ( 11 ) NOT NULL DEFAULT 0 ,
2016-06-13 06:16:39 +02:00
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
2016-01-06 21:10:57 +01:00
` contacts ` text CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
2016-07-04 15:50:53 +02:00
` local ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-11-28 12:02:26 +01:00
` restricted_to_domain ` text COLLATE utf8_bin ,
2016-01-06 21:10:57 +01:00
` landingpage ` text CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
2015-07-22 17:19:23 +02:00
PRIMARY KEY ( ` id ` ) ,
2021-08-03 10:26:25 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2021-08-13 08:59:26 +02:00
UNIQUE INDEX ` name ` ( ` name ` ( 255 ) )
2015-07-22 17:19:23 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2021-07-01 12:47:08 +02:00
CREATE TABLE IF NOT EXISTS ` org_blocklists ` (
2017-03-07 17:39:44 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` org_uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
2017-03-08 17:55:20 +01:00
` created ` datetime NOT NULL ,
2017-03-07 17:39:44 +01:00
` org_name ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` comment ` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci ,
PRIMARY KEY ( ` id ` ) ,
2021-08-03 10:31:30 +02:00
UNIQUE INDEX ` org_uuid ` ( ` org_uuid ` ) ,
2017-03-07 17:39:44 +01:00
INDEX ` org_name ` ( ` org_name ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2015-07-22 17:19:23 +02:00
-- --------------------------------------------------------
2013-11-06 10:35:51 +01:00
--
-- Table structure for table `posts`
--
2013-11-17 17:54:15 +01:00
2013-11-06 10:35:51 +01:00
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 ,
2016-07-04 15:50:53 +02:00
` post_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` thread_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` post_id ` ( ` post_id ` ) ,
INDEX ` thread_id ` ( ` thread_id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2013-11-06 10:35:51 +01:00
2019-09-29 22:20:31 +02:00
CREATE TABLE IF NOT EXISTS ` rest_client_histories ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` org_id ` int ( 11 ) NOT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
` headers ` text ,
` body ` text ,
` url ` text ,
` http_method ` varchar ( 255 ) ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` use_full_path ` tinyint ( 1 ) DEFAULT 0 ,
` show_result ` tinyint ( 1 ) DEFAULT 0 ,
` skip_ssl ` tinyint ( 1 ) DEFAULT 0 ,
` outcome ` int ( 11 ) NOT NULL ,
` bookmark ` tinyint ( 1 ) NOT NULL DEFAUlT 0 ,
` bookmark_name ` varchar ( 255 ) NULL DEFAULT ' ' ,
PRIMARY KEY ( ` id ` ) ,
KEY ` org_id ` ( ` org_id ` ) ,
KEY ` user_id ` ( ` user_id ` ) ,
KEY ` timestamp ` ( ` timestamp ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2013-11-06 10:35:51 +01:00
-- --------------------------------------------------------
2013-05-31 17:50:00 +02:00
--
-- Table structure for table `regexp`
--
CREATE TABLE IF NOT EXISTS ` regexp ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` regexp ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` replacement ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2013-07-11 13:12:37 +02:00
` type ` varchar ( 100 ) COLLATE utf8_bin NOT NULL DEFAULT ' ALL ' ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE IF NOT EXISTS ` roles ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2013-06-24 12:36:52 +02:00
` name ` varchar ( 100 ) COLLATE utf8_bin NOT NULL ,
2013-05-31 17:50:00 +02:00
` created ` datetime DEFAULT NULL ,
` modified ` datetime DEFAULT NULL ,
` perm_add ` tinyint ( 1 ) DEFAULT NULL ,
` perm_modify ` tinyint ( 1 ) DEFAULT NULL ,
` perm_modify_org ` tinyint ( 1 ) DEFAULT NULL ,
` perm_publish ` tinyint ( 1 ) DEFAULT NULL ,
2016-07-11 00:47:20 +02:00
` perm_delegate ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2013-05-31 17:50:00 +02:00
` perm_sync ` tinyint ( 1 ) DEFAULT NULL ,
` perm_admin ` tinyint ( 1 ) DEFAULT NULL ,
` perm_audit ` tinyint ( 1 ) DEFAULT NULL ,
` perm_full ` tinyint ( 1 ) DEFAULT NULL ,
2016-07-04 15:50:53 +02:00
` 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 ,
2017-03-17 14:43:41 +01:00
` perm_sighting ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2017-07-02 00:05:15 +02:00
` perm_object_template ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-08-30 15:52:58 +02:00
` default_role ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2018-06-20 06:30:01 +02:00
` memory_limit ` VARCHAR ( 255 ) COLLATE utf8_bin DEFAULT " " ,
` max_execution_time ` VARCHAR ( 255 ) COLLATE utf8_bin DEFAULT " " ,
` restricted_to_site_admin ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` perm_publish_zmq ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2019-03-05 12:24:56 +01:00
` perm_publish_kafka ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2019-08-20 16:37:06 +02:00
` perm_decaying ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 14:26:00 +01:00
` enforce_rate_limit ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` rate_limit_count ` int ( 11 ) NOT NULL DEFAULT 0 ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `servers`
--
CREATE TABLE IF NOT EXISTS ` servers ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2015-07-22 17:19:23 +02:00
` name ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2013-05-31 17:50:00 +02:00
` url ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` authkey ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
2013-05-31 17:50:00 +02:00
` push ` tinyint ( 1 ) NOT NULL ,
` pull ` tinyint ( 1 ) NOT NULL ,
2019-11-22 21:53:51 +01:00
` push_sightings ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2015-07-22 17:19:23 +02:00
` lastpulledid ` int ( 11 ) DEFAULT NULL ,
` lastpushedid ` int ( 11 ) DEFAULT NULL ,
` organization ` varchar ( 10 ) COLLATE utf8_bin DEFAULT NULL ,
` remote_org_id ` int ( 11 ) NOT NULL ,
2017-01-05 16:40:40 +01:00
` publish_without_email ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` unpublish_event ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2014-02-05 17:06:49 +01:00
` self_signed ` tinyint ( 1 ) NOT NULL ,
2015-07-22 17:19:23 +02:00
` pull_rules ` text COLLATE utf8_bin NOT NULL ,
` push_rules ` text COLLATE utf8_bin NOT NULL ,
2016-04-12 22:33:12 +02:00
` cert_file ` varchar ( 255 ) COLLATE utf8_bin DEFAULT NULL ,
2016-08-01 16:30:22 +02:00
` client_cert_file ` varchar ( 255 ) COLLATE utf8_bin DEFAULT NULL ,
2016-08-30 15:52:58 +02:00
` internal ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2019-09-29 22:20:31 +02:00
` skip_proxy ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` caching_enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` priority ` int ( 11 ) NOT NULL DEFAULT 0 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
2019-09-29 22:20:31 +02:00
INDEX ` priority ` ( ` priority ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` remote_org_id ` ( ` remote_org_id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
2017-02-17 09:46:07 +01:00
-- Table structure for table ``)ributes`
2013-05-31 17:50:00 +02:00
--
CREATE TABLE IF NOT EXISTS ` shadow_attributes ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2017-02-17 09:34:56 +01:00
` old_id ` int ( 11 ) DEFAULT 0 ,
2013-05-31 17:50:00 +02:00
` event_id ` int ( 11 ) NOT NULL ,
` 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 ,
2016-07-04 15:50:53 +02:00
` to_ids ` tinyint ( 1 ) NOT NULL DEFAULT 1 ,
2013-05-31 17:50:00 +02:00
` uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
` value2 ` text COLLATE utf8_bin ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
2016-07-15 17:42:52 +02:00
` email ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL ,
2015-07-22 17:19:23 +02:00
` event_org_id ` int ( 11 ) NOT NULL ,
2020-11-18 11:19:00 +01:00
` comment ` text COLLATE utf8_unicode_ci NOT NULL ,
2014-02-05 17:06:49 +01:00
` event_uuid ` varchar ( 40 ) COLLATE utf8_bin NOT NULL ,
2016-07-04 15:50:53 +02:00
` deleted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
2016-12-09 09:54:08 +01:00
` proposal_to_delete ` BOOLEAN NOT NULL DEFAULT 0 ,
2017-02-17 09:34:56 +01:00
` disable_correlation ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 15:14:19 +01:00
` first_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
` last_seen ` BIGINT ( 20 ) NULL DEFAULT NULL ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` event_uuid ` ( ` event_uuid ` ) ,
INDEX ` event_org_id ` ( ` event_org_id ` ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` old_id ` ( ` old_id ` ) ,
2015-12-28 14:05:13 +01:00
INDEX ` value1 ` ( ` value1 ` ( 255 ) ) ,
2017-02-17 09:46:07 +01:00
INDEX ` value2 ` ( ` value2 ` ( 255 ) ) ,
INDEX ` type ` ( ` type ` ) ,
2020-11-14 15:14:19 +01:00
INDEX ` category ` ( ` category ` ) ,
INDEX ` first_seen ` ( ` first_seen ` ) ,
INDEX ` last_seen ` ( ` last_seen ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2014-02-05 17:06:49 +01:00
-- --------------------------------------------------------
2016-02-20 11:08:51 +01:00
--
-- Table structure for table `shadow_attribute_correlations`
--
CREATE TABLE IF NOT EXISTS ` shadow_attribute_correlations ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` org_id ` int ( 11 ) NOT NULL ,
` value ` text NOT NULL ,
` distribution ` tinyint ( 4 ) NOT NULL ,
` a_distribution ` tinyint ( 4 ) NOT NULL ,
` sharing_group_id ` int ( 11 ) ,
` a_sharing_group_id ` int ( 11 ) ,
` attribute_id ` int ( 11 ) NOT NULL ,
` 1 _shadow_attribute_id ` int ( 11 ) NOT NULL ,
` event_id ` int ( 11 ) NOT NULL ,
` 1 _event_id ` int ( 11 ) NOT NULL ,
` info ` text COLLATE utf8_bin NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
2016-07-05 04:42:29 +02:00
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` attribute_id ` ( ` attribute_id ` ) ,
INDEX ` a_sharing_group_id ` ( ` a_sharing_group_id ` ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
2016-12-15 18:38:51 +01:00
INDEX ` 1 _event_id ` ( ` 1 _event_id ` ) ,
2016-07-05 04:42:29 +02:00
INDEX ` sharing_group_id ` ( ` sharing_group_id ` ) ,
INDEX ` 1 _shadow_attribute_id ` ( ` 1 _shadow_attribute_id ` )
2016-02-20 11:08:51 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
-- --------------------------------------------------------
2015-07-22 17:19:23 +02:00
--
-- Table structure for table `sharing_group_orgs`
--
2020-03-20 16:05:45 +01:00
CREATE TABLE IF NOT EXISTS ` sharing_group_orgs ` (
2015-07-22 17:19:23 +02:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` sharing_group_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
2016-07-04 15:50:53 +02:00
` extend ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` sharing_group_id ` ( ` sharing_group_id ` )
2015-07-22 17:19:23 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- --------------------------------------------------------
--
-- Table structure for table `sharing_group_servers`
--
2020-03-20 16:05:45 +01:00
CREATE TABLE IF NOT EXISTS ` sharing_group_servers ` (
2015-07-22 17:19:23 +02:00
` 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 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` server_id ` ( ` server_id ` ) ,
INDEX ` sharing_group_id ` ( ` sharing_group_id ` )
2015-07-22 17:19:23 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- --------------------------------------------------------
--
-- Table structure for table `sharing_groups`
--
2020-03-20 16:05:45 +01:00
CREATE TABLE IF NOT EXISTS ` sharing_groups ` (
2015-07-22 17:19:23 +02:00
` 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 ,
2016-07-04 15:50:53 +02:00
` sync_user_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2015-07-22 17:19:23 +02:00
` active ` tinyint ( 1 ) NOT NULL ,
` created ` datetime NOT NULL ,
` modified ` datetime NOT NULL ,
` local ` tinyint ( 1 ) NOT NULL ,
2016-07-19 08:44:11 +02:00
` roaming ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` sync_user_id ` ( ` sync_user_id ` ) ,
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2021-10-20 18:23:35 +02:00
UNIQUE INDEX ` name ` ( ` name ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` organisation_uuid ` ( ` organisation_uuid ` )
2015-07-22 17:19:23 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2020-11-14 14:26:00 +01:00
CREATE TABLE IF NOT EXISTS sightingdb_orgs (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` sightingdb_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( id ) ,
INDEX ` sightingdb_id ` ( ` sightingdb_id ` ) ,
INDEX ` org_id ` ( ` org_id ` )
) ENGINE = InnoDB ;
CREATE TABLE IF NOT EXISTS sightingdbs (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` name ` varchar ( 255 ) NOT NULL ,
` description ` text ,
` owner ` varchar ( 255 ) DEFAULT ' ' ,
` host ` varchar ( 255 ) DEFAULT ' http://localhost ' ,
` port ` int ( 11 ) DEFAULT 9999 ,
` timestamp ` int ( 11 ) NOT NULL DEFAULT 0 ,
` enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` skip_proxy ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` ssl_skip_verification ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
` namespace ` varchar ( 255 ) DEFAULT ' ' ,
PRIMARY KEY ( id ) ,
INDEX ` name ` ( ` name ` ) ,
INDEX ` owner ` ( ` owner ` ) ,
INDEX ` host ` ( ` host ` ) ,
INDEX ` port ` ( ` port ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ;
2015-07-22 17:19:23 +02:00
-- --------------------------------------------------------
2016-11-21 17:57:55 +01:00
--
-- Table structure for table sightings
--
2019-04-04 11:27:16 +02:00
CREATE TABLE IF NOT EXISTS ` sightings ` (
2017-02-17 09:39:24 +01:00
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2017-02-17 09:34:56 +01:00
` attribute_id ` int ( 11 ) NOT NULL ,
` event_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
` date_sighting ` bigint ( 20 ) NOT NULL ,
` uuid ` varchar ( 255 ) COLLATE utf8_bin DEFAULT " " ,
` source ` varchar ( 255 ) COLLATE utf8_bin DEFAULT " " ,
` type ` int ( 11 ) DEFAULT 0 ,
2016-11-21 17:57:55 +01:00
PRIMARY KEY ( id ) ,
2017-02-17 09:34:56 +01:00
INDEX ` attribute_id ` ( ` attribute_id ` ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
2021-08-11 14:19:28 +02:00
UNIQUE INDEX ` uuid ` ( ` uuid ` ) ,
2017-02-17 09:34:56 +01:00
INDEX ` source ` ( ` source ` ) ,
INDEX ` type ` ( ` type ` )
2016-11-21 17:57:55 +01:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2019-09-29 22:20:31 +02:00
CREATE TABLE IF NOT EXISTS tag_collections (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` uuid ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
` org_id ` int ( 11 ) NOT NULL ,
` name ` varchar ( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
` description ` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
` all_orgs ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( id ) ,
INDEX ` uuid ` ( ` uuid ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` org_id ` ( ` org_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
CREATE TABLE IF NOT EXISTS tag_collection_tags (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` tag_collection_id ` int ( 11 ) NOT NULL ,
` tag_id ` int ( 11 ) NOT NULL ,
PRIMARY KEY ( id ) ,
2020-09-01 19:05:26 +02:00
INDEX ` tag_collection_id ` ( ` tag_collection_id ` ) ,
INDEX ` tag_id ` ( ` tag_id ` )
2019-09-29 22:20:31 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2016-11-21 17:57:55 +01:00
-- --------------------------------------------------------
2014-02-05 17:06:49 +01:00
--
-- Table structure for table `tags`
--
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 ,
2015-07-22 17:19:23 +02:00
` exportable ` tinyint ( 1 ) NOT NULL ,
2019-01-01 16:39:32 +01:00
` org_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2018-06-20 06:30:01 +02:00
` user_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2017-02-17 09:34:56 +01:00
` hide_tag ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2019-09-29 22:20:31 +02:00
` numerical_value ` int ( 11 ) NULL ,
2016-07-20 00:08:46 +02:00
PRIMARY KEY ( ` id ` ) ,
2021-08-12 14:30:46 +02:00
UNIQUE INDEX ` name ` ( ` name ` ( 255 ) ) ,
2018-06-20 06:30:01 +02:00
INDEX ` org_id ` ( ` org_id ` ) ,
2019-09-29 22:20:31 +02:00
INDEX ` user_id ` ( ` user_id ` ) ,
2019-09-29 22:31:18 +02:00
INDEX ` numerical_value ` ( ` numerical_value ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-02-05 17:06:49 +01:00
2013-11-17 17:54:15 +01:00
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
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 ' ,
2016-07-18 00:42:32 +02:00
` process_id ` varchar ( 32 ) DEFAULT NULL ,
2014-07-19 15:46:52 +02:00
` 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
2016-07-06 00:17:59 +02:00
--
-- 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 ,
2019-09-29 22:20:31 +02:00
` exclusive ` tinyint ( 1 ) DEFAULT 0 ,
` required ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-07-06 00:17:59 +02:00
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 ,
2016-07-11 19:33:21 +02:00
` expanded ` text COLLATE utf8_bin ,
2017-03-08 15:04:38 +01:00
` colour ` varchar ( 7 ) CHARACTER SET utf8 COLLATE utf8_bin ,
2019-09-29 22:20:31 +02:00
` description ` text CHARACTER SET UTF8 collate utf8_bin ,
` numerical_value ` int ( 11 ) NULL ,
2016-07-06 00:17:59 +02:00
PRIMARY KEY ( ` id ` ) ,
2019-09-29 22:20:31 +02:00
INDEX ` taxonomy_predicate_id ` ( ` taxonomy_predicate_id ` ) ,
INDEX ` numerical_value ` ( ` numerical_value ` )
2016-07-06 00:17:59 +02:00
) 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 ,
2016-07-11 19:33:21 +02:00
` expanded ` text COLLATE utf8_bin ,
2017-03-08 15:04:38 +01:00
` colour ` varchar ( 7 ) CHARACTER SET utf8 COLLATE utf8_bin ,
2019-09-29 22:20:31 +02:00
` description ` text CHARACTER SET UTF8 collate utf8_bin ,
` exclusive ` tinyint ( 1 ) DEFAULT 0 ,
` numerical_value ` int ( 11 ) NULL ,
2016-07-06 00:17:59 +02:00
PRIMARY KEY ( ` id ` ) ,
2019-09-29 22:20:31 +02:00
INDEX ` taxonomy_id ` ( ` taxonomy_id ` ) ,
INDEX ` numerical_value ` ( ` numerical_value ` )
2016-07-06 00:17:59 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
-- --------------------------------------------------------
2014-07-19 15:46:52 +02:00
--
-- 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- 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 ,
2016-07-04 15:50:53 +02:00
` to_ids ` tinyint ( 1 ) NOT NULL DEFAULT 1 ,
2014-07-19 15:46:52 +02:00
` 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
-- --------------------------------------------------------
--
-- 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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2014-07-19 15:46:52 +02:00
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
2013-11-06 10:35:51 +01:00
--
-- Table structure for table `threads`
--
2013-11-17 17:54:15 +01:00
2013-11-06 10:35:51 +01:00
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 ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
` sharing_group_id ` int ( 11 ) NOT NULL ,
2015-12-27 19:00:35 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` event_id ` ( ` event_id ` ) ,
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` sharing_group_id ` ( ` sharing_group_id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2013-11-17 17:54:15 +01:00
-- --------------------------------------------------------
--
-- Table structure for table `threat_levels`
--
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 ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = latin1 ;
2013-11-17 17:54:15 +01:00
2019-09-29 22:20:31 +02:00
CREATE TABLE IF NOT EXISTS ` user_settings ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
` setting ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
` value ` text COLLATE utf8_bin NOT NULL ,
` user_id ` int ( 11 ) NOT NULL ,
` timestamp ` int ( 11 ) NOT NULL ,
INDEX ` setting ` ( ` setting ` ) ,
INDEX ` user_id ` ( ` user_id ` ) ,
INDEX ` timestamp ` ( ` timestamp ` ) ,
PRIMARY KEY ( ` id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8 ;
2013-11-06 10:35:51 +01:00
-- --------------------------------------------------------
2013-05-31 17:50:00 +02:00
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS ` users ` (
` id ` int ( 11 ) NOT NULL AUTO_INCREMENT ,
2017-07-12 15:59:20 +02:00
` password ` varchar ( 255 ) COLLATE utf8_bin NOT NULL ,
2015-07-22 17:19:23 +02:00
` org_id ` int ( 11 ) NOT NULL ,
2016-07-04 15:50:53 +02:00
` server_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
2013-05-31 17:50:00 +02:00
` email ` varchar ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
2016-07-04 15:50:53 +02:00
` autoalert ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-04-12 22:25:22 +02:00
` authkey ` varchar ( 40 ) COLLATE utf8_bin DEFAULT NULL ,
2016-07-04 15:50:53 +02:00
` invited_by ` int ( 11 ) NOT NULL DEFAULT 0 ,
2016-04-12 22:25:22 +02:00
` gpgkey ` longtext COLLATE utf8_bin ,
2016-07-22 10:48:19 +02:00
` certif_public ` longtext COLLATE utf8_bin ,
2016-07-05 04:53:56 +02:00
` nids_sid ` int ( 15 ) NOT NULL DEFAULT 0 ,
2016-07-04 15:50:53 +02:00
` termsaccepted ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-07-05 04:53:56 +02:00
` newsread ` int ( 11 ) unsigned DEFAULT 0 ,
2016-07-04 15:50:53 +02:00
` role_id ` int ( 11 ) NOT NULL DEFAULT 0 ,
` change_pw ` tinyint ( 4 ) NOT NULL DEFAULT 0 ,
` contactalert ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2016-07-05 04:53:56 +02:00
` disabled ` BOOLEAN NOT NULL DEFAULT 0 ,
2015-12-09 23:47:19 +01:00
` expiration ` datetime DEFAULT NULL ,
2016-07-04 15:28:17 +02:00
` current_login ` int ( 11 ) DEFAULT 0 ,
` last_login ` int ( 11 ) DEFAULT 0 ,
2016-03-31 01:09:04 +02:00
` force_logout ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2018-02-02 19:44:41 +01:00
` date_created ` bigint ( 20 ) ,
` date_modified ` bigint ( 20 ) ,
2013-05-31 17:50:00 +02:00
PRIMARY KEY ( ` id ` ) ,
2021-08-13 13:53:59 +02:00
UNIQUE INDEX ` email ` ( ` email ` ) ,
2015-12-27 19:00:35 +01:00
INDEX ` org_id ` ( ` org_id ` ) ,
INDEX ` server_id ` ( ` server_id ` )
2016-07-04 15:27:37 +02:00
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_bin ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
2023-11-24 13:47:59 +01:00
--
-- Table structure for table `user_login_profiles`
--
CREATE TABLE ` user_login_profiles ` (
` id ` int ( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
` created_at ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
` user_id ` int ( 11 ) NOT NULL ,
` status ` varchar ( 191 ) DEFAULT NULL ,
` ip ` varchar ( 191 ) DEFAULT NULL ,
` user_agent ` varchar ( 191 ) DEFAULT NULL ,
` accept_lang ` varchar ( 191 ) DEFAULT NULL ,
` geoip ` varchar ( 191 ) DEFAULT NULL ,
` ua_platform ` varchar ( 191 ) DEFAULT NULL ,
` ua_browser ` varchar ( 191 ) DEFAULT NULL ,
` ua_pattern ` varchar ( 191 ) DEFAULT NULL ,
` hash ` varchar ( 32 ) COLLATE utf8mb4_unicode_ci NOT NULL ,
PRIMARY KEY ( ` id ` ) ,
UNIQUE KEY ` hash ` ( ` hash ` ) ,
KEY ` ip ` ( ` ip ` ) ,
KEY ` status ` ( ` status ` ) ,
KEY ` geoip ` ( ` geoip ` ) ,
INDEX ` user_id ` ( ` user_id ` )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- --------------------------------------------------------
2016-07-06 00:22:19 +02:00
--
-- 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 ' ,
2016-07-18 12:22:05 +02:00
` enabled ` tinyint ( 1 ) NOT NULL DEFAULT 0 ,
2020-11-14 14:26:00 +01:00
` warninglist_entry_count ` int ( 11 ) unsigned NOT NULL DEFAULT 0 ,
2016-07-06 00:22:19 +02:00
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 ,
2016-12-15 18:38:51 +01:00
PRIMARY KEY ( ` id ` ) ,
INDEX ` warninglist_id ` ( ` warninglist_id ` )
2016-07-06 00:22:19 +02:00
) 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 ;
-- --------------------------------------------------------
2013-05-31 17:50:00 +02:00
--
-- Default values for initial installation
--
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` admin_settings ` ( ` id ` , ` setting ` , ` value ` ) VALUES
2020-11-14 14:26:00 +01:00
( 1 , ' db_version ' , ' 61 ' ) ;
2016-03-14 13:59:01 +01:00
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` feeds ` ( ` id ` , ` provider ` , ` name ` , ` url ` , ` distribution ` , ` default ` , ` enabled ` ) VALUES
2016-03-14 14:15:20 +01:00
( 1 , ' CIRCL ' , ' CIRCL OSINT Feed ' , ' https://www.circl.lu/doc/misp/feed-osint ' , 3 , 1 , 0 ) ,
2019-10-31 08:48:00 +01:00
( 2 , ' Botvrij.eu ' , ' The Botvrij.eu Data ' , ' https://www.botvrij.eu/data/feed-osint ' , 3 , 1 , 0 ) ;
2016-02-20 11:08:51 +01:00
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` regexp ` ( ` id ` , ` regexp ` , ` replacement ` , ` type ` ) VALUES
2014-02-13 09:04:27 +01:00
( 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 ' ) ;
2013-05-31 17:50:00 +02:00
-- --------------------------------------------------------
--
-- Creating initial roles
--
-- 1. Admin - has full access
2014-02-05 17:06:49 +01:00
-- 2. Org Admin - read/write/publish/audit/admin/sync/auth/tagger
2013-05-31 17:50:00 +02:00
-- 3. User - User - Read / Write, no other permissions (default)
2016-07-11 19:12:44 +02:00
-- 4. Publisher
-- 5. Sync user - read/write/publish/sync/auth
-- 6. Automation user - read/write/publish/auth
-- 7. Read Only - read
2013-05-31 17:50:00 +02:00
--
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
VALUES ( 1 , ' admin ' , NOW ( ) , NOW ( ) , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 ) ;
2014-02-05 17:06:49 +01:00
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
VALUES ( 2 , ' Org Admin ' , NOW ( ) , NOW ( ) , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 0 ) ;
2014-02-05 17:06:49 +01:00
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
2022-12-01 10:49:50 +01:00
VALUES ( 3 , ' User ' , NOW ( ) , NOW ( ) , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 1 ) ;
2013-05-31 17:50:00 +02:00
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
2022-12-01 10:49:50 +01:00
VALUES ( 4 , ' Publisher ' , NOW ( ) , NOW ( ) , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 1 , 0 ) ;
2015-11-14 11:09:02 +01:00
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
2022-12-01 10:49:50 +01:00
VALUES ( 5 , ' Sync user ' , NOW ( ) , NOW ( ) , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 1 , 0 ) ;
2013-05-31 17:50:00 +02:00
2020-11-16 15:02:41 +01:00
INSERT IGNORE INTO ` roles ` ( ` id ` , ` name ` , ` created ` , ` modified ` , ` perm_add ` , ` perm_modify ` , ` perm_modify_org ` , ` perm_publish ` , ` perm_publish_zmq ` , ` perm_publish_kafka ` , ` 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 ` , ` perm_sighting ` , ` perm_object_template ` , ` perm_decaying ` , ` default_role ` )
2022-12-01 10:49:50 +01:00
VALUES ( 6 , ' Read Only ' , NOW ( ) , NOW ( ) , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ;
2013-05-31 17:50:00 +02:00
2013-06-24 12:36:52 +02:00
-- --------------------------------------------------------
2013-11-17 17:54:15 +01:00
--
-- Initial threat levels
--
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` threat_levels ` ( ` id ` , ` name ` , ` description ` , ` form_description ` )
2013-11-17 17:54:15 +01:00
VALUES
2016-08-01 18:18:33 +02:00
( 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 ' ) ;
2013-11-17 17:54:15 +01:00
2014-01-13 12:47:43 +01:00
-- --------------------------------------------------------
2014-10-07 23:21:48 +02:00
--
-- Default templates
--
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` templates ` ( ` id ` , ` name ` , ` description ` , ` org ` , ` share ` ) VALUES
2014-10-07 23:21:48 +02:00
( 1 , ' Phishing E-mail ' , ' Create a MISP event about a Phishing E-mail. ' , ' MISP ' , 1 ) ,
2014-10-07 23:44:50 +02:00
( 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 ) ,
2014-10-07 23:21:48 +02:00
( 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 ) ;
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` template_elements ` ( ` id ` , ` template_id ` , ` position ` , ` element_definition ` ) VALUES
2014-10-07 23:21:48 +02:00
( 1 , 1 , 2 , ' attribute ' ) ,
( 2 , 1 , 3 , ' attribute ' ) ,
( 3 , 1 , 1 , ' text ' ) ,
( 4 , 1 , 4 , ' attribute ' ) ,
( 5 , 1 , 5 , ' text ' ) ,
( 6 , 1 , 6 , ' attribute ' ) ,
( 7 , 1 , 7 , ' attribute ' ) ,
( 8 , 1 , 8 , ' attribute ' ) ,
( 11 , 2 , 1 , ' text ' ) ,
( 12 , 2 , 2 , ' attribute ' ) ,
( 13 , 2 , 3 , ' text ' ) ,
( 14 , 2 , 4 , ' file ' ) ,
( 15 , 2 , 5 , ' attribute ' ) ,
( 16 , 2 , 10 , ' text ' ) ,
( 17 , 2 , 6 , ' attribute ' ) ,
( 18 , 2 , 7 , ' attribute ' ) ,
( 19 , 2 , 8 , ' attribute ' ) ,
( 20 , 2 , 9 , ' attribute ' ) ,
( 21 , 2 , 11 , ' file ' ) ,
( 22 , 2 , 12 , ' attribute ' ) ,
( 23 , 2 , 13 , ' attribute ' ) ,
( 24 , 2 , 14 , ' attribute ' ) ,
( 25 , 2 , 15 , ' attribute ' ) ,
( 26 , 2 , 16 , ' attribute ' ) ,
( 27 , 2 , 17 , ' attribute ' ) ,
( 28 , 2 , 18 , ' attribute ' ) ,
( 29 , 3 , 1 , ' text ' ) ,
( 30 , 3 , 2 , ' file ' ) ,
( 31 , 3 , 4 , ' text ' ) ,
( 32 , 3 , 9 , ' text ' ) ,
( 33 , 3 , 11 , ' text ' ) ,
( 34 , 3 , 10 , ' attribute ' ) ,
( 35 , 3 , 12 , ' attribute ' ) ,
( 36 , 3 , 3 , ' attribute ' ) ,
( 37 , 3 , 5 , ' attribute ' ) ,
( 38 , 3 , 6 , ' attribute ' ) ,
( 39 , 3 , 7 , ' attribute ' ) ,
( 40 , 3 , 8 , ' file ' ) ,
( 41 , 3 , 13 , ' text ' ) ,
( 42 , 3 , 14 , ' attribute ' ) ,
( 43 , 3 , 15 , ' attribute ' ) ,
( 44 , 3 , 16 , ' attribute ' ) ,
( 45 , 4 , 1 , ' text ' ) ,
( 46 , 4 , 2 , ' attribute ' ) ,
( 47 , 4 , 3 , ' attribute ' ) ;
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` template_element_attributes ` ( ` id ` , ` template_element_id ` , ` name ` , ` description ` , ` to_ids ` , ` category ` , ` complex ` , ` type ` , ` mandatory ` , ` batch ` ) VALUES
2014-10-07 23:21:48 +02:00
( 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 ) ,
( 4 , 6 , ' Spoofed source address ' , ' If an e-mail address was spoofed, specify which. ' , 1 , ' Payload delivery ' , 0 , ' email-src ' , 0 , 0 ) ,
( 5 , 7 , ' Source IP ' , ' The source IP from which the e-mail was sent ' , 1 , ' Payload delivery ' , 0 , ' ip-src ' , 0 , 1 ) ,
( 6 , 8 , ' X-mailer header ' , ' It could be useful to capture which application and which version thereof was used to send the message, as described by the X-mailer header. ' , 1 , ' Payload delivery ' , 0 , ' text ' , 0 , 1 ) ,
( 7 , 12 , ' From address ' , ' The source address from which the e-mail was sent ' , 1 , ' Payload delivery ' , 0 , ' email-src ' , 1 , 1 ) ,
( 8 , 15 , ' Spoofed From Address ' , ' The spoofed source address from which the e-mail appears to be sent. ' , 1 , ' Payload delivery ' , 0 , ' email-src ' , 0 , 1 ) ,
( 9 , 17 , ' E-mail Source IP ' , ' The IP address from which the e-mail was sent. ' , 1 , ' Payload delivery ' , 0 , ' ip-src ' , 0 , 1 ) ,
( 10 , 18 , ' X-mailer header ' , ' It could be useful to capture which application and which version thereof was used to send the message, as described by the X-mailer header. ' , 1 , ' Payload delivery ' , 0 , ' text ' , 0 , 0 ) ,
( 11 , 19 , ' Malicious URL in the e-mail ' , ' If there was a malicious URL (or several), please specify it here ' , 1 , ' Payload delivery ' , 0 , ' ip-dst ' , 0 , 1 ) ,
( 12 , 20 , ' Exploited vulnerablity ' , ' The vulnerabilities exploited during the payload delivery. ' , 0 , ' Payload delivery ' , 0 , ' vulnerability ' , 0 , 1 ) ,
( 13 , 22 , ' C2 information ' , ' Command and Control information detected during the analysis. ' , 1 , ' Network activity ' , 1 , ' CnC ' , 0 , 1 ) ,
( 14 , 23 , ' Artifacts dropped (File) ' , ' Any information about the files dropped during the analysis ' , 1 , ' Artifacts dropped ' , 1 , ' File ' , 0 , 1 ) ,
( 15 , 24 , ' Artifacts dropped (Registry key) ' , ' Any registry keys touched during the analysis ' , 1 , ' Artifacts dropped ' , 0 , ' regkey ' , 0 , 1 ) ,
( 16 , 25 , ' Artifacts dropped (Registry key + value) ' , ' Any registry keys created or altered together with the value. ' , 1 , ' Artifacts dropped ' , 0 , ' regkey|value ' , 0 , 1 ) ,
( 17 , 26 , ' Persistance mechanism (filename) ' , ' Filenames (or filenames with filepaths) used as a persistence mechanism ' , 1 , ' Persistence mechanism ' , 0 , ' regkey|value ' , 0 , 1 ) ,
( 18 , 27 , ' Persistence mechanism (Registry key) ' , ' Any registry keys touched as part of the persistence mechanism during the analysis ' , 1 , ' Persistence mechanism ' , 0 , ' regkey ' , 0 , 1 ) ,
( 19 , 28 , ' Persistence mechanism (Registry key + value) ' , ' Any registry keys created or modified together with their values used by the persistence mechanism ' , 1 , ' Persistence mechanism ' , 0 , ' regkey|value ' , 0 , 1 ) ,
( 20 , 34 , ' C2 Information ' , ' You can drop any urls, domains, hostnames or IP addresses that were detected as the Command and Control during the analysis here. ' , 1 , ' Network activity ' , 1 , ' CnC ' , 0 , 1 ) ,
( 21 , 35 , ' Other Network Activity ' , ' Drop any applicable information about other network activity here. The attributes created here will NOT be marked for IDS exports. ' , 0 , ' Network activity ' , 1 , ' CnC ' , 0 , 1 ) ,
( 22 , 36 , ' Vulnerability ' , ' The vulnerability or vulnerabilities that the sample exploits ' , 0 , ' Payload delivery ' , 0 , ' vulnerability ' , 0 , 1 ) ,
( 23 , 37 , ' Artifacts Dropped (File) ' , ' Insert any data you have on dropped files here. ' , 1 , ' Artifacts dropped ' , 1 , ' File ' , 0 , 1 ) ,
( 24 , 38 , ' Artifacts dropped (Registry key) ' , ' Any registry keys touched during the analysis ' , 1 , ' Artifacts dropped ' , 0 , ' regkey ' , 0 , 1 ) ,
( 25 , 39 , ' Artifacts dropped (Registry key + value) ' , ' Any registry keys created or altered together with the value. ' , 1 , ' Artifacts dropped ' , 0 , ' regkey|value ' , 0 , 1 ) ,
( 26 , 42 , ' Persistence mechanism (filename) ' , ' Insert any filenames used by the persistence mechanism. ' , 1 , ' Persistence mechanism ' , 0 , ' filename ' , 0 , 1 ) ,
( 27 , 43 , ' Persistence Mechanism (Registry key) ' , ' Paste any registry keys that were created or modified as part of the persistence mechanism ' , 1 , ' Persistence mechanism ' , 0 , ' regkey ' , 0 , 1 ) ,
( 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 ) ;
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` template_element_files ` ( ` id ` , ` template_element_id ` , ` name ` , ` description ` , ` category ` , ` malware ` , ` mandatory ` , ` batch ` ) VALUES
2014-10-07 23:21:48 +02:00
( 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 ) ;
2020-03-23 21:42:38 +01:00
INSERT IGNORE INTO ` template_element_texts ` ( ` id ` , ` name ` , ` template_element_id ` , ` text ` ) VALUES
2014-10-07 23:21:48 +02:00
( 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 ' ) ,
( 5 , ' Optional information about the payload delivery ' , 13 , ' All of the fields below are optional, please fill out anything that '' s applicable. This section describes the payload delivery, including the e-mail itself, the attached file, the vulnerability it is exploiting and any malicious urls in the e-mail. ' ) ,
( 6 , ' Optional information obtained from analysing the malicious file ' , 16 , ' Information about the analysis of the malware (if applicable). This can include C2 information, artifacts dropped during the analysis, persistance mechanism, etc. ' ) ,
( 7 , ' Malware Sample ' , 29 , ' If you can, please upload the sample that the report revolves around. ' ) ,
( 8 , ' Dropped Artifacts ' , 31 , ' Describe any dropped artifacts that you have encountered during your analysis ' ) ,
( 9 , ' C2 Information ' , 32 , ' The following field deals with Command and Control information obtained during the analysis. All fields are optional. ' ) ,
( 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. ' ) ;
2017-04-10 17:25:10 +02:00
2021-07-01 12:47:08 +02:00
INSERT IGNORE INTO ` org_blocklists ` ( ` org_uuid ` , ` created ` , ` org_name ` , ` comment ` ) VALUES
2017-04-10 17:25:10 +02:00
( ' 58d38339-7b24-4386-b4b4-4c0f950d210f ' , NOW ( ) , ' Setec Astrononomy ' , ' default example ' ) ,
( ' 58d38326-eda8-443a-9fa8-4e12950d210f ' , NOW ( ) , ' Acme Finance ' , ' default example ' ) ;
2020-11-14 14:26:00 +01:00
2022-12-06 10:39:53 +01:00
INSERT IGNORE INTO ` admin_settings ` ( ` setting ` , ` value ` ) VALUES
( ' fix_login ' , NOW ( ) ) ,
( ' default_role ' , 3 ) ;