You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* implmenting pylint recommendation
* Implementing pylint recommendations
* Implementing more pylint recommendations
* First set of doc notebooks.
Fixing a few bugs found during the creation of doc notebooks.
Updated several modules with numpy-style docstrings - to allow for auto-documentation
* Fixing failing test by specifying include_paths
* Updates to README.md and updates for unit tests to add additional entities and fix for changes to iocextract defaults. Also doc fix for iocextract.py
* Adding unit test for auditdextract.py.
Use pandas df search in base64unpack.py instead of iterrows then search.
Fixing auditdextract.py to only create process events for EXECVE syscalls. Added code to rename fields if name clash from different sub-records.
The public functions, classes and public class methods have docstrings that describe the
29
+
parameters and, for more complex functions give a more detailed description of functionality
30
+
and outputs. We are in the process of producing more formal documentation on read-the-docs.
31
+
32
+
Until then, the functionality is described in the following sections and accompanying notebooks.
33
+
You can also browse through the sample notebooks (especially the *Windows Alert Investigation* notebook)
34
+
to see some of the functionality used in context.
35
+
36
+
---
37
+
38
+
## Security Tools Sub-package - `sectools`
4
39
5
-
## sectools
6
40
This subpackage contains several modules helpful for working on security
7
41
investigations and hunting:
42
+
8
43
### base64unpack
9
-
Base64 and archive (gz, zip, tar) extractor. Input can either be a single string or a specified column of a pandas dataframe. It will try to identify any base64 encoded strings and decode them. If the result looks like one of the supported archive types it will unpack the contents. The results of each decode/unpack are rechecked for further base64 content and will recurse down up to 20 levels (default can be overridden).
44
+
45
+
Base64 and archive (gz, zip, tar) extractor. Input can either be a single string
46
+
or a specified column of a pandas dataframe. It will try to identify any base64 encoded
47
+
strings and decode them. If the result looks like one of the supported archive types it
48
+
will unpack the contents. The results of each decode/unpack are rechecked for further
49
+
base64 content and will recurse down up to 20 levels (default can be overridden).
10
50
Output is to a decoded string (for single string input) or a DataFrame (for dataframe input).
51
+
11
52
[Base64Unpack Notebook](./doc/Base64Unpack.ipynb)
12
53
13
54
### iocextract
14
-
Uses a set of builtin regular expressions to look for Indicator of Compromise (IoC) patterns. Input can be a single string or a pandas dataframe with one or more columns specified as input.
55
+
56
+
Uses a set of builtin regular expressions to look for Indicator of Compromise (IoC) patterns.
57
+
Input can be a single string or a pandas dataframe with one or more columns specified as input.
58
+
15
59
The following types are built-in:
60
+
16
61
- IPv4 and IPv6
17
62
- URL
18
63
- DNS domain
@@ -23,68 +68,142 @@ You can modify or add to the regular expressions used at runtime.
23
68
24
69
Output is a dictionary of matches (for single string input) or a DataFrame (for dataframe input).
25
70
71
+
[Base64Unpack Notebook](./doc/IoCExtract.ipynb)
72
+
26
73
### vtlookup
27
-
Wrapper class around Virus Total API (https://www.virustotal.com/en/documentation/public-api/).
74
+
75
+
Wrapper class around [Virus Total API](https://www.virustotal.com/en/documentation/public-api/).
28
76
Input can be a single IoC observable or a pandas DataFrame containing multiple observables.
29
-
Processing requires a Virus Total account and API key and processing performance is limited to
77
+
Processing requires a Virus Total account and API key and processing performance is limited to
30
78
the number of requests per minute for the account type that you have.
31
79
Support IoC Types:
80
+
32
81
- Filehash
33
82
- URL
34
83
- DNS Domain
35
84
- IPv4 Address
36
85
37
-
[VTLookup Notebook](./doc/VTLookup.ipynb)
86
+
[VTLookup Notebook](./doc/VirusTotalLookup.ipynb)
38
87
39
88
### geoip
89
+
40
90
Geographic location lookup for IP addresses.
41
91
This module has two classes for different services:
42
-
- GeoLiteLookup - Maxmind Geolite (see https://www.maxmind.com)
43
-
- IPStackLookup - IPStack (see https://ipstack.com)
44
-
Both services offer a free tier for non-commercial use. However,
45
-
a paid tier will normally get you more accuracy, more detail and
46
-
a higher throughput rate. Maxmind geolite uses a downloadable database,
92
+
93
+
- GeoLiteLookup - Maxmind Geolite (see <https://www.maxmind.com>)
94
+
- IPStackLookup - IPStack (see <https://ipstack.com>)
95
+
Both services offer a free tier for non-commercial use. However,
96
+
a paid tier will normally get you more accuracy, more detail and
97
+
a higher throughput rate. Maxmind geolite uses a downloadable database,
47
98
while IPStack is an online lookup (API key required).
48
99
100
+
[GeoIP Lookup Notebook](./doc/GeoIPLookups.ipynb)
101
+
49
102
### eventcluster
50
-
This module is intended to be used to summarize large numbers of
51
-
events into clusters of different patterns. High volume repeating
103
+
104
+
This module is intended to be used to summarize large numbers of
105
+
events into clusters of different patterns. High volume repeating
52
106
events can often make it difficult to see unique and interesting
53
-
items. The module uses a pattern-based approach rather than
54
-
matching on exact strings - so an admin command that
55
-
does some maintenance on thousands of servers with a commandline such as:
See the following notebooks for more examples of the use of this package in practice:
173
+
174
+
- Windows Alert Investigation in [github](https://github.com/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Investigation%20-%20Process-Alerts.ipynb)
175
+
or [NbViewer](https://nbviewer.jupyter.org/github/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Investigation%20-%20Process-Alerts.ipynb)
176
+
- Windows Host Explorer in [github](https://github.com/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Windows-Host-Explorer.ipynb)
177
+
or [NbViewer](https://nbviewer.jupyter.org/github/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Windows-Host-Explorer.ipynb)
178
+
- Office 365 Exploration in [github](https://github.com/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Office365-Exploring.ipynb)
179
+
or [NbViewer](https://nbviewer.jupyter.org/github.com/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Office365-Exploring.ipynb)
180
+
- Cross-Network Hunting in [github](https://github.com/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Linux-Windows-Office.ipynb)
181
+
or [NbViewer](https://nbviewer.jupyter.org/github/Azure/Azure-Sentinel/blob/master/Notebooks/Sample-Notebooks/Example%20-%20Guided%20Hunting%20-%20Linux-Windows-Office.ipynb)
182
+
183
+
## To-Do Items
184
+
185
+
- Refactor data modules into separate package.
186
+
- Replace custom data schema with [Intake](https://intake.readthedocs.io/en/latest/).
187
+
- Add additional notebooks to document use of the tools.
188
+
189
+
## Supported Platforms and Packages
190
+
191
+
- msticpy is OS-independent
192
+
- Requires Python 3.6 or later
193
+
- Requires the following python packages: pandas, bokeh, matplotlib, seaborn, setuptools, urllib3,
0 commit comments