├── Administration.md
├── Elasticstack-Docker.md
├── Filebeat
└── meerkat.yml
├── HTTPS.md
├── LICENSE
├── LogStash
├── 0000-debug.conf
├── 0001-beats.conf
├── 1001-winlogbeat-cleanup-dashes.conf
├── 1002-winlogbeat-cleanup-lowercase.conf
├── 9001_output_beats.conf
├── EventSamples
│ ├── Application.txt
│ ├── Microsoft-Windows-Sysmon-Operational.txt
│ ├── Microsoft-Windows-WMI-Activity-Operational.txt
│ ├── Microsoft-windows-PowerShell-Operational.txt
│ ├── Security.txt
│ └── System.txt
└── redo
│ ├── 9000-winlogbeat-security-output.conf
│ ├── 9001-winlogbeat-wmiactivity-output.conf
│ ├── 9002-winlogbeat-powershell-output.conf
│ ├── 9003-winlogbeat-sysmon-output.conf
│ ├── 9004-winlogbeat-application-output.conf
│ ├── 9005-winlogbeat-system-output.conf
│ └── meerkat.conf
├── Meerkat.md
├── NTFS-Share.md
├── README.md
└── Winlogbeat
└── winlogbeat.yml
/Administration.md:
--------------------------------------------------------------------------------
1 | ### Monitoring
2 |
3 | ### View current listening ports
4 | This is helpful when determining if stack services are listening properly.
5 |
6 | `netstat -plntu`
7 |
8 | ### Monitor Filebeat
9 |
10 | ```
11 | tail -f /var/log/filebeat/filebeat
12 | ```
13 |
14 | OR.... run a single instance with INFO and ERROR sent straight to console
15 | ```
16 | /usr/bin/filebeat -e -v
17 | ```
18 |
19 | ### Monitor Logstash
20 | `tail -f /var/log/logstash/logstash-plain.log`
21 |
22 | ### Troubleshooting
23 |
24 | #### "Unindexed Fields Cannot be Searched"
25 | If Kibana is giving this error on some fields, you may have modified the fields in somewhere else in the chain (beats, logstash, elastic, etc)
26 |
27 | `Kibana > Management > Select Index > Click Refresh Fields button in top right`
28 |
29 | ### Removing Indexes
30 | Sometimes data doesn't ingest right and you just want to purge the index and reuse the name.
31 | Remove index from Kibana via the web interface first, then remove from Elasticstack via web request:
32 | ```
33 | curl -XDELETE localhost:9200/index/type/documentID
34 | ````
35 | So `curl -XDELETE localhost:9200/logstash-bro` would remove the entire index
36 | and `curl -XDELETE localhost:9200/windows*` would remove any index starting with windows
--------------------------------------------------------------------------------
/Elasticstack-Docker.md:
--------------------------------------------------------------------------------
1 | ## Install Docker on Debian-Based Distributions
2 | ```
3 | apt update
4 | apt install apt-transport-https ca-certificates curl software-properties-common
5 | echo 'deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable' >> /etc/apt/sources.list.d/docker.list
6 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
7 |
8 | apt update
9 | apt install docker-ce
10 | curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
11 | chmod +x /usr/local/bin/docker-compose
12 | ```
13 |
14 | ## Pull Elasticstack Image & Prepare
15 | ```
16 | git clone https://github.com/elastic/stack-docker /user/share/elastic
17 | sysctl -w vm.max_map_count=262144
18 | ```
19 |
20 | ### Set the PWD Environment Variable
21 |
22 | ```
23 | echo 'PWD=/usr/share/elastic/' >> /usr/share/elastic/.env
24 | ```
25 |
26 | ### Create Elasticstack containers
27 |
28 | ```
29 | docker-compose -f .\setup.yml up
30 | ```
31 | **SAVE THE PASSWORD PRESENTED AT THE END!**
32 |
33 | The password will only be given this once, so don't miss the chance to save it.
34 |
35 | ### Run the containers
36 |
37 | ```
38 | docker-compose up -d
39 | ```
40 |
41 | ## Access Kibana/Elastic
42 |
43 | ```
44 | infconfig eth0
45 | ```
46 | Visit http://0.0.0.0:5601 for Kibana (with your eth0 IP address)
47 |
48 | Username: kibana
49 |
50 | Password: Given earlier
51 |
52 | Visit http://0.0.0.0:9200 for Elastic (with your eth0 IP address)
53 |
54 | Username: elastic
55 |
56 | Password: Given earlier
57 |
58 |
59 | ## Enable HTTPS
60 |
61 | set the following values in the following config files
62 | - `/user/share/elastic/config/apm-server/apm-server.yml`
63 | - `/user/share/elastic/config/auditbeat/auditbeat.yml`
64 | - `/user/share/elastic/config/filebeat/filebeat.yml`
65 | - `/user/share/elastic/config/heartbeat/heartbeat.yml`
66 | - `/user/share/elastic/config/metricbeat/metricbeat.yml`
67 | - `/user/share/elastic/config/packetbeat/packetbeat.yml`
68 |
69 | ```
70 | setup.kibana:
71 | host: "https://localhost:5601"
72 | protocol: "https"
73 | ssl.enabled: true
74 | ```
75 |
76 | set the following values in `/user/share/elastic/config/kibana/kibana.yml`
77 |
78 | ```
79 | server.ssl.enabled: true
80 | server.ssl.certificate: /usr/share/kibana/config/certs/kibana/kibana.crt
81 | server.ssl.key: /usr/share/kibana/config/certs/kibana/kibana.key
82 | ```
83 |
84 | Then restart the stack
85 |
86 | ```
87 | docker-compose restart
88 | ```
89 |
90 | (Monitor status via `docker container ls`, and know that it takes a minute or so after containers are "healthy", and more time for Kibana to successfully connect to the elasticsearch service)
--------------------------------------------------------------------------------
/Filebeat/meerkat.yml:
--------------------------------------------------------------------------------
1 | - type: log
2 | symlinks: true
3 | paths:
4 | - c:/meerkat/*ADS*.csv
5 | - c:/meerkat/*ads*.csv
6 | tags: ["meerkat","ads"]
7 | # Ignore the first line with column headings
8 | exclude_lines: ["^.Host"]
9 |
10 |
11 | - type: log
12 | symlinks: true
13 | paths:
14 | - c:/meerkat/*ARP*.csv
15 | - c:/meerkat/*arp*.csv
16 | tags: ["meerkat","arp"]
17 | # Ignore the first line with column headings
18 | exclude_lines: ["^.Host"]
19 |
20 |
21 | - type: log
22 | symlinks: true
23 | paths:
24 | - c:/meerkat/*Autoruns*.csv
25 | - c:/meerkat/*autoruns*.csv
26 | tags: ["meerkat","autoruns"]
27 | # Ignore the first line with column headings
28 | exclude_lines: ["^.Host"]
29 |
30 |
31 | - type: log
32 | symlinks: true
33 | paths:
34 | - c:/meerkat/*BitLocker*.csv
35 | - c:/meerkat/*bitlocker*.csv
36 | tags: ["meerkat","bitlocker"]
37 | # Ignore the first line with column headings
38 | exclude_lines: ["^.Host"]
39 |
40 |
41 | - type: log
42 | symlinks: true
43 | paths:
44 | - c:/meerkat/*Certificates*.csv
45 | - c:/meerkat/*certificates*.csv
46 | tags: ["meerkat","certificates"]
47 | # Ignore the first line with column headings
48 | exclude_lines: ["^.Host"]
49 |
50 |
51 | - type: log
52 | symlinks: true
53 | paths:
54 | - c:/meerkat/*Computer*.csv
55 | - c:/meerkat/*computer*.csv
56 | tags: ["meerkat","computer"]
57 | # Ignore the first line with column headings
58 | exclude_lines: ["^.Host"]
59 |
60 |
61 | - type: log
62 | symlinks: true
63 | paths:
64 | - c:/meerkat/*DLLs*.csv
65 | - c:/meerkat/*dlls*.csv
66 | tags: ["meerkat","dlls"]
67 | # Ignore the first line with column headings
68 | exclude_lines: ["^.Host"]
69 |
70 |
71 | - type: log
72 | symlinks: true
73 | paths:
74 | - c:/meerkat/*DNS*.csv
75 | - c:/meerkat/*dns*.csv
76 | tags: ["meerkat","dns"]
77 | # Ignore the first line with column headings
78 | exclude_lines: ["^.Host"]
79 |
80 |
81 | - type: log
82 | symlinks: true
83 | paths:
84 | - c:/meerkat/*Drivers*.csv
85 | - c:/meerkat/*drivers*.csv
86 | tags: ["meerkat","drivers"]
87 | # Ignore the first line with column headings
88 | exclude_lines: ["^.Host"]
89 |
90 |
91 | - type: log
92 | symlinks: true
93 | paths:
94 | - c:/meerkat/*EnvVars*.csv
95 | - c:/meerkat/*envvars*.csv
96 | tags: ["meerkat","envvars"]
97 | # Ignore the first line with column headings
98 | exclude_lines: ["^.Host"]
99 |
100 |
101 | - type: log
102 | symlinks: true
103 | paths:
104 | - c:/meerkat/*EventLogs*.csv
105 | - c:/meerkat/*eventlogs*.csv
106 | tags: ["meerkat","eventlogs"]
107 | # Ignore the first line with column headings
108 | exclude_lines: ["^.Host"]
109 |
110 |
111 | - type: log
112 | symlinks: true
113 | paths:
114 | - c:/meerkat/*GroupMembers*.csv
115 | - c:/meerkat/*groupmembers*.csv
116 | tags: ["meerkat","groupmembers"]
117 | # Ignore the first line with column headings
118 | exclude_lines: ["^.Host"]
119 |
120 |
121 | - type: log
122 | symlinks: true
123 | paths:
124 | - c:/meerkat/*Hardware*.csv
125 | - c:/meerkat/*hardware*.csv
126 | tags: ["meerkat","hardware"]
127 | # Ignore the first line with column headings
128 | exclude_lines: ["^.Host"]
129 |
130 |
131 | - type: log
132 | symlinks: true
133 | paths:
134 | - c:/meerkat/*Hosts*.csv
135 | - c:/meerkat/*hosts*.csv
136 | tags: ["meerkat","hosts"]
137 | # Ignore the first line with column headings
138 | exclude_lines: ["^.Host"]
139 |
140 |
141 | - type: log
142 | symlinks: true
143 | paths:
144 | - c:/meerkat/*Hotfixes*.csv
145 | - c:/meerkat/*hotfixes*.csv
146 | tags: ["meerkat","hotfixes"]
147 | # Ignore the first line with column headings
148 | exclude_lines: ["^.Host"]
149 |
150 |
151 | - type: log
152 | symlinks: true
153 | paths:
154 | - c:/meerkat/*MAC*.csv
155 | - c:/meerkat/*mac*.csv
156 | tags: ["meerkat","mac"]
157 | # Ignore the first line with column headings
158 | exclude_lines: ["^.Host"]
159 |
160 |
161 | - type: log
162 | symlinks: true
163 | paths:
164 | - c:/meerkat/*MRU*.csv
165 | - c:/meerkat/*mru*.csv
166 | tags: ["meerkat","mru"]
167 | # Ignore the first line with column headings
168 | exclude_lines: ["^.Host"]
169 |
170 |
171 | - type: log
172 | symlinks: true
173 | paths:
174 | - c:/meerkat/*NetAdapters*.csv
175 | - c:/meerkat/*netadapters*.csv
176 | tags: ["meerkat","netadapters"]
177 | # Ignore the first line with column headings
178 | exclude_lines: ["^.Host"]
179 |
180 |
181 | - type: log
182 | symlinks: true
183 | paths:
184 | - c:/meerkat/*NetRoute*.csv
185 | - c:/meerkat/*netroute*.csv
186 | tags: ["meerkat","netroute"]
187 | # Ignore the first line with column headings
188 | exclude_lines: ["^.Host"]
189 |
190 |
191 | - type: log
192 | symlinks: true
193 | paths:
194 | - c:/meerkat/*Processes*.csv
195 | - c:/meerkat/*processes*.csv
196 | tags: ["meerkat","processes"]
197 | # Ignore the first line with column headings
198 | exclude_lines: ["^.Host"]
199 |
200 |
201 | - type: log
202 | symlinks: true
203 | paths:
204 | - c:/meerkat/*RecycleBin*.csv
205 | - c:/meerkat/*recyclebin*.csv
206 | tags: ["meerkat","recyclebin"]
207 | # Ignore the first line with column headings
208 | exclude_lines: ["^.Host"]
209 |
210 |
211 | - type: log
212 | symlinks: true
213 | paths:
214 | - c:/meerkat/*Registry*.csv
215 | - c:/meerkat/*registry*.csv
216 | tags: ["meerkat","registry"]
217 | # Ignore the first line with column headings
218 | exclude_lines: ["^.Host"]
219 |
220 |
221 | - type: log
222 | symlinks: true
223 | paths:
224 | - c:/meerkat/*ScheduledTasks*.csv
225 | - c:/meerkat/*scheduledtasks*.csv
226 | tags: ["meerkat","scheduledtasks"]
227 | # Ignore the first line with column headings
228 | exclude_lines: ["^.Host"]
229 |
230 |
231 | - type: log
232 | symlinks: true
233 | paths:
234 | - c:/meerkat/*Services*.csv
235 | - c:/meerkat/*services*.csv
236 | tags: ["meerkat","services"]
237 | # Ignore the first line with column headings
238 | exclude_lines: ["^.Host"]
239 |
240 |
241 | - type: log
242 | symlinks: true
243 | paths:
244 | - c:/meerkat/*Sessions*.csv
245 | - c:/meerkat/*sessions*.csv
246 | tags: ["meerkat","sessions"]
247 | # Ignore the first line with column headings
248 | exclude_lines: ["^.Host"]
249 |
250 |
251 | - type: log
252 | symlinks: true
253 | paths:
254 | - c:/meerkat/*Shares*.csv
255 | - c:/meerkat/*shares*.csv
256 | tags: ["meerkat","shares"]
257 | # Ignore the first line with column headings
258 | exclude_lines: ["^.Host"]
259 |
260 |
261 | - type: log
262 | symlinks: true
263 | paths:
264 | - c:/meerkat/*Software*.csv
265 | - c:/meerkat/*software*.csv
266 | tags: ["meerkat","software"]
267 | # Ignore the first line with column headings
268 | exclude_lines: ["^.Host"]
269 |
270 |
271 | - type: log
272 | symlinks: true
273 | paths:
274 | - c:/meerkat/*Strings*.csv
275 | - c:/meerkat/*strings*.csv
276 | tags: ["meerkat","strings"]
277 | # Ignore the first line with column headings
278 | exclude_lines: ["^.Host"]
279 |
280 |
281 | - type: log
282 | symlinks: true
283 | paths:
284 | - c:/meerkat/*TCPConnections*.csv
285 | - c:/meerkat/*tcpconnections*.csv
286 | tags: ["meerkat","tcpconnections"]
287 | # Ignore the first line with column headings
288 | exclude_lines: ["^.Host"]
289 |
290 |
291 | - type: log
292 | symlinks: true
293 | paths:
294 | - c:/meerkat/*TPM*.csv
295 | - c:/meerkat/*tpm*.csv
296 | tags: ["meerkat","tpm"]
297 | # Ignore the first line with column headings
298 | exclude_lines: ["^.Host"]
299 |
--------------------------------------------------------------------------------
/HTTPS.md:
--------------------------------------------------------------------------------
1 | ### Install Nginx
2 | This provides a guide to adding HTTPS support.
3 | ```
4 | sudo apt-get install -y nginx apache2-utils
5 | ```
6 |
7 | #### Configure Nginx
8 | ```
9 | sudo mkdir /etc/nginx/sites-avaiable
10 | sudo /etc/nginx/sites-avaiable/touch kibana
11 | sudo mousepad /etc/nginx/sites-available/kibana &
12 | ```
13 |
14 | paste this:
15 | ```
16 | server {
17 | listen 80;
18 |
19 | server_name 192.168.16.129;
20 |
21 | auth_basic "Restricted Access";
22 | auth_basic_user_file /etc/nginx/.kibana-user;
23 |
24 | location / {
25 | proxy_pass http://192.168.16.129:5601;
26 | proxy_http_version 1.1;
27 | proxy_set_header Upgrade $http_upgrade;
28 | proxy_set_header Connection 'upgrade';
29 | proxy_set_header Host $host;
30 | proxy_cache_bypass $http_upgrade;
31 | }
32 | }
33 | ```
34 |
35 | Create basic auth file and user
36 | ```
37 | sudo htpasswd -c /etc/nginx/.kibana-user admin
38 | TYPE YOUR PASSWORD
39 | ```
40 |
41 | Activate the kibana virtual host
42 | ```
43 | sudo ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/
44 | ```
45 |
46 | Test the nginx configuration and make sure there is no error
47 | ```
48 | sudo nginx -t
49 | ```
50 |
51 | #### Configure Nginx to run on startup and restart
52 | ```
53 | sudo update-rc.d nginx defaults 95 10
54 | sudo -i service nginx restart
55 | ```
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/LogStash/0000-debug.conf:
--------------------------------------------------------------------------------
1 | output {
2 | #if "meerkat" in [tags] {
3 | #if [beats] {
4 | if [channel] == "Security" {
5 | stdout { codec => rubydebug }
6 | }
7 | }
--------------------------------------------------------------------------------
/LogStash/0001-beats.conf:
--------------------------------------------------------------------------------
1 | input {
2 | beats {
3 | port => 5044
4 | include_codec_tag => false
5 | }
6 | }
--------------------------------------------------------------------------------
/LogStash/1001-winlogbeat-cleanup-dashes.conf:
--------------------------------------------------------------------------------
1 | # Author: Nate Guagenti (@neu5ron), Tony Phipps
2 | # License: GPL-3.0
3 | # Remove specific keys/fields that have "-"/dash has the only value values
4 |
5 | filter {
6 | if [agent][type] == "winlogbeat" {
7 | mutate { add_field => { "z_logstash_pipeline" => "1001" } }
8 | prune {
9 | blacklist_values => [
10 | "AccessList", "^\-$",
11 | "AccessReason", "^\-$",
12 | "AccountExpires", "^\-$",
13 | "AccountName", "^\-$",
14 | "AdditionalInfo", "^\-$",
15 | "Address", "^\-$",
16 | "AllowedToDelegateTo", "^\-$",
17 | "AppCorrelationID", "^\-$",
18 | "AuthenticationPackageName", "^\-$",
19 | "CallerProcessName", "^\-$",
20 | "ClientAddress", "^\-$",
21 | "ClientIP", "^\-$",
22 | "ClientIPAddress", "^\-$",
23 | "CompatibleIds", "^\-$",
24 | "ComputerAccountChange", "^\-$",
25 | "ConnectedViaIPAddress", "^\-$",
26 | "DCIPAddress", "^\-$",
27 | "DestinationIp", "^\-$",
28 | "DisplayName", "^\-$",
29 | "DnsHostName", "^\-$",
30 | "Domain", "^\-$",
31 | "Dummy", "^\-$",
32 | "HomeDirectory", "^\-$",
33 | "HomePath", "^\-$",
34 | "Identity", "^\-$",
35 | "ipAddress", "^\-$",
36 | "IpAddress", "^\-$",
37 | "IPAddress", "^\-$",
38 | "IpPort", "^\-$",
39 | "IPString", "^\-$",
40 | "LaunchedViaIPAddress", "^\-$",
41 | "LmPackageName", "^\-$",
42 | "LocationInformation", "^\-$",
43 | "LogonGuid", "^\-$",
44 | "LogonHours", "^\-$",
45 | "NewUacValue", "^\-$",
46 | "ObjectName", "^\-$",
47 | "ObjectType", "^\-$",
48 | "OldUacValue", "^\-$",
49 | "PackageName", "^\-$",
50 | "PasswordLastSet", "^\-$",
51 | "PreAuthType", "^\-$",
52 | "PrimaryGroupId", "^\-$",
53 | "PrivilegeList", "^\-$",
54 | "ProcessName", "^\-$",
55 | "ProfilePath", "^\-$",
56 | "RestrictedAdminMode", "^\-$",
57 | "SamAccountName", "^\-$",
58 | "ScriptPath", "^\-$",
59 | "ServerIpAddress", "^\-$",
60 | "Service", "^\-$",
61 | "ServicePrincipalNames", "^\-$",
62 | "SourceIp", "^\-$",
63 | "SidHistory", "^\-$",
64 | "SidList", "^\-$",
65 | "SubjectDomainName", "^\-$",
66 | "SubjectUserName", "^\-$",
67 | "SubjectUserSid", "^\-$",
68 | "TargetDomainName", "^\-$",
69 | "TargetOutboundDomainName", "^\-$",
70 | "TargetOutboundUserName", "^\-$",
71 | "TargetUserName", "^\-$",
72 | "TargetUserSid", "^\-$",
73 | "TraceMessage", "^\-$",
74 | "TransmittedServices", "^\-$",
75 | "UserAccountControl", "^\-$",
76 | "UserID", "^\-$",
77 | "UserParameters", "^\-$",
78 | "UserPrincipalName", "^\-$",
79 | "UserWorkstations", "^\-$",
80 | "WorkstationName", "^\-$"
81 | ]
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/LogStash/1002-winlogbeat-cleanup-lowercase.conf:
--------------------------------------------------------------------------------
1 | filter {
2 | if [agent][type] == "winlogbeat" {
3 | if [z_logstash_pipeline] {
4 | mutate {
5 | update => { "z_logstash_pipeline" => "%{z_logstash_pipeline}, 1002" }
6 | }
7 | }
8 | else {
9 | mutate { add_field => { "z_logstash_pipeline" => "1002" } }
10 | }
11 | mutate {
12 | lowercase => [
13 | "[process][args]",
14 | "[process][parent][args]"
15 | ]
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/LogStash/9001_output_beats.conf:
--------------------------------------------------------------------------------
1 | output {
2 | elasticsearch {
3 | hosts => ["http://172.17.158.2:9200"]
4 | index => "%{[@metadata][beat]}-%{[@metadata][version]}"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/LogStash/EventSamples/Application.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "svchost (6020,G,98) The beta feature EseDiskFlushConsistency is enabled in ESENT due to the beta site mode settings 0x800000.",
3 | "ecs" => {
4 | "version" => "1.0.0"
5 | },
6 | "host" => {
7 | "os" => {
8 | "version" => "10.0",
9 | "name" => "Windows 10 Enterprise",
10 | "build" => "17134.765",
11 | "platform" => "windows",
12 | "family" => "windows",
13 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)"
14 | },
15 | "name" => "DESKTOP-08TEMKV",
16 | "architecture" => "x86_64",
17 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
18 | "hostname" => "DESKTOP-08TEMKV"
19 | },
20 | "agent" => {
21 | "hostname" => "DESKTOP-08TEMKV",
22 | "version" => "7.0.0",
23 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
24 | "type" => "winlogbeat",
25 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
26 | },
27 | "@version" => "1",
28 | "@timestamp" => 2019-05-29T01:26:00.003Z,
29 | "winlog" => {
30 | "task" => "General",
31 | "event_id" => 916,
32 | "event_data" => {
33 | "param5" => "ESENT",
34 | "param4" => "EseDiskFlushConsistency",
35 | "param6" => "0x800000",
36 | "param1" => "svchost",
37 | "param2" => "6020,G,98"
38 | },
39 | "provider_name" => "ESENT",
40 | "record_id" => 55561,
41 | "channel" => "Application",
42 | "opcode" => "Info",
43 | "api" => "wineventlog",
44 | "keywords" => [
45 | [0] "Classic"
46 | ],
47 | "computer_name" => "DESKTOP-08TEMKV"
48 | },
49 | "log" => {
50 | "level" => "information"
51 | },
52 | "event" => {
53 | "code" => 916,
54 | "created" => "2019-05-29T01:26:00.373Z",
55 | "action" => "General",
56 | "kind" => "event"
57 | }
58 | }
--------------------------------------------------------------------------------
/LogStash/EventSamples/Microsoft-Windows-Sysmon-Operational.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "Process Create:\nRuleName: \nUtcTime: 2019-05-29 00:16:04.067\nProcessGuid: {B1A07600-CF44-5CED-0000-00100D818F2B}\nProcessId: 28676\nImage: C:\\Program Files\\Mozilla Firefox\\firefox.exe\nFileVersion: 67.0\nDescription: Firefox\nProduct: Firefox\nCompany: Mozilla Corporation\nCommandLine: \"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -contentproc --channel=\"11780.1331.1225718746\\1560240105\" -childID 189 -isForBrowser -prefsHandle 6872 -prefMapHandle 2888 -prefsLen 10337 -prefMapSize 202905 -parentBuildID 20190516215225 -greomni \"C:\\Program Files\\Mozilla Firefox\\omni.ja\" -appomni \"C:\\Program Files\\Mozilla Firefox\\browser\\omni.ja\" -appdir \"C:\\Program Files\\Mozilla Firefox\\browser\" - 11780 \"\\\\.\\pipe\\gecko-crash-server-pipe.11780\" 11312 tab\nCurrentDirectory: C:\\Program Files\\Mozilla Firefox\\\nUser: DESKTOP-08TEMKV\\Cooler\nLogonGuid: {B1A07600-4A66-5CE8-0000-0020A4140200}\nLogonId: 0x214A4\nTerminalSessionId: 1\nIntegrityLevel: Low\nHashes: MD5=9B2DF28322B7D9E784B54D10A34DF3E6,SHA256=0D2BC11941E7952D59BF4BC919621C0F87BB73E0BDAF4EF2E57E98AEB3EC6EB7\nParentProcessGuid: {B1A07600-5EA9-5CE8-0000-001028EA7100}\nParentProcessId: 11780\nParentImage: C:\\Program Files\\Mozilla Firefox\\firefox.exe\nParentCommandLine: \"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" ",
3 | "host" => {
4 | "hostname" => "DESKTOP-08TEMKV",
5 | "name" => "DESKTOP-08TEMKV",
6 | "architecture" => "x86_64",
7 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
8 | "os" => {
9 | "version" => "10.0",
10 | "name" => "Windows 10 Enterprise",
11 | "build" => "17134.765",
12 | "platform" => "windows",
13 | "family" => "windows",
14 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)"
15 | }
16 | },
17 | "agent" => {
18 | "hostname" => "DESKTOP-08TEMKV",
19 | "version" => "7.0.0",
20 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
21 | "type" => "winlogbeat",
22 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
23 | },
24 | "ecs" => {
25 | "version" => "1.0.0"
26 | },
27 | "@version" => "1",
28 | "@timestamp" => 2019-05-29T00:16:04.084Z,
29 | "winlog" => {
30 | "version" => 5,
31 | "task" => "Process Create (rule: ProcessCreate)",
32 | "event_data" => {
33 | "Description" => "Firefox",
34 | "ParentProcessId" => "11780",
35 | "ParentImage" => "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
36 | "LogonId" => "0x214a4",
37 | "ProcessId" => "28676",
38 | "CommandLine" => "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -contentproc --channel=\"11780.1331.1225718746\\1560240105\" -childID 189 -isForBrowser -prefsHandle 6872 -prefMapHandle 2888 -prefsLen 10337 -prefMapSize 202905 -parentBuildID 20190516215225 -greomni \"C:\\Program Files\\Mozilla Firefox\\omni.ja\" -appomni \"C:\\Program Files\\Mozilla Firefox\\browser\\omni.ja\" -appdir \"C:\\Program Files\\Mozilla Firefox\\browser\" - 11780 \"\\\\.\\pipe\\gecko-crash-server-pipe.11780\" 11312 tab",
39 | "Hashes" => "MD5=9B2DF28322B7D9E784B54D10A34DF3E6,SHA256=0D2BC11941E7952D59BF4BC919621C0F87BB73E0BDAF4EF2E57E98AEB3EC6EB7",
40 | "Company" => "Mozilla Corporation",
41 | "User" => "DESKTOP-08TEMKV\\Cooler",
42 | "IntegrityLevel" => "Low",
43 | "Image" => "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
44 | "CurrentDirectory" => "C:\\Program Files\\Mozilla Firefox\\",
45 | "TerminalSessionId" => "1",
46 | "UtcTime" => "2019-05-29 00:16:04.067",
47 | "LogonGuid" => "{B1A07600-4A66-5CE8-0000-0020A4140200}",
48 | "ParentProcessGuid" => "{B1A07600-5EA9-5CE8-0000-001028EA7100}",
49 | "FileVersion" => "67.0",
50 | "ProcessGuid" => "{B1A07600-CF44-5CED-0000-00100D818F2B}",
51 | "Product" => "Firefox",
52 | "ParentCommandLine" => "\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" "
53 | },
54 | "record_id" => 56796,
55 | "provider_name" => "Microsoft-Windows-Sysmon",
56 | "opcode" => "Info",
57 | "process" => {
58 | "pid" => 5988,
59 | "thread" => {
60 | "id" => 7024
61 | }
62 | },
63 | "user" => {
64 | "name" => "SYSTEM",
65 | "domain" => "NT AUTHORITY",
66 | "identifier" => "S-1-5-18",
67 | "type" => "User"
68 | },
69 | "computer_name" => "DESKTOP-08TEMKV",
70 | "event_id" => 1,
71 | "api" => "wineventlog",
72 | "channel" => "Microsoft-Windows-Sysmon/Operational",
73 | "provider_guid" => "{5770385F-C22A-43E0-BF4C-06F5698FFBD9}"
74 | },
75 | "log" => {
76 | "level" => "information"
77 | },
78 | "event" => {
79 | "created" => "2019-05-29T00:16:05.234Z",
80 | "code" => 1,
81 | "action" => "Process Create (rule: ProcessCreate)",
82 | "kind" => "event"
83 | }
84 | }
--------------------------------------------------------------------------------
/LogStash/EventSamples/Microsoft-Windows-WMI-Activity-Operational.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "Id = {8A4A21EE-1269-0004-F845-578A6912D501}; ClientMachine = DESKTOP-08TEMKV; User = NT AUTHORITY\\SYSTEM; ClientProcessId = 24416; Component = Unknown; Operation = Start IWbemServices::ExecNotificationQuery - ROOT\\CIMV2 : SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName = 'wsmprovhost.exe'; ResultCode = 0x80041032; PossibleCause = Unknown",
3 | "winlog" => {
4 | "user_data" => {
5 | "xml_name" => "Operation_ClientFailure",
6 | "ClientMachine" => "DESKTOP-08TEMKV",
7 | "Operation" => "Start IWbemServices::ExecNotificationQuery - ROOT\\CIMV2 : SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName = 'wsmprovhost.exe'",
8 | "User" => "NT AUTHORITY\\SYSTEM",
9 | "ResultCode" => "0x80041032",
10 | "Id" => "{8A4A21EE-1269-0004-F845-578A6912D501}",
11 | "Component" => "Unknown",
12 | "PossibleCause" => "Unknown",
13 | "ClientProcessId" => "24416"
14 | },
15 | "provider_name" => "Microsoft-Windows-WMI-Activity",
16 | "computer_name" => "DESKTOP-08TEMKV",
17 | "provider_guid" => "{1418EF04-B0B4-4623-BF7E-D74AB47BBDAA}",
18 | "activity_id" => "{8A4A21EE-1269-0004-F845-578A6912D501}",
19 | "channel" => "Microsoft-Windows-WMI-Activity/Operational",
20 | "event_id" => 5858,
21 | "record_id" => 23634,
22 | "opcode" => "Info",
23 | "process" => {
24 | "pid" => 4092,
25 | "thread" => {
26 | "id" => 12092
27 | }
28 | },
29 | "user" => {
30 | "name" => "SYSTEM",
31 | "type" => "User",
32 | "domain" => "NT AUTHORITY",
33 | "identifier" => "S-1-5-18"
34 | },
35 | "api" => "wineventlog",
36 | "task" => ""
37 | },
38 | "host" => {
39 | "os" => {
40 | "version" => "10.0",
41 | "name" => "Windows 10 Enterprise",
42 | "build" => "17134.765",
43 | "platform" => "windows",
44 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)",
45 | "family" => "windows"
46 | },
47 | "name" => "DESKTOP-08TEMKV",
48 | "hostname" => "DESKTOP-08TEMKV",
49 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
50 | "architecture" => "x86_64"
51 | },
52 | "agent" => {
53 | "version" => "7.0.0",
54 | "type" => "winlogbeat",
55 | "hostname" => "DESKTOP-08TEMKV",
56 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
57 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
58 | },
59 | "ecs" => {
60 | "version" => "1.0.0"
61 | },
62 | "event" => {
63 | "created" => "2019-05-29T01:40:26.632Z",
64 | "kind" => "event",
65 | "code" => 5858
66 | },
67 | "@version" => "1",
68 | "log" => {
69 | "level" => "error"
70 | },
71 | "@timestamp" => 2019-05-29T01:40:25.181Z
72 | }
73 |
--------------------------------------------------------------------------------
/LogStash/EventSamples/Microsoft-windows-PowerShell-Operational.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "CommandInvocation(Get-Process): \"Get-Process\"\n\n\nContext:\n Severity = Informational\n Host Name = Windows PowerShell ISE Host\n Host Version = 5.1.17134.765\n Host ID = f9056055-be9b-45b1-b532-d3b4574ebc54\n Host Application = C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell_ISE.exe\n Engine Version = 5.1.17134.765\n Runspace ID = 22924de0-e803-40ac-98fe-b9260cf2a37a\n Pipeline ID = 14\n Command Name = Get-Process\n Command Type = Cmdlet\n Script Name = \n Command Path = \n Sequence Number = 34\n User = DESKTOP-08TEMKV\\Cooler\n Connected User = \n Shell ID = Microsoft.PowerShell\n\n\nUser Data:",
3 | "winlog" => {
4 | "version" => 1,
5 | "provider_name" => "Microsoft-Windows-PowerShell",
6 | "computer_name" => "DESKTOP-08TEMKV",
7 | "provider_guid" => "{A0C1853B-5C40-4B15-8766-3CF1C58F985A}",
8 | "channel" => "Microsoft-windows-PowerShell/Operational",
9 | "activity_id" => "{8A4A21EE-1269-0008-4D5F-4F8A6912D501}",
10 | "event_data" => {
11 | "ContextInfo" => " Severity = Informational\n Host Name = Windows PowerShell ISE Host\n Host Version = 5.1.17134.765\n Host ID = f9056055-be9b-45b1-b532-d3b4574ebc54\n Host Application = C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\PowerShell_ISE.exe\n Engine Version = 5.1.17134.765\n Runspace ID = 22924de0-e803-40ac-98fe-b9260cf2a37a\n Pipeline ID = 14\n Command Name = Get-Process\n Command Type = Cmdlet\n Script Name = \n Command Path = \n Sequence Number = 34\n User = DESKTOP-08TEMKV\\Cooler\n Connected User = \n Shell ID = Microsoft.PowerShell",
12 | "Payload" => "CommandInvocation(Get-Process): \"Get-Process\""
13 | },
14 | "record_id" => 37410262,
15 | "event_id" => 4103,
16 | "opcode" => "To be used when operation is just executing a method",
17 | "process" => {
18 | "pid" => 28700,
19 | "thread" => {
20 | "id" => 14432
21 | }
22 | },
23 | "user" => {
24 | "name" => "Cooler",
25 | "type" => "User",
26 | "domain" => "DESKTOP-08TEMKV",
27 | "identifier" => "S-1-5-21-3201126533-4233093971-1484186300-1001"
28 | },
29 | "api" => "wineventlog",
30 | "task" => "Executing Pipeline"
31 | },
32 | "host" => {
33 | "os" => {
34 | "version" => "10.0",
35 | "name" => "Windows 10 Enterprise",
36 | "build" => "17134.765",
37 | "platform" => "windows",
38 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)",
39 | "family" => "windows"
40 | },
41 | "name" => "DESKTOP-08TEMKV",
42 | "hostname" => "DESKTOP-08TEMKV",
43 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
44 | "architecture" => "x86_64"
45 | },
46 | "agent" => {
47 | "version" => "7.0.0",
48 | "hostname" => "DESKTOP-08TEMKV",
49 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
50 | "type" => "winlogbeat",
51 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
52 | },
53 | "ecs" => {
54 | "version" => "1.0.0"
55 | },
56 | "event" => {
57 | "created" => "2019-05-29T02:21:52.602Z",
58 | "action" => "Executing Pipeline",
59 | "kind" => "event",
60 | "code" => 4103
61 | },
62 | "@version" => "1",
63 | "log" => {
64 | "level" => "information"
65 | },
66 | "@timestamp" => 2019-05-29T02:21:51.730Z
67 | }
--------------------------------------------------------------------------------
/LogStash/EventSamples/Security.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "A user's local group membership was enumerated.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-21-3201126533-4233093971-1484186300-1001\n\tAccount Name:\t\tCooler\n\tAccount Domain:\t\tDESKTOP-08TEMKV\n\tLogon ID:\t\t0x214A4\n\nUser:\n\tSecurity ID:\t\tS-1-5-21-3201126533-4233093971-1484186300-1001\n\tAccount Name:\t\tCooler\n\tAccount Domain:\t\tDESKTOP-08TEMKV\n\nProcess Information:\n\tProcess ID:\t\t0x13d0\n\tProcess Name:\t\tC:\\Windows\\explorer.exe",
3 | "agent" => {
4 | "version" => "7.0.0",
5 | "hostname" => "DESKTOP-08TEMKV",
6 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
7 | "type" => "winlogbeat",
8 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
9 | },
10 | "ecs" => {
11 | "version" => "1.0.0"
12 | },
13 | "host" => {
14 | "os" => {
15 | "version" => "10.0",
16 | "name" => "Windows 10 Enterprise",
17 | "build" => "17134.765",
18 | "platform" => "windows",
19 | "family" => "windows",
20 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)"
21 | },
22 | "name" => "DESKTOP-08TEMKV",
23 | "architecture" => "x86_64",
24 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
25 | "hostname" => "DESKTOP-08TEMKV"
26 | },
27 | "@version" => "1",
28 | "@timestamp" => 2019-05-28T22:57:18.035Z,
29 | "winlog" => {
30 | "task" => "User Account Management",
31 | "event_data" => {
32 | "TargetDomainName" => "DESKTOP-08TEMKV",
33 | "SubjectLogonId" => "0x214a4",
34 | "SubjectDomainName" => "DESKTOP-08TEMKV",
35 | "TargetSid" => "S-1-5-21-3201126533-4233093971-1484186300-1001",
36 | "SubjectUserName" => "Cooler",
37 | "CallerProcessId" => "0x13d0",
38 | "SubjectUserSid" => "S-1-5-21-3201126533-4233093971-1484186300-1001",
39 | "TargetUserName" => "Cooler",
40 | "CallerProcessName" => "C:\\Windows\\explorer.exe"
41 | },
42 | "record_id" => 106840,
43 | "keywords" => [
44 | [0] "Audit Success"
45 | ],
46 | "provider_name" => "Microsoft-Windows-Security-Auditing",
47 | "opcode" => "Info",
48 | "process" => {
49 | "pid" => 1124,
50 | "thread" => {
51 | "id" => 9308
52 | }
53 | },
54 | "computer_name" => "DESKTOP-08TEMKV",
55 | "activity_id" => "{8A4A21EE-1269-000B-2422-4A8A6912D501}",
56 | "event_id" => 4798,
57 | "api" => "wineventlog",
58 | "channel" => "Security",
59 | "provider_guid" => "{54849625-5478-4994-A5BA-3E3B0328C30D}"
60 | },
61 | "log" => {
62 | "level" => "information"
63 | },
64 | "event" => {
65 | "code" => 4798,
66 | "created" => "2019-05-28T22:57:19.406Z",
67 | "action" => "User Account Management",
68 | "kind" => "event"
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/LogStash/EventSamples/System.txt:
--------------------------------------------------------------------------------
1 | {
2 | "message" => "Installation Successful: Windows successfully installed the following update: 9WZDNCRFHVN5-MICROSOFT.WINDOWSCALCULATOR",
3 | "ecs" => {
4 | "version" => "1.0.0"
5 | },
6 | "host" => {
7 | "os" => {
8 | "version" => "10.0",
9 | "name" => "Windows 10 Enterprise",
10 | "build" => "17134.765",
11 | "platform" => "windows",
12 | "family" => "windows",
13 | "kernel" => "10.0.17134.765 (WinBuild.160101.0800)"
14 | },
15 | "name" => "DESKTOP-08TEMKV",
16 | "id" => "b1a07600-db94-4a6e-8638-b7c83b4ee849",
17 | "architecture" => "x86_64",
18 | "hostname" => "DESKTOP-08TEMKV"
19 | },
20 | "agent" => {
21 | "hostname" => "DESKTOP-08TEMKV",
22 | "version" => "7.0.0",
23 | "id" => "c1cc54cb-8226-486f-8e73-18bd07e257e5",
24 | "type" => "winlogbeat",
25 | "ephemeral_id" => "b5ec4f03-941e-46f6-8f4b-07ff32e17f2f"
26 | },
27 | "@version" => "1",
28 | "@timestamp" => 2019-05-28T22:57:13.046Z,
29 | "winlog" => {
30 | "version" => 1,
31 | "task" => "Windows Update Agent",
32 | "event_data" => {
33 | "serviceGuid" => "{855E8A7C-ECB4-4CA3-B045-1DFA50104289}",
34 | "updateGuid" => "{0B1B89E4-8F48-4AE5-8DDD-4E6D00353F15}",
35 | "updateTitle" => "9WZDNCRFHVN5-MICROSOFT.WINDOWSCALCULATOR",
36 | "updateRevisionNumber" => "1"
37 | },
38 | "provider_name" => "Microsoft-Windows-WindowsUpdateClient",
39 | "record_id" => 167594,
40 | "keywords" => [
41 | [0] "Installation",
42 | [1] "Success"
43 | ],
44 | "opcode" => "Installation",
45 | "user" => {
46 | "domain" => "NT AUTHORITY",
47 | "name" => "SYSTEM",
48 | "identifier" => "S-1-5-18",
49 | "type" => "User"
50 | },
51 | "process" => {
52 | "pid" => 5140,
53 | "thread" => {
54 | "id" => 25620
55 | }
56 | },
57 | "computer_name" => "DESKTOP-08TEMKV",
58 | "event_id" => 19,
59 | "api" => "wineventlog",
60 | "channel" => "System",
61 | "provider_guid" => "{945A8954-C147-4ACD-923F-40C45405A658}"
62 | },
63 | "log" => {
64 | "level" => "information"
65 | },
66 | "event" => {
67 | "code" => 19,
68 | "created" => "2019-05-28T22:57:14.729Z",
69 | "action" => "Windows Update Agent",
70 | "kind" => "event"
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/LogStash/redo/9000-winlogbeat-security-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "security" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-security-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/9001-winlogbeat-wmiactivity-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "wmiactivity" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-wmiactivity-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/9002-winlogbeat-powershell-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "powershell" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-powershell-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/9003-winlogbeat-sysmon-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "sysmon" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-sysmon-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/9004-winlogbeat-application-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "application" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-application-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/9005-winlogbeat-system-output.conf:
--------------------------------------------------------------------------------
1 | output {
2 | if "winlogbeat" in [tags] and "system" in [tags] {
3 | elasticsearch {
4 | hosts => ["localhost:9200"]
5 | index => "logs-endpoint-winevent-system-%{+YYYY.MM.dd}"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/LogStash/redo/meerkat.conf:
--------------------------------------------------------------------------------
1 | # I had issues with autodetect_column_names => "true", but will likely test it again to avoid maintaining all these column names long-term
2 | # https://www.elastic.co/guide/en/logstash/current/plugins-filters-csv.html#plugins-filters-csv-autodetect_column_names
3 |
4 | filter {
5 | if "meerkat" in [tags] {
6 | mutate {
7 | lowercase => [ "message" ]
8 | }
9 | }
10 |
11 | if "arp" in [tags] {
12 | csv {
13 | columns => ["Host","DateScanned","ifIndex","InterfaceAlias","IPAddress","LinkLayerAddress","State","PolicyStore"]
14 | }
15 | }
16 |
17 | if "ads" in [tags] {
18 | csv {
19 | columns => ["Host","DateScanned","FileName","StreamName","StreamLength","StreamContent","Attributes","CreationTimeUtc","LastAccessTimeUtc","LastWriteTimeUtc"]
20 | }
21 | }
22 |
23 | if "autoruns" in [tags] {
24 | csv {
25 | columns => ["Host","DateScanned","Name","Caption","Command","Location","User","UserSID"]
26 | }
27 | }
28 |
29 | if "bitlocker" in [tags] {
30 | csv {
31 | columns => ["Host","DateScanned","MountPoint","EncryptionMethod","AutoUnlockEnabled","MetadataVersion","VolumeStatus","ProtectionStatus","LockStatus","EncryptionPercentage","WipePercentage","VolumeType","CapacityGB","KeyProtector"]
32 | }
33 | }
34 |
35 | if "certificates" in [tags] {
36 | csv {
37 | columns => ["Host","DateScanned","Path","Thumbprint","SendAsTrustedIssuer","DnsNameList","FriendlyName","Issuer","Subject","NotAfter","NotBefore","Algorithm"]
38 | }
39 | }
40 |
41 | if "computer" in [tags] {
42 | csv {
43 | columns => ["Host","DateScanned","BootDevice","BuildNumber","Caption","CurrentTimeZone","DataExecutionPrevention_32BitApplications","DataExecutionPrevention_Available","DataExecutionPrevention_Drivers","DataExecutionPrevention_SupportPolicy","Debug","Description","Distributed","EncryptionLevel","InstallDate","LastBootUpTime","LocalDateTime","MUILanguages","OSArchitecture","OSProductSuite","OSType","OperatingSystemSKU","Organization","OtherTypeDescription","PortableOperatingSystem","ProductType","RegisteredUser","ServicePackMajorVersion","ServicePackMinorVersion","Status","SuiteMask","SystemDevice","SystemDirectory","SystemDrive","Version","WindowsDirectory","AdminPasswordStatus","BootROMSupported","BootupState","ChassisBootupState","DNSHostName","DaylightInEffect","Domain","DomainRole","EnableDaylightSavingsTime","HypervisorPresent","Manufacturer","Model","NetworkServerModeEnabled","PrimaryOwnerContact","PrimaryOwnerName","SupportContactDescription","SystemSKUNumber","ThermalState","UserName","BIOSVersion","BIOSInstallDate","BIOSManufacturer","PrimaryBIOS","BIOSReleaseDate","SMBIOSBIOSVersion","SMBIOSMajorVersion","SMBIOSMinorVersion","SMBIOSPresent","SerialNumber","SystemBiosMajorVersion","SystemBiosMinorVersion","VirtualizationFirmwareEnabled"]
44 | }
45 | }
46 |
47 | if "dlls" in [tags] {
48 | csv {
49 | columns => ["Host","DateScanned","Id","ProcessName","Company","Product","Modules"]
50 | }
51 | }
52 |
53 | if "dns" in [tags] {
54 | csv {
55 | columns => ["Host","DateScanned","Status","RecordStatus","DataLength","Section","RecordResponse","TimeToLive","Type","RecordType","Data","Entry","Name"]
56 | }
57 | }
58 |
59 | if "drivers" in [tags] {
60 | csv {
61 | columns => ["Host","DateScanned","ProviderName","Driver","Version","Date","ClassDescription","DriverSignature","OriginalFileName"]
62 | }
63 | }
64 |
65 | if "envvars" in [tags] {
66 | csv {
67 | columns => ["Host","DateScanned","UserName","VariableName","VariableValue"]
68 | }
69 | }
70 |
71 | if "eventlogs" in [tags] {
72 | csv {
73 | columns => ["Host","DateScanned","TimeCreated","MachineName","UserId","ProcessId","LogName","Source","LevelDisplayName","EventId","OpcodeDisplayName","TaskDisplayName","Message","RecordId","RelatedActivityId","ThreadId","Version"]
74 | }
75 | }
76 |
77 | if "groupmembers" in [tags] {
78 | csv {
79 | columns => ["Host","DateScanned","UserDomain","UserName","SID","PrincipalSource","ObjectClass","GroupName","GroupDescription","GroupSID","GroupPrincipalSource","GroupObjectClass"]
80 | }
81 | }
82 |
83 | if "hardware" in [tags] {
84 | csv {
85 | columns => ["Host","DateScanned","Class","Caption","Description","DeviceID"]
86 | }
87 | }
88 |
89 | if "hosts" in [tags] {
90 | csv {
91 | columns => ["Host","DateScanned","IP","Comment"]
92 | }
93 | }
94 |
95 | if "hotfixes" in [tags] {
96 | csv {
97 | columns => ["Host","DateScanned","Operation","ResultCode","HResult","Date","Title","Description","UnmappedResultCode","ClientApplicationID","ServerSelection","ServiceID","UninstallationNotes","SupportUrl"]
98 | }
99 | }
100 |
101 | if "mac" in [tags] {
102 | csv {
103 | columns => ["Host","DateScanned","FileName","Mode","Bytes","Hash","LastWriteTimeUTC","LastAccessTimeUTC","CreationTimeUTC"]
104 | }
105 | }
106 |
107 | if "mru" in [tags] {
108 | csv {
109 | columns => ["Host","DateScanned","Key","Value","Data"]
110 | }
111 | }
112 |
113 | if "netadapters" in [tags] {
114 | csv {
115 | columns => ["Host","DateScanned","SystemName","InterfaceDescription","Name","MediaConnectionState","ifIndex","Speed","MacAddress","IPAddress","IPSubnet","DefaultIPGateway","DNSServerSearchOrder","MtuSize","PromiscuousMode"]
116 | }
117 | }
118 |
119 | if "netroute" in [tags] {
120 | csv {
121 | columns => ["Host","DateScanned","ifIndex","InterfaceAlias","DestinationPrefix","NextHop","RouteMetric","Protocol","Store","Publish","TypeOfRoute","RouteType"]
122 | }
123 | }
124 |
125 | if "processes" in [tags] {
126 | csv {
127 | columns => ["Host","DateScanned","CommandLine","Services","PercentProcessorTime","MemoryMB","BasePriority","Id","MainWindowHandle","MainWindowTitle","PriorityBoostEnabled","PriorityClass","PrivateMemorySize","PrivilegedProcessorTime","ProcessName","Responding","SessionId","StartTime","TotalProcessorTime","UserProcessorTime","Company","CPU","Description","FileVersion","Path","Product","ProductVersion","ModuleCount","ThreadCount","HandleCount"]
128 | }
129 | }
130 |
131 | if "recylcebin" in [tags] {
132 | csv {
133 | columns => ["Host","DateScanned","LinkType","Name","Length","Directory","IsReadOnly","Exists","FullName","CreationTimeUtc","LastAccessTimeUtc","LastWriteTimeUtc","PSIsContainer","Mode"]
134 | }
135 | }
136 |
137 | if "registry" in [tags] {
138 | csv {
139 | columns => ["Host","DateScanned","Key","Value","Data"]
140 | }
141 | }
142 |
143 | if "scheduledtasks" in [tags] {
144 | csv {
145 | columns => ["Host","DateScanned","Author","Description","SecurityDescriptor","Source","State","TaskName","TaskPath","URI","ActionsArguments","ActionsExecute","ActionsId","ActionsWorkingDirectory","TriggersId","TriggersDelay","TriggersEnabled","TriggersEndBoundary","TriggersExecutionTimeLimit","TriggersRepetitionDuration","TriggersRepetitionInterval","TriggersStartBoundary"]
146 | }
147 | }
148 |
149 | if "services" in [tags] {
150 | csv {
151 | columns => ["Host","DateScanned","AcceptPause","AcceptStop","Caption","CheckPoint","DelayedAutoStart","Description","DesktopInteract","DisconnectedSessions","DisplayName","ErrorControl","ExitCode","InstallDate","Name","PathName","ProcessId","ServiceSpecificExitCode","ServiceType","Started","StartMode","StartName","State","TagId","TotalSessions","WaitHint"]
152 | }
153 | }
154 |
155 | if "sessions" in [tags] {
156 | csv {
157 | columns => ["Host","DateScanned","SESSIONNAME","USERNAME","ID","STATE","TYPE","DEVICE"]
158 | }
159 | }
160 |
161 | if "shares" in [tags] {
162 | csv {
163 | columns => ["Host","DateScanned","Name","Path","DESCRIPTION","TrusteeName","TrusteeDomain","TrusteeSID","Type","AccessMask","SharePermission"]
164 | }
165 | }
166 |
167 | if "software" in [tags] {
168 | csv {
169 | columns => ["Host","DateScanned","Publisher","DisplayName","DisplayVersion","InstallDate","InstallSource","InstallLocation","PSChildName","HelpLink"]
170 | }
171 | }
172 |
173 | if "strings" in [tags] {
174 | csv {
175 | columns => ["Host","DateScanned","ProcessLocation","String"]
176 | }
177 | }
178 |
179 | if "tcpconnections" in [tags] {
180 | csv {
181 | columns => ["Host","DateScanned","LocalAddress","LocalPort","RemoteAddress","RemotePort","State","AppliedSetting","OwningProcess","Path"]
182 | }
183 | }
184 |
185 | if "tpm" in [tags] {
186 | csv {
187 | columns => ["Host","DateScanned","TpmPresent","TpmReady","ManufacturerId","ManufacturerName","ManufacturerVersion","ManagedAuthLevel","OwnerAuth","OwnerClearDisabled","AutoProvisioning","LockedOut","LockoutCount","LockoutMax","SelfTest","FirmwareVersionAtLastProvision"]
188 | }
189 | }
190 |
191 | if "meerkat" in [tags] {
192 | truncate {
193 | fields => "DateScanned"
194 | length_bytes => 19
195 | }
196 | date {
197 | locale => "en"
198 | match => [ "DateScanned", "yyyy-MM-dd HH:mm:ss" ]
199 | target => "DateScanned"
200 | add_tag => [ "TimeMatched" ]
201 | }
202 | }
203 | }
204 |
205 |
206 | output {
207 | #if "meerkat" in [tags] {
208 | #stdout { codec => rubydebug }
209 | #}
210 |
211 | if "ads" in [tags] {
212 | elasticsearch {
213 | hosts => ["localhost:9200"]
214 | index => "logs-endpoint-meerkat-ads-%{+YYYY.MM.dd}"
215 | }
216 | }
217 |
218 | if "autoruns" in [tags] {
219 | elasticsearch {
220 | hosts => ["localhost:9200"]
221 | index => "logs-endpoint-meerkat-autoruns-%{+YYYY.MM.dd}"
222 | }
223 | }
224 |
225 | if "bitlocker" in [tags] {
226 | elasticsearch {
227 | hosts => ["localhost:9200"]
228 | index => "logs-endpoint-meerkat-bitlocker-%{+YYYY.MM.dd}"
229 | }
230 | }
231 |
232 | if "certificates" in [tags] {
233 | elasticsearch {
234 | hosts => ["localhost:9200"]
235 | index => "logs-endpoint-meerkat-certificates-%{+YYYY.MM.dd}"
236 | }
237 | }
238 |
239 | if "computer" in [tags] {
240 | elasticsearch {
241 | hosts => ["localhost:9200"]
242 | index => "logs-endpoint-meerkat-computer-%{+YYYY.MM.dd}"
243 | }
244 | }
245 |
246 | if "dlls" in [tags] {
247 | elasticsearch {
248 | hosts => ["localhost:9200"]
249 | index => "logs-endpoint-meerkat-dlls-%{+YYYY.MM.dd}"
250 | }
251 | }
252 |
253 | if "dns" in [tags] {
254 | elasticsearch {
255 | hosts => ["localhost:9200"]
256 | index => "logs-endpoint-meerkat-dns-%{+YYYY.MM.dd}"
257 | }
258 | }
259 |
260 | if "drivers" in [tags] {
261 | elasticsearch {
262 | hosts => ["localhost:9200"]
263 | index => "logs-endpoint-meerkat-drivers-%{+YYYY.MM.dd}"
264 | }
265 | }
266 |
267 | if "envvars" in [tags] {
268 | elasticsearch {
269 | hosts => ["localhost:9200"]
270 | index => "logs-endpoint-meerkat-envvars-%{+YYYY.MM.dd}"
271 | }
272 | }
273 |
274 | if "eventlogs" in [tags] {
275 | elasticsearch {
276 | hosts => ["localhost:9200"]
277 | index => "logs-endpoint-meerkat-eventlogs-%{+YYYY.MM.dd}"
278 | }
279 | }
280 |
281 | if "groupmembers" in [tags] {
282 | elasticsearch {
283 | hosts => ["localhost:9200"]
284 | index => "logs-endpoint-meerkat-groupmembers-%{+YYYY.MM.dd}"
285 | }
286 | }
287 |
288 | if "hardware" in [tags] {
289 | elasticsearch {
290 | hosts => ["localhost:9200"]
291 | index => "logs-endpoint-meerkat-hardware-%{+YYYY.MM.dd}"
292 | }
293 | }
294 |
295 | if "hosts" in [tags] {
296 | elasticsearch {
297 | hosts => ["localhost:9200"]
298 | index => "logs-endpoint-meerkat-hosts-%{+YYYY.MM.dd}"
299 | }
300 | }
301 |
302 | if "hotfixes" in [tags] {
303 | elasticsearch {
304 | hosts => ["localhost:9200"]
305 | index => "logs-endpoint-meerkat-hotfixes-%{+YYYY.MM.dd}"
306 | }
307 | }
308 |
309 | if "mac" in [tags] {
310 | elasticsearch {
311 | hosts => ["localhost:9200"]
312 | index => "logs-endpoint-meerkat-mac-%{+YYYY.MM.dd}"
313 | }
314 | }
315 |
316 | if "mru" in [tags] {
317 | elasticsearch {
318 | hosts => ["localhost:9200"]
319 | index => "logs-endpoint-meerkat-mru-%{+YYYY.MM.dd}"
320 | }
321 | }
322 |
323 | if "netadapters" in [tags] {
324 | elasticsearch {
325 | hosts => ["localhost:9200"]
326 | index => "logs-endpoint-meerkat-netadapters-%{+YYYY.MM.dd}"
327 | }
328 | }
329 |
330 | if "netroute" in [tags] {
331 | elasticsearch {
332 | hosts => ["localhost:9200"]
333 | index => "logs-endpoint-meerkat-netroute-%{+YYYY.MM.dd}"
334 | }
335 | }
336 |
337 | if "processes" in [tags] {
338 | elasticsearch {
339 | hosts => ["localhost:9200"]
340 | index => "logs-endpoint-meerkat-processes-%{+YYYY.MM.dd}"
341 | }
342 | }
343 |
344 | if "recylcebin" in [tags] {
345 | elasticsearch {
346 | hosts => ["localhost:9200"]
347 | index => "logs-endpoint-meerkat-recylcebin-%{+YYYY.MM.dd}"
348 | }
349 | }
350 |
351 | if "registry" in [tags] {
352 | elasticsearch {
353 | hosts => ["localhost:9200"]
354 | index => "logs-endpoint-meerkat-registry-%{+YYYY.MM.dd}"
355 | }
356 | }
357 |
358 | if "scheduledtasks" in [tags] {
359 | elasticsearch {
360 | hosts => ["localhost:9200"]
361 | index => "logs-endpoint-meerkat-scheduledtasks-%{+YYYY.MM.dd}"
362 | }
363 | }
364 |
365 | if "services" in [tags] {
366 | elasticsearch {
367 | hosts => ["localhost:9200"]
368 | index => "logs-endpoint-meerkat-services-%{+YYYY.MM.dd}"
369 | }
370 | }
371 |
372 | if "sessions" in [tags] {
373 | elasticsearch {
374 | hosts => ["localhost:9200"]
375 | index => "logs-endpoint-meerkat-sessions-%{+YYYY.MM.dd}"
376 | }
377 | }
378 |
379 | if "shares" in [tags] {
380 | elasticsearch {
381 | hosts => ["localhost:9200"]
382 | index => "logs-endpoint-meerkat-shares-%{+YYYY.MM.dd}"
383 | }
384 | }
385 |
386 | if "softwtare" in [tags] {
387 | elasticsearch {
388 | hosts => ["localhost:9200"]
389 | index => "logs-endpoint-meerkat-softwtare-%{+YYYY.MM.dd}"
390 | }
391 | }
392 |
393 | if "strings" in [tags] {
394 | elasticsearch {
395 | hosts => ["localhost:9200"]
396 | index => "logs-endpoint-meerkat-strings-%{+YYYY.MM.dd}"
397 | }
398 | }
399 |
400 | if "tcpconnections" in [tags] {
401 | elasticsearch {
402 | hosts => ["localhost:9200"]
403 | index => "logs-endpoint-meerkat-tcpconnections-%{+YYYY.MM.dd}"
404 | }
405 | }
406 |
407 | if "tpm" in [tags] {
408 | elasticsearch {
409 | hosts => ["localhost:9200"]
410 | index => "logs-endpoint-meerkat-tpm-%{+YYYY.MM.dd}"
411 | }
412 | }
413 | }
414 |
--------------------------------------------------------------------------------
/Meerkat.md:
--------------------------------------------------------------------------------
1 | This guide explains how to use Filebeat to harvest Meerkat output and send it to Logstash. To install the Elasticstack, see [README.md](README.md)
2 |
3 | # Logstash
4 |
5 | Copy ```Logstash/meerkat.yml``` to ```/etc/logstash/conf.d```
6 |
7 |
8 | ## Restart Logstash Service
9 |
10 | Note: not required with Logstash option ```config.reload.automatic: true```
11 | ```
12 | systemctl restart logstash.service
13 | ```
14 |
15 | # Filebeat
16 |
17 | - Paste the contents of ```Filebeat/meerkat.yml``` into ```filebeat.yml``, immediately after this line:
18 | ```
19 | filebeat.inputs:
20 | ```
21 |
--------------------------------------------------------------------------------
/NTFS-Share.md:
--------------------------------------------------------------------------------
1 | # Connect to an NTFS File Share (Permanently)
2 | Show net neighbors by reviewing ARP cache
3 | ```
4 | arp -a
5 | ```
6 |
7 | Create a new folder and mount it to the NTFS share
8 | ```
9 | mkdir /mnt/meerkat
10 | mount -t cifs //192.168.1.120/Linux -o username=myntaccount,password='mypassword' /mnt/meerkat
11 | ls -l /mnt/meerkat
12 | ```
13 |
14 | Create a credential file to hold the Windows username and password
15 | ```
16 | touch /root/.meerkat
17 | chmod 600 /root/.meerkat
18 | ls -l .meerkat
19 | ```
20 |
21 | ```
22 | +++ Begin screen output +++
23 |
24 | -rw------- 1 root root 35 Jul 5 23:59 .meerkat
25 |
26 | --- End screen output ---
27 | ```
28 |
29 | ```
30 | vi /root/.meerkat
31 | cat vi /root/.meerkat
32 | ```
33 |
34 | ```
35 | +++ Begin screen output +++
36 |
37 | username=my_nt_username
38 | password=my_nt_password
39 |
40 | --- End screen output ---
41 | ```
42 |
43 | Determine the uid and gid of the account that will own the directory after it is mounted
44 | ```
45 | whoami
46 | id my_linux_username
47 | ```
48 |
49 | ```
50 | +++ Begin screen output +++
51 |
52 | uid=500(my_linux_username) gid=500(my_linux_username) groups=500(my_linux_username)
53 |
54 | --- End screen output ---
55 | ```
56 |
57 | Edit the fstab file (note that uid 500 points to the my_linux_username Linux account)
58 | ```
59 | vi /etc/fstab
60 | ```
61 |
62 | Add a line for meerkat; see output from "cat /etc/fstab" below
63 | ```
64 | cat /etc/fstab
65 | ```
66 |
67 | ```
68 | +++ Begin screen output +++
69 |
70 | /dev/VolGroup00/LogVol00 / ext3 defaults 1 1
71 | LABEL=/boot /boot ext3 defaults 1 2
72 | tmpfs /dev/shm tmpfs defaults 0 0
73 | devpts /dev/pts devpts gid=5,mode=620 0 0
74 | sysfs /sys sysfs defaults 0 0
75 | proc /proc proc defaults 0 0
76 | /dev/VolGroup00/LogVol01 swap swap defaults 0 0
77 | //192.168.1.137/meerkat /mnt/meerkat cifs auto,credentials=/root/.meerkat,uid=500,gid=500,file_mode=0777,dir_mode=0777 0 0
78 |
79 | --- End screen output ---
80 | ```
81 |
82 |
83 | Display the mounted devices
84 | ```
85 | mount
86 | ```
87 |
88 | ```
89 | +++ Begin screen output +++
90 |
91 | /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
92 | proc on /proc type proc (rw)
93 | sysfs on /sys type sysfs (rw)
94 | devpts on /dev/pts type devpts (rw,gid=5,mode=620)
95 | /dev/hda1 on /boot type ext3 (rw)
96 | tmpfs on /dev/shm type tmpfs (rw)
97 | none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
98 | sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
99 |
100 | --- End screen output ---
101 | ```
102 |
103 | Reload the fstab file
104 | ```
105 | mount -a
106 | ```
107 |
108 | Display the mounted devices
109 | ```
110 | mount
111 | ```
112 |
113 | ```
114 | +++ Begin screen output +++
115 |
116 | /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
117 | proc on /proc type proc (rw)
118 | sysfs on /sys type sysfs (rw)
119 | devpts on /dev/pts type devpts (rw,gid=5,mode=620)
120 | /dev/hda1 on /boot type ext3 (rw)
121 | tmpfs on /dev/shm type tmpfs (rw)
122 | none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
123 | sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
124 | meerkat on /mnt/meerkat type cifs (rw,mand)
125 |
126 | --- End screen output ---
127 | ```
128 |
129 | ```
130 | ls -l /mnt/meerkat
131 | ```
132 |
133 | ```
134 | +++ Begin screen output +++
135 |
136 | total 0
137 | drwxrwxrwx 1 my_linux_username my_linux_username 0 Mar 4 22:10 blah1.csv
138 | -rwxrwxrwx 1 my_linux_username my_linux_username 89712640 Mar 4 22:02 blah2.csv
139 |
140 | --- End screen output ---
141 | ```
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | - [Ubuntu](#ubuntu)
2 | - [Set Up NAT on a Virtual Switch](#set-up-nat-on-a-virtual-switch)
3 | - [Set Up Static IPs](#set-up-static-ips)
4 | - [Elasticsearch](#elasticsearch)
5 | - [Install](#install)
6 | - [Enable Service, Run, and Verify](#enable-service-run-and-verify)
7 | - [Manage Service](#manage-service)
8 | - [Check Status and Monitor](#check-status-and-monitor)
9 | - [Configure](#configure)
10 | - [Kibana](#kibana)
11 | - [Install](#install-1)
12 | - [Enable Service, Run, and Verify](#enable-service-run-and-verify-1)
13 | - [Manage Service](#manage-service-1)
14 | - [Check Status and Monitor](#check-status-and-monitor-1)
15 | - [Configure](#configure-1)
16 | - [Setup Index Patterns](#setup-index-patterns)
17 | - [Logstash](#logstash)
18 | - [Install](#install-2)
19 | - [Enable Service, Run, and Verify](#enable-service-run-and-verify-2)
20 | - [Manage Service](#manage-service-2)
21 | - [Check Status and Monitor](#check-status-and-monitor-2)
22 | - [Configure](#configure-2)
23 | - [WinLogBeat](#winlogbeat)
24 | - [Prepare LogStash for Receipt of Logs](#prepare-logstash-for-receipt-of-logs)
25 | - [Install](#install-3)
26 | - [Configure](#configure-3)
27 | - [Filebeat](#filebeat)
28 | - [Install](#install-4)
29 | - [Configure](#configure-4)
30 | - [Start at Boot](#start-at-boot)
31 | - [Monitor](#monitor)
32 | - [What Next?](#what-next)
33 |
34 | This guide was written primarily with Ubuntu 18.04 LTS in mind, but can easily be adjusted to any other distribution. It is primarily comprised of condensed versions of the following guides:
35 | - https://www.omgubuntu.co.uk/2018/09/hyper-v-ubuntu-1804-windows-integration
36 | - https://www.elastic.co/guide/en/elasticsearch/reference/7.6/deb.html
37 | - https://www.elastic.co/guide/en/kibana/7.1/install.html
38 | - https://www.elastic.co/guide/en/logstash/7.1/installing-logstash.html
39 | - https://www.elastic.co/guide/en/logstash/7.1/running-logstash.html
40 | - https://www.elastic.co/guide/en/beats/winlogbeat/current/config-winlogbeat-logstash.html
41 | - https://www.elastic.co/guide/en/beats/winlogbeat/master/logstash-output.html
42 | - https://www.elastic.co/guide/en/beats/filebeat/master/filebeat-installation.html
43 | - http://wiki.friendlyarm.com/wiki/index.php/Use_NetworkManager_to_configure_network_settings
44 | - https://anandthearchitect.com/2018/01/06/windows-10-how-to-setup-nat-network-for-hyper-v-guests/
45 |
46 | # Ubuntu
47 | Do NOT select the option to log in automatically. This has been known to cause issues with the first logon. It won't cost you much time to test this, so feel free to ignore my advice to see if things have changed.
48 |
49 | Install updates
50 | ```
51 | sudo bash
52 | apt-get update
53 | apt-get upgrade
54 | ```
55 |
56 | ## Set Up NAT on a Virtual Switch
57 |
58 | Open PowerShell and enter the following commands to set up a virtual switch
59 | ```
60 | # Create Hyper-V internal only switch.
61 | New-VMSwitch –SwitchName “NAT-Switch” –SwitchType Internal –Verbose
62 |
63 | # Note the IfIndex of NAT-Switch of the next command's output
64 | Get-NetAdapter
65 |
66 | # Create NAT Gateway
67 | New-NetIPAddress –IPAddress 192.168.200.1 -PrefixLength 24 -InterfaceIndex ## –Verbose
68 |
69 | # Assign each guest VM to this new adapter
70 | Get-VM YourVMName | Get-VMNetworkAdapter | Connect-VMNetworkAdapter –SwitchName “NAT-Switch”
71 |
72 | ```
73 |
74 | ## Set Up Static IPs
75 |
76 | Set up static IPs so your systems can point to each other properly. If you are running all services on one box, this and other related steps can be ignored or set to 127.0.0.1 // localhost.
77 |
78 | Set your static IP. Use your home router IP as your DNS
79 | ```
80 | nmcli connection modify 'Wired connection 1' connection.autoconnect yes ipv4.method manual ipv4.address 192.168.200.2/28 ipv4.gateway 192.168.200.1 ipv4.dns 192.168.1.1
81 | reboot
82 | ```
83 |
84 |
85 |
86 | # Elasticsearch
87 |
88 | ## Install
89 | ```
90 | apt-get update
91 | apt-get install curl
92 | wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
93 | apt-get install apt-transport-https
94 | echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
95 | apt-get update
96 | apt-get install elasticsearch
97 | ```
98 |
99 | ## Enable Service, Run, and Verify
100 | ```
101 | sudo /bin/systemctl daemon-reload
102 | sudo /bin/systemctl enable elasticsearch.service
103 | apt-get install curl
104 | curl -X GET localhost:9200
105 | ```
106 |
107 | ## Manage Service
108 | ```
109 | systemctl stop elasticsearch.service
110 | systemctl start elasticsearch.service
111 | systemctl restart elasticsearch.service
112 | ```
113 |
114 | ## Check Status and Monitor
115 | ```
116 | systemctl status elasticsearch.service
117 | ```
118 | ```
119 | journalctl -u elasticsearch.service -f
120 | ```
121 |
122 | ## Configure
123 | The following will allow Kibana to reach this server
124 |
125 | Edit /etc/elasticsearch/elasticsearch.yml
126 | ```
127 | network.host: 0.0.0.0
128 | cluster.initial_master_nodes: ["node-1", "node-2"]
129 | ```
130 | ```
131 | systemctl restart elasticsearch.service
132 | ```
133 |
134 | # Kibana
135 |
136 |
137 | ## Install
138 |
139 | ```
140 | wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
141 | apt-get install apt-transport-https
142 | echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
143 | apt-get update
144 | apt-get install kibana
145 | ```
146 |
147 |
148 |
149 | ## Enable Service, Run, and Verify
150 | ```
151 | /bin/systemctl daemon-reload
152 | /bin/systemctl enable kibana.service
153 | ```
154 | Allow the service a moment to start, then visit localhost:5601
155 |
156 |
157 | ## Manage Service
158 | ```
159 | systemctl stop kibana.service
160 | systemctl start kibana.service
161 | systemctl restart kibana.service
162 | ```
163 |
164 | ## Check Status and Monitor
165 | ```
166 | systemctl status kibana.service
167 | ```
168 | ```
169 | journalctl -u kibana.service -f
170 | ```
171 |
172 |
173 | ## Configure
174 | Edit /etc/kibana/kibana.yml
175 | ```
176 | server.host: "0.0.0.0"
177 | server.name: "kibana-vm"
178 | elasticsearch.hosts:["http://192.168.200.2:9200"]
179 | ```
180 | Ensure permissions on kibana folders and files are allowing the logstash account access
181 | ```
182 | chown kibana:kibana /etc/kibana -R
183 | chown kibana:kibana /var/log/kibana -R
184 | chown kibana:kibana /var/lib/kibana -R
185 | chown kibana:kibana /etc/default/kibana -R
186 | ```
187 | ```
188 | systemctl restart kibana.service
189 | ```
190 |
191 | ## Setup Index Patterns
192 | For each new event feed, you'll likely be setting up new Elasticsearch indices. For each one, you'll need to set up Index Patterns under Kibana's Management > Kibana > Index Patterns setup interface.
193 |
194 | If you set up winlogbeat with mostly defaults, you'd use index pattern "winlogbeat*" with the @timestamp as your Time Filter.
195 |
196 |
197 | # Logstash
198 |
199 |
200 | ## Install
201 | ```
202 | apt-get install default-jre
203 | update-alternatives --config java
204 | wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
205 | apt-get install apt-transport-https
206 | echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
207 | apt-get update
208 | apt-get install logstash
209 | ```
210 |
211 | Determine java location
212 | ```
213 | update-java-alternatives --list
214 | ```
215 |
216 | Append a JAVA_HOME environment variable
217 | ```
218 | echo 'JAVA_HOME="/your/java/location"' | sudo tee -a /etc/environment
219 | source /etc/environment
220 | echo $JAVA_HOME
221 | ```
222 |
223 |
224 | ## Enable Service, Run, and Verify
225 | ```
226 | /bin/systemctl daemon-reload
227 | /bin/systemctl enable logstash.service
228 | ```
229 |
230 | ## Manage Service
231 | ```
232 | systemctl stop logstash.service
233 | systemctl start logstash.service
234 | systemctl restart logstash.service
235 | ```
236 |
237 | ## Check Status and Monitor
238 | ```
239 | systemctl status logstash.service
240 | ```
241 | ```
242 | /usr/share/logstash/bin/logstash --path.settings /etc/logstash --log.level=debug
243 | journalctl -u logstash.service -f
244 | ```
245 |
246 |
247 | ## Configure
248 |
249 | Edit /etc/logstash/logstash.yml
250 | ```
251 | path.data: /var/lib/logstash
252 | config.reload.automatic: true
253 | config.reload.interval: 30s
254 | log.level: warn
255 | path.logs: /var/log/logstash
256 | ```
257 |
258 | Ensure permissions on logstash folders and files are allowing the logstash account access
259 | ```
260 | chown logstash:logstash /etc/logstash -R
261 | chown logstash:logstash /var/log/logstash -R
262 | chown logstash:logstash /var/lib/logstash -R
263 | chown logstash:logstash /etc/default/logstash
264 | ```
265 |
266 | # WinLogBeat
267 |
268 | ## Prepare LogStash for Receipt of Logs
269 | Create /etc/logstash/conf.d/winlogbeat.yml:
270 | ```
271 | input {
272 | beats {
273 | port => 5044
274 | }
275 | }
276 |
277 | output {
278 | elasticsearch {
279 | hosts => ["http://19.168.200.2:9200"]
280 | index => "%{[@metadata][beat]}-%{[@metadata][version]}"
281 | }
282 | }
283 | ```
284 |
285 | ## Install
286 | https://www.elastic.co/downloads/beats/winlogbeat
287 |
288 | ## Configure
289 | - Edit winlogbeat.yml. Comment out Elasticsearch lines and uncomment Logstash lines.
290 |
291 | ```
292 | #-------------------------- Elasticsearch output ------------------------------
293 | #output.elasticsearch:
294 | #hosts: ["localhost:9200"]
295 |
296 | #----------------------------- Logstash output --------------------------------
297 | output.logstash:
298 | hosts: ["192.168.200.3:5044"]
299 | ```
300 |
301 |
302 |
303 | # Filebeat
304 |
305 |
306 | ## Install
307 |
308 | - Download and install Filebeat to a windows box according to the guide
309 |
310 | ## Configure
311 |
312 | - Edit filebeat.yml and place input config immediately after this line:
313 | ```
314 | filebeat.inputs:
315 | ```
316 |
317 | Edit filebeat.yml, comment out Elasticsearch section and uncomment Logstash section.
318 | ```
319 | #output.elasticsearch:
320 | # Array of hosts to connect to.
321 | # hosts: ["localhost:9200"]
322 |
323 | output.logstash:
324 | # The Logstash hosts
325 | hosts: ["192.168.200.3:9600"]
326 | ```
327 |
328 | ## Start at Boot
329 |
330 | Ensure the "filebeat" service was created via services.msc
331 |
332 | ## Monitor
333 |
334 | Either:
335 | - Review the logs at c:\programdata\filebeat\logs
336 | - run ```..\filebeat.exe -e -v``` and review output to console
337 |
338 | # What Next?
339 | - [Ingest Meerkat Output](Meerkat.md)
340 | - [Administration Tips & Tricks](https://github.com/TonyPhipps/Elasticstack/blob/master/Administration.md)
341 | - [Enable HTTPS](HTTPS.md)
--------------------------------------------------------------------------------
/Winlogbeat/winlogbeat.yml:
--------------------------------------------------------------------------------
1 | ###################### Winlogbeat Configuration Example ########################
2 |
3 | # This file is an example configuration file highlighting only the most common
4 | # options. The winlogbeat.reference.yml file from the same directory contains
5 | # all the supported options with more comments. You can use it as a reference.
6 | #
7 | # You can find the full configuration reference here:
8 | # https://www.elastic.co/guide/en/beats/winlogbeat/index.html
9 |
10 | #======================= Winlogbeat specific options ===========================
11 |
12 | # event_logs specifies a list of event logs to monitor as well as any
13 | # accompanying options. The YAML data type of event_logs is a list of
14 | # dictionaries.
15 | #
16 | # The supported keys are name (required), tags, fields, fields_under_root,
17 | # forwarded, ignore_older, level, event_id, provider, and include_xml. Please
18 | # visit the documentation for the complete details of each option.
19 | # https://go.es.io/WinlogbeatConfig
20 | winlogbeat.event_logs:
21 | - name: Application
22 | ignore_older: 30m
23 |
24 | - name: Security
25 | ignore_older: 30m
26 | processors:
27 | - script:
28 | lang: javascript
29 | id: security
30 | file: ${path.home}/module/security/config/winlogbeat-security.js
31 |
32 | - name: System
33 | ignore_older: 30m
34 |
35 | - name: Microsoft-windows-sysmon/operational
36 | ignore_older: 30m
37 | processors:
38 | - script:
39 | lang: javascript
40 | id: sysmon
41 | file: ${path.home}/module/sysmon/config/winlogbeat-sysmon.js
42 |
43 | - name: Microsoft-windows-PowerShell/Operational
44 | ignore_older: 30m
45 | event_id: 4103, 4104
46 |
47 | - name: Windows PowerShell
48 | event_id: 400,600
49 | ignore_older: 30m
50 |
51 | - name: Microsoft-Windows-WMI-Activity/Operational
52 | event_id: 5857,5858,5859,5860,5861
53 |
54 | #==================== Elasticsearch template settings ==========================
55 |
56 | setup.template.settings:
57 | index.number_of_shards: 1
58 | #index.codec: best_compression
59 | #_source.enabled: false
60 |
61 |
62 | #================================ General =====================================
63 |
64 | # The name of the shipper that publishes the network data. It can be used to group
65 | # all the transactions sent by a single shipper in the web interface.
66 | #name:
67 |
68 | # The tags of the shipper are included in their own field with each
69 | # transaction published.
70 | #tags: ["service-X", "web-tier"]
71 |
72 | # Optional fields that you can specify to add additional information to the
73 | # output.
74 | #fields:
75 | # env: staging
76 |
77 |
78 | #============================== Dashboards =====================================
79 | # These settings control loading the sample dashboards to the Kibana index. Loading
80 | # the dashboards is disabled by default and can be enabled either by setting the
81 | # options here or by using the `setup` command.
82 | #setup.dashboards.enabled: false
83 |
84 | # The URL from where to download the dashboards archive. By default this URL
85 | # has a value which is computed based on the Beat name and version. For released
86 | # versions, this URL points to the dashboard archive on the artifacts.elastic.co
87 | # website.
88 | #setup.dashboards.url:
89 |
90 | #============================== Kibana =====================================
91 |
92 | # Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
93 | # This requires a Kibana endpoint configuration.
94 | setup.kibana:
95 |
96 | # Kibana Host
97 | # Scheme and port can be left out and will be set to the default (http and 5601)
98 | # In case you specify and additional path, the scheme is required: http://localhost:5601/path
99 | # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
100 | #host: "localhost:5601"
101 |
102 | # Kibana Space ID
103 | # ID of the Kibana Space into which the dashboards should be loaded. By default,
104 | # the Default Space will be used.
105 | #space.id:
106 |
107 | #============================= Elastic Cloud ==================================
108 |
109 | # These settings simplify using Winlogbeat with the Elastic Cloud (https://cloud.elastic.co/).
110 |
111 | # The cloud.id setting overwrites the `output.elasticsearch.hosts` and
112 | # `setup.kibana.host` options.
113 | # You can find the `cloud.id` in the Elastic Cloud web UI.
114 | #cloud.id:
115 |
116 | # The cloud.auth setting overwrites the `output.elasticsearch.username` and
117 | # `output.elasticsearch.password` settings. The format is `:`.
118 | #cloud.auth:
119 |
120 | #================================ Outputs =====================================
121 |
122 | # Configure what output to use when sending the data collected by the beat.
123 |
124 | #-------------------------- Elasticsearch output ------------------------------
125 | #output.elasticsearch:
126 | # Array of hosts to connect to.
127 | #hosts: ["localhost:9200"]
128 |
129 | # Protocol - either `http` (default) or `https`.
130 | #protocol: "https"
131 |
132 | # Authentication credentials - either API key or username/password.
133 | #api_key: "id:api_key"
134 | #username: "elastic"
135 | #password: "changeme"
136 |
137 | #----------------------------- Logstash output --------------------------------
138 | output.logstash:
139 | # The Logstash hosts
140 | hosts: ["172.17.158.3:5044"]
141 |
142 | # Optional SSL. By default is off.
143 | # List of root certificates for HTTPS server verifications
144 | #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
145 |
146 | # Certificate for SSL client authentication
147 | #ssl.certificate: "/etc/pki/client/cert.pem"
148 |
149 | # Client Certificate Key
150 | #ssl.key: "/etc/pki/client/cert.key"
151 |
152 | #================================ Processors =====================================
153 |
154 | # Configure processors to enhance or manipulate events generated by the beat.
155 |
156 | processors:
157 | - add_host_metadata: ~
158 | - add_cloud_metadata: ~
159 | - add_docker_metadata: ~
160 |
161 | #================================ Logging =====================================
162 |
163 | # Sets log level. The default log level is info.
164 | # Available log levels are: error, warning, info, debug
165 | #logging.level: debug
166 |
167 | # At debug level, you can selectively enable logging only for some components.
168 | # To enable all selectors use ["*"]. Examples of other selectors are "beat",
169 | # "publish", "service".
170 | #logging.selectors: ["*"]
171 |
172 | #============================== X-Pack Monitoring ===============================
173 | # winlogbeat can export internal metrics to a central Elasticsearch monitoring
174 | # cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
175 | # reporting is disabled by default.
176 |
177 | # Set to true to enable the monitoring reporter.
178 | #monitoring.enabled: false
179 |
180 | # Sets the UUID of the Elasticsearch cluster under which monitoring data for this
181 | # Winlogbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
182 | # is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
183 | #monitoring.cluster_uuid:
184 |
185 | # Uncomment to send the metrics to Elasticsearch. Most settings from the
186 | # Elasticsearch output are accepted here as well.
187 | # Note that the settings should point to your Elasticsearch *monitoring* cluster.
188 | # Any setting that is not set is automatically inherited from the Elasticsearch
189 | # output configuration, so if you have the Elasticsearch output configured such
190 | # that it is pointing to your Elasticsearch monitoring cluster, you can simply
191 | # uncomment the following line.
192 | #monitoring.elasticsearch:
193 |
194 | #================================= Migration ==================================
195 |
196 | # This allows to enable 6.7 migration aliases
197 | #migration.6_to_7.enabled: true
198 |
--------------------------------------------------------------------------------