This repository has been archived by the owner on Feb 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable.sql
161 lines (139 loc) · 5.68 KB
/
table.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
DROP TABLE IF EXISTS `bro_conn`;
CREATE TABLE IF NOT EXISTS `bro_conn` (
`CONN_ID` bigint(20) unsigned NOT NULL,
`CONN_TS` timestamp(6) NOT NULL,
`CONN_UID` varchar(20) NOT NULL,
`CONN_ORIGH` varbinary(16) NOT NULL,
`CONN_ORIGP` smallint(5) unsigned NOT NULL,
`CONN_RESPH` varbinary(16) NOT NULL,
`CONN_RESPP` smallint(5) unsigned NOT NULL,
`CONN_PROTO` varchar(10) NOT NULL,
`CONN_SERVICE` varchar(7) NOT NULL,
`CONN_DURATION` decimal(11,6) NOT NULL,
`CONN_ORIGBYTES` int(10) unsigned NOT NULL,
`CONN_RESPBYTES` int(10) unsigned NOT NULL,
`CONN_CONNSTATE` varchar(10) NOT NULL,
`CONN_HISTORY` varchar(10) NOT NULL,
`CONN_ORIGPKTS` int(10) unsigned NOT NULL,
`CONN_ORIGIPBYTES` int(10) unsigned NOT NULL,
`CONN_RESPPKTS` int(10) unsigned NOT NULL,
`CONN_RESPIPBYTES` int(10) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_conn`
ADD PRIMARY KEY (`CONN_ID`),
ADD KEY `CONN_UID` (`CONN_UID`),
ADD KEY `CONN_ORIGH` (`CONN_ORIGH`),
ADD KEY `CONN_ORIGP` (`CONN_ORIGP`),
ADD KEY `CONN_RESPH` (`CONN_RESPH`),
ADD KEY `CONN_RESPP` (`CONN_RESPP`);
ALTER TABLE `bro_conn`
MODIFY `CONN_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `bro_dns`;
CREATE TABLE IF NOT EXISTS `bro_dns` (
`DNS_ID` bigint(20) unsigned NOT NULL,
`DNS_UID` varchar(20) NOT NULL,
`DNS_TRANSID` varchar(20) NOT NULL,
`DNS_QUERY_SUBDOMAIN` varchar(255) NOT NULL,
`DNS_QUERY_TLD` varchar(255) NOT NULL,
`DNS_CLASSNAME` varchar(255) NOT NULL,
`DNS_TYPENAME` varchar(255) NOT NULL,
`DNS_RESPONSECODENAME` varchar(255) NOT NULL,
`DNS_ANSWERS` varchar(255) NOT NULL,
`DNS_TTL` int unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_dns`
ADD PRIMARY KEY (`DNS_ID`),
ADD KEY `DNS_UID` (`DNS_UID`),
ADD KEY `DNS_QUERY_SUBDOMAIN` (`DNS_QUERY_SUBDOMAIN`),
ADD KEY `DNS_QUERY_TLD` (`DNS_QUERY_TLD`);
ALTER TABLE `bro_dns`
MODIFY `DNS_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `bro_file`;
CREATE TABLE IF NOT EXISTS `bro_file` (
`FILE_ID` bigint(20) unsigned NOT NULL,
`FILE_FUID` varchar(20) NOT NULL,
`FILE_TXHOST` varbinary(16) NOT NULL,
`FILE_RXHOST` varbinary(16) NOT NULL,
`FILE_UID` varchar(20) NOT NULL,
`FILE_SOURCE` varchar(254) NOT NULL,
`FILE_ANALYZERS` varchar(50) NOT NULL,
`FILE_MIME` varchar(50) NOT NULL,
`FILE_FILENAME` varchar(100) NOT NULL,
`FILE_MD5` varchar(32) NOT NULL,
`FILE_SHA1` varchar(40) NOT NULL,
`FILE_SHA256` varchar(64) NOT NULL,
`FILE_EXTRACTED` varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_file`
ADD PRIMARY KEY (`FILE_ID`),
ADD KEY `FILE_FUID` (`FILE_FUID`),
ADD KEY `FILE_TXHOST` (`FILE_TXHOST`),
ADD KEY `FILE_RXHOST` (`FILE_RXHOST`),
ADD KEY `FILE_UID` (`FILE_UID`);
ALTER TABLE `bro_file`
MODIFY `FILE_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `bro_http`;
CREATE TABLE IF NOT EXISTS `bro_http` (
`HTTP_ID` bigint(20) unsigned NOT NULL,
`HTTP_UID` varchar(20) NOT NULL,
`HTTP_METHOD` varchar(10) NOT NULL,
`HTTP_HOST` varchar(255) NOT NULL,
`HTTP_URI` varchar(255) NOT NULL,
`HTTP_REFERRER` varchar(255) NOT NULL,
`HTTP_USERAGENT` varchar(255) NOT NULL,
`HTTP_REQLEN` smallint(5) unsigned NOT NULL,
`HTTP_RESPLEN` smallint(5) unsigned NOT NULL,
`HTTP_STATUSCODE` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_http`
ADD PRIMARY KEY (`HTTP_ID`),
ADD KEY `HTTP_UID` (`HTTP_UID`);
ALTER TABLE `bro_http`
MODIFY `HTTP_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `bro_ssl`;
CREATE TABLE IF NOT EXISTS `bro_ssl` (
`SSL_ID` bigint(20) unsigned NOT NULL,
`SSL_UID` varchar(20) NOT NULL,
`SSL_VERSION` varchar(15) NOT NULL,
`SSL_CIPHER` varchar(255) NOT NULL,
`SSL_SERVER` varchar(255) NOT NULL,
`SSL_SUBJECT` varchar(255) NOT NULL,
`SSL_ISSUER` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_ssl`
ADD PRIMARY KEY (`SSL_ID`),
ADD KEY `SSL_UID` (`SSL_UID`);
ALTER TABLE `bro_ssl`
MODIFY `SSL_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `bro_x509`;
CREATE TABLE IF NOT EXISTS `bro_x509` (
`X509_ID` bigint(20) unsigned NOT NULL,
`X509_FUID` varchar(20) NOT NULL,
`X509_VERSION` tinyint unsigned NOT NULL,
`X509_SERIAL` varchar(255) NOT NULL,
`X509_SUBJECT` varchar(255) NOT NULL,
`X509_ISSUER` varchar(255) NOT NULL,
`X509_NOTVALIDBEFORE` timestamp NOT NULL,
`X509_NOTVALIDAFTER` timestamp NOT NULL,
`X509_KEYALG` varchar(255) NOT NULL,
`X509_SIGALG` varchar(255) NOT NULL,
`X509_KEYTYPE` varchar(255) NOT NULL,
`X509_KEYLENGTH` smallint unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `bro_x509`
ADD PRIMARY KEY (`X509_ID`),
ADD KEY `X509_FUID` (`X509_FUID`);
ALTER TABLE `bro_x509`
MODIFY `X509_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
DROP TABLE IF EXISTS `passive_dns`;
CREATE TABLE IF NOT EXISTS `passive_dns` (
`PASSIVE_QUERY` varchar(255) NOT NULL,
`PASSIVE_ANSWER` varbinary(16) NOT NULL,
`PASSIVE_FIRSTFOUND` timestamp NOT NULL,
`PASSIVE_LASTFOUND` timestamp NULL,
`PASSIVE_COUNT` int unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ALTER TABLE `passive_dns`
ADD PRIMARY KEY (`PASSIVE_QUERY`, `PASSIVE_ANSWER`);
CREATE TABLE `test`.`Alexa` ( `Alexa_site` VARCHAR(30) NOT NULL , PRIMARY KEY (`Alexa_site`)) ENGINE = MyISAM;
CREATE TABLE `test`.`exempt_ips` ( `exempt_address` VARBINARY(16) NOT NULL , `exempt_reason` VARCHAR(255) NOT NULL , PRIMARY KEY (`exempt_address`)) ENGINE = MyISAM;