author int64 658 755k | date stringlengths 19 19 | timezone int64 -46,800 43.2k | hash stringlengths 40 40 | message stringlengths 5 490 | mods list | language stringclasses 20 values | license stringclasses 3 values | repo stringlengths 5 68 | original_message stringlengths 12 491 |
|---|---|---|---|---|---|---|---|---|---|
263,093 | 18.05.2021 14:52:53 | -7,200 | 6de13f54a83133e19dbe7d58d32b6cbdd3f582cb | Change from OR to AND | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/datastores/elastic.py",
"new_path": "timesketch/lib/datastores/elastic.py",
"diff": "@@ -338,7 +338,10 @@ class ElasticsearchDataStore(object):\nif query_string:\nquery_dsl['query']['bool']['must'].append(\n- {'query_string': {'query': query_string}})\n+ {'query_string': {\n+ 'query': query_string,\n+ 'default_operator': 'AND'}\n+ })\n# New UI filters\nif query_filter.get('chips', None):\n"
}
] | Python | Apache License 2.0 | google/timesketch | Change from OR to AND (#1775) |
263,113 | 19.05.2021 17:23:09 | -10,800 | a5f086094409446ae408d71f89a3df4c1ba085c5 | Fixed some links pointing to non-existing docs | [
{
"change_type": "MODIFY",
"old_path": "docs/learn/basic-concepts.md",
"new_path": "docs/learn/basic-concepts.md",
"diff": "@@ -12,13 +12,13 @@ Use the credentials provided by your Timesketch admin to log on to Timesketch or\nThere is a dedicated document to walk you through [Sketches](sketch-overview.md)\n## Adding Timelines\n-- [Create timeline from JSON/JSONL/CSV file](/docs/CreateTimelineFromJSONorCSV.md)\n-- [Upload data via the importer/API](/docs/UploadDataViaAPI.md)\n+- [Create timeline from JSON/JSONL/CSV file](/docs/learn/create-timeline-from-json-csv.md)\n+- [Upload data via the importer/API](/docs/getting-started/upload-data.md)\n- [Enable Plaso upload via HTTP](/docs/EnablePlasoUpload.md)\n## Adding event\n-This feature is currently not implemented in the Web UI. But you can add events using the [API client](/developers/api-client/).\n+This feature is currently not implemented in the Web UI. But you can add events using the [API client](../developers/api-client.md).\n## Add a comment\n@@ -92,7 +92,7 @@ To play with timesketch without any installation visit [demo.timesketch.org](htt\n## Searching\n-There is a dedicated document called [SearchQueryGuide](search-query-guide.md) to help you create custom searches.\n+There is a dedicated document called [search query guide](search-query-guide.md) to help you create custom searches.\nAll data within Timesketch is stored in elasticsearch. So the search works similar to ES.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fixed some links pointing to non-existing docs (#1776) |
263,133 | 26.05.2021 15:30:29 | 0 | d66cf7d3791882ed3a44d34bcbfa47b233014953 | Changed how sketch attributes are stored and read from datastore. | [
{
"change_type": "MODIFY",
"old_path": "api_client/python/timesketch_api_client/sketch.py",
"new_path": "api_client/python/timesketch_api_client/sketch.py",
"diff": "@@ -234,7 +234,8 @@ class Sketch(resource.BaseResource):\nArgs:\nname (str): The name of the attribute.\n- values (list): A list of string values of the attribute.\n+ values (list): A list of values (in their correct type according\n+ to the ontology).\nontology (str): The ontology (matches with\n/etc/ontology.yaml), which defines how the attribute\nis interpreted.\n@@ -249,10 +250,6 @@ class Sketch(resource.BaseResource):\nif not isinstance(name, str):\nraise ValueError('Name needs to be a string.')\n- if not isinstance(values, (list, tuple)):\n- if any(not isinstance(x, str) for x in values):\n- raise ValueError('All values need to be a string.')\n-\nif not isinstance(ontology, str):\nraise ValueError('Ontology needs to be a string.')\n"
},
{
"change_type": "MODIFY",
"old_path": "data/ontology.yaml",
"new_path": "data/ontology.yaml",
"diff": "@@ -30,5 +30,9 @@ float:\ndescription: \"Float.\"\nbool:\n- case_as: bool\n+ cast_as: bool\ndescription: \"Boolean, True or False values.\"\n+\n+intelligence:\n+ cast_as: dict\n+ description: \"Set of key/value pairs to summarize an intelligence report.\"\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/resources/attribute.py",
"new_path": "timesketch/api/v1/resources/attribute.py",
"diff": "@@ -23,6 +23,7 @@ from flask_login import current_user\nfrom timesketch.api.v1 import resources\nfrom timesketch.api.v1 import utils\n+from timesketch.lib import ontology as ontology_lib\nfrom timesketch.lib.definitions import HTTP_STATUS_CODE_OK\nfrom timesketch.lib.definitions import HTTP_STATUS_CODE_BAD_REQUEST\nfrom timesketch.lib.definitions import HTTP_STATUS_CODE_FORBIDDEN\n@@ -122,6 +123,10 @@ class AttributeResource(resources.ResourceMixin, Resource):\nname = form.get('name')\nontology = form.get('ontology', 'text')\n+ ontology_def = ontology_lib.ONTOLOGY\n+ ontology_dict = ontology_def.get(ontology, {})\n+ cast_as_string = ontology_dict.get('cast_as', 'str')\n+\nif action == 'post':\nvalues = form.get('values')\nif not values:\n@@ -133,7 +138,10 @@ class AttributeResource(resources.ResourceMixin, Resource):\nreturn abort(\nHTTP_STATUS_CODE_BAD_REQUEST, 'Values needs to be a list.')\n- if any([not isinstance(x, str) for x in values]):\n+ value_strings = [ontology_lib.OntologyManager.encode_value(\n+ x, cast_as_string) for x in values]\n+\n+ if any([not isinstance(x, str) for x in value_strings]):\nreturn abort(\nHTTP_STATUS_CODE_BAD_REQUEST,\n'All values needs to be stored as strings.')\n@@ -152,7 +160,7 @@ class AttributeResource(resources.ResourceMixin, Resource):\ndb_session.add(attribute)\ndb_session.commit()\n- for value in values:\n+ for value in value_strings:\nattribute_value = AttributeValue(\nuser=current_user,\nattribute=attribute,\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/utils.py",
"new_path": "timesketch/api/v1/utils.py",
"diff": "@@ -61,9 +61,12 @@ def get_sketch_attributes(sketch):\nfor attr_value in attribute.values:\ntry:\n- value = ontology.cast_variable(attr_value.value, cast_as_str)\n- except TypeError:\n+ value = ontology.OntologyManager.decode_value(\n+ attr_value.value, cast_as_str)\n+ except ValueError:\nvalue = 'Unable to cast'\n+ except NotImplementedError:\n+ value = f'Ontology {cast_as_str} not yet defined.'\nattribute_values.append(value)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/ontology.py",
"new_path": "timesketch/lib/ontology.py",
"diff": "# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Ontology for attributes as well as related functions.\"\"\"\n+import json\nfrom timesketch.lib.analyzers import interface\n@@ -21,37 +22,173 @@ def ontology():\nreturn interface.get_yaml_config('ontology.yaml')\n-def cast_variable(value, cast_as_str):\n- \"\"\"Cast a variable and return it.\n+class OntologyInterface:\n+ \"\"\"Interface for the ontology class.\"\"\"\n- Args:\n- value (str): Value as a string.\n- cast_as_str (str): The type to cast it as.\n+ # Defines the type that this ontology class supports for encoding\n+ # and decoding.\n+ TYPE=''\n- Raises\n- TypeError: If the value isn't already a string.\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns an encoded string that can be stored in the database.\n- Returns:\n- The value cast as cast_as_str defines.\n+ Raises:\n+ ValueError: If the value is not of the correct value, as dictated\n+ by the ontology type.\n\"\"\"\n- if not isinstance(value, str):\n- raise TypeError('Value needs to be a string, not {0!s}'.format(\n- type(value)))\n+ raise NotImplementedError\n- if cast_as_str == 'str':\n- return value\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns the proper data structure for this ontology.\"\"\"\n+ raise NotImplementedError\n- if cast_as_str == 'int':\n- return int(value)\n- if cast_as_str == 'float':\n- return float(value)\n+class StringOntology(OntologyInterface):\n+ \"\"\"Implements the string ontology.\"\"\"\n- if cast_as_str == 'bool':\n- return bool(value == 'True')\n+ TYPE='str'\n- # TODO: Support more casting.\n- return value\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns the string or the original value back.\n+\n+ Raises:\n+ ValueError: If the value is not a string.\n+ \"\"\"\n+ if not isinstance(data, str):\n+ raise ValueError('Value needs to be a string.')\n+ return data\n+\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns back the string.\"\"\"\n+ return data\n+\n+\n+class IntegerOntology(OntologyInterface):\n+ \"\"\"Implements the ontology for an integer.\"\"\"\n+\n+ TYPE='int'\n+\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns an encoded string that can be stored in the database.\n+\n+ Raises:\n+ ValueError: If the value is not an integer.\n+ \"\"\"\n+ if not isinstance(data, int):\n+ raise ValueError('Data is not an integer.')\n+\n+ return str(data)\n+\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns back an ineger.\"\"\"\n+ return int(data)\n+\n+\n+class FloatOntology(OntologyInterface):\n+ \"\"\"Implements the ontology for floating numbers.\"\"\"\n+\n+ TYPE='float'\n+\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns an encoded string that can be stored in the database.\n+\n+ Raises:\n+ ValueError: If the value is not a float.\n+ \"\"\"\n+ if not isinstance(data, float):\n+ raise ValueError('Data is not a float.')\n+\n+ return str(data)\n+\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns back a float.\"\"\"\n+ return float(data)\n+\n+\n+class BoolOntology(OntologyInterface):\n+ \"\"\"Implements the ontology for boolean values.\"\"\"\n+\n+ TYPE='bool'\n+\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns an encoded string that can be stored in the database.\"\"\"\n+ if data:\n+ return 'true'\n+ return 'false'\n+\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns a bool value from the stored string.\"\"\"\n+ return data == 'true'\n+\n+\n+class DictOntology(OntologyInterface):\n+ \"\"\"Implements the ontology for dict structures.\"\"\"\n+\n+ TYPE='dict'\n+\n+ @staticmethod\n+ def encode(data):\n+ \"\"\"Returns an encoded string that can be stored in the database.\n+\n+ Raises:\n+ ValueError: If the value is not a dict.\n+ \"\"\"\n+ if not isinstance(data, dict):\n+ raise ValueError('Data needs to be a dictionary.')\n+\n+ return json.dumps(data)\n+\n+ @staticmethod\n+ def decode(data):\n+ \"\"\"Returns a dict object from the stored string in the database.\"\"\"\n+ dict_value = json.loads(data)\n+ if not isinstance(dict_value, dict):\n+ raise ValueError(\n+ 'Unable to read in the data, it\\'s not stored as a dictionary')\n+ return dict_value\n+\n+\n+class OntologyManager:\n+ \"\"\"Manager that handles various ontology types.\"\"\"\n+\n+ _types = {}\n+\n+ @classmethod\n+ def register(cls, ontology_class):\n+ \"\"\"Registers an ontology into the manager.\"\"\"\n+\n+ cls._types[ontology_class.TYPE] = ontology_class\n+\n+ @classmethod\n+ def decode_value(cls, value, type_string):\n+ \"\"\"Decodes a value from storage.\"\"\"\n+ if type_string not in cls._types:\n+ raise NotImplementedError(\n+ 'Type [{0:s}] is not yet implemented as a type.')\n+ return cls._types[type_string].decode(value)\n+\n+ @classmethod\n+ def encode_value(cls, value, type_string):\n+ \"\"\"Encodes a value for storage.\"\"\"\n+ if type_string not in cls._types:\n+ raise NotImplementedError(\n+ 'Type [{0:s}] is not yet implemented as a type.')\n+ return cls._types[type_string].encode(value)\nONTOLOGY = ontology()\n+OntologyManager.register(StringOntology)\n+OntologyManager.register(IntegerOntology)\n+OntologyManager.register(FloatOntology)\n+OntologyManager.register(BoolOntology)\n+OntologyManager.register(DictOntology)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Changed how sketch attributes are stored and read from datastore. (#1789) |
263,112 | 26.05.2021 10:33:33 | 18,000 | 4a13f6c0b5f8c5a1ab44851bc466da3fb63f813f | Updated the documentation, there was a broken link in getting started | [
{
"change_type": "MODIFY",
"old_path": "docs/getting-started/upload-data.md",
"new_path": "docs/getting-started/upload-data.md",
"diff": "@@ -69,5 +69,5 @@ appears below the timelines.\nThe importer client defines an importer library that is used to help with\nfile or data uploads. This is documented further\n-[here](/docs/UploadDataViaAPI.md)\n+[here](/docs/developers/api-upload-data.md)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Updated the documentation, there was a broken link in getting started (#1788)
Co-authored-by: Kristinn <kristinn@log2timeline.net> |
263,133 | 26.05.2021 16:17:19 | 0 | ee8c01c74171b6df0fbcf5722938e8ba12d15885 | Fixed a minor issue in the attribute reST API. | [
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/resources/attribute.py",
"new_path": "timesketch/api/v1/resources/attribute.py",
"diff": "import logging\n+from flask import jsonify\nfrom flask import request\nfrom flask import abort\nfrom flask_restful import Resource\n@@ -79,7 +80,7 @@ class AttributeResource(resources.ResourceMixin, Resource):\nHTTP_STATUS_CODE_FORBIDDEN,\n'User does not have read access to sketch')\n- return self.to_json(utils.get_sketch_attributes(sketch))\n+ return jsonify(utils.get_sketch_attributes(sketch))\n@login_required\ndef post(self, sketch_id):\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/version.py",
"new_path": "timesketch/version.py",
"diff": "# limitations under the License.\n\"\"\"Version information for Timesketch.\"\"\"\n-__version__ = '20210507'\n+__version__ = '20210526'\ndef get_version():\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fixed a minor issue in the attribute reST API. (#1790) |
263,129 | 31.05.2021 15:48:00 | -7,200 | 4f181410b56a8d360d96c56e01105aa066f038ec | Fix broken attribute count in navbar | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"new_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"diff": "@@ -67,7 +67,7 @@ limitations under the License.\n<li v-if=\"meta\" v-bind:class=\"{'is-active': currentPage === 'attributes'}\">\n<router-link :to=\"{ name: 'Attributes' }\">\n<span class=\"icon is-small\"><i class=\"fas fa-table\" aria-hidden=\"true\"></i></span>\n- <span>Attributes <b-tag type=\"is-light\">{{meta.attributes.length}}</b-tag></span>\n+ <span>Attributes <b-tag type=\"is-light\">{{attributeCount}}</b-tag></span>\n</router-link>\n</li>\n</ul>\n@@ -99,6 +99,9 @@ export default {\ncomputed: {\nmeta () {\nreturn this.$store.state.meta\n+ },\n+ attributeCount () {\n+ return Object.entries(this.meta.attributes).length\n}\n}\n}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix broken attribute count in navbar (#1795) |
263,096 | 02.06.2021 18:16:30 | -7,200 | a069bfd81d83aa9a9b2789dab653489210b62f41 | Added Youtube Channel and Twitter account to docs | [
{
"change_type": "MODIFY",
"old_path": "docs/community/resources.md",
"new_path": "docs/community/resources.md",
"diff": "### Slack community\nJoin the [DFIR Timesketch Slack community](https://github.com/open-source-dfir/slack).\n+\n+### Youtube\n+\n+* [Timesketch Youtube Channel](https://www.youtube.com/channel/UC_n6mMb0OxWRk7xiqiOOcRQ)\n+\n+### Twitter\n+\n+* Official Twitter Account: [@Timesketchproj](https://twitter.com/TimesketchProj)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Added Youtube Channel and Twitter account to docs (#1802) |
263,096 | 03.06.2021 11:53:41 | -7,200 | 0af81faed33cbdb7431538e90209b7f3e8b35d08 | Updated Sigma tagging and added few improvements to sigma handling | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "data/sigma_blocklist.csv",
"diff": "+path,bad,reason,last_ckecked,rule_id\n+application/app,bad,not checked yet,2021-05-04,\n+apt/apt_silence,bad,not checked yet,2021-05-04,\n+cloud/aws_,bad,not checked yet,2021-05-04,\n+compliance/,bad,not checked yet,2021-05-04,\n+generic/generic_brute_force.yml,bad,count not implemented,2021-05-04,\n+network/cisco/aaa/cisco_,bad,no test data available,2021-05-04,\n+network/net_,bad,no test data available,2021-05-04,\n+network/zeek/zeek,bad,no test data available,2021-05-04,\n+proxy/proxy_,bad,no test data available,2021-05-04,\n+web/web_,bad,no test data available,2021-05-04,\n+windows/create_stream_hash/sysmon_regedit_export_to_ads,bad,endswith problem,2021-05-04,\n+windows/dns_query/sysmon_,bad,no test data available,2021-05-04,\n+windows/malware/av_password_dumper.yml,good,win10_4703_SeDebugPrivilege_enabled.evtx,2021-05-21,\n+windows/malware/av_exploiting.yml,good,win10_4703_SeDebugPrivilege_enabled.evtx,2021-05-21,\n+windows/malware/av_relevant_files.yml,bad,(unicode error) 'unicodeescape' codec can't decode bytes in position 550-551: truncated \\UXXXXXXXX escape,2021-05-21,\n+windows/malware/av_webshell.yml,bad,startswith problem,2021-05-21,\n+windows/malware/mal_azorult_reg.yml,bad, endswith,2021-05-21,\n+windows/malware/win_mal_darkside.yml,bad, no rules found,2021-05-21,\n+windows/malware/win_mal_flowcloud.yml,bad, endswith,2021-05-21,\n+windows/malware/win_mal_ryuk.yml,bad, endswith and raise ValueError More than one matching log source contains a rewrite part ,2021-05-21,\n+windows/network_connection,bad,no test data available,2021-05-04,\n+windows/other/win_,bad,no test data available,2021-05-04,\n+windows/pipe_created/sysmon_,bad,no test data available,2021-05-04,\n+windows/powershell/powershell_CL_Invocation_LOLScript.yml, bad,bot working, 2021-05-04,\n+windows/powershell/powershell_CL_Invocation_LOLScript_v2.yml,bad,Aggregations not implemented for this backend,2021-05-04,\n+windows/powershell/powershell_CL_Mutexverifiers_LOLScript.yml, bad,not tested, 2021-05-04,\n+windows/powershell/powershell_CL_Mutexverifiers_LOLScript_v2.yml,bad,Aggregations not implemented for this backend,2021-05-04,\n+windows/powershell/powershell_accessing_win_api.yml,good,,2021-05-04,\n+windows/powershell/powershell_alternate_powershell_hosts.yml,good,,2021-05-04,\n+windows/powershell/powershell_bad_opsec_artifacts.yml,good,,2021-05-04,\n+windows/powershell/powershell_clear_powershell_history.yml,good, no examples,2021-05-04,\n+windows/powershell/powershell_cmdline_reversed_strings.yml, good,,2021-05-04,\n+windows/powershell/powershell_cmdline_special_characters.yml,bad,does not work,2021-05-04,\n+windows/powershell/powershell_cmdline_specific_comb_methods.yml,good,,2021-05-04,\n+windows/powershell/powershell_code_injection.yml,bad,no test data,2021-05-04,\n+windows/powershell/powershell_create_local_user.yml,good,,2021-05-04,\n+windows/powershell/powershell_data_compressed.yml,good,,2021-05-04,\n+windows/powershell/powershell_decompress_commands.yml,good,,2021-05-04,\n+windows/powershell/powershell_dnscat_execution.yml,good,,2021-05-04,\n+windows/powershell/powershell_downgrade_attack.yml,bad,startswith,2021-05-04,\n+windows/powershell/powershell_exe_calling_ps.yml,bad,strartswith,2021-05-04,\n+windows/powershell/powershell_get_clipboard.yml,good,no test data,2021-05-04,\n+powershell_icmp_exfiltration.yml,good,no test data,2021-05-04,\n+powershell_invoke_obfuscation_clip+.yml,good,no test data,2021-05-04,\n+powershell_invoke_obfuscation_obfuscated_iex.yml,good,no test data,2021-05-04,\n+powershell_invoke_obfuscation_stdin+.yml,good,no test data,2021-05-04,\n+powershell_invoke_obfuscation_var+.yml,good,no tests data,2021-05-04,\n+powershell_invoke_obfuscation_via_compress.yml, good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_rundll.yml,good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_stdin.yml,good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_use_clip.yml,good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_use_mhsta.yml,good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_use_rundll32.yml,good, no test data,2021-05-04,\n+powershell_invoke_obfuscation_via_var++.yml,bad, not sure why but this rule looked werid,2021-05-04,\n+powershell_malicious_commandlets.yml,good, no sample data,2021-05-04,\n+powershell_malicious_keywords.yml,good,,2021-05-04,\n+powershell_nishang_malicious_commandlets.yml,bad, does not parse,2021-05-04,\n+powershell_ntfs_ads_access.yml,bad, does not parse,2021-05-04,\n+powershell_prompt_credentials.yml.good, good, no test data,2021-05-04,\n+powershell_psattack.yml, good, no sample data,2021-05-04,\n+powershell_remote_powershell_session.yml, good, no sample data,2021-05-04,\n+powershell_shellcode_b64.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_download.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_export_pfxcertificate.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_getprocess_lsass.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_invocation_generic.yml, bad, Connection timeout potentially because the all of them statement,2021-05-04,\n+powershell_suspicious_invocation_specific.yml, good, no sample data ,2021-05-04,\n+powershell_suspicious_keywords.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_mounted_share_deletion.yml, good, no sample data,2021-05-04,\n+powershell_suspicious_profile_create.yml, bad, special char not allowed,2021-05-04,\n+powershell_winlogon_helper_dll.yml, good, no sample data,2021-05-04,\n+powershell_wmimplant.yml, good, no sample data,2021-05-04,\n+powershell_wsman_com_provider_no_powershell.yml, good, no sample data,2021-05-04,\n+powershell_xor_commandline.yml, good, no sample data,2021-05-04,\n+win_powershell_web_request.yml, bad, multiple rules in one file,2021-05-04,\n+windows/process_access/sysmon_,bad,no test data available,2021-05-04,\n+windows/process_creation/,bad,no test data available,2021-05-04,\n+windows/raw_access_thread/,bad,no test data available,2021-05-04,\n+windows/registry_event/,bad,no test data available,2021-05-04,\n+windows/wmi_event/,bad,no test data available,2021-05-04,\n+windows/file_event/sysmon_creation_system_file.yml,bad,slash au in audio breaks things,2021-05-04,\n+windows/file_event/sysmon_hack_dumpert.yml,bad,no rules found (section),2021-05-04,\n+windows/create_remote_thread/sysmon_suspicious_remote_thread.yml,bad,https://github.com/SigmaHQ/sigma/blob/c877a9a68dc9aca87dc849f75b0c49f676e03409/rules/windows/create_remote_thread/sysmon_suspicious_remote_thread.yml#L64 slash u causing parser to error out,2021-05-04,\n+windows/builtin/win_global_catalog_enumeration.yml,bad, Aggregations not implemented for this backend,2021-05-04,\n+windows/builtin/win_invoke_obfuscation_clip+_services.yml, bad, No condition found,2021-05-04,\n+windows/file_event/sysmon_powershell_exploit_scripts.yml,bad,endswith problem does not match with xml_string #TODO,2021-05-04,\n+/windows/process_creation/win_multiple_suspicious_cli.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/process_creation/win_silenttrinity_stage_use.yml, bad, No detection definitions found,2021-05-04,\n+/windows/process_creation/win_susp_commands_recon_activity.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/process_creation/win_syncappvpublishingserver_exe.yml, bad, No condition found,2021-05-04,\n+/windows/sysmon/sysmon_possible_dns_rebinding.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_obfuscated_iex_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_stdin+_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_var+_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_compress_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_rundll_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_inwindows/image_load/sysmon_susp_fax_dll.ymlvoke_obfuscation_via_stdin_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_use_clip_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_use_mhsta_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_use_rundll32_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_invoke_obfuscation_via_var++_services.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_mal_creddumper.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_metasploit_or_impacket_smb_psexec_service_install.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_meterpreter_or_cobaltstrike_getsystem_service_installation.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_net_ntlm_downgrade.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_powershell_script_installed_as_service.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_rare_schtasks_creations.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/builtin/win_rare_service_installs.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/builtin/win_root_certificate_installed.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_software_discovery.yml, bad, No condition found,2021-05-04,\n+/windows/builtin/win_susp_failed_logons_single_source.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/builtin/win_susp_samr_pwset.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/builtin/win_tap_driver_installation.yml, bad, No condition found,2021-05-04,\n+/windows/file_event/win_susp_multiple_files_renamed_or_deleted.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/image_load/sysmon_in_memory_powershell.yml, bad, Yaml parsing error,2021-05-04,\n+/windows/image_load/sysmon_mimikatz_inmemory_detection.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/image_load/sysmon_tttracer_mod_load.yml, bad, No condition found,2021-05-04,\n+/windows/malware/win_mal_blue_mockingbird.yml, bad, No condition found,2021-05-04,\n+/windows/network_connection/sysmon_regsvr32_network_activity.yml, bad, No detection definitions found,2021-05-04,\n+/windows/other/win_rare_schtask_creation.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/other/win_tool_psexec.yml, bad, No condition found,2021-05-04,\n+/windows/powershell/powershell_CL_Invocation_LOLScript_v2.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/powershell/powershell_CL_Mutexverifiers_LOLScript_v2.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/powershell/win_powershell_web_request.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_apt_chafer_mar18.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_apt_empiremonkey.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_apt_slingshot.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_apt_turla_commands.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/process_creation/win_apt_unidentified_nov_18.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_dnscat2_powershell_implementation.yml, bad, Aggregations not implemented for this backend,2021-05-04,\n+/windows/process_creation/win_mal_adwind.yml, bad, No condition found,2021-05-04,\n+/windows/process_creation/win_mouse_lock.yml, bad, Yaml parsing error,2021-05-04,\n+/windows/file_event/sysmon_redmimicry_winnti_filedrop.yml,bad,slashes issue in path,2021-05-04,\n+windows/file_event/sysmon_startup_folder_file_write.yml,bad, slashes issue in path,2021-05-04,\n+windows/file_event/sysmon_susp_adsi_cache_usage.yml,bad,slashes issue in path ,2021-05-04,\n+windows/file_event/sysmon_susp_clr_logs.yml,bad,slashes issue in path,2021-05-04,\n+windows/file_event/sysmon_susp_desktop_ini.yml,bad,1761,2021-05-04,\n+windows/file_event/sysmon_susp_procexplorer_driver_created_in_tmp_folder.yml,bad,1761,2021-05-04,\n+windows/file_event/sysmon_tsclient_filewrite_startup.yml,bad,1761,2021-05-04,\n+windows/file_event/sysmon_webshell_creation_detect.yml,bad,1761,2021-05-04,\n+windows/file_event/sysmon_wmi_persistence_script_event_consumer_write.yml,bad,1761,2021-05-04,\n+windows/file_event/win_outlook_c2_macro_creation.yml,bad,1761,2021-05-04,\n+windows/file_event/win_susp_desktopimgdownldr_file.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_pcre_net_load.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_susp_fax_dll.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_susp_office_dotnet_assembly_dll_load.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_susp_office_dotnet_gac_dll_load.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_svchost_dll_search_order_hijack.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_tttracer_mod_load.yml,bad, multiple riles in it,2021-05-04,\n+windows/image_load/sysmon_uac_bypass_via_dism.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_wmi_module_load.yml,bad,1761,2021-05-04,\n+windows/image_load/sysmon_wmi_persistence_commandline_event_consumer.yml,bad,1761,2021-05-04,\n+linux/macos_,bad,not yet reviewed,2021-05-04,\n+linux/lnx_buffer_overflows.yml,bad,causing ES exceptions,2021-05-04,\n+linux/lnx,bad,not reviewed,2021-05-04,\n+win_lsass_access_non_system_account.yml,bad,Failed to parse query,2021-05-04,\n+sysmon_uipromptforcreds_dlls.yml,bad, Failed to parse query,2021-05-05,\n+sysmon_wsman_provider_image_load.yml,bad, Failed to parse query,2021-05-05,\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -75,6 +75,146 @@ logsources:\nconditions:\ndata_type:\n- \"fs:stat\"\n+ sysmon:\n+ service: sysmon\n+ conditions:\n+ source_name:\n+ - \"Microsoft-Windows-Sysmon\"\n+ # log source configurations for generic sigma rules\n+ process_creation:\n+ category: process_creation\n+ product: windows\n+ conditions:\n+ EventID:\n+ - 1\n+ - 4688\n+ source_name:\n+ - \"Microsoft-Windows-Sysmon\"\n+ - \"Microsoft-Windows-Security-Auditing\"\n+ - \"Microsoft-Windows-Eventlog\"\n+ fieldmappings:\n+ Image: NewProcessName\n+ ParentImage: ParentProcessName\n+ network_connection:\n+ category: network_connection\n+ product: windows\n+ conditions:\n+ EventID: 3\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ process_terminated:\n+ category: process_termination\n+ product: windows\n+ conditions:\n+ EventID: 5\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ driver_loaded:\n+ category: driver_load\n+ product: windows\n+ conditions:\n+ EventID: 6\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ image_loaded:\n+ category: image_load\n+ product: windows\n+ conditions:\n+ EventID: 7\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ create_remote_thread:\n+ category: create_remote_thread\n+ product: windows\n+ conditions:\n+ EventID: 8\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ raw_access_thread:\n+ category: raw_access_thread\n+ product: windows\n+ conditions:\n+ EventID: 9\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ process_access:\n+ category: process_access\n+ product: windows\n+ conditions:\n+ EventID: 10\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ file_creation:\n+ category: file_event\n+ product: windows\n+ conditions:\n+ EventID: 11\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ registry_event:\n+ category: registry_event\n+ product: windows\n+ conditions:\n+ EventID:\n+ - 12\n+ - 13\n+ - 14\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ create_stream_hash:\n+ category: create_stream_hash\n+ product: windows\n+ conditions:\n+ EventID: 15\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ pipe_created:\n+ category: pipe_created\n+ product: windows\n+ conditions:\n+ EventID:\n+ - 17\n+ - 18\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ wmi_event:\n+ category: wmi_event\n+ product: windows\n+ conditions:\n+ EventID:\n+ - 19\n+ - 20\n+ - 21\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ dns_query:\n+ category: dns_query\n+ product: windows\n+ conditions:\n+ EventID: 22\n+ rewrite:\n+ product: windows\n+ service: sysmon\n+ file_delete:\n+ category: file_delete\n+ product: windows\n+ conditions:\n+ EventID: 23\n+ rewrite:\n+ product: windows\n+ service: sysmon\nfieldmappings:\nEventID: event_identifier\nComputerName: computer_name\n@@ -140,3 +280,23 @@ fieldmappings:\nKeywords: xml_string\nLDAPDisplayName: xml_string\nAuditPolicyChanges: xml_string\n+ SourceImage: xml_string\n+ TargetImage: xml_string\n+ TargetFilename: xml_string\n+ Image: xml_string # that is a value name that might be used in other queries as well. Ideally it would be something _all\n+ ImageLoaded: xml_string\n+ QueryName: xml_string\n+ TargetProcessAddress: xml_string\n+ TargetObject: xml_string\n+ Signature: xml_string\n+ StartModule: xml_string\n+ StartFunction: xml_string\n+ IntegrityLevel: xml_string\n+ Description: xml_string\n+ Signed: xml_string\n+ ScriptBlockText: xml_string\n+ ContextInfo: xml_string\n+ OriginalFileName: \"xml_string:*OriginalFileName*\"\n+ Payload: xml_string\n+ HostName: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\n+ HostApplication: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\n"
},
{
"change_type": "MODIFY",
"old_path": "data/timesketch.conf",
"new_path": "data/timesketch.conf",
"diff": "@@ -257,3 +257,4 @@ EXTERNAL_HOST_URL = 'https://localhost'\nSIGMA_RULES_FOLDERS = ['/etc/timesketch/sigma/rules/']\nSIGMA_CONFIG = '/etc/timesketch/sigma_config.yaml'\n+SIGMA_TAG_DELAY = 5\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/learn/sigma.md",
"new_path": "docs/learn/sigma.md",
"diff": "@@ -43,6 +43,22 @@ timesketch/data/linux\ntimesketch/data/sigma/rules/linux\n```\n+### Timesketch config file\n+\n+There are multiple sigma related config variables in ```timesketch.conf```.\n+\n+```\n+# Sigma Settings\n+\n+SIGMA_RULES_FOLDERS = ['/etc/timesketch/sigma/rules/']\n+SIGMA_CONFIG = '/etc/timesketch/sigma_config.yaml'\n+SIGMA_TAG_DELAY = 5\n+```\n+\n+The ```SIGMA_RULES_FOLDERS``` points to the folder(s) where Sigma rules are stored. The folder is the local folder of the Timesketch server (celery worker and webserver). For a distributed system, mounting network shares is possible.\n+\n+```SIGMA_TAG_DELAY```can be used to throttle the Sigma analyzer. If Timesketch is running on a less powerful machine (or docker-dev) a sleep timer of 15 seconds will help avoid Elastic Search exceptions for to many requests to the ES backend in a to short timerange. For more powerfull Timesketch installations, this value can be set to 0.\n+\n### Sigma config\nIn the config file\n"
},
{
"change_type": "MODIFY",
"old_path": "notebooks/Sigma_test_Notebook.ipynb",
"new_path": "notebooks/Sigma_test_Notebook.ipynb",
"diff": "\"metadata\": {},\n\"outputs\": [],\n\"source\": [\n- \"MOCK_SIGMA_RULE = \\\"\\\"\\\"\\n\",\n+ \"MOCK_SIGMA_RULE = r\\\"\\\"\\\"\\n\",\n\"title: Suspicious Installation of Zenmap\\n\",\n\"id: 5266a592-b793-11ea-b3de-0242ac130004\\n\",\n\"description: Detects suspicious installation of Zenmap\\n\",\n"
},
{
"change_type": "MODIFY",
"old_path": "test_tools/sigma_verify_rules.py",
"new_path": "test_tools/sigma_verify_rules.py",
"diff": "@@ -18,14 +18,16 @@ It also does not require you to have a full blown Timesketch instance.\nDefault this tool will show only the rules that cause problems.\nExample way of running the tool:\n$ PYTHONPATH=. python3 test_tools/sigma_verify_rules.py --config_file\n-../data/sigma_config.yaml --config_file data/sigma_config.yaml\n---debug data/sigma/rules/windows/ --move data/sigma/rules/problematic/\n+data/sigma_config.yaml --debug data/sigma/rules/windows/\n+--move data/sigma/rules/problematic/\n\"\"\"\nimport logging\nimport os\nimport argparse\nimport sys\n+import pandas as pd\n+\nfrom timesketch.lib import sigma_util# pylint: disable=no-name-in-module\n@@ -33,12 +35,48 @@ logger = logging.getLogger('timesketch.test_tool.sigma-verify')\nlogging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO'))\n-def run_verifier(rules_path, config_file_path):\n+def get_sigma_blocklist(blocklist_path='./data/sigma_blocklist.csv'):\n+ \"\"\"Get a dataframe of sigma rules to ignore.\n+\n+ This includes filenames, paths, ids.\n+\n+ Args:\n+ blocklist_path(str): Path to a blocklist file.\n+ The default value is './data/sigma_blocklist.csv'\n+\n+ Returns:\n+ Pandas dataframe with blocklist\n+\n+ Raises:\n+ ValueError: Sigma blocklist file is not readabale.\n+ \"\"\"\n+\n+ if blocklist_path is None or blocklist_path == '':\n+ blocklist_path = './data/sigma_blocklist.csv'\n+\n+ if not blocklist_path:\n+ raise ValueError('No blocklist_file_path set via param or config file')\n+\n+ if not os.path.isfile(blocklist_path):\n+ raise ValueError(\n+ 'Unable to open file: [{0:s}], it does not exist.'.format(\n+ blocklist_path))\n+\n+ if not os.access(blocklist_path, os.R_OK):\n+ raise ValueError(\n+ 'Unable to open file: [{0:s}], cannot open it for '\n+ 'read, please check permissions.'.format(blocklist_path))\n+\n+ return pd.read_csv(blocklist_path)\n+\n+def run_verifier(rules_path, config_file_path, blocklist_path=None):\n\"\"\"Run an sigma parsing test on a dir and returns results from the run.\nArgs:\n- rules_path: the path to the rules.\n- config_file_path: the path to a config file that contains mapping data.\n+ rules_path (str): Path to the Sigma rules.\n+ config_file_path (str): Path to a config file with Sigma mapping data.\n+ blocklist_path (str): Optional path to a blocklist file.\n+ The default value is none.\nRaises:\nIOError: if the path to either test or analyzer file does not exist\n@@ -65,6 +103,10 @@ def run_verifier(rules_path, config_file_path):\nreturn_verified_rules = []\nreturn_rules_with_problems = []\n+ ignore = get_sigma_blocklist(blocklist_path)\n+ ignore_list = list(ignore['path'].unique())\n+\n+\nfor dirpath, dirnames, files in os.walk(rules_path):\nif 'deprecated' in [x.lower() for x in dirnames]:\ndirnames.remove('deprecated')\n@@ -76,8 +118,25 @@ def run_verifier(rules_path, config_file_path):\ncontinue\nrule_file_path = os.path.join(dirpath, rule_filename)\n+\n+ block_because_csv = False\n+ if rule_file_path in ignore_list:\n+ return_rules_with_problems.append(rule_file_path)\n+ block_because_csv = True\n+\n+ if block_because_csv:\n+ continue\n+\n+ try:\nparsed_rule = sigma_util.get_sigma_rule(\nrule_file_path, sigma_config)\n+ # This except is to keep the unknown exceptions\n+ # this function is made to catch them and document\n+ # them the broad exception is needed\n+ except Exception:# pylint: disable=broad-except\n+ logger.debug('Rule parsing error', exc_info=True)\n+ return_rules_with_problems.append(rule_file_path)\n+\nif parsed_rule:\nreturn_verified_rules.append(rule_file_path)\nelse:\n@@ -104,9 +163,11 @@ def move_problematic_rule(filepath, move_to_path, reason=None):\nfile_objec.write(f'{filepath}\\n{reason}\\n\\n')\nbase_path = os.path.basename(filepath)\n- os.rename(filepath, f'{move_to_path}{base_path}')\n+ logging.info('Moving the rule: {0:s} to {1:s}'.format(\n+ filepath, f'{move_to_path}{base_path}'))\n+ os.rename(filepath, os.path.join(move_to_path, base_path))\nexcept OSError:\n- logger.error('OS Error - no rules moved')\n+ logger.error('OS Error - rule not moved', exc_info=True)\nif __name__ == '__main__':\n@@ -126,6 +187,11 @@ if __name__ == '__main__':\ndefault='', type=str, metavar='PATH_TO_TEST_FILE', help=(\n'Path to the file containing the config data to feed sigma '\n))\n+ arguments.add_argument(\n+ '--blocklist_file', dest='blocklist_file_path', action='store',\n+ default='', type=str, metavar='PATH_TO_BLOCK_FILE', help=(\n+ 'Path to the file containing the blocklist '\n+ ))\narguments.add_argument(\n'rules_path', action='store', default='', type=str,\nmetavar='PATH_TO_RULES', help='Path to the rules to test.')\n@@ -136,7 +202,7 @@ if __name__ == '__main__':\narguments.add_argument(\n'--move', dest='move_to_path', action='store',\ndefault='', type=str, help=(\n- 'Path to the file containing the config data to feed sigma '\n+ 'Move problematic rules to this path'\n))\ntry:\noptions = arguments.parse_args()\n@@ -159,13 +225,18 @@ if __name__ == '__main__':\noptions.rules_path))\nsys.exit(1)\n+ if len(options.blocklist_file_path) > 0:\n+ if not os.path.isfile(options.blocklist_file_path):\n+ print('Blocklist file not found.')\n+ sys.exit(1)\n+\nsigma_verified_rules, sigma_rules_with_problems = run_verifier(\nrules_path=options.rules_path,\n- config_file_path=options.config_file_path)\n+ config_file_path=options.config_file_path,\n+ blocklist_path=options.blocklist_file_path)\nif len(sigma_rules_with_problems) > 0:\n- print('### You should NOT import the following rules ###')\n- print('### To get the reason per rule, re-run with --info###')\n+ print('### Do NOT import below.###')\nfor badrule in sigma_rules_with_problems:\nif options.move_to_path:\nmove_problematic_rule(\n"
},
{
"change_type": "MODIFY",
"old_path": "test_tools/sigma_verify_rules_test.py",
"new_path": "test_tools/sigma_verify_rules_test.py",
"diff": "@@ -3,20 +3,16 @@ from __future__ import unicode_literals\nimport unittest\n-from sigma_verify_rules import get_codepath, verify_rules_file, run_verifier\n+from sigma_verify_rules import run_verifier\nclass TestSigmaVerifyRules(unittest.TestCase):\n- def test_get_code_path(self):\n- \"\"\"Test the get code path function.\"\"\"\n- code_path_output = get_codepath\n- self.assertIsNotNone(code_path_output)\ndef test_verify_rules_file(self):\n\"\"\"Test some of the verify rules code.\"\"\"\n- self.assertFalse(verify_rules_file(\"foo\", \"bar\", None))\n- self.assertFalse(verify_rules_file(\"../data/sigma/rules/\",\n- \"../data/sigma_config.yaml\", None))\n+ self.assertRaises(IOError,run_verifier,'foo','bar')\n+ self.assertRaises(IOError,run_verifier,'../data/sigma/rules/',\n+ '../data/sigma_config.yaml')\ndef test_run_verifier(self):\nself.assertRaises(IOError, run_verifier,\n@@ -25,10 +21,10 @@ class TestSigmaVerifyRules(unittest.TestCase):\nconfig = './data/sigma_config.yaml'\nrules = './data/sigma/rules/'\n- sigma_ok_rules, sigma_pro_rules = run_verifier(\n+ sigma_ok_rules, sigma_prob_rules = run_verifier(\nconfig_file_path=config, rules_path=rules)\n-\nfound = False\n+ self.assertEqual(len(sigma_prob_rules),0)\nfor verified_rule in sigma_ok_rules:\nif 'lnx_susp_zenmap' in verified_rule:\nfound = True\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/sigma_tagger.py",
"new_path": "timesketch/lib/analyzers/sigma_tagger.py",
"diff": "@@ -5,6 +5,8 @@ import logging\nimport time\nimport elasticsearch\n+from flask import current_app\n+\nfrom timesketch.lib.analyzers import utils\nfrom timesketch.lib.analyzers import interface\n@@ -38,8 +40,19 @@ class SigmaPlugin(interface.BaseAnalyzer):\nevents = self.event_stream(\nquery_string=query, return_fields=return_fields)\nfor event in events:\n- event.add_tags(['sigma_{0:s}'.format(rule_name)])\n+ ts_sigma_rules = event.source.get('ts_sigma_rule', [])\n+ ts_sigma_rules.append(rule_name)\n+ event.add_attributes({'ts_sigma_rule': list(set(ts_sigma_rules))})\n+ ts_ttp = event.source.get('ts_ttp', [])\n+ for tag in tag_list:\n+ # special handling for sigma tags that TS considers TTPS\n+ # https://car.mitre.org and https://attack.mitre.org\n+ if tag.startswith(('attack.', 'car.')):\n+ ts_ttp.append(tag)\n+ tag_list.remove(tag)\nevent.add_tags(tag_list)\n+ if len(ts_ttp) > 0:\n+ event.add_attributes({'ts_ttp': list(set(ts_ttp))})\nevent.commit()\ntagged_events_counter += 1\nreturn tagged_events_counter\n@@ -54,10 +67,8 @@ class SigmaPlugin(interface.BaseAnalyzer):\ntags_applied = {}\nsigma_rule_counter = 0\nsigma_rules = ts_sigma_lib.get_all_sigma_rules()\n-\nif sigma_rules is None:\nlogger.error('No Sigma rules found. Check SIGMA_RULES_FOLDERS')\n-\nproblem_strings = []\noutput_strings = []\n@@ -69,17 +80,25 @@ class SigmaPlugin(interface.BaseAnalyzer):\nrule.get('es_query'), rule.get('file_name'),\ntag_list=rule.get('tags'))\ntags_applied[rule.get('file_name')] += tagged_events_counter\n+ if sigma_rule_counter % 10 == 0:\n+ logger.debug('Rule {0:d}/{1:d}'.format(\n+ sigma_rule_counter, len(sigma_rules)))\nexcept elasticsearch.TransportError as e:\nlogger.error(\n'Timeout executing search for {0:s}: '\n'{1!s} waiting for 10 seconds'.format(\nrule.get('file_name'), e), exc_info=True)\n- # this is caused by to many ES queries in short time range\n- # thus waiting for 10 seconds before sending the next one.\n- time.sleep(10)\n- # This except block is by purpose very broad as one bad rule could\n- # otherwise stop the whole analyzer run\n- # it might be an option to write the problematic rules to the output\n+ # this is caused by too many ES queries in short time range\n+ # TODO: https://github.com/google/timesketch/issues/1782\n+ sleep_time = current_app.config.get(\n+ 'SIGMA_TAG_DELAY', 15)\n+ time.sleep(sleep_time)\n+ tagged_events_counter = self.run_sigma_rule(\n+ rule.get('es_query'), rule.get('file_name'),\n+ tag_list=rule.get('tags'))\n+ tags_applied[rule.get('file_name')] += tagged_events_counter\n+ # Wide exception handling since there are multiple exceptions that\n+ # can be raised by the underlying sigma library.\nexcept: # pylint: disable=bare-except\nlogger.error(\n'Problem with rule in file {0:s}: '.format(\n@@ -90,11 +109,23 @@ class SigmaPlugin(interface.BaseAnalyzer):\ntotal_tagged_events = sum(tags_applied.values())\noutput_strings.append('Applied {0:d} tags'.format(total_tagged_events))\n- for tag_name, tagged_events_counter in tags_applied.items():\n- output_strings.append('* {0:s}: {1:d}'.format(\n- tag_name, tagged_events_counter))\nif sigma_rule_counter > 0:\n+ self.add_sigma_match_view(sigma_rule_counter)\n+\n+ if len(problem_strings) > 0:\n+ output_strings.append('Problematic rules:')\n+ output_strings.extend(problem_strings)\n+\n+ return '\\n'.join(output_strings)\n+\n+ def add_sigma_match_view(self, sigma_rule_counter):\n+ \"\"\"Adds a view with the top 20 matching rules.\n+\n+ Args:\n+ sigma_rule_counter number of matching rules\n+\n+ \"\"\"\nview = self.sketch.add_view(\nview_name='Sigma Rule matches', analyzer_name=self.NAME,\nquery_string='tag:\"sigma*\"')\n@@ -125,11 +156,6 @@ class SigmaPlugin(interface.BaseAnalyzer):\n'And an overview of all the discovered search terms:')\nstory.add_view(view)\n- output_strings.append('Problematic rules:')\n- output_strings.extend(problem_strings)\n-\n- return '\\n'.join(output_strings)\n-\nclass RulesSigmaPlugin(SigmaPlugin):\n\"\"\"Sigma plugin to run rules.\"\"\"\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/sigma_util.py",
"new_path": "timesketch/lib/sigma_util.py",
"diff": "@@ -72,6 +72,7 @@ def get_sigma_config_file(config_file=None):\nreturn sigma_config\n+\ndef get_sigma_rules_path():\n\"\"\"Get Sigma rules paths.\n@@ -181,7 +182,6 @@ def get_sigma_rule(filepath, sigma_config=None):\n'Problem reading the Sigma config', exc_info=True)\nraise ValueError('Problem reading the Sigma config') from e\n-\nsigma_backend = sigma_es.ElasticsearchQuerystringBackend(sigma_conf_obj, {})\ntry:\n@@ -206,7 +206,7 @@ def get_sigma_rule(filepath, sigma_config=None):\nfor doc in rule_yaml_data:\nrule_return.update(doc)\nparser = sigma_collection.SigmaCollectionParser(\n- str(doc), sigma_conf_obj, None)\n+ yaml.safe_dump(doc), sigma_conf_obj, None)\nparsed_sigma_rules = parser.generate(sigma_backend)\nexcept NotImplementedError as exception:\n@@ -230,6 +230,10 @@ def get_sigma_rule(filepath, sigma_config=None):\nsigma_es_query = ''\nfor sigma_rule in parsed_sigma_rules:\n+ # TODO Investigate how to handle .keyword\n+ # fields in Sigma.\n+ # https://github.com/google/timesketch/issues/1199#issuecomment-639475885\n+ sigma_rule = sigma_rule.replace('.keyword:', ':')\nsigma_es_query = sigma_rule\nrule_return.update(\n@@ -264,6 +268,7 @@ def get_sigma_rule_by_text(rule_text, sigma_config=None):\nNotImplementedError: A feature in the provided Sigma rule is not\nimplemented in Sigma for Timesketch\n\"\"\"\n+\ntry:\nif isinstance(sigma_config, sigma_configuration.SigmaConfiguration):\nsigma_conf_obj = sigma_config\n@@ -279,14 +284,15 @@ def get_sigma_rule_by_text(rule_text, sigma_config=None):\nsigma_backend = sigma_es.ElasticsearchQuerystringBackend(sigma_conf_obj, {})\nrule_return = {}\n-\n# TODO check if input validation is needed / useful.\ntry:\n- parser = sigma_collection.SigmaCollectionParser(\n- rule_text, sigma_conf_obj, None)\n- parsed_sigma_rules = parser.generate(sigma_backend)\nrule_yaml_data = yaml.safe_load_all(rule_text)\n+\nfor doc in rule_yaml_data:\n+\n+ parser = sigma_collection.SigmaCollectionParser(\n+ str(doc), sigma_conf_obj, None)\n+ parsed_sigma_rules = parser.generate(sigma_backend)\nrule_return.update(doc)\nexcept NotImplementedError as exception:\n@@ -308,6 +314,7 @@ def get_sigma_rule_by_text(rule_text, sigma_config=None):\nsigma_es_query = ''\nfor sigma_rule in parsed_sigma_rules:\n+ sigma_rule = sigma_rule.replace('.keyword:', ':')\nsigma_es_query = sigma_rule\nrule_return.update(\n"
}
] | Python | Apache License 2.0 | google/timesketch | Updated Sigma tagging and added few improvements to sigma handling (#1766) |
263,096 | 04.06.2021 11:11:03 | -7,200 | 0cfb6b4fd7e0d55b2197dc8a76487b8881365fac | Improved the Sigma verify tool | [
{
"change_type": "MODIFY",
"old_path": "test_tools/sigma_verify_rules.py",
"new_path": "test_tools/sigma_verify_rules.py",
"diff": "@@ -118,9 +118,9 @@ def run_verifier(rules_path, config_file_path, blocklist_path=None):\ncontinue\nrule_file_path = os.path.join(dirpath, rule_filename)\n-\nblock_because_csv = False\n- if rule_file_path in ignore_list:\n+\n+ if any(x in rule_file_path for x in ignore_list):\nreturn_rules_with_problems.append(rule_file_path)\nblock_because_csv = True\n"
}
] | Python | Apache License 2.0 | google/timesketch | Improved the Sigma verify tool (#1804) |
263,133 | 04.06.2021 12:03:28 | 0 | 3907a5982bcd2b97ee03cdf816adeddceaead34f | add a logger statement. | [
{
"change_type": "MODIFY",
"old_path": "importer_client/python/tools/timesketch_importer.py",
"new_path": "importer_client/python/tools/timesketch_importer.py",
"diff": "@@ -361,6 +361,7 @@ def main(args=None):\nconf_password = ''\nif credentials:\n+ logger.info('Using cached credentials.')\nif credentials.TYPE.lower() == 'oauth':\nassistant.set_config('auth_mode', 'oauth')\nelif credentials.TYPE.lower() == 'timesketch':\n"
}
] | Python | Apache License 2.0 | google/timesketch | add a logger statement. (#1806) |
263,111 | 22.06.2021 20:22:17 | -36,000 | 3e6d7c98184bb5250cca94aedc4c7e351c734eab | Fix to Time Filter Removal behavior
Closes | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Explore.vue",
"new_path": "timesketch/frontend/src/views/Explore.vue",
"diff": "@@ -185,7 +185,7 @@ limitations under the License.\n<span class=\"fa-stack fa-lg is-small\" style=\"margin-left:5px; width:20px;\">\n<i class=\"fas fa-edit fa-stack-1x\" style=\"transform:scale(0.7);color:#777;\"></i>\n</span>\n- <button class=\"delete is-small\" style=\"margin-left:5px\" v-on:click=\"removeChip(index)\"></button>\n+ <button class=\"delete is-small\" style=\"margin-left:5px\" v-on:click=\"removeChip(chip)\"></button>\n</span>\n</div>\n</span>\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix to Time Filter Removal behavior (#1843)
Closes #1832
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,095 | 22.06.2021 15:15:31 | 0 | 59b26154a859a3c50c7a398bd2e0c3b6efa83fe8 | Adding copy function to EventListRow and EvetlistRowDetail | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"diff": "@@ -165,6 +165,13 @@ limitations under the License.\nstyle=\"margin-right:5px; border:1px solid #d1d1d1;\"\n>{{ label }}</span\n>\n+ <span\n+ class=\"icon is-small\"\n+ style=\"cursor:pointer;float:right;\"\n+ title=\"Copy key:value\"\n+ v-on:click=\"copyCode(event._source[field.field])\"\n+ ><i class=\"fas fa-copy\"></i\n+ ></span>\n</span>\n<!--eslint-enable-->\n<span style=\"word-break: break-word;\" :title=\"event._source[field.field]\">\n@@ -443,6 +450,23 @@ export default {\ntoggleTheme: function() {\nthis.isDarkTheme = !this.isDarkTheme\n},\n+ copyCode: function (value) {\n+ try {\n+ const el = document.createElement('textarea');\n+ el.value = value;\n+\n+ document.body.appendChild(el);\n+ el.select();\n+ var successful = document.execCommand('copy');\n+ document.body.removeChild(el);\n+ var msg = successful ? 'successful' : 'unsuccessful';\n+ alert('Copied to clipboard ' + msg);\n+ } catch (err) {\n+ alert('Oops, unable to copy');\n+ }\n+\n+\n+ },\n},\nbeforeDestroy() {\nEventBus.$off('selectEvent', this.selectEvent)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"diff": "@@ -35,9 +35,24 @@ limitations under the License.\n><i class=\"fas fa-search-minus\"></i\n></span>\n</td>\n+ <td style=\"width:40px;\">\n+ <span\n+ class=\"icon is-small\"\n+ style=\"cursor:pointer;\"\n+ title=\"Copy key:value\"\n+ v-on:click=\"copyCode(key,item,'both')\"\n+ ><i class=\"fas fa-copy\"></i\n+ ></span>\n<td style=\"white-space:pre-wrap;word-wrap: break-word; width: 150px;\">{{ key }}</td>\n<td>\n<span style=\"white-space:pre-wrap;word-wrap: break-word\">{{ item }}</span>\n+ <span\n+ class=\"icon is-small\"\n+ style=\"cursor:pointer; margin-left: 3px; color: #d3d3d3;float:right;\"\n+ title=\"Copy value\"\n+ v-on:click=\"copyCode(key,item,'value')\"\n+ ><i class=\"fas fa-copy\"></i\n+ ></span>\n</td>\n</tr>\n</tbody>\n@@ -88,6 +103,26 @@ export default {\n}\nthis.$emit('addChip', chip)\n},\n+ copyCode: function (field, value, operator) {\n+ try {\n+ const el = document.createElement('textarea');\n+ if (operator == 'both')\n+ el.value = field.concat(' : ',value);\n+ else\n+ el.value = value;\n+\n+ document.body.appendChild(el);\n+ el.select();\n+ var successful = document.execCommand('copy');\n+ document.body.removeChild(el);\n+ var msg = successful ? 'successful' : 'unsuccessful';\n+ alert('Copied to clipboard ' + msg);\n+ } catch (err) {\n+ alert('Oops, unable to copy');\n+ }\n+\n+\n+ },\n},\ncreated: function() {\nthis.getEvent()\n"
}
] | Python | Apache License 2.0 | google/timesketch | Adding copy function to EventListRow and EvetlistRowDetail |
263,095 | 24.06.2021 08:11:02 | 0 | b7c7c87b2a4a194f45a58fbc77199c3778731df6 | make the copy message nicer and disappear | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"diff": "@@ -454,19 +454,15 @@ export default {\ntry {\nconst el = document.createElement('textarea');\nel.value = value;\n-\ndocument.body.appendChild(el);\nel.select();\n- var successful = document.execCommand('copy');\n+ document.execCommand('copy');\n+ this.$buefy.notification.open('Copied!!')\ndocument.body.removeChild(el);\n- var msg = successful ? 'successful' : 'unsuccessful';\n- alert('Copied to clipboard ' + msg);\n} catch (err) {\nalert('Oops, unable to copy');\n}\n-\n-\n- },\n+ }\n},\nbeforeDestroy() {\nEventBus.$off('selectEvent', this.selectEvent)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"diff": "@@ -103,26 +103,19 @@ export default {\n}\nthis.$emit('addChip', chip)\n},\n- copyCode: function (field, value, operator) {\n+ copyCode: function (value) {\ntry {\nconst el = document.createElement('textarea');\n- if (operator === 'both')\n- el.value = field.concat(' : ',value);\n- else\nel.value = value;\n-\ndocument.body.appendChild(el);\nel.select();\n- var successful = document.execCommand('copy');\n+ document.execCommand('copy');\n+ this.$buefy.notification.open('Copied!!')\ndocument.body.removeChild(el);\n- var msg = successful ? 'successful' : 'unsuccessful';\n- alert('Copied to clipboard ' + msg);\n} catch (err) {\nalert('Oops, unable to copy');\n}\n-\n-\n- },\n+ }\n},\ncreated: function() {\nthis.getEvent()\n"
}
] | Python | Apache License 2.0 | google/timesketch | make the copy message nicer and disappear |
263,130 | 30.06.2021 13:39:56 | -36,000 | 70e06ccce629af3e84571bed741a88923aeb7922 | Update features.yaml
Extend SSH regex to support public key authentication logs | [
{
"change_type": "MODIFY",
"old_path": "data/features.yaml",
"new_path": "data/features.yaml",
"diff": "@@ -142,5 +142,5 @@ ssh_client_password_ipv4_addresses:\nquery_string: 'reporter:\"sshd\"'\nattribute: 'message'\nstore_as: 'client_ip'\n- re: '^\\[sshd, pid: \\d+\\] (Accepted|Failed) password for \\w+\n+ re: '^\\[sshd, pid: \\d+\\] (Accepted|Failed) (password|publickey) for \\w+\nfrom ((?:[0-9]{1,3}\\.){3}[0-9]{1,3}) port \\d+'\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update features.yaml
Extend SSH regex to support public key authentication logs |
263,095 | 30.06.2021 09:54:29 | 0 | 86bb9060943094ec52aa03f2cd733f00bf16f4a0 | use vue-clipboard2 | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"diff": "@@ -169,7 +169,8 @@ limitations under the License.\nclass=\"icon is-small\"\nstyle=\"cursor:pointer;float:right;\"\ntitle=\"Copy key:value\"\n- v-on:click=\"copyCode(event._source[field.field])\"\n+ v-clipboard:copy=\"event._source[field.field]\"\n+ v-clipboard:success=\"handleCopyStatus\"\n><i class=\"fas fa-copy\"></i\n></span>\n</span>\n@@ -450,19 +451,9 @@ export default {\ntoggleTheme: function() {\nthis.isDarkTheme = !this.isDarkTheme\n},\n- copyCode: function (value) {\n- try {\n- const el = document.createElement('textarea');\n- el.value = value;\n- document.body.appendChild(el);\n- el.select();\n- document.execCommand('copy');\n- this.$buefy.notification.open('Copied!!')\n- document.body.removeChild(el);\n- } catch (err) {\n- alert('Oops, unable to copy');\n- }\n- }\n+ handleCopyStatus: function() {\n+ this.$buefy.notification.open('Copied!')\n+ },\n},\nbeforeDestroy() {\nEventBus.$off('selectEvent', this.selectEvent)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"diff": "@@ -39,10 +39,13 @@ limitations under the License.\n<span\nclass=\"icon is-small\"\nstyle=\"cursor:pointer;\"\n- title=\"Copy key:value\"\n- v-on:click=\"copyCode(key,item,'both')\"\n+ title=\"Copy key\"\n+ v-clipboard:copy=\"key\"\n+ v-clipboard:success=\"handleCopyStatus\"\n><i class=\"fas fa-copy\"></i\n></span>\n+ </td>\n+\n<td style=\"white-space:pre-wrap;word-wrap: break-word; width: 150px;\">{{ key }}</td>\n<td>\n<span style=\"white-space:pre-wrap;word-wrap: break-word\">{{ item }}</span>\n@@ -50,7 +53,8 @@ limitations under the License.\nclass=\"icon is-small\"\nstyle=\"cursor:pointer; margin-left: 3px; color: #d3d3d3;float:right;\"\ntitle=\"Copy value\"\n- v-on:click=\"copyCode(key,item,'value')\"\n+ v-clipboard:copy=\"item\"\n+ v-clipboard:success=\"handleCopyStatus\"\n><i class=\"fas fa-copy\"></i\n></span>\n</td>\n@@ -103,19 +107,9 @@ export default {\n}\nthis.$emit('addChip', chip)\n},\n- copyCode: function (value) {\n- try {\n- const el = document.createElement('textarea');\n- el.value = value;\n- document.body.appendChild(el);\n- el.select();\n- document.execCommand('copy');\n- this.$buefy.notification.open('Copied!!')\n- document.body.removeChild(el);\n- } catch (err) {\n- alert('Oops, unable to copy');\n- }\n- }\n+ handleCopyStatus: function() {\n+ this.$buefy.notification.open('Copied!')\n+ },\n},\ncreated: function() {\nthis.getEvent()\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/main.js",
"new_path": "timesketch/frontend/src/main.js",
"diff": "@@ -24,6 +24,7 @@ import Buefy from 'buefy'\nimport VueScrollTo from 'vue-scrollto'\nimport Multiselect from 'vue-multiselect'\nimport VueCytoscape from 'vue-cytoscape'\n+import VueClipboard from 'vue-clipboard2'\n// Icons\nimport { library } from '@fortawesome/fontawesome-svg-core'\n@@ -54,6 +55,7 @@ export default EventBus\n// Third party\nVue.use(require('vue-moment'))\nVue.use(VueCytoscape)\n+Vue.use(VueClipboard);\nVue.use(Buefy, {\ndefaultIconComponent: 'font-awesome-icon',\ndefaultIconPack: 'fas',\n"
}
] | Python | Apache License 2.0 | google/timesketch | use vue-clipboard2 |
263,095 | 30.06.2021 10:41:40 | 0 | 8c877508196eb1dde74feb68b74e8dc1b8ff5f1d | make copy button in Event List hover | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"diff": "@@ -30,7 +30,7 @@ limitations under the License.\n</tr>\n<!-- The event -->\n- <tr>\n+ <tr @mouseover=\"hover = true\" @mouseleave=\"hover = false\">\n<!-- Timeline color (set the color for the timeline) -->\n<td v-bind:style=\"timelineColor\">\n{{ event._source.timestamp | formatTimestamp | moment('utc', datetimeFormat) }}\n@@ -166,6 +166,7 @@ limitations under the License.\n>{{ label }}</span\n>\n<span\n+ v-if=\"hover\"\nclass=\"icon is-small\"\nstyle=\"cursor:pointer;float:right;\"\ntitle=\"Copy key:value\"\n@@ -263,6 +264,7 @@ export default {\nlabelToAdd: null,\nselectedLabels: [],\nlabelsToRemove: [],\n+ hover: false,\n}\n},\ncomputed: {\n"
}
] | Python | Apache License 2.0 | google/timesketch | make copy button in Event List hover |
263,096 | 30.06.2021 15:30:20 | -7,200 | b16cc797ff597e55880a08074a16708d4de99578 | UX local dev doc updates | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/developer-guide.md",
"new_path": "docs/developers/developer-guide.md",
"diff": "@@ -264,8 +264,8 @@ Add Yarn repo\n```bash\n$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -\n$ echo \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list\n+```\n-```bash\nInstall Node.js and Yarn\n```bash\n"
}
] | Python | Apache License 2.0 | google/timesketch | UX local dev doc updates (#1862) |
263,095 | 01.07.2021 10:00:05 | 0 | 48245b8f3282ef7a4387477cae1ae85b477d85f7 | initial sysadmin guide | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/sysadmin/install.md",
"diff": "+See [here](/docs/getting-started/install.md)\n\\ No newline at end of file\n"
},
{
"change_type": "RENAME",
"old_path": "docs/learn/server-admin.md",
"new_path": "docs/sysadmin/server-admin.md",
"diff": ""
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/sysadmin/upgrade.md",
"diff": "+# Upgrade an existing installation\n+\n+When upgrading Timesketch you might need to migrate the database to use the latest database schema. This is how you do that.\n+\n+## Backup you database (!)\n+First you should backup your current database in case something goes wrong in the upgrade process. For PostgreSQL you do the following (Ref: https://www.postgresql.org/docs/9.1/static/backup.html):\n+\n+```shell\n+$ sudo -u postgres pg_dump timesketch > ~/timesketch-db.sql\n+$ sudo -u postgres pg_dumpall > ~/timesketch-db-all.sql\n+```\n+\n+## Change to your Timesketch installation directory\n+(e.g. /opt/timesketch)\n+\n+```shell\n+$ cd /<PATH TO TIMESKETCH INSTALLATION>\n+```\n+\n+## Upgrade the database schema\n+Have you backed up your database..? good. Let's upgrade the schema. First connect to the timesketch-web container:\n+\n+```shell\n+$ docker-compose exec timesketch-web /bin/bash\n+```\n+\n+While connected to the container:\n+\n+```shell\n+root@<CONTAINER_ID>$ git clone https://github.com/google/timesketch.git\n+root@<CONTAINER_ID>$ cd timesketch/timesketch\n+root@<CONTAINER_ID>$ tsctl db current\n+```\n+\n+If this command returns a value, then you can go ahead and upgrade the database.\n+\n+In case you don't get any response back from the `db current` command you'll need to first find out revisions and fix a spot to upgrade from.\n+\n+```shell\n+root@<CONTAINER_ID>$ tsctl db history\n+```\n+\n+Find the lasat revision number you have upgraded the database too, and then issue\n+\n+```shell\n+root@<CONTAINER_ID>$ tsctl db stamp <REVISION_ID>\n+```\n+\n+And now you are ready to upgrade.\n+\n+```shell\n+root@<CONTAINER_ID>$ tsctl db upgrade\n+```\n+\n+## Upgrade timesketch\n+Exit from the container (CTRL-D), then pull new versions of the docker images and upgrade Timesketch:\n+\n+```shell\n+$ docker-compose pull\n+$ docker-compose down\n+$ docker-compose up -d\n+```\n"
}
] | Python | Apache License 2.0 | google/timesketch | initial sysadmin guide |
263,096 | 02.07.2021 09:00:28 | -7,200 | a28fd3b1fa069ed794685736b2f6eb593381da0f | remove capitalize from event list | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventList.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventList.vue",
"diff": "@@ -22,7 +22,7 @@ limitations under the License.\n<input type=\"checkbox\" v-on:click=\"toggleSelectAll\" />\n</span>\n</th>\n- <th v-for=\"(field, index) in selectedFields\" :key=\"index\">{{ field.field | capitalize }}</th>\n+ <th v-for=\"(field, index) in selectedFields\" :key=\"index\">{{ field.field }}</th>\n<th width=\"150\">Timeline name</th>\n</thead>\n<ts-sketch-explore-event-list-row\n"
}
] | Python | Apache License 2.0 | google/timesketch | remove capitalize from event list (#1864) |
263,096 | 08.07.2021 00:00:34 | -7,200 | 31a351c2c2b2c09bd57f0d3ae1db2a9d508971ed | Mention WTF_CSRF_TIME_LIMIT in timesketch.conf | [
{
"change_type": "MODIFY",
"old_path": "data/timesketch.conf",
"new_path": "data/timesketch.conf",
"diff": "@@ -261,3 +261,10 @@ EXTERNAL_HOST_URL = 'https://localhost'\nSIGMA_RULES_FOLDERS = ['/etc/timesketch/sigma/rules/']\nSIGMA_CONFIG = '/etc/timesketch/sigma_config.yaml'\nSIGMA_TAG_DELAY = 5\n+\n+#-------------------------------------------------------------------------------\n+# Flask Settings\n+# Everything mentioned in https://flask-wtf.readthedocs.io/en/latest/config/ can be used.\n+# Max age in seconds for CSRF tokens. Default is 3600. If set to None, the CSRF token is valid for the life of the session.\n+# WTF_CSRF_TIME_LIMIT = 7200\n+\n"
}
] | Python | Apache License 2.0 | google/timesketch | Mention WTF_CSRF_TIME_LIMIT in timesketch.conf (#1870)
https://github.com/google/timesketch/issues/1794 |
263,111 | 07.08.2021 02:32:23 | -36,000 | 18a5841bb5a1fb0fb5216bf351d441f75f19292d | Extended tsctl.py to add users to a sketch
* Extended tsctl.py to add users to a sketch
A function to grant a user access to a sketch.
* Update tsctl.py
Fixed linter errors about bad indentation.
* Update tsctl.py
Fixed another linter error about a long line. | [
{
"change_type": "MODIFY",
"old_path": "timesketch/tsctl.py",
"new_path": "timesketch/tsctl.py",
"diff": "@@ -68,6 +68,33 @@ class DropDataBaseTables(Command):\ndrop_all()\n+class GrantUser(Command):\n+ \"\"\"Grant a user user access to a sketch.\"\"\"\n+ option_list = (\n+ Option('--username', '-u', dest='username', required=True),\n+ Option('--sketchId', '-s', dest='sketch_id', required=True), )\n+\n+ # pylint: disable=arguments-differ, method-hidden\n+ def run(self, username, sketch_id):\n+ \"\"\"Creates the user.\"\"\"\n+ if not isinstance(sketch_id, six.text_type):\n+ sketch_id = codecs.decode(sketch_id, 'utf-8')\n+ if not isinstance(username, six.text_type):\n+ username = codecs.decode(username, 'utf-8')\n+ sketch = Sketch.query.filter_by(id=sketch_id).first()\n+ user = User.query.filter_by(username=username).first()\n+ if not sketch:\n+ sys.stdout.write('No sketch found with this ID.')\n+ elif not user:\n+ sys.stdout.write('User [{0:s}] does not exist.\\n'.format(\n+ username))\n+ else:\n+ sketch.grant_permission(permission='read', user=user)\n+ sketch.grant_permission(permission='write', user=user)\n+ sys.stdout.write('User {0:s} added to the sketch {1:s}.\\n'.format(\n+ username, sketch_id))\n+\n+\nclass AddUser(Command):\n\"\"\"Create a new Timesketch user.\"\"\"\noption_list = (\n@@ -440,6 +467,7 @@ def main():\n\"\"\"Main function of the script, setting up the shell manager.\"\"\"\n# Setup Flask-script command manager and register commands.\nshell_manager = Manager(create_app)\n+ shell_manager.add_command('grant_user', GrantUser())\nshell_manager.add_command('add_user', AddUser())\nshell_manager.add_command('make_admin', MakeUserAdmin())\nshell_manager.add_command('list_users', ListUsers())\n"
}
] | Python | Apache License 2.0 | google/timesketch | Extended tsctl.py to add users to a sketch (#1886)
* Extended tsctl.py to add users to a sketch
A function to grant a user access to a sketch.
* Update tsctl.py
Fixed linter errors about bad indentation.
* Update tsctl.py
Fixed another linter error about a long line. |
263,103 | 09.08.2021 16:18:39 | -14,400 | e936c011fd0dd946650d4d1735c3ed01fd74a849 | Fixed issue 1871 | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Explore.vue",
"new_path": "timesketch/frontend/src/views/Explore.vue",
"diff": "@@ -949,7 +949,7 @@ export default {\nthis.selectedLabels.forEach(label => {\nlet chip = {\nfield: '',\n- value: label.label,\n+ value: label,\ntype: 'label',\noperator: 'must',\nactive: true,\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fixed issue 1871 (#1893)
Co-authored-by: Hussein Khalifa <hkhalifa@google.com> |
263,093 | 16.08.2021 10:34:49 | -7,200 | dff6559b3b93a6cee7356e4e23e05f11d168bfcc | Fix double value text | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"diff": "@@ -48,7 +48,6 @@ limitations under the License.\n<td style=\"white-space:pre-wrap;word-wrap: break-word; width: 150px;\">{{ key }}</td>\n<td>\n- <span style=\"white-space:pre-wrap;word-wrap: break-word\">{{ item }}</span>\n<span\nclass=\"icon is-small\"\nstyle=\"cursor:pointer; margin-left: 3px; color: #d3d3d3;float:right;\"\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix double value text (#1900) |
263,096 | 16.08.2021 18:12:27 | -7,200 | dee63a81f3861e4d1e4e64f9fe351c37abd94983 | 1895 bugfix copy buttons
* remove copy button from EventList
* Copy Button: Dark. hover, moved
* dist folder
* Revert "dist folder"
This reverts commit | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRow.vue",
"diff": "@@ -30,7 +30,7 @@ limitations under the License.\n</tr>\n<!-- The event -->\n- <tr @mouseover=\"hover = true\" @mouseleave=\"hover = false\">\n+ <tr>\n<!-- Timeline color (set the color for the timeline) -->\n<td v-bind:style=\"timelineColor\">\n{{ event._source.timestamp | formatTimestamp | moment('utc', datetimeFormat) }}\n@@ -155,15 +155,6 @@ limitations under the License.\nstyle=\"margin-right:5px; background-color:var(--tag-background-color); color:var(--tag-font-color);\"\n>{{ label }}</span\n>\n- <span\n- v-if=\"hover\"\n- class=\"icon is-small\"\n- style=\"cursor:pointer;float:right;\"\n- title=\"Copy key:value\"\n- v-clipboard:copy=\"event._source[field.field]\"\n- v-clipboard:success=\"handleCopyStatus\"\n- ><i class=\"fas fa-copy\"></i\n- ></span>\n</span>\n<!--eslint-enable-->\n<span style=\"word-break: break-word;\" :title=\"event._source[field.field]\">\n@@ -256,7 +247,6 @@ export default {\nlabelToAdd: null,\nselectedLabels: [],\nlabelsToRemove: [],\n- hover: false,\n}\n},\ncomputed: {\n@@ -445,9 +435,6 @@ export default {\ntoggleTheme: function() {\nthis.isDarkTheme = !this.isDarkTheme\n},\n- handleCopyStatus: function() {\n- this.$buefy.notification.open('Copied!')\n- },\n},\nbeforeDestroy() {\nEventBus.$off('selectEvent', this.selectEvent)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"new_path": "timesketch/frontend/src/components/Explore/EventListRowDetail.vue",
"diff": "@@ -16,7 +16,7 @@ limitations under the License.\n<template>\n<table class=\"table is-bordered\" style=\"width:100%;table-layout: fixed;\" @mouseup=\"handleSelectionChange\">\n<tbody>\n- <tr v-for=\"(item, key) in fullEventFiltered\" :key=\"key\">\n+ <tr v-for=\"(item, key) in fullEventFiltered\" :key=\"key\" @mouseover=\"c_key = key\" @mouseleave=\"c_key = -1\">\n<td style=\"width:40px;\">\n<span\nclass=\"icon is-small\"\n@@ -35,8 +35,11 @@ limitations under the License.\n><i class=\"fas fa-search-minus\"></i\n></span>\n</td>\n- <td style=\"width:40px;\">\n+\n+ <td style=\"word-wrap: break-word; width: 150px;\">\n+ {{ key }}\n<span\n+ v-if=\"key == c_key\"\nclass=\"icon is-small\"\nstyle=\"cursor:pointer;\"\ntitle=\"Copy key\"\n@@ -45,12 +48,11 @@ limitations under the License.\n><i class=\"fas fa-copy\"></i\n></span>\n</td>\n-\n- <td style=\"white-space:pre-wrap;word-wrap: break-word; width: 150px;\">{{ key }}</td>\n<td>\n<span\n+ v-if=\"key == c_key\"\nclass=\"icon is-small\"\n- style=\"cursor:pointer; margin-left: 3px; color: #d3d3d3;float:right;\"\n+ style=\"cursor:pointer; margin-left: 3px; float:right;\"\ntitle=\"Copy value\"\nv-clipboard:copy=\"item\"\nv-clipboard:success=\"handleCopyStatus\"\n@@ -87,6 +89,7 @@ export default {\nhash_sha256: /[0-9a-f]{64}/gi,\nselection: '',\n},\n+ c_key: -1,\nfullEvent: {},\n}\n},\n"
}
] | Python | Apache License 2.0 | google/timesketch | 1895 bugfix copy buttons (#1906)
* remove copy button from EventList
* Copy Button: Dark. hover, moved
* dist folder
* Revert "dist folder"
This reverts commit 10729a8fb40a94f0ab55ec0a15c1edf6b094bb24. |
263,093 | 17.08.2021 14:34:58 | -7,200 | fc8e029604dea59475750c822f68c72f1fa41049 | Only create saved search if there are any sessions created | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/ssh_sessionizer.py",
"new_path": "timesketch/lib/analyzers/ssh_sessionizer.py",
"diff": "@@ -85,8 +85,9 @@ class SSHSessionizerSketchPlugin(sessionizer.SessionizerSketchPlugin):\nif process_id in started_sessions_ids.keys():\nself.annotateEvent(event, started_sessions_ids[process_id])\n+ if self.session_num:\nself.sketch.add_view(\n- 'SSH session view',\n+ 'SSH sessions',\nself.NAME,\nquery_string='session_id.{0:s}:*'.format(self.session_type))\n"
}
] | Python | Apache License 2.0 | google/timesketch | Only create saved search if there are any sessions created (#1909) |
263,096 | 17.08.2021 22:54:00 | -7,200 | 7c01d273641706ea74ba6562e1f59370cf0d990a | fix the sigma_view | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/sigma_tagger.py",
"new_path": "timesketch/lib/analyzers/sigma_tagger.py",
"diff": "@@ -110,7 +110,7 @@ class SigmaPlugin(interface.BaseAnalyzer):\ntotal_tagged_events = sum(tags_applied.values())\noutput_strings.append('Applied {0:d} tags'.format(total_tagged_events))\n- if sigma_rule_counter > 0:\n+ if total_tagged_events > 0:\nself.add_sigma_match_view(sigma_rule_counter)\nif len(problem_strings) > 0:\n"
}
] | Python | Apache License 2.0 | google/timesketch | fix the sigma_view (#1910) |
263,096 | 18.08.2021 15:39:42 | -7,200 | c633b50547da0888727e1d10f65547d5dab816c8 | remove mans from various docs | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/unit-tests.yml",
"new_path": ".github/workflows/unit-tests.yml",
"diff": "@@ -56,7 +56,7 @@ jobs:\npython3-flask-restful python3-flask-script python3-flask-sqlalchemy \\\npython3-flaskext.wtf python3-google-auth python3-google-auth-oauthlib \\\npython3-gunicorn python3-idna python3-itsdangerous python3-jinja2 \\\n- python3-jsonschema python3-jwt python3-kombu python3-mako python3-mans-to-es \\\n+ python3-jsonschema python3-jwt python3-kombu python3-mako \\\npython3-markdown python3-markupsafe python3-neo4jrestclient python3-numpy \\\npython3-oauthlib python3-pandas python3-parameterized python3-pycparser \\\npython3-pyrsistent python3-redis python3-requests python3-requests-oauthlib \\\n"
},
{
"change_type": "MODIFY",
"old_path": "data/timesketch.conf",
"new_path": "data/timesketch.conf",
"diff": "@@ -144,13 +144,13 @@ GOOGLE_OIDC_HOSTED_DOMAIN = None\nGOOGLE_OIDC_ALLOWED_USERS = []\n#-------------------------------------------------------------------------------\n-# Upload and processing of Plaso storage or mans files.\n+# Upload and processing of Plaso storage files.\n# To enable this feature you need to configure an upload directory and\n# how to reach the Redis database used by the distributed task queue.\nUPLOAD_ENABLED = False\n-# Folder for temporarily storage of Plaso dump or mans files before being processed and\n+# Folder for temporarily storage of Plaso dump files before being processed and\n# inserted into the datastore.\nUPLOAD_FOLDER = '/tmp'\n"
},
{
"change_type": "MODIFY",
"old_path": "importer_client/python/timesketch_import_client/importer.py",
"new_path": "importer_client/python/timesketch_import_client/importer.py",
"diff": "@@ -629,7 +629,7 @@ class ImportStreamer(object):\nelse:\nraise TypeError(\n- 'File needs to have a file extension of: .csv, .jsonl, mans or '\n+ 'File needs to have a file extension of: .csv, .jsonl or '\n'.plaso')\ndef add_json(self, json_entry, column_names=None):\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/tasks.py",
"new_path": "timesketch/lib/tasks.py",
"diff": "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n-\"\"\"Celery task for processing Plaso storage or mans files.\"\"\"\n+\"\"\"Celery task for processing Plaso storage files.\"\"\"\nfrom __future__ import unicode_literals\n"
}
] | Python | Apache License 2.0 | google/timesketch | remove mans from various docs (#1912) |
263,178 | 21.08.2021 15:29:39 | -7,200 | 993701332ceb73aaa3f32cdc2fe58aebad092da9 | Corrected docstring in setup.py | [
{
"change_type": "MODIFY",
"old_path": "setup.py",
"new_path": "setup.py",
"diff": "@@ -48,7 +48,7 @@ def parse_requirements_from_file(path):\npath (str): path to the requirements file.\nYields:\n- pkg_resources.Requirement: package resource requirement.\n+ str: package resource requirement.\n\"\"\"\nwith open(path, 'r') as file_object:\nfile_contents = file_object.read()\n"
}
] | Python | Apache License 2.0 | google/timesketch | Corrected docstring in setup.py (#1926) |
263,093 | 10.09.2021 08:49:54 | -7,200 | 745659fc285e0373009919aeeeb987c3166d7efe | timestamp in microseconds since epoch | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/utils.py",
"new_path": "timesketch/lib/utils.py",
"diff": "@@ -258,7 +258,8 @@ def read_and_validate_jsonl(file_handle):\nlinedict['datetime'] = dt.isoformat()\nif 'timestamp' not in ld_keys and 'datetime' in ld_keys:\ntry:\n- linedict['timestamp'] = parser.parse(linedict['datetime'])\n+ linedict['timestamp'] = int(parser.parse(\n+ linedict['datetime']).timestamp() * 1000000)\nexcept parser.ParserError:\nlogger.error(\n'Unable to parse timestamp, skipping line '\n"
}
] | Python | Apache License 2.0 | google/timesketch | timestamp in microseconds since epoch (#1939) |
263,093 | 13.09.2021 01:11:21 | -7,200 | f3faad7e268d931a56f3f2e6c51654989c8dff5a | Update plaso.mappings
* Update plaso.mappings
Closes
* Update data/plaso.mappings | [
{
"change_type": "MODIFY",
"old_path": "data/plaso.mappings",
"new_path": "data/plaso.mappings",
"diff": "\"version\": {\n\"type\": \"text\",\n\"fields\": {\"keyword\": {\"type\": \"keyword\"}}\n+ },\n+ \"http_response_bytes\": {\n+ \"type\": \"text\",\n+ \"fields\": {\"keyword\": {\"type\": \"keyword\"}}\n}\n}\n}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update plaso.mappings (#1941)
* Update plaso.mappings
Closes #1935
* Update data/plaso.mappings |
263,129 | 15.09.2021 09:28:12 | -7,200 | 87eabdcafd18c48d858134f4b6a9053707ffb48f | Check missing attributes | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"new_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"diff": "@@ -132,7 +132,7 @@ export default {\nreturn Object.entries(this.meta.attributes).length\n},\nintelligenceCount() {\n- return (Object.entries(this.meta.attributes.intelligence).length + Object.entries(this.meta.attributes.intelligence_local).length)\n+ return (Object.entries(this.meta.attributes.intelligence || {}).length + Object.entries(this.meta.attributes.intelligence_local || {}).length)\n},\n},\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Attributes.vue",
"new_path": "timesketch/frontend/src/views/Attributes.vue",
"diff": "@@ -82,4 +82,5 @@ export default {\n})\n},\n}\n+\n</script>\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Intelligence.vue",
"new_path": "timesketch/frontend/src/views/Intelligence.vue",
"diff": "@@ -99,8 +99,12 @@ export default {\n},\nloadIntelligence() {\nApiClient.getSketchAttributes(this.sketch.id).then(response => {\n+ if (!_.isEmpty(response.data.intelligence)) {\nthis.meta.attributes.intelligence = response.data.intelligence\n+ }\n+ if (!_.isEmpty(response.data.intelligence_local)) {\nthis.meta.attributes.intelligence_local = response.data.intelligence_local\n+ }\n})\n},\n},\n@@ -112,13 +116,13 @@ export default {\nreturn this.$store.state.meta\n},\nexternalIntelligence() {\n- if (_.isEmpty(this.meta.attributes.intelligence.value)) {\n+ if (this.meta.attributes.intelligence === undefined || _.isEmpty(this.meta.attributes.intelligence.value)) {\nreturn { data: {}, meta: {} }\n}\nreturn this.meta.attributes.intelligence.value\n},\nlocalIntelligence() {\n- if (_.isEmpty(this.meta.attributes.intelligence_local.value)) {\n+ if (this.meta.attributes.intelligence_local === undefined || _.isEmpty(this.meta.attributes.intelligence_local.value)) {\nreturn { data: [] }\n}\nreturn this.meta.attributes.intelligence_local.value\n"
}
] | Python | Apache License 2.0 | google/timesketch | Check missing attributes (#1943) |
263,096 | 15.09.2021 09:29:42 | -7,200 | 7bd8a11f2e5999b8046cb201c71fe00b35e141f4 | initiatl sizing doc | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/getting-started/sizing.md",
"diff": "+# Sizing and limitations\n+\n+Timesketch is designed to scale.\n+\n+The minimum system requirements are:\n+\n+* Machine with Ubuntu 20.04 installed.\n+* At least 8GB RAM, but more the better.\n+* Optional: Domain name registered and configure for the machine if you want to setup SSL for the webserver.\n+\n+These are the limitations:\n+\n+- Disk size: You can't save larger indexes than the physical hard disk space.\n+- There are maximum number (1500) of shards that can be opened.\n+- There are limitations with Lucene (which Elastic uses) and then Elastic itself, see https://www.elastic.co/guide/en/app-search/current/limits.html and maximum sizes of HTTP requests, hence when Timesketch uploads files they are split up, to avoid HTTP limitations.\n+\n+With a decent Elasticsearch deployment you can have hundreds of millions events across many many investigations without issues.\n\\ No newline at end of file\n"
}
] | Python | Apache License 2.0 | google/timesketch | initiatl sizing doc (#1947) |
263,095 | 23.09.2021 07:43:36 | 0 | 362919f05bffb10b12ecea32ee2e975ccb0a334c | add GCP to sigma config file / mapping | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_blocklist.csv",
"new_path": "data/sigma_blocklist.csv",
"diff": "@@ -2,6 +2,11 @@ path,bad,reason,last_ckecked,rule_id\napplication/app,bad,not checked yet,2021-05-04,\napt/apt_silence,bad,not checked yet,2021-05-04,\ncloud/aws_,bad,not checked yet,2021-05-04,\n+cloud/azure,bad,no test data available,2021-09-23,\n+cloud/gworkspace,bad,no test data available,2021-09-23,\n+cloud/m365,bad,no test data available,2021-09-23,\n+cloud/okta,bad,no test data available,2021-09-23,\n+cloud/awd,bad,no test data available,2021-09-23,\ncompliance/,bad,not checked yet,2021-05-04,\ngeneric/generic_brute_force.yml,bad,count not implemented,2021-05-04,\nnetwork/cisco/aaa/cisco_,bad,no test data available,2021-05-04,\n"
},
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -80,6 +80,12 @@ logsources:\nconditions:\nsource_name:\n- \"Microsoft-Windows-Sysmon\"\n+ # GCP\n+ gcp_audit:\n+ service: gcp.audit\n+ conditions:\n+ query:\n+ - \"cloudaudit.googleapis.com\"\n# log source configurations for generic sigma rules\nprocess_creation:\ncategory: process_creation\n@@ -300,3 +306,4 @@ fieldmappings:\nPayload: xml_string\nHostName: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\nHostApplication: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\n+ gcp.audit.method_name: methodName\n\\ No newline at end of file\n"
}
] | Python | Apache License 2.0 | google/timesketch | add GCP to sigma config file / mapping |
263,093 | 04.10.2021 15:02:16 | -7,200 | 176a5aaed69348fcd690b0e15f581d7492dda996 | Run tagger and feature extractor as multiple tasks | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/feature_extraction.py",
"new_path": "timesketch/lib/analyzers/feature_extraction.py",
"diff": "@@ -29,8 +29,6 @@ class FeatureExtractionSketchPlugin(interface.BaseAnalyzer):\nDISPLAY_NAME = 'Feature extractor'\nDESCRIPTION = 'Extract features from event based on stored definitions'\n- CONFIG_FILE = 'features.yaml'\n-\nFORM_FIELDS = [\n{\n'name': 'query_string',\n@@ -147,20 +145,19 @@ class FeatureExtractionSketchPlugin(interface.BaseAnalyzer):\n]\n- def __init__(self, index_name, sketch_id, timeline_id=None, config=None):\n+ def __init__(self, index_name, sketch_id, timeline_id=None, **kwargs):\n\"\"\"Initialize The Sketch Analyzer.\nArgs:\nindex_name: Elasticsearch index name\nsketch_id: Sketch ID\ntimeline_id: The ID of the timeline.\n- config: Optional dict that contains the configuration for the\n- analyzer. If not provided, the default YAML file will be\n- loaded up.\n\"\"\"\nself.index_name = index_name\n+ self._feature_name = kwargs.get('feature')\n+ self._feature_config = kwargs.get('feature_config')\nsuper().__init__(index_name, sketch_id, timeline_id=timeline_id)\n- self._config = config\n+\ndef run(self):\n\"\"\"Entry point for the analyzer.\n@@ -168,17 +165,7 @@ class FeatureExtractionSketchPlugin(interface.BaseAnalyzer):\nReturns:\nString with summary of the analyzer result.\n\"\"\"\n- config = self._config or interface.get_yaml_config(self.CONFIG_FILE)\n- if not config:\n- return 'Unable to parse the config file.'\n-\n- return_strings = []\n- for name, feature_config in iter(config.items()):\n- feature_string = self.extract_feature(name, feature_config)\n- if feature_string:\n- return_strings.append(feature_string)\n-\n- return ', '.join(return_strings)\n+ return self.extract_feature(self._feature_name, self._feature_config)\n@staticmethod\ndef _get_attribute_value(\n@@ -346,5 +333,21 @@ class FeatureExtractionSketchPlugin(interface.BaseAnalyzer):\nreturn 'Feature extraction [{0:s}] extracted {1:d} features.'.format(\nname, event_counter)\n+ @staticmethod\n+ def get_kwargs():\n+ \"\"\"Get kwargs for the analyzer.\n+\n+ Returns:\n+ List of features to search for.\n+ \"\"\"\n+ features_config = interface.get_yaml_config('features.yaml')\n+ if not features_config:\n+ return 'Unable to parse the config features file.'\n+\n+ features_kwargs = [\n+ {'feature': feature, 'feature_config': config}\n+ for feature, config in features_config.items()\n+ ]\n+ return features_kwargs\nmanager.AnalysisManager.register_analyzer(FeatureExtractionSketchPlugin)\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/tagger.py",
"new_path": "timesketch/lib/analyzers/tagger.py",
"diff": "@@ -19,18 +19,17 @@ class TaggerSketchPlugin(interface.BaseAnalyzer):\nCONFIG_FILE = 'tags.yaml'\n- def __init__(self, index_name, sketch_id, timeline_id=None, config=None):\n+ def __init__(self, index_name, sketch_id, timeline_id=None, **kwargs):\n\"\"\"Initialize The Sketch Analyzer.\nArgs:\nindex_name: Elasticsearch index name\nsketch_id: Sketch ID\n- timeline_id: The ID of the timeline.\n- config: Optional dict that contains the configuration for the\n- analyzer. If not provided, the default YAML file will be used.\n+ timeline_id: The ID of the timeline\n\"\"\"\nself.index_name = index_name\n- self._config = config\n+ self._tag_name = kwargs.get('tag')\n+ self._tag_config = kwargs.get('tag_config')\nsuper().__init__(index_name, sketch_id, timeline_id=timeline_id)\ndef run(self):\n@@ -39,19 +38,24 @@ class TaggerSketchPlugin(interface.BaseAnalyzer):\nReturns:\nString with summary of the analyzer result.\n\"\"\"\n- config = self._config or interface.get_yaml_config(self.CONFIG_FILE)\n- if not config:\n- return 'Unable to parse the config file.'\n-\n- tag_results = []\n- for name, tag_config in iter(config.items()):\n- tag_result = self.tagger(name, tag_config)\n- if tag_result and not tag_result.startswith('0 events tagged'):\n- tag_results.append(tag_result)\n-\n- if tag_results:\n- return ', '.join(tag_results)\n- return 'No tags applied'\n+ return self.tagger(self._tag_name, self._tag_config)\n+\n+ @staticmethod\n+ def get_kwargs():\n+ \"\"\"Get kwargs for the analyzer.\n+\n+ Returns:\n+ List of searches to tag results for.\n+ \"\"\"\n+ tags_config = interface.get_yaml_config('tags.yaml')\n+ if not tags_config:\n+ return 'Unable to parse the tags config file.'\n+\n+ tags_kwargs = [\n+ {'tag': tag, 'tag_config': config}\n+ for tag, config in tags_config.items()\n+ ]\n+ return tags_kwargs\ndef tagger(self, name, config):\n\"\"\"Tag and add emojis to events.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Run tagger and feature extractor as multiple tasks |
263,093 | 04.10.2021 15:56:43 | -7,200 | 5bcdaea399cc8100ae835d7e43a9193df883a50f | remove test sleep | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/feature_extraction.py",
"new_path": "timesketch/lib/analyzers/feature_extraction.py",
"diff": "@@ -164,8 +164,6 @@ class FeatureExtractionSketchPlugin(interface.BaseAnalyzer):\nReturns:\nString with summary of the analyzer result.\n\"\"\"\n- import time\n- time.sleep(10)\nreturn self.extract_feature(self._feature_name, self._feature_config)\n@staticmethod\n"
}
] | Python | Apache License 2.0 | google/timesketch | remove test sleep |
263,096 | 04.10.2021 16:50:33 | -7,200 | 1e9122c578f910b5da00b90b8bed6b72ce4d0b25 | introduce multi analyzer to docs | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/analyzer-development.md",
"new_path": "docs/developers/analyzer-development.md",
"diff": "# Write analyzers in Timesketch\n+## Multi Analyzer\n+\n+When you develop an anylzer that would benefit from creating smaller sub-jobs, you should use Multi Analyzer.\n+\n+For example The Sigma analyzer is such a Multi Analyzer. That means, the Sigma analyzer is calling ```get_kwargs()``` from [sigma_tagger.py](https://github.com/google/timesketch/blob/master/timesketch/lib/analyzers/sigma_tagger.py). That will return a list of all Sigma rules installed on the instance. The Main celery job then spawns one celery job per Sigma rule that can run in paralell or serial depending on the celery config and sizing of the Timesketch instance.\n+\n+If ```get_kwargs()``` is not implemented in the analyzer, [tasks.py](https://github.com/google/timesketch/blob/master/timesketch/lib/tasks.py) expects it is not a multi analyzer, thus creating only one celery job.\n+\n## analyzer_run.py\n### Purpose\n"
}
] | Python | Apache License 2.0 | google/timesketch | introduce multi analyzer to docs (#1961) |
263,161 | 07.10.2021 15:44:00 | -10,800 | ba5e3bdc46e079b67998927ec181cbab0d0227c0 | Added deploy_timesketch.ps1
Fixes | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "contrib/deploy_timesketch.ps1",
"diff": "+# Requires powershell 6.0 or newer - just because the out-file does not support encoding of UTF8NoBom on older versions.\n+# This is a copy from the official Bash script of Timesketch. https://timesketch.org/\n+# https://raw.githubusercontent.com/google/timesketch/master/contrib/deploy_timesketch.sh\n+# Some of the functionality might be still missing that is present on the bash script.\n+\n+# Check for the existing timesketch path\n+if (Test-Path -path timesketch) {\n+ write-host \"ERROR: Timesketch directory already exist.\"\n+ exit\n+}\n+\n+# Check if the docker service is available and running\n+if((Get-Service com.docker.service).status -ne \"Running\") {\n+ write-host \"ERROR: Docker is not available.\"\n+ exit\n+}\n+\n+# Check if Timesketch container is already present\n+if ((docker ps | sls timesketch) -ne $null) {\n+ write-host \"ERROR: Timesketch containers already running.\"\n+ exit\n+}\n+\n+#set the vm.max_map_count for elasticsearch in WSL\n+write-host \"Set the vm.max_map_count for Elasticsearch\"\n+wsl -d docker-desktop sysctl -w vm.max_map_count=262144\n+\n+# Create dirs.\n+# Casting to void to avoid output.\n+[void](New-Item -ItemType Directory -Name timesketch)\n+[void](New-Item -ItemType Directory -Name timesketch\\data)\n+[void](New-Item -ItemType Directory -Name timesketch\\data\\postgresql)\n+[void](New-Item -ItemType Directory -Name timesketch\\data\\elasticsearch)\n+[void](New-Item -ItemType Directory -Name timesketch\\logs)\n+[void](New-Item -ItemType Directory -Name timesketch\\etc)\n+[void](New-Item -ItemType Directory -Name timesketch\\etc\\timesketch)\n+[void](New-Item -ItemType Directory -Name timesketch\\etc\\timesketch\\sigma)\n+[void](New-Item -ItemType Directory -Name timesketch\\etc\\timesketch\\sigma\\rules)\n+[void](New-Item -ItemType Directory -Name timesketch\\upload)\n+\n+# config parameters\n+Write-Host \"* Setting default config parameters..\"\n+$POSTGRES_USER=\"timesketch\"\n+$POSTGRES_PASSWORD= (-join(1..42 | ForEach {((65..90)+(97..122)+(\".\") | % {[char]$_})+(0..9)+(\".\") | Get-Random}))\n+$POSTGRES_ADDRESS=\"postgres\"\n+$POSTGRES_PORT=\"5432\"\n+$SECRET_KEY=(-join(1..42 | ForEach {((65..90)+(97..122)+(\".\") | % {[char]$_})+(0..9)+(\".\") | Get-Random}))\n+$ELASTIC_ADDRESS=\"elasticsearch\"\n+$ELASTIC_PORT=\"9200\"\n+$REDIS_ADDRESS=\"redis\"\n+$REDIS_PORT=\"6379\"\n+$GITHUB_BASE_URL=\"https://raw.githubusercontent.com/google/timesketch/master\"\n+# The command below will take half of the system memory. This can be changed to whatever suits you. More the merrier for the ES though.\n+$ELASTIC_MEM_USE_GB=(Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb / 2\n+Write-Host \"OK\"\n+Write-Host \"Setting Elasticsearch memory allocation to $ELASTIC_MEM_USE_GB GB\"\n+\n+\n+# Docker compose and configuration\n+Write-Host \"* Fetching configuration files..\"\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/docker/release/docker-compose.yml).Content > timesketch\\docker-compose.yml\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/docker/release/config.env).Content > timesketch\\config.env\n+\n+# Fetch default Timesketch config files\n+# The encoding is set as UTF8NoBOM as otherwise the dockers can't read the configurations right.\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/timesketch.conf).Content | out-file timesketch\\etc\\timesketch\\timesketch.conf -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/tags.yaml).Content | out-file timesketch\\etc\\timesketch\\tags.yaml -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/plaso.mappings).Content | out-file timesketch\\etc\\timesketch\\plaso.mappings -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/generic.mappings).Content | out-file timesketch\\etc\\timesketch\\generic.mappings -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/features.yaml).Content | out-file timesketch\\etc\\timesketch\\features.yaml -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/sigma_config.yaml).Content | out-file timesketch\\etc\\timesketch\\sigma_config.yaml -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/data/sigma/rules/lnx_susp_zenmap.yml).Content | out-file timesketch\\etc\\timesketch\\sigma\\rules\\lnx_susp_zenmap.yml -encoding UTF8NoBOM\n+(Invoke-webrequest -URI $GITHUB_BASE_URL/contrib/nginx.conf).Content | out-file timesketch\\etc\\nginx.conf -encoding UTF8NoBOM\n+Write-Host \"OK\"\n+\n+# Create a minimal Timesketch config\n+Write-Host \"* Edit configuration files.\"\n+$timesketchconf = 'timesketch\\etc\\timesketch\\timesketch.conf'\n+$convfenv = 'timesketch\\config.env'\n+(Get-Content $timesketchconf).replace(\"SECRET_KEY = '<KEY_GOES_HERE>'\", \"SECRET_KEY = '$SECRET_KEY'\") | Set-Content $timesketchconf\n+\n+# Set up the Elastic connection\n+(Get-Content $timesketchconf).replace(\"ELASTIC_HOST = '127.0.0.1'\", \"ELASTIC_HOST = '$ELASTIC_ADDRESS'\") | Set-Content $timesketchconf\n+(Get-Content $timesketchconf).replace(\"ELASTIC_PORT = 9200\", \"ELASTIC_PORT = $ELASTIC_PORT\") | Set-Content $timesketchconf\n+\n+# Set up the Redis connection\n+(Get-Content $timesketchconf).replace(\"UPLOAD_ENABLED = False\", \"UPLOAD_ENABLED = True\") | Set-Content $timesketchconf\n+(Get-Content $timesketchconf).replace(\"UPLOAD_FOLDER = '/tmp'\", \"UPLOAD_FOLDER = '/usr/share/timesketch/upload'\") | Set-Content $timesketchconf\n+\n+(Get-Content $timesketchconf).replace(\"CELERY_BROKER_URL = 'redis://127.0.0.1:6379'\", \"CELERY_BROKER_URL = 'redis://$($REDIS_ADDRESS):$($REDIS_PORT)'\") | Set-Content $timesketchconf\n+(Get-Content $timesketchconf).replace(\"CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379'\", \"CELERY_RESULT_BACKEND = 'redis://$($REDIS_ADDRESS):$($REDIS_PORT)'\") | Set-Content $timesketchconf\n+\n+# Set up the Postgres connection\n+(Get-Content $timesketchconf).replace(\"SQLALCHEMY_DATABASE_URI = 'postgresql://<USERNAME>:<PASSWORD>@localhost/timesketch'\", \"SQLALCHEMY_DATABASE_URI = 'postgresql://$($POSTGRES_USER):$($POSTGRES_PASSWORD)@$($POSTGRES_ADDRESS):$($POSTGRES_PORT)/timesketch'\") | Set-Content $timesketchconf\n+\n+(Get-Content $convfenv).replace(\"POSTGRES_PASSWORD=\", \"POSTGRES_PASSWORD=$POSTGRES_PASSWORD\") | Set-Content $convfenv\n+(Get-Content $convfenv).replace(\"ELASTIC_MEM_USE_GB=\", \"ELASTIC_MEM_USE_GB=$ELASTIC_MEM_USE_GB\") | Set-Content $convfenv\n+\n+copy-item -Path $convfenv -Destination timesketch\\.env\n+Write-Host \"OK\"\n+Write-Host \"* Installation done.\"\n+\n+Write-Host \"--\"\n+Write-Host \"--\"\n+Write-Host \"--\"\n+Write-Host \"Start the system:\"\n+Write-Host \"1. cd timesketch\"\n+Write-Host \"2. docker-compose up -d\"\n+Write-Host \"3. docker-compose exec timesketch-web tsctl add_user --username <USERNAME>\"\n+Write-Host \"--\"\n+Write-Host \"WARNING: The server is running without encryption.\"\n+Write-Host \"Follow the instructions to enable SSL to secure the communications:\"\n+Write-Host \"https://github.com/google/timesketch/blob/master/docs/Installation.md\"\n"
}
] | Python | Apache License 2.0 | google/timesketch | Added deploy_timesketch.ps1 (#1953)
Fixes #1082
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,093 | 11.10.2021 13:06:04 | -7,200 | 3ebbd094548abe163fb4a49b92e9908897473a2e | Adding docs on how to update docs site | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/README.md",
"diff": "+# Documentation\n+\n+This is the place for user facing documentation. This is the source for the public site https://timesketch.org/\n+\n+## Adding/edit docs\n+\n+We are using a site generation tool called mkdocs. It is fully automated using GH actions.\n+To update or add new content you edit the files under this directory (/docs/). When the code is merged to the master branch it will automatically be build and deployed.\n+\n+## Preview changes locally before opening a PR\n+\n+In your development container navigate to the root directory of the repo:\n+\n+```\n+cd /usr/local/src/timesketch/\n+```\n+\n+Install mkdocs in your container:\n+\n+```\n+pip3 install mkdocs mkdocs-material\n+```\n+\n+Start the preview webserver:\n+\n+```\n+mkdocs serve\n+```\n+\n+Access your generated docs at http://127.0.0.1:8000/\n"
}
] | Python | Apache License 2.0 | google/timesketch | Adding docs on how to update docs site (#1971) |
263,093 | 14.10.2021 16:09:15 | -7,200 | fdfd0fbb324222df7f96834b249bad929d9b1296 | Remoce nav and toc from main page | [
{
"change_type": "MODIFY",
"old_path": "docs/index.md",
"new_path": "docs/index.md",
"diff": "+---\n+hide:\n+ - navigation\n+ - toc\n+---\n+\n# Timesketch\nTimesketch is an open-source tool for collaborative forensic timeline analysis. Using sketches you and your collaborators can easily organize your timelines and analyze them all at the same time. Add meaning to your raw data with rich annotations, comments, tags and stars.\n"
},
{
"change_type": "MODIFY",
"old_path": "mkdocs.yml",
"new_path": "mkdocs.yml",
"diff": "@@ -3,7 +3,8 @@ use_directory_urls: true\nextra_css:\n- assets/css/extra.css\nmarkdown_extensions:\n- - attr_list\n+ - meta\n+\nnav:\n- Home: index.md\n- User Guide:\n@@ -44,6 +45,7 @@ plugins:\n\"getting-started/install.md\": \"admin-guide/install.md\"\n\"getting-started/sizing.md\": \"admin-guide/sizing.md\"\n\"getting-started/upload-data.md\": \"user-guide/upload-data.md\"\n+\ntheme:\nname: material\nlogo: assets/images/timesketch-color.svg\n"
}
] | Python | Apache License 2.0 | google/timesketch | Remoce nav and toc from main page (#1982) |
263,096 | 27.10.2021 16:56:34 | -7,200 | d282b8955dc1fc1e0aafc7876b4fa19cb450bf3b | add ParentImage to the sigma mapping | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -307,3 +307,4 @@ fieldmappings:\nHostName: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\nHostApplication: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\ngcp.audit.method_name: methodName\n+ ParentImage: xml_string\n\\ No newline at end of file\n"
}
] | Python | Apache License 2.0 | google/timesketch | add ParentImage to the sigma mapping (#1996) |
263,096 | 02.11.2021 14:47:05 | -3,600 | 1e33109f2394e89198c04aa0c251519ff6577312 | fix a testadd restarting services to the doc | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/getting-started.md",
"new_path": "docs/developers/getting-started.md",
"diff": "@@ -93,6 +93,16 @@ In a new shell, run the following:\n$ docker-compose exec timesketch celery -A timesketch.lib.tasks worker --loglevel info\n```\n+### Restarting\n+\n+To restart the webserver and celery workers, stop the execution. Depending on your system `ctrl+c` will do it.\n+Then start them both as outlined before with:\n+\n+```bash\n+$ docker-compose exec timesketch gunicorn --reload -b 0.0.0.0:5000 --log-file - --timeout 120 timesketch.wsgi:application\n+$ docker-compose exec timesketch celery -A timesketch.lib.tasks worker --loglevel info\n+```\n+\n## API development\nExposing new functionality via the API starts at `/timesketch/api/v1/routes.py`. In that file the different routes / endpoints are defined that can be used.\n"
}
] | Python | Apache License 2.0 | google/timesketch | fix a testadd restarting services to the doc (#2004) |
263,096 | 09.11.2021 16:18:54 | -3,600 | d42cddc70ce8df24080e844bebb429003e2e122f | fix csv | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_blocklist.csv",
"new_path": "data/sigma_blocklist.csv",
"diff": "@@ -81,8 +81,8 @@ powershell_xor_commandline.yml, good, no sample data,2021-05-04,\nwin_powershell_web_request.yml, bad, multiple rules in one file,2021-05-04,\nwindows/process_access/sysmon_,bad,no test data available,2021-05-04,\nwindows/process_creation/,bad,no test data available,2021-05-04,\n-windows/process_creation/win_office_shell.yml,good,479eb1c4644de672a5b221c6ad19b5b1cbd2875b45af76a291e9ff594d651b68,2021-10-25\n-rules/windows/process_creation/win_shadow_copies_deletion.yml, good,62a8fc79a775abce91c4cb87c7f3cdc4cbdf85d0f0083c72703052710d645119,2021-10-25\n+windows/process_creation/win_office_shell.yml,good,479eb1c4644de672a5b221c6ad19b5b1cbd2875b45af76a291e9ff594d651b68,2021-10-25,\n+rules/windows/process_creation/win_shadow_copies_deletion.yml, good,62a8fc79a775abce91c4cb87c7f3cdc4cbdf85d0f0083c72703052710d645119,2021-10-25,\nrules/windows/registry_event/sysmon_asep_reg_keys_modification.yml, bad,to long query needs to be tuned 0628997695cf9655c523896f1703472cee08b66eb5ae6bd385433b73105f4ca9,2021-10-26,17f878b8-9968-4578-b814-c4217fc5768c\nrules/windows/process_creation/win_non_interactive_powershell.yml,good,good 0628997695cf9655c523896f1703472cee08b66eb5ae6bd385433b73105f4ca9,2021-10-26,f4bbd493-b796-416e-bbf2-121235348529\nrules/windows/registry_event/sysmon_susp_download_run_key.yml,bad,no evtx sample found,2021-10-26,9c5037d1-c568-49b3-88c7-9846a5bdc2be\n"
}
] | Python | Apache License 2.0 | google/timesketch | fix csv (#2014) |
263,096 | 09.11.2021 18:19:25 | -3,600 | 09f384de08ca05b9bbbf91c3951951966965e73e | another missing column | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_blocklist.csv",
"new_path": "data/sigma_blocklist.csv",
"diff": "@@ -179,4 +179,4 @@ sysmon_wsman_provider_image_load.yml,bad, Failed to parse query,2021-05-05,\nrules/windows/file_event/sysmon_susp_desktop_ini.yml,good,9ac87754adb88a8ac14969bb4adaed043f783d7264d0846365ca0cf4b7f80ffb,2021-10-26,81315b50-6b60-4d8f-9928-3466e1022515\nrules/windows/file_event/sysmon_startup_folder_file_write.yml,bad,no good sample found 9ac87754adb88a8ac14969bb4adaed043f783d7264d0846365ca0cf4b7f80ffb,2021-10-26,2aa0a6b4-a865-495b-ab51-c28249537b75\nrules/windows/process_creation/sysmon_always_install_elevated_windows_installer.yml,bad,no good sample found e5874027b483a6bcac952f302eedcadb59f858e9d7cc1f89b08102c8dbc69160,2021-10-26,cd951fdc-4b2f-47f5-ba99-a33bf61e3770\n-rules/windows/process_creation/win_susp_svchost.yml,cc565bd2909f2889f8369939c3b932030f4dddba3b52ec17a2b4961144b05aa6,2021-10-26,01d2e2a1-5f09-44f7-9fc1-24faa7479b6d\n+rules/windows/process_creation/win_susp_svchost.yml,good,cc565bd2909f2889f8369939c3b932030f4dddba3b52ec17a2b4961144b05aa6,2021-10-26,01d2e2a1-5f09-44f7-9fc1-24faa7479b6d\n"
}
] | Python | Apache License 2.0 | google/timesketch | another missing column (#2015) |
263,137 | 09.11.2021 14:46:28 | 18,000 | a1dfadc077f4fc2220a8d74de95e3003d7b99fa3 | Fixed broken/outdated documentation URLs | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -27,23 +27,23 @@ Timesketch is an open-source tool for collaborative forensic timeline analysis.\n## Getting started\n#### Installation\n-* [Install Timesketch](docs/getting-started/install.md)\n+* [Install Timesketch](docs/guides/admin/install.md)\n#### Adding timelines\n-* [Upload data](docs/getting-started/upload-data.md)\n+* [Upload data](docs/guides/user/import-from-json-csv.md)\n#### Using Timesketch\n-* [Users guide](docs/learn/basic-concepts.md)\n+* [Users guide](docs/guides/user/basic-concepts.md)\n#### Adding a Notebook Container\n-* [Installation](docs/learn/notebook.md)\n+* [Installation](docs/guides/user/notebook.md)\n## Community\n* [Community guide](docs/community/resources.md)\n## Contributing\n* [Prerequisites](CONTRIBUTING.md)\n-* [Developers guide](docs/developers/developer-guide.md)\n+* [Developers guide](docs/developers/getting-started.md)\n---\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/developers/analyzer-development.md",
"new_path": "docs/developers/analyzer-development.md",
"diff": "@@ -35,7 +35,7 @@ analyzer_run.py: error: the following arguments are required: PATH_TO_ANALYZER,\nYou can create your sample data either in CSV or JSONL with the same format\nthat Timesketch can ingest. To learn more about that visit\n-[CreateTimelineFromJSONorCSV](/user-guide/create-timeline-from-json-csv/)\n+[CreateTimelineFromJSONorCSV](/guides/user/import-from-json-csv/)\n### use existing sample data\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/developers/api-upload-data.md",
"new_path": "docs/developers/api-upload-data.md",
"diff": "# Create Timeline From Other Sources\nNot all data comes in a good [CSV or JSONL\n-format](/user-guide/create-timeline-from-json-csv/) that can be imported\n+format](/guides/user/import-from-json-csv/) that can be imported\ndirectly into Timesketch. Your data may lie in a SQL database, Excel sheet, or\neven in CSV/JSON but it does not have the correct fields in it. In those cases\nit might be beneficial to have a separate importer in Timesketch that can deal\n@@ -94,7 +94,7 @@ Timestamp What URL Results\nHere we have a data frame that we may want to add to our Timesketch instance.\nWhat is missing here are few of the necessary columns, see\n-[documentation](/user-guide/create-timeline-from-json-csv/). We don't really need to\n+[documentation](/guides/user/import-from-json-csv/). We don't really need to\nadd them here, we can do that all in our upload stream. Let's start by\nconnecting to a Timesketch instance.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/developers/getting-started.md",
"new_path": "docs/developers/getting-started.md",
"diff": "@@ -140,7 +140,7 @@ To test mkdocs locally, run the following in your container:\n```shell\n! cd /usr/local/src/timesketch\n-! pip3 install mkdocs mkdocs-material\n+! pip3 install mkdocs mkdocs-material mkdocs-redirects\n! mkdocs serve\n```\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/admin/install.md",
"new_path": "docs/guides/admin/install.md",
"diff": "@@ -138,4 +138,4 @@ Congratulations, your Timesketch system is operational and ready to use.\n## Set up users\n-After system is set up, look at [here](/docs/sysadmin/tsctl.html) to add users.\n\\ No newline at end of file\n+After system is set up, look at [here](/guides/admin/admin-cli/) to add users.\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/getting-started.md",
"new_path": "docs/guides/getting-started.md",
"diff": "@@ -10,19 +10,19 @@ hide:\nIf you don't have your own Timesketch server yet the first step is to install one.\nFollow these instructions to get started:\n-- [Installing Timesketch](../admin/install/)\n+- [Installing Timesketch](admin/install.md)\n## Uploading your first timeline\nWhen you have a Timesketch server setup it is time to upload some data.\nTimesketch supports Plaso storage files as well as CSV and JSON formatted files.\n-- [Uploading timelines to Timesketch](../user/upload-data/)\n-- [Creating a timeline from JSON or CSV](../user/import-from-json-csv/)\n+- [Uploading timelines to Timesketch](user/upload-data.md)\n+- [Creating a timeline from JSON or CSV](user/import-from-json-csv.md)\n## Search and explore\nWhen you have timelines uploaded to you server it is time to learn how to search and explore your data.\nTake a look there to get started:\n-- [Search query guide](../user/search-query-guide/)\n+- [Search query guide](user/search-query-guide.md)\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/import-from-json-csv.md",
"new_path": "docs/guides/user/import-from-json-csv.md",
"diff": "@@ -28,4 +28,4 @@ Unlike JSON files, imports in JSONL format can be streamed from disk, making the\nTo create a new timeline in Timesketch you need to upload it to the server.\n-[See here for instructions to do so](/guides/getting-started/upload-data/)\n+[See here for instructions to do so](/guides/user/upload-data/)\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/upload-data.md",
"new_path": "docs/guides/user/upload-data.md",
"diff": "@@ -69,4 +69,4 @@ appears below the timelines.\nThe importer client defines an importer library that is used to help with\nfile or data uploads. This is documented further\n-[here](/docs/developers/api-upload-data.md)\n+[here](/developers/api-upload-data/)\n"
},
{
"change_type": "MODIFY",
"old_path": "mkdocs.yml",
"new_path": "mkdocs.yml",
"diff": "@@ -46,15 +46,15 @@ nav:\nplugins:\n- redirects:\nredirect_maps:\n- \"learn/basic-concepts.md\": \"user-guide/basic-concepts.md\"\n- \"learn/sketch-overview.md\": \"user-guide/sketch-overview.md\"\n- \"learn/search-query-guide.md\": \"user-guide/search-query-guide.md\"\n- \"learn/notebook.md\": \"user-guide/notebook.md\"\n- \"learn/create-timeline-from-json-csv.md\": \"user-guide/create-timeline-from-json-csv.md\"\n- \"learn/sigma.md\": \"user-guide/sigma.md\"\n- \"getting-started/install.md\": \"admin-guide/install.md\"\n- \"getting-started/sizing.md\": \"admin-guide/sizing.md\"\n- \"getting-started/upload-data.md\": \"user-guide/upload-data.md\"\n+ \"learn/basic-concepts.md\": \"guides/user/basic-concepts.md\"\n+ \"learn/sketch-overview.md\": \"guides/user/sketch-overview.md\"\n+ \"learn/search-query-guide.md\": \"guides/user/search-query-guide.md\"\n+ \"learn/notebook.md\": \"guides/user/notebook.md\"\n+ \"learn/create-timeline-from-json-csv.md\": \"guides/user/import-from-json-csv.md\"\n+ \"learn/sigma.md\": \"guides/user/sigma.md\"\n+ \"getting-started/install.md\": \"guides/admin/install.md\"\n+ \"getting-started/sizing.md\": \"guides/admin/scaling-and-limits.md\"\n+ \"getting-started/upload-data.md\": \"guides/user/upload-data.md\"\ntheme:\nname: material\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Overview.vue",
"new_path": "timesketch/frontend/src/views/Overview.vue",
"diff": "@@ -120,7 +120,7 @@ limitations under the License.\nSupported formats are Plaso storage file, JSON(L), or a CSV file. If you are uploading a CSV or JSON(L)\nfile make sure to read the\n<a\n- href=\"https://github.com/google/timesketch/blob/master/docs/Users-Guide.md#adding-timelines\"\n+ href=\"https://github.com/google/timesketch/blob/master/docs/guides/user/import-from-json-csv.md\"\nrel=\"noreferrer\"\ntarget=\"_blank\"\n>documentation</a\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fixed broken/outdated documentation URLs (#2017)
Co-authored-by: Juan Leaniz <leaniz@google.com> |
263,147 | 09.11.2021 19:53:31 | 0 | 15082210e561e8adb17308621b0bbecb186bf64c | added date search examples | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/search-query-guide.md",
"new_path": "docs/guides/user/search-query-guide.md",
"diff": "@@ -174,8 +174,20 @@ Below are syntax elements and example regular expressions\n+### Date Related Searches\n+| Description |Example Query |\n+|------------------------|------------------------------------------------------------|\n+| Date Ranges | datetime:[2021-08-29 TO 2021-08-31] |\n+| Date prior to | datetime:[* TO 2021-08-29] |\n+| Dates after | datetime:[2021-08-31 TO *] |\n+| Either side of a range | datetime:[* TO 2021-08-29] OR datetime:[2021-08-31 TO *] |\n+\n+Now that we can handle dates in the query bar, we can start building more complex queries.\n+This query will find all the potential Remote Desktop event log entries in the given date range.\n+\n+`data_type:\"windows:evtx:record\" AND event_identifier:4624 AND xml_string:\"/LogonType\\\"\\>3/\" AND datetime:[2021-08-29 TO 2021-08-31]`\n### Advanced search\n"
}
] | Python | Apache License 2.0 | google/timesketch | added date search examples (#2013)
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com>
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,093 | 12.11.2021 13:20:54 | -3,600 | 1917d0821e0ce1c86f99abe5d023b0ef31730813 | Generate graph for a timeline | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Graph/Graph.vue",
"new_path": "timesketch/frontend/src/components/Graph/Graph.vue",
"diff": "@@ -56,6 +56,29 @@ limitations under the License.\n</ts-dropdown>\n</div>\n+ <ts-dropdown>\n+ <template v-slot:dropdown-trigger-element>\n+ <a class=\"button ts-search-dropdown\" style=\"background-color: transparent;\">\n+ <span v-if=\"currentGraphCacheConfig.filter.timelineIds.length\">\n+ {{ getTimelineFromId(currentGraphCacheConfig.filter.timelineIds[0])[0].name }}\n+ </span>\n+ <strong v-else>Choose timeline</strong>\n+ <b-icon icon=\"chevron-down\" style=\"font-size: 0.6em;\"></b-icon>\n+ </a>\n+ </template>\n+\n+ <div\n+ class=\"ts-dropdown-item\"\n+ v-for=\"timeline in sketch.timelines\"\n+ :key=\"timeline.id\"\n+ v-on:click=\"buildGraph(currentGraph)\"\n+ >\n+ <router-link :to=\"{ name: 'GraphExplore', query: { plugin: currentGraph, timeline: timeline.id } }\">{{\n+ timeline.name\n+ }}</router-link>\n+ </div>\n+ </ts-dropdown>\n+\n<input\nclass=\"ts-search-input\"\nv-if=\"currentGraph\"\n@@ -191,8 +214,8 @@ limitations under the License.\n.local()\n.fromNow()\n}}</i\n- ></span\n>\n+ </span>\n<a\nclass=\"is-small\"\nstyle=\"text-decoration: underline; margin-left:15px;\"\n@@ -201,6 +224,13 @@ limitations under the License.\n<span>Refresh</span>\n</a>\n</span>\n+ <span\n+ style=\"color:red; margin-left:20px;\"\n+ v-for=\"timelineId in currentGraphCacheConfig.filter.timelineIds\"\n+ :key=\"timelineId\"\n+ >\n+ Note: Graph generated for timeline: {{ getTimelineFromId(timelineId)[0].name }}\n+ </span>\n</div>\n</div>\n</div>\n@@ -241,6 +271,7 @@ export default {\nsavedGraphs: [],\ncurrentGraph: '',\ncurrentGraphCache: {},\n+ currentGraphCacheConfig: {},\nselectedGraphs: [],\nfadeOpacity: 7,\nelements: [],\n@@ -405,13 +436,20 @@ export default {\n}, 600)\nthis.edgeQuery = ''\nlet currentIndices = []\n+ let timelineIds = []\n+ if (this.$route.query.timeline) {\n+ timelineIds.push(parseInt(this.$route.query.timeline))\n+ refresh = true\n+ } else {\nthis.sketch.timelines.forEach(timeline => {\ncurrentIndices.push(timeline.searchindex.index_name)\n})\n- ApiClient.generateGraphFromPlugin(this.sketch.id, this.currentGraph, currentIndices, refresh)\n+ }\n+ ApiClient.generateGraphFromPlugin(this.sketch.id, this.currentGraph, currentIndices, timelineIds, refresh)\n.then(response => {\nlet graphCache = response.data['objects'][0]\nlet elementsCache = JSON.parse(graphCache.graph_elements)\n+ let configCache = JSON.parse(graphCache.graph_config)\nlet elements = []\nlet nodes\nlet edges\n@@ -431,6 +469,7 @@ export default {\n})\ndelete graphCache.graph_elements\nthis.currentGraphCache = graphCache\n+ this.currentGraphCacheConfig = configCache\nthis.elements = elements\nclearTimeout(this.loadingTimeout)\nthis.showGraph = true\n@@ -630,6 +669,9 @@ export default {\n.update()\n}\n},\n+ getTimelineFromId(id) {\n+ return this.sketch.timelines.filter(timeline => timeline.id === id)\n+ },\n},\ncreated() {\nwindow.addEventListener(\n@@ -660,6 +702,7 @@ export default {\nthis.params = {\ngraphId: this.$route.query.graph,\npluginName: this.$route.query.plugin,\n+ timelineId: this.$route.query.timeline,\n}\nif (this.params.graphId) {\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/utils/RestApiClient.js",
"new_path": "timesketch/frontend/src/utils/RestApiClient.js",
"diff": "@@ -281,16 +281,20 @@ export default {\ngetLoggedInUser() {\nreturn RestApiClient.get('/users/me/')\n},\n- generateGraphFromPlugin(sketchId, graphPlugin, currentIndices, refresh) {\n+ generateGraphFromPlugin(sketchId, graphPlugin, currentIndices, timelineIds, refresh) {\nlet formData = {\nplugin: graphPlugin,\nconfig: {\nfilter: {\nindices: currentIndices,\n+ timelineIds: timelineIds,\n},\n},\nrefresh: refresh,\n}\n+ if (timelineIds.length) {\n+ formData['timeline_ids'] = timelineIds\n+ }\nreturn RestApiClient.post('/sketches/' + sketchId + /graph/, formData)\n},\ngetGraphPluginList() {\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/graphs/interface.py",
"new_path": "timesketch/lib/graphs/interface.py",
"diff": "@@ -142,6 +142,7 @@ class BaseGraphElement:\nReturns:\nMD5 hash (str): MD5 hash of the provided label.\n\"\"\"\n+\nid_string = self.attributes.get('id', self.label)\nreturn hashlib.md5(id_string.encode('utf-8')).hexdigest()\n"
}
] | Python | Apache License 2.0 | google/timesketch | Generate graph for a timeline (#2027) |
263,096 | 12.11.2021 22:33:34 | -3,600 | b027bf370bb964a5ae039c0a80429cf54ec28862 | make it clear to which ID the timeline is uploaded | [
{
"change_type": "MODIFY",
"old_path": "importer_client/python/tools/timesketch_importer.py",
"new_path": "importer_client/python/tools/timesketch_importer.py",
"diff": "@@ -484,7 +484,7 @@ def main(args=None):\ncontinue\nprint('[DONE]')\n- print(f'Timeline uploaded to ID: {timeline.id}.')\n+ print(f'Timeline uploaded to Timeline Id: {timeline.id}.')\ntask_state = 'Unknown'\ntask_list = ts_client.check_celery_status(task_id)\n"
}
] | Python | Apache License 2.0 | google/timesketch | make it clear to which ID the timeline is uploaded (#2030) |
263,130 | 19.11.2021 18:17:05 | -39,600 | 900a18c4c2baf1839d3e57ed0989dfb269a62b00 | Update sketch.py
Update API documentation to reflect new location of the ontology.yaml file | [
{
"change_type": "MODIFY",
"old_path": "api_client/python/timesketch_api_client/sketch.py",
"new_path": "api_client/python/timesketch_api_client/sketch.py",
"diff": "@@ -232,7 +232,7 @@ class Sketch(resource.BaseResource):\nvalues (list): A list of values (in their correct type according\nto the ontology).\nontology (str): The ontology (matches with\n- /etc/ontology.yaml), which defines how the attribute\n+ /data/ontology.yaml), which defines how the attribute\nis interpreted.\nRaises:\n@@ -270,7 +270,7 @@ class Sketch(resource.BaseResource):\nname (str): The name of the attribute.\nvalue (str): Value of the attribute, stored as a string.\nontology (str): The ontology (matches with\n- /etc/timesketch/ontology.yaml), which defines\n+ /data/ontology.yaml), which defines\nhow the attribute is interpreted.\nRaises:\n@@ -322,7 +322,7 @@ class Sketch(resource.BaseResource):\nArgs:\nname (str): The name of the attribute.\nontology (str): The ontology (matches with\n- /etc/ontology.yaml), which defines how the attribute\n+ /data/ontology.yaml), which defines how the attribute\nis interpreted.\nRaises:\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update sketch.py (#2036)
Update API documentation to reflect new location of the ontology.yaml file |
263,096 | 24.11.2021 17:00:56 | -3,600 | bb0ca63130e2044ed5e1049c0a4ce98fffad39e3 | mention celery job checking
Add some celery worker troubleshooting | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/admin/troubleshooting.md",
"new_path": "docs/guides/admin/troubleshooting.md",
"diff": "@@ -124,6 +124,19 @@ See your console output if you started the workers with:\ndocker exec -it $CONTAINER_ID celery -A timesketch.lib.tasks worker --loglevel=debug\n```\n+It is possible to see current running jobs with:\n+\n+```shell\n+docker exec -it $CONTAINER_ID celery -A timesketch.lib.tasks inspect active\n+```\n+\n+Which will give a list of tasks, individual tasks that are running can be then checked with\n+```shell\n+docker exec -it $CONTAINER_ID celery -A timesketch.lib.tasks inspect query_task $TASKID\n+```\n+\n+Where $TASKID is the id that was shown in the previous step.\n+\n### Elasticsearch\n```shell\n"
}
] | Python | Apache License 2.0 | google/timesketch | mention celery job checking (#2046)
Add some celery worker troubleshooting |
263,096 | 01.12.2021 14:44:58 | -3,600 | 7179a44b670187240c57873745fdcefe6ccf445f | Update import-from-json-csv.md | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/import-from-json-csv.md",
"new_path": "docs/guides/user/import-from-json-csv.md",
"diff": "@@ -8,6 +8,10 @@ You can ingest timeline data from a JSONL or CSV file. You can have any number o\n- `datetime` ISO8601 format for example: `2015-07-24T19:01:01+00:00`\n- `timestamp_desc` String explaining what type of timestamp it is for example `file created`\n+## Filename\n+\n+The filename must end with `.csv / .jsonl` otherwise the import will fail.\n+\n## Example CSV file\nYou need to provide the CSV header with the column names as the first line in the file.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update import-from-json-csv.md (#2063) |
263,093 | 20.12.2021 22:03:44 | -3,600 | 232dee4d47871158392fd7770f0937536d6ac7a9 | Change search backend to OpenSearch | [
{
"change_type": "MODIFY",
"old_path": "contrib/deploy_timesketch.ps1",
"new_path": "contrib/deploy_timesketch.ps1",
"diff": "@@ -21,8 +21,8 @@ if ((docker ps | sls timesketch) -ne $null) {\nexit\n}\n-#set the vm.max_map_count for elasticsearch in WSL\n-write-host \"Set the vm.max_map_count for Elasticsearch\"\n+#set the vm.max_map_count for OpenSearch in WSL\n+write-host \"Set the vm.max_map_count for OpenSearch\"\nwsl -d docker-desktop sysctl -w vm.max_map_count=262144\n# Create dirs.\n@@ -30,7 +30,7 @@ wsl -d docker-desktop sysctl -w vm.max_map_count=262144\n[void](New-Item -ItemType Directory -Name timesketch)\n[void](New-Item -ItemType Directory -Name timesketch\\data)\n[void](New-Item -ItemType Directory -Name timesketch\\data\\postgresql)\n-[void](New-Item -ItemType Directory -Name timesketch\\data\\elasticsearch)\n+[void](New-Item -ItemType Directory -Name timesketch\\data\\opensearch)\n[void](New-Item -ItemType Directory -Name timesketch\\logs)\n[void](New-Item -ItemType Directory -Name timesketch\\etc)\n[void](New-Item -ItemType Directory -Name timesketch\\etc\\timesketch)\n@@ -45,15 +45,15 @@ $POSTGRES_PASSWORD= (-join(1..42 | ForEach {((65..90)+(97..122)+(\".\") | % {[char\n$POSTGRES_ADDRESS=\"postgres\"\n$POSTGRES_PORT=\"5432\"\n$SECRET_KEY=(-join(1..42 | ForEach {((65..90)+(97..122)+(\".\") | % {[char]$_})+(0..9)+(\".\") | Get-Random}))\n-$ELASTIC_ADDRESS=\"elasticsearch\"\n-$ELASTIC_PORT=\"9200\"\n+$OPENSEARCH_ADDRESS=\"opensearch\"\n+$OPENSEARCH_PORT=\"9200\"\n$REDIS_ADDRESS=\"redis\"\n$REDIS_PORT=\"6379\"\n$GITHUB_BASE_URL=\"https://raw.githubusercontent.com/google/timesketch/master\"\n# The command below will take half of the system memory. This can be changed to whatever suits you. More the merrier for the ES though.\n-$ELASTIC_MEM_USE_GB=(Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb / 2\n+$OPENSEARCH_MEM_USE_GB=(Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb / 2\nWrite-Host \"OK\"\n-Write-Host \"Setting Elasticsearch memory allocation to $ELASTIC_MEM_USE_GB GB\"\n+Write-Host \"Setting OpenSearch memory allocation to $OPENSEARCH_MEM_USE_GB GB\"\n# Docker compose and configuration\n@@ -80,9 +80,9 @@ $timesketchconf = 'timesketch\\etc\\timesketch\\timesketch.conf'\n$convfenv = 'timesketch\\config.env'\n(Get-Content $timesketchconf).replace(\"SECRET_KEY = '<KEY_GOES_HERE>'\", \"SECRET_KEY = '$SECRET_KEY'\") | Set-Content $timesketchconf\n-# Set up the Elastic connection\n-(Get-Content $timesketchconf).replace(\"ELASTIC_HOST = '127.0.0.1'\", \"ELASTIC_HOST = '$ELASTIC_ADDRESS'\") | Set-Content $timesketchconf\n-(Get-Content $timesketchconf).replace(\"ELASTIC_PORT = 9200\", \"ELASTIC_PORT = $ELASTIC_PORT\") | Set-Content $timesketchconf\n+# Set up the OpenSearch connection\n+(Get-Content $timesketchconf).replace(\"ELASTIC_HOST = '127.0.0.1'\", \"ELASTIC_HOST = '$OPENSEARCH_ADDRESS'\") | Set-Content $timesketchconf\n+(Get-Content $timesketchconf).replace(\"ELASTIC_PORT = 9200\", \"ELASTIC_PORT = $OPENSEARCH_PORT\") | Set-Content $timesketchconf\n# Set up the Redis connection\n(Get-Content $timesketchconf).replace(\"UPLOAD_ENABLED = False\", \"UPLOAD_ENABLED = True\") | Set-Content $timesketchconf\n@@ -95,7 +95,7 @@ $convfenv = 'timesketch\\config.env'\n(Get-Content $timesketchconf).replace(\"SQLALCHEMY_DATABASE_URI = 'postgresql://<USERNAME>:<PASSWORD>@localhost/timesketch'\", \"SQLALCHEMY_DATABASE_URI = 'postgresql://$($POSTGRES_USER):$($POSTGRES_PASSWORD)@$($POSTGRES_ADDRESS):$($POSTGRES_PORT)/timesketch'\") | Set-Content $timesketchconf\n(Get-Content $convfenv).replace(\"POSTGRES_PASSWORD=\", \"POSTGRES_PASSWORD=$POSTGRES_PASSWORD\") | Set-Content $convfenv\n-(Get-Content $convfenv).replace(\"ELASTIC_MEM_USE_GB=\", \"ELASTIC_MEM_USE_GB=$ELASTIC_MEM_USE_GB\") | Set-Content $convfenv\n+(Get-Content $convfenv).replace(\"OPENSEARCH_MEM_USE_GB=\", \"OPENSEARCH_MEM_USE_GB=$OPENSEARCH_MEM_USE_GB\") | Set-Content $convfenv\ncopy-item -Path $convfenv -Destination timesketch\\.env\nWrite-Host \"OK\"\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/e2e/docker-compose.yml",
"new_path": "docker/e2e/docker-compose.yml",
"diff": "@@ -6,8 +6,8 @@ services:\n- POSTGRES_PASSWORD=password\n- POSTGRES_ADDRESS=postgres\n- POSTGRES_PORT=5432\n- - ELASTIC_ADDRESS=opensearch\n- - ELASTIC_PORT=9200\n+ - OPENSEARCH_ADDRESS=opensearch\n+ - OPENSEARCH_PORT=9200\n- REDIS_ADDRESS=redis\n- REDIS_PORT=6379\n- TIMESKETCH_USER=test\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/e2e/docker-entrypoint.sh",
"new_path": "docker/e2e/docker-entrypoint.sh",
"diff": "@@ -26,13 +26,13 @@ if [ \"$1\" = 'timesketch' ]; then\nexit 1\nfi\n- # Set up the Elastic connection\n- if [ $ELASTIC_ADDRESS ] && [ $ELASTIC_PORT ]; then\n- sed -i 's#ELASTIC_HOST = \\x27127.0.0.1\\x27#ELASTIC_HOST = \\x27'$ELASTIC_ADDRESS'\\x27#' /etc/timesketch/timesketch.conf\n- sed -i 's#ELASTIC_PORT = 9200#ELASTIC_PORT = '$ELASTIC_PORT'#' /etc/timesketch/timesketch.conf\n+ # Set up the OpenSearch connection\n+ if [ $OPENSEARCH_ADDRESS ] && [ $OPENSEARCH_PORT ]; then\n+ sed -i 's#ELASTIC_HOST = \\x27127.0.0.1\\x27#ELASTIC_HOST = \\x27'$OPENSEARCH_ADDRESS'\\x27#' /etc/timesketch/timesketch.conf\n+ sed -i 's#ELASTIC_PORT = 9200#ELASTIC_PORT = '$OPENSEARCH_PORT'#' /etc/timesketch/timesketch.conf\nelse\n# Log an error since we need the above-listed environment variables\n- echo \"Please pass values for the ELASTIC_ADDRESS and ELASTIC_PORT environment variables\"\n+ echo \"Please pass values for the OPENSEARCH_ADDRESS and OPENSEARCH_PORT environment variables\"\nfi\n# Set up the Redis connection\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/release/config.env",
"new_path": "docker/release/config.env",
"diff": "@@ -9,11 +9,11 @@ NUM_WSGI_WORKERS=4\n# Log level for import and analysis workers.\nWORKER_LOG_LEVEL=info\n-# Version of Elasticsearch to run\n-ELASTIC_VERSION=7.10.2\n+# Version of OpenSerach to run\n+OPENSEARCH_VERSION=1.2.2\n-# How much memory to give Elasticsearch. Rule: RAM / 2, but no more than 32GB.\n-ELASTIC_MEM_USE_GB=\n+# How much memory to give OpenSearch. Rule: RAM / 2, but no more than 32GB.\n+OPENSEARCH_MEM_USE_GB=\n# PostgreSQL version to run.\nPOSTGRES_VERSION=13.0-alpine\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/release/docker-compose.yml",
"new_path": "docker/release/docker-compose.yml",
"diff": "-version: '3.7'\n+version: \"3.7\"\nservices:\ntimesketch-web:\nimage: us-docker.pkg.dev/osdfir-registry/timesketch/timesketch:${TIMESKETCH_VERSION}\n@@ -28,10 +28,27 @@ services:\n- discovery.type=single-node\n- bootstrap.memory_lock=true\n- TAKE_FILE_OWNERSHIP=1\n- - ES_JAVA_OPTS=-Xms${ELASTIC_MEM_USE_GB}g -Xmx${ELASTIC_MEM_USE_GB}g\n+\n+ restart: always\n+\n+ opensearch:\n+ image: opensearchproject/opensearch:${OPENSEARCH_VERSION}\nrestart: always\n+ environment:\n+ - TAKE_FILE_OWNERSHIP=1\n+ - discovery.type=single-node\n+ - \"DISABLE_INSTALL_DEMO_CONFIG=true\"\n+ - \"DISABLE_SECURITY_PLUGIN=true\" # TODO: Enable when we have migrated the python client to Opensearch as well.\n+ - \"OPENSEARCH_JAVA_OPTS=-Xms${OPENSEARCH_MEM_USE_GB}g -Xmx${OPENSEARCH_MEM_USE_GB}g\"\n+ ulimits:\n+ memlock:\n+ soft: -1\n+ hard: -1\n+ nofile:\n+ soft: 65536\n+ hard: 65536\nvolumes:\n- - ./data/elasticsearch:/usr/share/elasticsearch/data/\n+ - ./data/opensearch:/usr/share/opensearch/data/\npostgres:\nimage: postgres:${POSTGRES_VERSION}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Change search backend to OpenSearch (#2086) |
263,093 | 20.12.2021 22:13:32 | -3,600 | b74fa03ed6f285230a7524188997126597599931 | Update scaling-and-limits.md | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/admin/scaling-and-limits.md",
"new_path": "docs/guides/admin/scaling-and-limits.md",
"diff": "@@ -12,13 +12,13 @@ These are the limitations:\n- Disk size: You can't save larger indexes than the physical hard disk space.\n-## Elastic indices limitation\n+## OpenSearch indices limitation\n-In the past, every timeline in a sketch was a dedicated ElasticSearch Index. In larger installations, Timesketch hit the number of maximum open shards Elastic could handle.\n+In the past, every timeline in a sketch was a dedicated OpenSearch Index. In larger installations, Timesketch hit the number of maximum open shards OpenSearch could handle.\nTherefor a design [https://github.com/google/timesketch/issues/1567](change) was made to tackle those limitations\n- There are maximum number (1500) of shards that can be opened.\n-- There are limitations with Lucene (which Elastic uses) and then Elastic itself, see https://www.elastic.co/guide/en/app-search/current/limits.html and maximum sizes of HTTP requests, hence when Timesketch uploads files they are split up, to avoid HTTP limitations.\n+- There are limitations with Lucene (which OpenSearch uses) and then OpenSearch itself, see https://www.elastic.co/guide/en/app-search/current/limits.html and maximum sizes of HTTP requests, hence when Timesketch uploads files they are split up, to avoid HTTP limitations.\nUsing the `timesketch_importer` the system can be forced to create a dedicated index:\n@@ -47,15 +47,15 @@ The following points are important to increase the performance of a Timesketch s\n- Fast local storrage\n- Memory, the more the better\n-### ElasticSearch\n+### OpenSearch\n-The first thing to scale will be your ES cluster.\n+The first thing to scale will be your OpenSearch cluster.\n-With a decent Elasticsearch deployment you can have hundreds of millions events across many many investigations without issues.\n+With a decent OpenSearch deployment you can have hundreds of millions events across many many investigations without issues.\n-[This article](https://edward-cernera.medium.com/deploy-a-multi-node-elasticsearch-instance-with-docker-compose-ef63625f246e) will give you a good start to scale the ElasticSearch cluster. Be careful to not expose your Cluster to systems other then the Timesketch node(s).\n+[This article](https://edward-cernera.medium.com/deploy-a-multi-node-elasticsearch-instance-with-docker-compose-ef63625f246e) will give you a good start to scale the OpenSearch cluster. Be careful to not expose your Cluster to systems other then the Timesketch node(s).\n-The config and credentials to the ElasticSearch cluster are stored in https://github.com/google/timesketch/blob/master/data/timesketch.conf. If those calues are changed, the Timesketch Instance needs to be restarted.\n+The config and credentials to the OpenSearch cluster are stored in https://github.com/google/timesketch/blob/master/data/timesketch.conf. If those calues are changed, the Timesketch Instance needs to be restarted.\n### Celery workers\n@@ -69,18 +69,18 @@ A potential 3 node (dedicated machines) setup could look like the following:\n```\ntimesketch-1:\n-Elasticsearch 7.x\n+OpenSearch\nRedis\nPostgreSQL 11.x\nDocker: Timesketch Web\nDocker: Timesketch Worker\ntimesketch-2:\n-Elasticsearch 7.x\n+OpenSearch\nDocker: Timesketch Worker\ntimesketch-3:\n-Elasticsearch 7.x\n+OpenSearch\nDocker: Timesketch Worker\n```\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update scaling-and-limits.md |
263,160 | 10.01.2022 14:04:59 | -3,600 | ad926c1c1c7ce034f2d3dc577711b1609565f748 | bugfix 2097 | [
{
"change_type": "MODIFY",
"old_path": "contrib/deploy_timesketch.sh",
"new_path": "contrib/deploy_timesketch.sh",
"diff": "@@ -93,8 +93,8 @@ echo -n \"* Edit configuration files..\"\nsed -i 's#SECRET_KEY = \\x27\\x3CKEY_GOES_HERE\\x3E\\x27#SECRET_KEY = \\x27'$SECRET_KEY'\\x27#' timesketch/etc/timesketch/timesketch.conf\n# Set up the Elastic connection\n-sed -i 's#^ELASTIC_HOST = \\x27127.0.0.1\\x27#ELASTIC_HOST = \\x27'$OPENSEARCH_ADDRESS'\\x27#' timesketch/etc/timesketch/timesketch.conf\n-sed -i 's#^ELASTIC_PORT = 9200#ELASTIC_PORT = '$OPENSEARCH_PORT'#' timesketch/etc/timesketch/timesketch.conf\n+sed -i 's#^OPENSEARCH_HOST = \\x27127.0.0.1\\x27#OPNSEARCH_HOST = \\x27'$OPENSEARCH_ADDRESS'\\x27#' timesketch/etc/timesketch/timesketch.conf\n+sed -i 's#^OPENSEARCH_PORT = 9200#OPENSEARCH_PORT = '$OPENSEARCH_PORT'#' timesketch/etc/timesketch/timesketch.conf\n# Set up the Redis connection\nsed -i 's#^UPLOAD_ENABLED = False#UPLOAD_ENABLED = True#' timesketch/etc/timesketch/timesketch.conf\n"
}
] | Python | Apache License 2.0 | google/timesketch | bugfix 2097 (#2099)
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com> |
263,165 | 12.01.2022 03:12:56 | -39,600 | 43ec555d1331e277dce7154103451cb63bfe6984 | Sketch attributes deleted via the API cannot be re-added by an analyzer
Fixes | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/interface.py",
"new_path": "timesketch/lib/analyzers/interface.py",
"diff": "@@ -464,7 +464,8 @@ class Sketch(object):\ndata/ontology.yaml.\n\"\"\"\n# Check first whether the attribute already exists.\n- attribute = Attribute.query.filter_by(name=name).first()\n+ attribute = Attribute.query.filter_by(\n+ name=name, sketch=self.sql_sketch).first()\nif not attribute:\nattribute = Attribute(\n"
}
] | Python | Apache License 2.0 | google/timesketch | Sketch attributes deleted via the API cannot be re-added by an analyzer (#2101)
Fixes #2051 |
263,129 | 13.01.2022 12:29:11 | -3,600 | 5d4d8d1b42944f9cb41a40eb642a9d0b2339a9a6 | Add intelligence to the navbar | [
{
"change_type": "MODIFY",
"old_path": "mkdocs.yml",
"new_path": "mkdocs.yml",
"diff": "@@ -21,6 +21,7 @@ nav:\n- Interactive notebook: guides/user/notebook.md\n- Import from JSON or CSV: guides/user/import-from-json-csv.md\n- Use Sigma: guides/user/sigma.md\n+ - Intelligence: guides/user/intelligence.md\n- Admin Guide:\n- Installing Timesketch: guides/admin/install.md\n- Scaling and limits: guides/admin/scaling-and-limits.md\n"
}
] | Python | Apache License 2.0 | google/timesketch | Add intelligence to the navbar (#2106)
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,096 | 14.01.2022 16:07:52 | -3,600 | 054faf6ea16f8366b23e3b98bd7c8641f3c2dc63 | Mention two blog post as reading recommendation
* Mention two blog post as reading recommendation
I think it will be beneficial for starters to read up on those two articles before getting started.
* Update basic-concepts.md | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/basic-concepts.md",
"new_path": "docs/guides/user/basic-concepts.md",
"diff": "Timesketch is built on multiple sketches, where one sketch is usually one case.\nEvery sketch can consist of multiple timelines with multiple views.\n+We highly recommend to read two blog post to understand limitations of time and timeline analysis:\n+\n+- [Lets talk about time](https://osdfir.blogspot.com/2021/06/lets-talk-about-time.html)\n+- [pearls and pitfalls of timeline analysis](https://osdfir.blogspot.com/2021/10/pearls-and-pitfalls-of-timeline-analysis.html) before starting your first timeline analysis.\n+\n+This should avoid wrong expectations and help analysts asking the right questions when looking at timelines in Timesketch.\n+\n## Sketches\nThere is a dedicated document to walk you through [Sketches](sketch-overview.md)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Mention two blog post as reading recommendation (#2107)
* Mention two blog post as reading recommendation
I think it will be beneficial for starters to read up on those two articles before getting started.
* Update basic-concepts.md
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,096 | 24.01.2022 22:25:16 | -3,600 | 41fada01cec10960e57be9a569d12412cb23e040 | Mention Common Windows EventLog question in Docu
* Mention Common Windows EventLog question in Docu
from time to time people ask questions about Windows event logs, as there is a good article written by Joachim, I added it to the documentation
* Update search-query-guide.md | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/search-query-guide.md",
"new_path": "docs/guides/user/search-query-guide.md",
"diff": "@@ -213,3 +213,7 @@ Here are some common searches:\n| ---------------------------- | ---------------------------------------------------------------- |\n| EventId 4624 and LogonType 5 | event_identifier:4624 AND \"LogonType\\\">5</Data>\" |\n| Windows File path | \"C:\\\\Users\\\\foobar\\\\Download\\\\folder\\ whitespace\\\\filename.jpeg\" |\n+\n+## Common questions\n+\n+There is a frequent question around Windows Event logs and how they are represented in Timesketch when imported from Plaso. For that we recommend reading up on [Common misconception about Windows EventLogs](https://osdfir.blogspot.com/2021/10/common-misconceptions-about-windows.html)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Mention Common Windows EventLog question in Docu (#2108)
* Mention Common Windows EventLog question in Docu
from time to time people ask questions about Windows event logs, as there is a good article written by Joachim, I added it to the documentation
* Update search-query-guide.md
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,130 | 26.01.2022 03:14:51 | -39,600 | fe4d99381c1ea593e9d03ef643484f2830b13d0f | Update TsIOCMenu.vue
Fix typo | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/Common/TsIOCMenu.vue",
"new_path": "timesketch/frontend/src/components/Common/TsIOCMenu.vue",
"diff": "@@ -143,7 +143,7 @@ export default {\n'intelligence'\n).then(() => {\nSnackbar.open({\n- message: 'Attribtue added successfully',\n+ message: 'Attribute added successfully',\ntype: 'is-white',\nposition: 'is-top',\nactionText: 'View intelligence',\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update TsIOCMenu.vue (#2118)
Fix typo |
263,096 | 25.01.2022 17:15:20 | -3,600 | 7a2962a4afc7b0ddeb016e76b0d8f53f3959a903 | Fix broken link to notebooks
the current notebook link only works if you visit it on Github, but opening it on timesketch.org (where it should be) | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/api-client.md",
"new_path": "docs/developers/api-client.md",
"diff": "@@ -580,4 +580,4 @@ The sketch object can be used to do several other actions that are not documente\n## Examples\n-There are several examples using the API client in the [notebooks folder](../notebooks/) in the Github repository.\n+There are several examples using the API client in the [notebooks folder](https://github.com/google/timesketch/notebooks) in the Github repository.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix broken link to notebooks (#2105)
the current notebook link only works if you visit it on Github, but opening it on timesketch.org (where it should be) |
263,129 | 25.01.2022 17:16:10 | -3,600 | 253bb736a8e17fd5428e9703b9a21285d6b94f98 | Minor changes to intelligence view | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"new_path": "timesketch/frontend/src/components/AppNavbarSecondary.vue",
"diff": "@@ -16,9 +16,9 @@ limitations under the License.\n<template>\n<section\nclass=\"section\"\n- style=\"background-color:var(--navbar-background);padding:0;border-bottom: 1px solid var(--navbar-border-color);\"\n+ style=\"background-color: var(--navbar-background); padding: 0; border-bottom: 1px solid var(--navbar-border-color)\"\n>\n- <div class=\"container is-fluid\" style=\"padding-bottom:0;\">\n+ <div class=\"container is-fluid\" style=\"padding-bottom: 0\">\n<nav class=\"navbar\" role=\"navigation\" aria-label=\"main navigation\">\n<div class=\"navbar-item\" v-if=\"currentAppContext === 'sketch'\">\n<div class=\"tabs is-left\" v-if=\"activeTimelines.length\">\n@@ -74,23 +74,20 @@ limitations under the License.\n>Attributes\n<span\nclass=\"tag is-small\"\n- style=\"background-color:var(--tag-background-color); color:var(--tag-font-color);\"\n+ style=\"background-color: var(--tag-background-color); color: var(--tag-font-color)\"\n>{{ attributeCount }}</span\n>\n</span>\n</router-link>\n</li>\n- <li\n- v-if=\"hasAttributeOntology('intelligence')\"\n- v-bind:class=\"{ 'is-active': currentPage === 'intelligence' }\"\n- >\n+ <li v-bind:class=\"{ 'is-active': currentPage === 'intelligence' }\">\n<router-link :to=\"{ name: 'Intelligence' }\">\n<span class=\"icon is-small\"><i class=\"fas fa-brain\" aria-hidden=\"true\"></i></span>\n<span\n>Intelligence\n<span\nclass=\"tag is-small\"\n- style=\"background-color:var(--tag-background-color); color:var(--tag-font-color);\"\n+ style=\"background-color: var(--tag-background-color); color: var(--tag-font-color)\"\n>{{ intelligenceCount }}</span\n>\n</span>\n@@ -118,7 +115,7 @@ export default {\n},\nmethods: {\nhasAttributeOntology: function (ontologyName) {\n- return Object.values(this.meta.attributes).some(value => value.ontology === ontologyName)\n+ return Object.values(this.meta.attributes).some((value) => value.ontology === ontologyName)\n},\n},\ncomputed: {\n@@ -132,7 +129,12 @@ export default {\nreturn Object.entries(this.meta.attributes).length\n},\nintelligenceCount() {\n- return (Object.entries(this.meta.attributes.intelligence.value || {}).length)\n+ if ('intelligence' in this.meta.attributes) {\n+ if ('data' in this.meta.attributes.intelligence.value) {\n+ return this.meta.attributes.intelligence.value.data.length\n+ }\n+ }\n+ return 0\n},\n},\n}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Minor changes to intelligence view (#2116)
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com> |
263,126 | 07.02.2022 19:10:10 | -39,600 | 548a5537a0bea0a5cb25176b0bcd013663ce73d2 | Update FormatTimestamp.js
Add nanosecond case | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/filters/FormatTimestamp.js",
"new_path": "timesketch/frontend/src/filters/FormatTimestamp.js",
"diff": "@@ -23,6 +23,8 @@ export default {\ninput = input / 1000 // microseconds -> milliseconds\n} else if (tsLength === 10) {\ninput = input * 1000000 // seconds -> milliseconds\n+ } else if (tsLength === 19) {\n+ input = input / 1000000 // nanoseconds -> milliseconds\n}\nreturn input\n},\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update FormatTimestamp.js (#2132)
Add nanosecond case
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com> |
263,152 | 12.04.2022 21:33:52 | -36,000 | 04fb4d140b3174ab0f97b3818dbcfb7bd57ab8c4 | Update install.md
add_user not an option for tsctl, its now create-user.
added sudo to docker compose down and up | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/admin/install.md",
"new_path": "docs/guides/admin/install.md",
"diff": "@@ -69,7 +69,7 @@ sudo docker-compose up -d\n### Create the first user\n```shell\n-sudo docker-compose exec timesketch-web tsctl add_user --username <USERNAME>\n+sudo docker-compose exec timesketch-web tsctl create-user <USERNAME>\n```\n## 4. Enable TLS (optional)\n@@ -134,8 +134,8 @@ nginx:\nRestart the system:\n```shell\n-docker-compose down\n-docker-compose up -d\n+sudo docker-compose down\n+sudo docker-compose up -d\n```\nCongratulations, your Timesketch system is operational and ready to use.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update install.md (#2160)
add_user not an option for tsctl, its now create-user.
added sudo to docker compose down and up
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com>
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,111 | 14.04.2022 02:40:49 | 0 | bf49b5bf5717983e925547535fac0250c90577f2 | Use of "Conditoinal Field Mappings" to support translating the same name (in this instance TargetFilename) to different data fields, depending on the rule metadata (e.g. OS is Linux vs OS is Windows). | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -6,6 +6,11 @@ backends:\n- es-qr\n- es-rule\nlogsources:\n+ linux_file:\n+ category: file_event\n+ product: linux\n+ conditions:\n+ data_type: \"fs:stat\"\nsshd:\nservice: sshd\nconditions:\n@@ -70,7 +75,7 @@ logsources:\nconditions:\nsource_name:\n- \"Microsoft-Windows-Security-Auditing\"\n- os:\n+ files:\nservice: filesystem\nconditions:\ndata_type:\n@@ -286,7 +291,9 @@ fieldmappings:\nAuditPolicyChanges: xml_string\nSourceImage: xml_string\nTargetImage: xml_string\n- TargetFilename: xml_string\n+ TargetFilename:\n+ product=linux: filename\n+ default: xml_string\nImage: xml_string # that is a value name that might be used in other queries as well. Ideally it would be something _all\nImageLoaded: xml_string\nQueryName: xml_string\n"
}
] | Python | Apache License 2.0 | google/timesketch | Use of "Conditoinal Field Mappings" to support translating the same name (in this instance TargetFilename) to different data fields, depending on the rule metadata (e.g. OS is Linux vs OS is Windows). |
263,096 | 22.04.2022 16:02:56 | -7,200 | 47523ce90741b8fa39ae0a728b88edf81a182f95 | update tsctl command create-user
in getting started docs for devs | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/getting-started.md",
"new_path": "docs/developers/getting-started.md",
"diff": "@@ -41,7 +41,7 @@ timesketch-dev | Timesketch development server is ready!\nAdd a user to your Timesketch server (this will add a user `dev` with password `dev`)\n```bash\n-$ docker-compose exec timesketch tsctl add_user --username dev --password dev\n+$ docker-compose exec timesketch tsctl create-user dev --password dev\nUser dev created/updated\n```\n"
}
] | Python | Apache License 2.0 | google/timesketch | update tsctl command create-user (#2172)
in getting started docs for devs |
263,096 | 22.04.2022 16:03:46 | -7,200 | 11e9af4870bb596e5542c2a83448310ec1111f70 | introduce debugging of test instructions | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/testing.md",
"new_path": "docs/developers/testing.md",
"diff": "@@ -56,6 +56,20 @@ The unittests for the api client can use `mock` to emulate responses from the se\nTo introduce a new API endpoint to be tested, the endpoint needs to be registered in the `url_router` section in `/api_client/python/timesketch_api_client/test_lib.py` and the response needs to be defined in the same file.\n+### Debugging tests\n+\n+To debug tests, simply add the following at the point of interest:\n+\n+```python\n+breakpoint()\n+```\n+\n+And then within the docker container execute\n+\n+```shell\n+! nosetests /usr/local/src/timesketchtimesketch/lib/emojis_test.py -s -pdb\n+```\n+\n## end2end tests\nEnd2end (e2e) tests are run on Github with every commit. Those tests will setup and run a full Timesketch instance, with the ability to import data and perform actions with it.\n"
}
] | Python | Apache License 2.0 | google/timesketch | introduce debugging of test instructions (#2174) |
263,096 | 04.05.2022 14:23:15 | -7,200 | 1b1ec02709473dca2eb72ab8ce74cc13479fc9d7 | fix path to ts config in UI dev guide | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/frontend-development.md",
"new_path": "docs/developers/frontend-development.md",
"diff": "@@ -36,7 +36,7 @@ Follow the steps in the previous section to get dependencies installed.\n### Tweak config files\n-* In your `timesketch` docker container, edit `/etc/timesketch/config.yaml` and set `WTF_CSRF_ENABLED = False`.\n+* In your `timesketch` docker container, edit `/etc/timesketch/timesketch.conf` and set `WTF_CSRF_ENABLED = False`.\n### Start the VueJS development server\n"
}
] | Python | Apache License 2.0 | google/timesketch | fix path to ts config in UI dev guide (#2175) |
263,165 | 18.05.2022 17:24:05 | -36,000 | c4483eb0b041acb1fd2239e752c526f527d0ef89 | timesketch_cli_client.commands.search bug in timestamp handling
Fixes | [
{
"change_type": "MODIFY",
"old_path": "cli_client/python/timesketch_cli_client/commands/search.py",
"new_path": "cli_client/python/timesketch_cli_client/commands/search.py",
"diff": "@@ -166,8 +166,8 @@ def search_group(\nfor time_range in time_ranges:\ntry:\nrange_chip = search.DateRangeChip()\n- range_chip.add_start_time = time_range[0]\n- range_chip.add_end_time = time_range[1]\n+ range_chip.add_start_time(time_range[0])\n+ range_chip.add_end_time(time_range[1])\nsearch_obj.add_chip(range_chip)\nexcept ValueError:\nclick.echo(\"Error parsing date (make sure it is ISO formatted)\")\n@@ -179,8 +179,8 @@ def search_group(\nfor time in times:\ntry:\nrange_chip = search.DateRangeChip()\n- range_chip.add_start_time = time\n- range_chip.add_end_time = time\n+ range_chip.add_start_time(time)\n+ range_chip.add_end_time(time)\nsearch_obj.add_chip(range_chip)\nexcept ValueError:\nclick.echo(\"Error parsing date (make sure it is ISO formatted)\")\n"
}
] | Python | Apache License 2.0 | google/timesketch | timesketch_cli_client.commands.search bug in timestamp handling (#2186)
Fixes #2185 |
263,116 | 24.05.2022 02:39:29 | -7,200 | aea5b74b362fe5fed2d445d322cc83f2dcd4e1c3 | Fixed marked import | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/StoryContent.vue",
"new_path": "timesketch/frontend/src/views/StoryContent.vue",
"diff": "@@ -143,7 +143,7 @@ limitations under the License.\n<script>\nimport ApiClient from '../utils/RestApiClient'\n-import marked from 'marked'\n+import { marked } from 'marked'\nimport _ from 'lodash'\nimport TsAggregationListDropdown from '../components/Aggregation/AggregationListDropdown'\nimport TsAggregationCompact from '../components/Aggregation/AggregationCompact'\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fixed marked import (#2190) |
263,096 | 24.05.2022 17:12:41 | -7,200 | 75a67d8567245374a933d409ccf7956e7c62eb35 | add mutex to Sigma mapping | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -333,6 +333,7 @@ fieldmappings:\nHostApplication: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\ngcp.audit.method_name: methodName\nParentImage: xml_string\n+ Mutex: message\nValue:\nservice=windefend: xml_string\ndefault: Value\n"
}
] | Python | Apache License 2.0 | google/timesketch | add mutex to Sigma mapping (#2181) |
263,129 | 03.06.2022 17:04:36 | -7,200 | 4bbd77052a0d3095854d75f3c4221a37fe6e82c2 | Escape backslashes and spaces in generated OpenSearch queries | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Intelligence.vue",
"new_path": "timesketch/frontend/src/views/Intelligence.vue",
"diff": "@@ -340,6 +340,8 @@ export default {\n},\ngenerateOpenSearchQuery(value, field) {\nlet query = `\"${value}\"`\n+ // Escape special OpenSearch characters: \\, [space]\n+ query = query.replace(/[\\\\\\s]/g, '\\\\$&')\nif (field !== undefined) {\nquery = `${field}:${query}`\n}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Escape backslashes and spaces in generated OpenSearch queries (#2207)
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com> |
263,157 | 09.06.2022 23:46:06 | -7,200 | b98656ffe16b4a94040413598d0064c3402e4000 | Fix for issue 2195 by pinning the opensearch container to version 1.3.2. | [
{
"change_type": "MODIFY",
"old_path": "docker/dev/docker-compose.yml",
"new_path": "docker/dev/docker-compose.yml",
"diff": "@@ -33,7 +33,7 @@ services:\nopensearch:\ncontainer_name: opensearch\n- image: opensearchproject/opensearch:latest\n+ image: opensearchproject/opensearch:1.3.2\nrestart: always\nenvironment:\n- discovery.type=single-node\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix for issue 2195 by pinning the opensearch container to version 1.3.2. (#2217) |
263,099 | 16.06.2022 05:53:35 | 0 | a667669cad943d72ccb081cb90a7e03a56c073b9 | Adjusted client.py to throw an error if no usable tty is found | [
{
"change_type": "MODIFY",
"old_path": "api_client/python/timesketch_api_client/client.py",
"new_path": "api_client/python/timesketch_api_client/client.py",
"diff": "@@ -16,6 +16,7 @@ from __future__ import unicode_literals\nimport os\nimport logging\n+import sys\n# pylint: disable=wrong-import-order\nimport bs4\n@@ -246,6 +247,11 @@ class TimesketchApi:\nif run_server:\n_ = flow.run_local_server()\nelse:\n+ if not sys.stdout.isatty():\n+ msg = ('You will be asked to paste a token into this session to'\n+ 'authenticate, but the session doesn\\'t have a tty')\n+ raise RuntimeError(msg)\n+\nauth_url, _ = flow.authorization_url(prompt=\"select_account\")\nif skip_open:\n"
}
] | Python | Apache License 2.0 | google/timesketch | Adjusted client.py to throw an error if no usable tty is found |
263,099 | 16.06.2022 06:06:49 | 0 | 8998f5dd387ef99e10d2657fd396d1554b0ba20a | Added stdin check | [
{
"change_type": "MODIFY",
"old_path": "api_client/python/timesketch_api_client/client.py",
"new_path": "api_client/python/timesketch_api_client/client.py",
"diff": "@@ -247,7 +247,7 @@ class TimesketchApi:\nif run_server:\n_ = flow.run_local_server()\nelse:\n- if not sys.stdout.isatty():\n+ if not sys.stdout.isatty() or not sys.stdin.isatty():\nmsg = ('You will be asked to paste a token into this session to'\n'authenticate, but the session doesn\\'t have a tty')\nraise RuntimeError(msg)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Added stdin check |
263,138 | 20.06.2022 00:36:16 | 28,800 | c9c7ae8ed5b586839ad19a484bf8ff6de1d2b184 | Update spelling across docs | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/admin/upgrade.md",
"new_path": "docs/guides/admin/upgrade.md",
"diff": "@@ -40,7 +40,7 @@ In case you don't get any response back from the `db current` command you'll nee\nroot@<CONTAINER_ID>$ tsctl db history\n```\n-Find the lasat revision number you have upgraded the database too, and then issue\n+Find the last revision number you have upgraded the database too, and then issue\n```shell\nroot@<CONTAINER_ID>$ tsctl db stamp <REVISION_ID>\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/basic-concepts.md",
"new_path": "docs/guides/user/basic-concepts.md",
"diff": "@@ -26,7 +26,7 @@ This feature is currently not implemented in the Web UI. But you can add events\n## Add a comment\n-You can comment events in your sketch. The comments are safed in your sketch, that means if you add a timeline to multiple sketches, the comments are only shown in the one sketch you made the comments.\n+You can comment events in your sketch. The comments are saved in your sketch, that means if you add a timeline to multiple sketches, the comments are only shown in the one sketch you made the comments.\n## Star an event\n@@ -38,7 +38,7 @@ Views are saved search queries. Those can either be created by the User, by API\nTo create a view from the Web Ui, click the _Save as view_ button on the top right of the Search fields in the Explore Tab of a sketch.\n-## Insights / Aggegations\n+## Insights / Aggregations\nThe _Insights_ functionality in a sketch gives the opportunity to run aggregations on the events in a sketch.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/cli-client.md",
"new_path": "docs/guides/user/cli-client.md",
"diff": "@@ -10,7 +10,7 @@ including:\n## Installing\n-The CLI client is available as a packag on PyPi. To install, simply:\n+The CLI client is available as a package on PyPi. To install, simply:\n```\npip3 install timesketch-cli-client\n@@ -19,7 +19,7 @@ pip3 install timesketch-cli-client\n## Basic usage\nThe command line program is called `timesketch`. To see the help menu you can\n-invoke without ay parameters alternativly issue `timesketch --help`.\n+invoke without ay parameters alternatively issue `timesketch --help`.\n```\n$ timesketch\n@@ -58,7 +58,7 @@ Commands:\n#### Default sketch\nThe program need to know what sketch you are working in. You can either specify it\n-with the `--sketch` flag on all invocations, or you can configure it globaly:\n+with the `--sketch` flag on all invocations, or you can configure it globally:\n```\ntimesketch config set sketch <ID of your sketch>\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/sigma.md",
"new_path": "docs/guides/user/sigma.md",
"diff": "@@ -175,7 +175,7 @@ This feature can be helpful if you want to test out field mapping.\nFrom the parse result you can copy the `es_query` value and paste it in a new window where you have the explore of a Sketch open.\n-You need to remember to copy your rule when you are ready and create a new file on your Timesketch server to store the rule and make it available to others. The text from the compose area will be resetted with each reload of the page.\n+You need to remember to copy your rule when you are ready and create a new file on your Timesketch server to store the rule and make it available to others. The text from the compose area will be reset with each reload of the page.\n### Best practices\n@@ -237,7 +237,7 @@ detection:\nThat will create two queries:\n` *value1* or *value2* or *value3* ... or *value10*` and ` *value11* or *value12* or *value13* ... or *value20*`.\n-The Sigma analyzer is designed to batch and throttle execution of queries which is benefitial for such rule structure.\n+The Sigma analyzer is designed to batch and throttle execution of queries which is beneficial for such rule structure.\n### Reduce the haystack\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update spelling across docs (#2226) |
263,096 | 21.06.2022 17:45:35 | -7,200 | dab63e921c2f4e453e77aab45c5a23bfcd3a3ed9 | add network/zeek/zeek_rdp_public_listener.yml | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_rule_status.csv",
"new_path": "data/sigma_rule_status.csv",
"diff": "@@ -293,3 +293,4 @@ windows/sysmon/sysmon_config_modification_error.yml,good,no test data available,\nwindows/sysmon/sysmon_config_modification_status.yml,good,no test data available,2022-04-28,1f2b5353-573f-4880-8e33-7d04dcf97744\nwindows/sysmon/sysmon_process_hollowing.yml,good,no test data available,2022-04-28,c4b890e5-8d8c-4496-8c66-c805753817cd\nwindows/wmi_event/,bad,no test data available,2021-05-04,\n+network/zeek/zeek_rdp_public_listener.yml,bad, no sampe data available for zeek and it would flag every event so very noisy rule,2022-06-08,1fc0809e-06bf-4de3-ad52-25e5263b7623\n"
}
] | Python | Apache License 2.0 | google/timesketch | add network/zeek/zeek_rdp_public_listener.yml (#2227) |
263,093 | 23.06.2022 05:01:36 | 25,200 | aa5dd153b66d5090b16abe419a625c14f2fbdf20 | Handle mutliple client ids | [
{
"change_type": "MODIFY",
"old_path": "data/timesketch.conf",
"new_path": "data/timesketch.conf",
"diff": "@@ -134,12 +134,9 @@ GOOGLE_OIDC_CLIENT_SECRET = None\n# an OAUTH client for \"other\", or for native applications.\n# https://developers.google.com/identity/protocols/OAuth2ForDevices\nGOOGLE_OIDC_API_CLIENT_ID = None\n-# Currently not used, API clients initializes TimesketchApi using CLIENT_ID and CLIENT_SECRET\n-# in client code. The server only verifies the CLIENT_ID used is available in\n-# GOOGLE_OIDC_API_CLIENT_ID or ALLOWED_GOOGLE_OIDC_API_CLIENT_IDS.\n-GOOGLE_OIDC_API_CLIENT_SECRET = None\n-# List of allowed GOOGLE OIDC clients that can authenticate to the APIs\n-ALLOWED_GOOGLE_OIDC_API_CLIENT_IDS = []\n+\n+# List of additional allowed GOOGLE OIDC clients that can authenticate to the APIs\n+GOOGLE_OIDC_API_CLIENT_IDS = []\n# Limit access to a specific Google GSuite domain.\nGOOGLE_OIDC_HOSTED_DOMAIN = None\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/views/auth.py",
"new_path": "timesketch/views/auth.py",
"diff": "@@ -60,7 +60,6 @@ SCOPES = [\n\"openid\",\n\"https://www.googleapis.com/auth/userinfo.profile\",\n]\n-_GOOGLE_OIDC_CLIENTS = []\n@auth_views.route(\"/login/\", methods=[\"GET\", \"POST\"])\n@@ -183,6 +182,8 @@ def validate_api_token():\nReturns:\nA simple page indicating the user is authenticated.\n\"\"\"\n+ ALLOWED_CLIENT_IDS = []\n+\ntry:\ntoken = oauth2.rfc6749.tokens.get_token_from_header(request)\nexcept AttributeError:\n@@ -194,26 +195,27 @@ def validate_api_token():\nid_token = request.args.get(\"id_token\")\nif not id_token:\nreturn abort(HTTP_STATUS_CODE_UNAUTHORIZED, \"No ID token supplied.\")\n- if not _GOOGLE_OIDC_CLIENTS:\n+\nclient_ids = set()\nprimary_client_id = current_app.config.get(\"GOOGLE_OIDC_CLIENT_ID\")\n+ legacy_api_client_id = current_app.config.get(\"GOOGLE_OIDC_API_CLIENT_ID\")\n+ api_client_ids = current_app.config.get(\"GOOGLE_OIDC_API_CLIENT_IDS\", [])\n+\nif primary_client_id:\nclient_ids.add(primary_client_id)\n- else:\n- current_app.logger.warning(\n- \"GOOGLE_OIDC_CLIENT_ID is not set in config file.\")\n- additional_client_ids = current_app.config.get(\n- \"ALLOWED_GOOGLE_OIDC_API_CLIENT_IDS\",[])\n- if additional_client_ids:\n- client_ids.update(additional_client_ids)\n- else:\n- current_app.logger.warning(\n- \"ALLOWED_GOOGLE_OIDC_API_CLIENT_IDS is not set in config file.\")\n- _GOOGLE_OIDC_CLIENTS = list(client_ids)\n- if not _GOOGLE_OIDC_CLIENTS:\n+\n+ if legacy_api_client_id:\n+ client_ids.add(legacy_api_client_id)\n+\n+ if api_client_ids:\n+ client_ids.update(api_client_ids)\n+\n+ ALLOWED_CLIENT_IDS = list(client_ids)\n+\n+ if not ALLOWED_CLIENT_IDS:\nreturn abort(\nHTTP_STATUS_CODE_BAD_REQUEST,\n- \"No OIDC API client ID defined in the configuration file.\",\n+ \"No OIDC client IDs defined in the configuration file.\",\n)\n# Authenticating session, see more details here:\n@@ -275,7 +277,7 @@ def validate_api_token():\n)\nread_client_id = token_json.get(\"aud\", \"\")\n- if read_client_id not in _GOOGLE_OIDC_CLIENTS:\n+ if read_client_id not in ALLOWED_CLIENT_IDS:\nreturn abort(\nHTTP_STATUS_CODE_UNAUTHORIZED,\n\"Client ID {0:s} does not match server configuration for \"\n"
}
] | Python | Apache License 2.0 | google/timesketch | Handle mutliple client ids (#2232) |
263,165 | 06.07.2022 16:54:04 | -36,000 | e33056e17a10e961dcd4b897c2cd66a1fc12ebae | Add missing decorators | [
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/resources/attribute.py",
"new_path": "timesketch/api/v1/resources/attribute.py",
"diff": "@@ -186,6 +186,7 @@ class AttributeResource(resources.ResourceMixin, Resource):\nreturn response\n+ @login_required\ndef delete(self, sketch_id):\n\"\"\"Handles delete request to the resource.\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/resources/graph.py",
"new_path": "timesketch/api/v1/resources/graph.py",
"diff": "@@ -58,6 +58,7 @@ class GraphListResource(resources.ResourceMixin, Resource):\ngraphs = sketch.graphs\nreturn self.to_json(graphs)\n+ @login_required\ndef post(self, sketch_id):\n\"\"\"Handles POST request to the resource.\"\"\"\nsketch = Sketch.query.get_with_acl(sketch_id)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Add missing @login_required decorators (#2236) |
263,165 | 14.07.2022 23:30:08 | -36,000 | 9fae8701e743fcdc42b8de2b6357f3fbbc78d081 | Unit test test_invalid_algorithm_raises_jwt_validation_error failing in PPA tests
* Unit test test_invalid_algorithm_raises_jwt_validation_error failing in PPA tests
Fixes
* Comment clarification | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/google_auth_test.py",
"new_path": "timesketch/lib/google_auth_test.py",
"diff": "@@ -273,9 +273,27 @@ class TestGoogleCloudIAP(BaseTest):\ndef test_invalid_algorithm_raises_jwt_validation_error(self):\n\"\"\"Test to validate a JWT with invalid algorithm.\"\"\"\n- header = create_default_header(IAP_JWT_ALGORITHM, \"iap_1234\")\n- header[\"alg\"] = \"HS256\"\n- self._test_header_raises_jwt_validation_error(header)\n+\n+ # Hard coding a JWT with MOCK_EC_PRIVATE_KEY as key and \"HS256\" as alg\n+ # in the header. Newer versions of PyJWT won't encode JWTs with this\n+ # configuration.\n+ test_jwt = (\n+ b'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6ImlhcF8xMjM0In0.eyJzd'\n+ b'WIiOiIxMjM0NTY3ODkwIiwiZW1haWwiOiJ0ZXN0QGV4YW1wbGUuY29tIiwiaGQiOi'\n+ b'JleGFtcGxlLmNvbSIsImlhdCI6MTY1NzU5NDE4NSwiZXhwIjoxNjU3NTk0Nzg1LCJ'\n+ b'hdWQiOiIvcHJvamVjdHMvMTIzNC9nbG9iYWwvYmFja2VuZFNlcnZpY2VzLzEyMzQi'\n+ b'LCJpc3MiOiJodHRwczovL2Nsb3VkLmdvb2dsZS5jb20vaWFwIn0.s49RJ_Fhoaqpo'\n+ b'GHfXTjEi5Ma373Zr69BU8rG3ZObNq0EJJXGgBq4E48LwaD_WMR4z3dMxv-UkcShmU'\n+ b'3p6qnv7w'\n+ )\n+\n+ public_key = get_public_key_for_jwt(test_jwt, IAP_PUBLIC_KEY_URL)\n+\n+ with self.assertRaises(JwtValidationError):\n+ test_decoded_jwt = decode_jwt(\n+ test_jwt, public_key, IAP_JWT_ALGORITHM, IAP_VALID_AUDIENCE\n+ )\n+ validate_jwt(test_decoded_jwt, IAP_VALID_ISSUER)\ndef test_missing_key_id_raises_jwt_key_error(self):\n\"\"\"Test to validate a JWT with key ID missing.\"\"\"\n"
}
] | Python | Apache License 2.0 | google/timesketch | Unit test test_invalid_algorithm_raises_jwt_validation_error failing in PPA tests (#2239)
* Unit test test_invalid_algorithm_raises_jwt_validation_error failing in PPA tests
Fixes #2238
* Comment clarification |
263,096 | 21.07.2022 11:49:45 | -7,200 | 42efffc3e5b0870720ab2b850b213856f1fcb015 | s/GET/POST typo | [
{
"change_type": "MODIFY",
"old_path": "timesketch/api/v1/resources/timeline.py",
"new_path": "timesketch/api/v1/resources/timeline.py",
"diff": "@@ -230,7 +230,7 @@ class TimelineResource(resources.ResourceMixin, Resource):\n@login_required\ndef post(self, sketch_id, timeline_id):\n- \"\"\"Handles GET request to the resource.\n+ \"\"\"Handles POST request to the resource.\nArgs:\nsketch_id: Integer primary key for a sketch database model\n"
}
] | Python | Apache License 2.0 | google/timesketch | s/GET/POST typo (#2258) |
263,129 | 22.07.2022 09:50:16 | -7,200 | b34fe1cc544c4035c5e9ff02e75bc66b57d24df8 | Bring back disappearing codebase | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend/src/views/Intelligence.vue",
"new_path": "timesketch/frontend/src/views/Intelligence.vue",
"diff": "@@ -313,6 +313,11 @@ export default {\nif (this.tagMetadata[tag]) {\nreturn _.extend(tagInfo, this.tagMetadata[tag])\n} else {\n+ for (var regex in this.tagMetadata['regexes']) {\n+ if (tag.match(regex)) {\n+ return _.extend(tagInfo, this.tagMetadata['regexes'][regex])\n+ }\n+ }\nreturn _.extend(tagInfo, this.tagMetadata.default)\n}\n},\n"
}
] | Python | Apache License 2.0 | google/timesketch | Bring back disappearing codebase (#2260) |
263,175 | 01.08.2022 10:19:29 | -3,600 | 59da65a65ffc9da4b8d27f88ea8a0fbe7d51e417 | Update dev README
Updated dev README container commands to match the updated container name | [
{
"change_type": "MODIFY",
"old_path": "docker/dev/README.md",
"new_path": "docker/dev/README.md",
"diff": "@@ -21,13 +21,13 @@ Timesketch development server is ready!\n### Find out container ID for the timesketch container\n```\n-CONTAINER_ID=\"$(docker container list -f name=dev_timesketch -q)\"\n+CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\n```\nIn the output look for CONTAINER ID for the timesketch container\nTo write the ID to a variable, use:\n```\n-export CONTAINER_ID=\"$(docker container list -f name=dev_timesketch -q)\"\n+export CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\n```\nand test with\n```\n@@ -55,7 +55,7 @@ You can also access a metrics dashboard at http://127.0.0.1:3000/\nRunning the following as a script after `docker-compose up -d` will bring up the development environment in the background for you.\n```\n-export CONTAINER_ID=\"$(docker container list -f name=dev_timesketch -q)\"\n+export CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\ndocker exec $CONTAINER_ID celery -A timesketch.lib.tasks worker --loglevel info\ndocker exec $CONTAINER_ID gunicorn --reload -b 0.0.0.0:5000 --log-file - --timeout 120 timesketch.wsgi:application\n```\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update dev README (#2267)
- Updated dev README container commands to match the updated container name |
263,115 | 01.08.2022 12:51:49 | -10,800 | 7fe6f8c954a415762e5f9b21faeead570375997f | Update sigma_tagger_test.py | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/sigma_tagger_test.py",
"new_path": "timesketch/lib/analyzers/sigma_tagger_test.py",
"diff": "@@ -25,7 +25,10 @@ class TestSigmaPlugin(BaseTest):\n_ = sigma_tagger.RulesSigmaPlugin(\nsketch_id=1, index_name=self.test_index\n)\n-\n+ # Mock the OpenSearch datastore.\n+ @mock.patch(\n+ \"timesketch.lib.analyzers.interface.OpenSearchDataStore\", MockDataStore\n+ )\ndef test_get_kwargs(self):\nanalyzer_init = sigma_tagger.RulesSigmaPlugin(\nsketch_id=1, index_name=self.test_index\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update sigma_tagger_test.py (#2265)
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,096 | 17.08.2022 10:47:41 | -7,200 | ab6b8c87ee8c3a3c36c8832b2705d2537e1e5849 | improve Sigma documentation
documentation without review | [
{
"change_type": "MODIFY",
"old_path": "docs/guides/analyzers/sigma_analyzer.md",
"new_path": "docs/guides/analyzers/sigma_analyzer.md",
"diff": "@@ -20,8 +20,26 @@ Reasons might be because:\n- the rule is located in a folder containing the term `deprecated`\n- After parsing a rule the following value is set: `'ts_use_in_analyzer': False`\n+## Which rules should be deployed\n+\n+It is not recommended to deploy all rules from https://github.com/SigmaHQ/sigma as it is impossible for the Timesketch project to ensure that all rules produce valid OpenSearch Queries.\n+Instead pick the rules you verified the format of your logs allign and you expect hits.\n+\n## Troubleshooting\n### Unable to run, no rule given to the analyzer\nIf you see that error in the Analyzer results, you likely have no rule installed that matches the Sigma analyzer criteria to use it.\n+\n+### Other errors\n+\n+Please see the celery logs for further information.\n+\n+### Find the rule that is causing problems\n+\n+If you run into a problem after installing a new rule or multiple rules:\n+\n+- seek the celery logs to identify the Sigma rule causing problems and identify the Sigma rule uuid\n+- remove all new rules and add rules individually till the error occurs and write down the Sigma rule uuid\n+\n+Please open a Github issue in the Timesketch project providing the Sigma rule UUID (as long as it is part of https://github.com/SigmaHQ/sigma) and the exception shown in celery.\n\\ No newline at end of file\n"
}
] | Python | Apache License 2.0 | google/timesketch | improve Sigma documentation (#2283)
documentation without review |
263,168 | 18.08.2022 17:09:06 | -7,200 | 8ebdc81df86ce5af26ee5fdd385bf51620d7d581 | Update getting-started.md
Add formatting python files documentation | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/getting-started.md",
"new_path": "docs/developers/getting-started.md",
"diff": "@@ -130,3 +130,20 @@ To test mkdocs locally, run the following in your container:\n```\nAnd visit the results / review remarks, warnings or errors from mkdocs.\n+\n+## Formatting\n+\n+Before merging a pull request, we expect the code to be formatted in a certain manner. You can use VS Code extensions to make your life easier in formatting your files. For example:\n+* [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) for *Vue* files\n+* [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) and [Black](https://github.com/psf/black) for *Python* files.\n+\n+### Formatting Python files\n+\n+We use `black` to format Python files. `black` is the uncompromising Python code formatter. There are two ways to use it:\n+1. Manually from the command line:\n+ * Install `black` following the official [black documentation](https://pypi.org/project/black/).\n+ * Format your file by running this command: `$ black path/to/python/file`\n+2. Automatically from [VS Code](https://dev.to/adamlombard/how-to-use-the-black-python-code-formatter-in-vscode-3lo0):\n+ * Download the VS Code extension `Python`.\n+ * Navigate to `Code -> Preferences -> Settings` and search for `Python Formatting Provider`. Then, select `black` from the dropdown menu.\n+ * Enable the `Format on Save` option to automatically format your files every time you save them.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update getting-started.md (#2287)
Add formatting python files documentation |
263,093 | 22.08.2022 12:05:15 | -7,200 | d2f9e25bea5bdc766a7f73273d033671b3bf110e | Fix redirect for OIDC logins | [
{
"change_type": "MODIFY",
"old_path": "timesketch/views/auth.py",
"new_path": "timesketch/views/auth.py",
"diff": "@@ -82,6 +82,8 @@ def login():\n# Google OpenID Connect authentication.\nif current_app.config.get(\"GOOGLE_OIDC_ENABLED\", False):\nhosted_domain = current_app.config.get(\"GOOGLE_OIDC_HOSTED_DOMAIN\")\n+ # Save the next URL parameter in the session for redirect after login.\n+ session['next'] = request.args.get(\"next\", \"/\")\nreturn redirect(get_oauth2_authorize_url(hosted_domain))\n# Google Identity-Aware Proxy authentication (using JSON Web Tokens)\n@@ -410,6 +412,6 @@ def google_openid_connect():\n# Log the user in and setup the session.\nif current_user.is_authenticated:\n- return redirect(request.args.get(\"next\") or \"/\")\n+ return redirect(session.get(\"next\", \"/\"))\nreturn abort(HTTP_STATUS_CODE_BAD_REQUEST, \"User is not authenticated.\")\n"
}
] | Python | Apache License 2.0 | google/timesketch | Fix redirect for OIDC logins (#2290) |
263,096 | 22.08.2022 14:51:04 | -7,200 | 13bf19aa0b8b3612d3bf44748f2a6bb1933b18ab | Change default value of use rule in Sigma analyzer | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/sigma_tagger.py",
"new_path": "timesketch/lib/analyzers/sigma_tagger.py",
"diff": "@@ -33,7 +33,7 @@ class SigmaPlugin(interface.BaseAnalyzer):\nsuper().__init__(index_name, sketch_id, timeline_id=timeline_id)\ndef run_sigma_rule(\n- self, query, rule_name, tag_list=None, status_good=True):\n+ self, query, rule_name, tag_list=None, status_good=False):\n\"\"\"Runs a sigma rule and applies the appropriate tags.\nArgs:\n"
}
] | Python | Apache License 2.0 | google/timesketch | Change default value of use rule in Sigma analyzer (#2292) |
263,093 | 23.08.2022 10:17:35 | -7,200 | 64d02d78234841a0c766af897656ec40d152b061 | Enable UI v2 | [
{
"change_type": "MODIFY",
"old_path": "MANIFEST.in",
"new_path": "MANIFEST.in",
"diff": "@@ -6,6 +6,7 @@ exclude *.pyc\nrecursive-include config *\nrecursive-include data *\nrecursive-include timesketch/frontend/dist *\n+recursive-include timesketch/frontend-ng/dist *\nrecursive-include timesketch/lib/experimental *.cql\nrecursive-include timesketch/static *\nrecursive-include timesketch/templates *\n"
},
{
"change_type": "MODIFY",
"old_path": "contrib/nginx.conf",
"new_path": "contrib/nginx.conf",
"diff": "@@ -16,5 +16,14 @@ http {\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Proto $scheme;\n}\n+ location /v2/ {\n+ proxy_buffer_size 128k;\n+ proxy_buffers 4 256k;\n+ proxy_busy_buffers_size 256k;\n+ proxy_pass http://timesketch-web-v2:5000;\n+ proxy_set_header Host $host;\n+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n+ proxy_set_header X-Forwarded-Proto $scheme;\n+ }\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/release/build/docker-entrypoint.sh",
"new_path": "docker/release/build/docker-entrypoint.sh",
"diff": "@@ -7,6 +7,15 @@ if [ \"$1\" = \"timesketch-web\" ]; then\n--error-logfile /var/log/timesketch/wsgi_error.log --log-level info \\\n--capture-output --timeout 600 --limit-request-line 8190 \\\n--workers ${NUM_WSGI_WORKERS} timesketch.wsgi:application\n+# Temporary V2 application of the UI.\n+# TODO: Remove when V2 is the default.\n+elif [ \"$1\" = \"timesketch-web-v2\" ]; then\n+ # Get number of WSGI workers from environment, or set it to default value.\n+ NUM_WSGI_WORKERS=\"${NUM_WSGI_WORKERS:-4}\"\n+ gunicorn --bind 0.0.0.0:5000 --log-file /var/log/timesketch/wsgi.log \\\n+ --error-logfile /var/log/timesketch/wsgi_error.log --log-level info \\\n+ --capture-output --timeout 600 --limit-request-line 8190 \\\n+ --workers ${NUM_WSGI_WORKERS} timesketch.wsgi:application_v2\nelif [ \"$1\" = \"timesketch-worker\" ]; then\ncelery -A timesketch.lib.tasks worker \\\n--logfile=/var/log/timesketch/worker.log \\\n"
},
{
"change_type": "MODIFY",
"old_path": "docker/release/docker-compose.yml",
"new_path": "docker/release/docker-compose.yml",
"diff": "@@ -12,6 +12,20 @@ services:\n- ./upload:/usr/share/timesketch/upload/\n- ./logs:/var/log/timesketch/\n+ # Temporary service while the V2 UI is in the testing phase.\n+ # TODO: Remove when V2 is the default.\n+ timesketch-web-v2:\n+ container_name: timesketch-web-v2\n+ image: us-docker.pkg.dev/osdfir-registry/timesketch/timesketch:${TIMESKETCH_VERSION}\n+ environment:\n+ - NUM_WSGI_WORKERS=${NUM_WSGI_WORKERS}\n+ restart: always\n+ command: timesketch-web-v2\n+ volumes:\n+ - ./etc/timesketch:/etc/timesketch/\n+ - ./upload:/usr/share/timesketch/upload/\n+ - ./logs:/var/log/timesketch/\n+\ntimesketch-worker:\ncontainer_name: timesketch-worker\nimage: us-docker.pkg.dev/osdfir-registry/timesketch/timesketch:${TIMESKETCH_VERSION}\n"
}
] | Python | Apache License 2.0 | google/timesketch | Enable UI v2 (#2294) |
263,168 | 23.08.2022 16:38:24 | -7,200 | 843e046b57c4bf3f47400c778f8fbddf5a7e8eb5 | Tsdev.sh: a script for fast frontend/frontend-ng development
* Update getting-started.md
Add formatting python files documentation
* add tsdev script
* Update tsdev.sh
* Update contrib/tsdev.sh
* Update contrib/tsdev.sh | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "contrib/tsdev.sh",
"diff": "+#!/bin/bash\n+\n+CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\n+frontend=${2:-\"frontend\"}\n+\n+if [ $1 == \"web\" ]; then\n+ docker exec -it $CONTAINER_ID gunicorn --reload -b 0.0.0.0:5000 --log-level debug --capture-output --timeout 600 timesketch.wsgi:application\n+elif [ $1 == \"celery\" ]; then\n+ docker exec -it $CONTAINER_ID celery -A timesketch.lib.tasks worker --loglevel=info\n+elif [ $1 == \"vue-install-deps\" ]; then\n+ docker exec -it $CONTAINER_ID yarn install --cwd=/usr/local/src/timesketch/timesketch/$frontend\n+elif [ $1 == \"vue-dev\" ]; then\n+ docker exec -it $CONTAINER_ID yarn run --cwd=/usr/local/src/timesketch/timesketch/$frontend serve\n+elif [ $1 == \"vue-build\" ]; then\n+ docker exec -it $CONTAINER_ID yarn run --cwd=/usr/local/src/timesketch/timesketch/$frontend build\n+elif [ $1 == \"test\" ]; then\n+ docker exec -w /usr/local/src/timesketch -it $CONTAINER_ID python3 run_tests.py --coverage\n+elif [ $1 == \"shell\" ]; then\n+ docker exec -it $CONTAINER_ID /bin/bash\n+elif [ $1 == \"logs\" ]; then\n+ docker logs -f $CONTAINER_ID\n+fi\n"
}
] | Python | Apache License 2.0 | google/timesketch | Tsdev.sh: a script for fast frontend/frontend-ng development (#2298)
* Update getting-started.md
Add formatting python files documentation
* add tsdev script
* Update tsdev.sh
* Update contrib/tsdev.sh
Co-authored-by: Johan Berggren <jberggren@gmail.com>
* Update contrib/tsdev.sh
Co-authored-by: Johan Berggren <jberggren@gmail.com>
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,114 | 20.09.2022 02:48:55 | 14,400 | 1820d318c3af671b95b0cbc799fff9156ae1587e | Update plaso args | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/tasks.py",
"new_path": "timesketch/lib/tasks.py",
"diff": "@@ -658,11 +658,11 @@ def run_plaso(file_path, events, timeline_name, index_name, source_type, timelin\nopensearch_username = current_app.config.get(\"OPENSEARCH_USER\", \"\")\nif opensearch_username:\n- cmd.extend([\"--elastic_user\", opensearch_username])\n+ cmd.extend([\"--opensearch_user\", opensearch_username])\nopensearch_password = current_app.config.get(\"OPENSEARCH_PASSWORD\", \"\")\nif opensearch_password:\n- cmd.extend([\"--elastic_password\", opensearch_password])\n+ cmd.extend([\"--opensearch_password\", opensearch_password])\nopensearch_ssl = current_app.config.get(\"OPENSEARCH_SSL\", False)\nif opensearch_ssl:\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update plaso args (#2300)
Co-authored-by: Alexander J <741037+jaegeral@users.noreply.github.com> |
263,096 | 05.10.2022 11:37:09 | -7,200 | a65071302154b739d7e438ef98ed392478b2e252 | Changelog
Only documentation affected, so overwriting branch protection as admin | [
{
"change_type": "ADD",
"old_path": "docs/assets/images/2321_1.png",
"new_path": "docs/assets/images/2321_1.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2321_1.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/assets/images/2321_2.png",
"new_path": "docs/assets/images/2321_2.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2321_2.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/assets/images/2322_1.png",
"new_path": "docs/assets/images/2322_1.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2322_1.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/assets/images/2322_2.png",
"new_path": "docs/assets/images/2322_2.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2322_2.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/assets/images/2322_3.png",
"new_path": "docs/assets/images/2322_3.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2322_3.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/assets/images/2327.png",
"new_path": "docs/assets/images/2327.png",
"diff": "Binary files /dev/null and b/docs/assets/images/2327.png differ\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/changelog/2022-09.md",
"diff": "+# 2022-09\n+\n+## [XML Viewer for xml_string attribute](https://github.com/google/timesketch/pull/2327)\n+\n+Plaso can parse WINEVTX logs. It creates an attribute xml_string that is the\n+\"dump\" of the log itself. The next figure shows how it is represented in\n+Timesketch.\n+\n+This valuable information might be hard to interpret since it is written in\n+a compat format. With this PR we aim to create an icon to visualize better\n+this attribute.\n+\n+\n+\n+## [Python Notebook to debug the most common Timesketch API](https://github.com/google/timesketch/pull/2348)\n+\n+A new [Notebook](https://github.com/google/timesketch/blob/master/notebooks/debugging_timesketch.ipynb)\n+was added with common Timesketch API interactions such as:\n+\n+- Timeline information\n+- create a new sketches\n+- run an analyzer\n+- retrieve analyzer results\n+\n+## [Add manual event in frontend-ng](https://github.com/google/timesketch/pull/2321)\n+\n+Creating a new manual event correlated to an existing timeline event at the bottom of the page.\n+\n+\n+\n+\n+## [File upload in frontent-ng](https://github.com/google/timesketch/pull/2322)\n+\n+Non fully indexed files are constantly monitored to give the user an idea\n+of the \"indexing-progress\".\n+\n+This feature allows the user to upload a large file (e.g., a large Plaso file)\n+and having an idea about the status of the file on the server\n+(e.g., 40% indexed).\n+\n+Add a status dialog that summarize the information of the file\n+(how many events, the status, i.e., ready, processing, or fail).\n+\n+The user can directly add a new timeline from the Explore tab.\n+The user can only enable the timelines that have been successfully uploaded.\n+\n+Timeline is **ready**: the user can explore it:\n+\n+\n+\n+Timeline is **failed**: the user can not explore it.\n+A failed timeline can be spotted because it has a red\n+background color and it cannot be opened.\n+\n+\n+\n+\n+Timeline is **processing**: the user can check how many events have already\n+been indexed and the remaining time for the timeline to be ready.\n+A \"processing\" timeline can be spotted because is not fully colored\n+and it cannot be opened.\n+\n+\n+\n+### [Sigma support in API client](https://github.com/google/timesketch/pull/2333)\n+\n+- Change the expected storage from Sigma rules from file system to database\n+- Update the JS API client to add recent additions of the File based API\n+- replace the term `es_query` with `query_string` to be consistent with\n+- the rest of the codebase\n+- make API client methods deprecated that will soon be gone away as they link\n+to the file based API\n+- add methods in the API client that talk to the databased Sigma Rule API\n+\n+### [Extend datasource model schema](https://github.com/google/timesketch/pull/2342)\n+\n+- Introduced a new field to the datasource model.\n+- This PR adds the needed DB migration scripts.\n+\n+### [Extend Search Templates model to support user defined parameters](https://github.com/google/timesketch/pull/2349)\n+\n+- Extend Search Templates model to support user defined parameters.\n+- This PR extend the model to include template_uuid and template_json to support importing of templates, and support for user defined input parameters.\n+\n+## Bugfixes\n+\n+### [Uploads not working with newest Plaso](https://github.com/google/timesketch/pull/2300)\n+\n+When trying to upload a plaso file, the upload failed with psort.py: `error: unrecognized arguments: --elastic_user opensearch --elastic_password opensearch`\n+\n+### [Search history tree generation](https://github.com/google/timesketch/pull/2320)\n+\n+The History tree used a naive approach to find a reasonable root node to\n+generate the tree from. In some edge cases, the last node was not present\n+in the tree and the UI failed to render the history.\n+\n+Now it always starts from the last node, and then traverse backwards in the\n+tree 10 nodes. After that generate the full sub tree with all children etc.\n+\n+### [docs: Fix a few typos](https://github.com/google/timesketch/pull/2330)\n+\n+Some typos in documentation have been fixed\n+\n+### [add vsvode and notebook checkpoints to .gitignore](https://github.com/google/timesketch/pull/2332)\n+\n+New additions to the `.gitignore` file to make it more usable.\n+\n+### [fix for Export Sketch feature](https://github.com/google/timesketch/pull/2316)\n+\n+Fixed an HTTP Error 500 when attempting to export a Sketch.\n+\n+### And some other minor bugfixes\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/index.md",
"new_path": "docs/index.md",
"diff": "@@ -28,6 +28,10 @@ Timesketch is an open-source tool for collaborative forensic timeline analysis.\n\n\n+## Changelog\n+\n+- [2022-09](changelog/2022-09)\n+\n---\n**Obligatory Fine Print**: This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Changelog 2022-09 (#2358)
Only documentation affected, so overwriting branch protection as admin |
263,096 | 14.10.2022 13:55:09 | -7,200 | d9392f600e1e444c8a621c1c769dbe736aab0c3e | Update frontend-development.md | [
{
"change_type": "MODIFY",
"old_path": "docs/developers/frontend-development.md",
"new_path": "docs/developers/frontend-development.md",
"diff": "@@ -57,3 +57,38 @@ $ docker-compose exec timesketch yarn run --cwd=/usr/local/src/timesketch/timesk\nThis will spawn a listener on port `5001`. Point your browser to `http://localhost:5001/login`, login with your\ndev credentials, and you should be redirected to the main Timesketch page. All code changes in `.vue` files will\nbe instantly picked up.\n+\n+## Frontend-ng developement\n+\n+## Frontend development\n+\n+When developing the frontend-ng you use the VueJS frontend server. Changes will be picked up automatically\n+as soon as a `.vue` file is saved without having to rebuild the frontend or even refresh your browser.\n+\n+Follow the steps in the previous section to get dependencies installed.\n+\n+### Tweak config files\n+\n+* In your `timesketch` docker container, edit `/etc/timesketch/timesketch.conf` and set `WTF_CSRF_ENABLED = False`.\n+\n+### Start the VueJS development server\n+\n+You need two shells:\n+\n+1. Start the main webserver (for serving the API etc) in the first shell:\n+```bash\n+$ CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\n+$ docker exec -it $CONTAINER_ID gunicorn --reload -b 0.0.0.0:5000 --log-file - --timeout 600 -c /usr/local/src/timesketch/data/gunicorn_config.py timesketch.wsgi:application\n+```\n+\n+2. Start the development webserver in the second shell:\n+```bash\n+$ CONTAINER_ID=\"$(docker container list -f name=timesketch-dev -q)\"\n+$ docker-compose exec timesketch yarn run --cwd=/usr/local/src/timesketch/timesketch/frontend-ng serve\n+```\n+\n+This will spawn a listener on port `5001`. Point your browser to `http://localhost:5001/login`, login with your\n+dev credentials, and you should be redirected to the main Timesketch page. All code changes in `.vue` files will\n+be instantly picked up.\n+\n+If you already have a yarn process running with the \"old\" frontend, it might not work.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update frontend-development.md (#2367) |
263,096 | 18.10.2022 11:48:49 | -7,200 | 6b6f6a260c9392edb2969d7dc7ac406751a751d4 | re-adding console.error(error.response.data) | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/utils/RestApiClient.js",
"new_path": "timesketch/frontend-ng/src/utils/RestApiClient.js",
"diff": "@@ -53,6 +53,8 @@ RestApiClient.interceptors.response.use(\n},\n})\n} else {\n+ // TODO: Consider removing that if a global Error handling is established\n+ console.error(error.response.data)\nSnackbar.open({\nmessage: error.response.data.message,\ntype: 'is-white',\n"
}
] | Python | Apache License 2.0 | google/timesketch | re-adding console.error(error.response.data) (#2375) |
263,093 | 21.10.2022 08:18:34 | -7,200 | a2f20c54455a2e4562c62420cf197bebb77e85bb | Add UI feedback issue template | [
{
"change_type": "ADD",
"old_path": null,
"new_path": ".github/ISSUE_TEMPLATE/ui_feedback.md",
"diff": "+---\n+name: UI feedback\n+about: Give feedback on the UI experience.\n+title: 'UI feedback: '\n+labels: 'UI/UX, Feedback'\n+\n+---\n+\n+**Describe the solution you'd like**\n+A clear and concise description of your feedback.\n+\n+**Screenshots**\n+If you have screenshots that clarifies your feedback, please add it here.\n"
}
] | Python | Apache License 2.0 | google/timesketch | Add UI feedback issue template |
263,157 | 31.10.2022 14:46:33 | -3,600 | 7bda5422a096030c47eff1a0d933d01d40f73b58 | Adding maxmind attribution for the geoip analyzer. | [
{
"change_type": "MODIFY",
"old_path": "timesketch/lib/analyzers/geoip.py",
"new_path": "timesketch/lib/analyzers/geoip.py",
"diff": "# See the License for the specific language governing permissions and\n# limitations under the License.\n+# This geoip analyzer uses GeoLite2 data created by MaxMind,\n+# available from https://maxmind.com\n+\n\"\"\"Sketch analyzer plugin for geolocating IP addresses.\"\"\"\nimport os\n@@ -345,7 +348,7 @@ class MaxMindDbGeoIPAnalyzer(BaseGeoIpAnalyzer):\nDISPLAY_NAME = \"Geolocate IP addresses (MaxMind Database based)\"\nDESCRIPTION = (\n\"Find the approximate geolocation of an IP address using \"\n- + \"a MaxMind GeoLite2 database\"\n+ \"a MaxMind GeoLite2 database, available from https://maxmind.com\"\n)\n@@ -357,7 +360,7 @@ class MaxMindDbWebIPAnalyzer(BaseGeoIpAnalyzer):\nDISPLAY_NAME = \"Geolocate IP addresses (MaxMind Web client based)\"\nDESCRIPTION = (\n\"Find the approximate geolocation of an IP address using \"\n- + \"a MaxMind GeoLite2 web client API\"\n+ \"a MaxMind GeoLite2 web client API, available from https://maxmind.com\"\n)\n"
}
] | Python | Apache License 2.0 | google/timesketch | Adding maxmind attribution for the geoip analyzer. (#2406) |
263,096 | 08.11.2022 16:49:51 | -3,600 | 9cc38aea0a13007cd45ed78d81c2e50992f63d70 | [Sigma] Update OriginalFileName mapping
* Update OriginalFileName mapping
the previous mapping did create a query that was not parseable, e.g. for rule #
* remove one Image mapping that was not unique | [
{
"change_type": "MODIFY",
"old_path": "data/sigma_config.yaml",
"new_path": "data/sigma_config.yaml",
"diff": "@@ -326,7 +326,6 @@ fieldmappings:\nTargetFilename:\nproduct=linux: filename\ndefault: xml_string\n- Image: xml_string # that is a value name that might be used in other queries as well. Ideally it would be something _all\nImageLoaded: xml_string\nQueryName: xml_string\nTargetProcessAddress: xml_string\n@@ -339,7 +338,7 @@ fieldmappings:\nSigned: xml_string\nScriptBlockText: xml_string\nContextInfo: xml_string\n- OriginalFileName: \"xml_string:*OriginalFileName*\"\n+ OriginalFileName: xml_string # 80167ada-7a12-41ed-b8e9-aa47195c66a1\nPayload: xml_string\nHostName: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\nHostApplication: xml_string #96b9f619-aa91-478f-bacb-c3e50f8df575\n"
}
] | Python | Apache License 2.0 | google/timesketch | [Sigma] Update OriginalFileName mapping (#2412)
* Update OriginalFileName mapping
the previous mapping did create a query that was not parseable, e.g. for rule # 80167ada-7a12-41ed-b8e9-aa47195c66a1
* remove one Image mapping that was not unique |
263,096 | 11.11.2022 09:44:59 | -3,600 | 7c0eaf0f97c657b2cb0dbc0d7acea2497b022ab5 | use capitalize in currentUser in App.vue
Fixes:
```TypeError: Cannot read properties of undefined (reading 'charAt')
at Proxy.render (VM25715 App.vue:71:37)
at Vue._render (vue.runtime.esm.js?2b0e:2654:1)
at VueComponent.updateComponent (vue.runtime.esm.js?2b0e:3844:1)``` | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/App.vue",
"new_path": "timesketch/frontend-ng/src/App.vue",
"diff": "@@ -49,7 +49,7 @@ limitations under the License.\nShare\n</v-btn>\n<v-avatar color=\"grey lighten-1\" size=\"25\" class=\"ml-3\">\n- <span class=\"white--text\">{{ currentUser.charAt(0).toUpperCase() }}</span>\n+ <span class=\"white--text\">{{ currentUser | capitalize }}</span>\n</v-avatar>\n<v-menu v-if=\"!isRootPage\" offset-y>\n<template v-slot:activator=\"{ on, attrs }\">\n"
}
] | Python | Apache License 2.0 | google/timesketch | use capitalize in currentUser in App.vue (#2418)
Fixes:
```TypeError: Cannot read properties of undefined (reading 'charAt')
at Proxy.render (VM25715 App.vue:71:37)
at Vue._render (vue.runtime.esm.js?2b0e:2654:1)
at VueComponent.updateComponent (vue.runtime.esm.js?2b0e:3844:1)``` |
263,096 | 11.11.2022 11:24:36 | -3,600 | 1b70edd81e0755fc912427571a85542ae07a6c8d | Update SearchTemplates.vue to check if no searchTemplates are on a system
* Update SearchTemplates.vue
Fixes:
* Update SearchTemplates.vue | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/components/LeftPanel/SearchTemplates.vue",
"new_path": "timesketch/frontend-ng/src/components/LeftPanel/SearchTemplates.vue",
"diff": "@@ -80,6 +80,9 @@ export default {\nApiClient.getSearchTemplates()\n.then((response) => {\nthis.searchtemplates = response.data.objects[0]\n+ if (typeof(this.searchtemplates) === 'undefined') {\n+ this.searchtemplates = []\n+ }\n})\n.catch((e) => {})\n},\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update SearchTemplates.vue to check if no searchTemplates are on a system (#2419)
* Update SearchTemplates.vue
Fixes: https://github.com/google/timesketch/issues/2395
* Update SearchTemplates.vue
Co-authored-by: Johan Berggren <jberggren@gmail.com> |
263,096 | 17.11.2022 09:46:08 | -3,600 | f90dab57297762d4f24a2bbe61a3542b1c811dec | update Sigma doc to match the new Web UI | [
{
"change_type": "ADD",
"old_path": "docs/assets/images/Sigma_create_rule.gif",
"new_path": "docs/assets/images/Sigma_create_rule.gif",
"diff": "Binary files /dev/null and b/docs/assets/images/Sigma_create_rule.gif differ\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/guides/user/sigma.md",
"new_path": "docs/guides/user/sigma.md",
"diff": "@@ -9,6 +9,8 @@ See description at the [Sigma Github repository](https://github.com/Neo23x0/sigm\nSince early 2020 Timesketch has Sigma support implemented. Sigma can be used as an analyzer.\nThe other option is to use Sigma via the API and the API client or the Web interface.\n+> Sigma in Timesketch should still be considered an Alpha version functionality with known performance and functionality issues.\n+\n### Web Interface\nSigma rules are exposed to the Web Interface as part of a sketch.\n@@ -29,7 +31,11 @@ This will show a table with all Sigma rules installed on a system. You can searc\nSo if you want to search for ZMap related rules, you can search for `zma` in `Title, File Name` and it will show you the pre installed rule.\n-#### Hits\n+#### Analyzer\n+\n+The Sigma Analyzer will only take rules that have the status: `stable`. `Experimental`, `Deprecated` or similar marked rules are **not picked up** by the Analyzer.\n+\n+##### Hits\nIf you have run the Sigma Analyzer on a sketch and a rule has produced hits, the following fields will be added to the event:\n@@ -64,6 +70,35 @@ In this detail view all key and values of that rule that has been parsed by Time\nTimesketch deliberately does not provide a set of Sigma rules, as those would add complexity to maintain.\nTo use the official community rules you can visit [github.com/Neo23x0/sigma](https://github.com/Neo23x0/sigma) and copy the rules you are interested in.\n+#### Web\n+\n+In the past, Sigma rules where stored on disk, in 2022 this has been changed and Sigma rules are stored in the database.\n+New rules can be added / modified via the Sigma Tab.\n+\n+\n+\n+#### tscl\n+\n+Sigma rules can also be added by the [admin-cli](../admin/admin-cli).\n+\n+\n+```shell\n+tsctl import-sigma-rules sigma/rules/cloud/gcp/\n+Importing: Google Cloud Kubernetes RoleBinding\n+Importing: Google Cloud Storage Buckets Modified or Deleted\n+Importing: Google Cloud VPN Tunnel Modified or Deleted\n+Importing: Google Cloud Re-identifies Sensitive Information\n+...\n+```\n+\n+#### Limitations\n+\n+It is **not** recommended to simply add all Sigma rules from e.g. [github.com/Neo23x0/sigma](https://github.com/Neo23x0/sigma).\n+\n+- Rules might have missing field mappings (see below) which will cause to broad queries\n+- Rules might have to many `OR` & `AND` combinations that result in very compley OpenSearch queries. On a large index, such queries can cause Timeouts that can lead to stability problems of your Timesketch instance\n+- To many rules marked as Stable could result in Sigma Analyzers running for hours or days, blocking other Analyzers\n+\n### Timesketch config file\nThere are multiple sigma related config variables in `timesketch.conf`.\n@@ -203,47 +238,6 @@ The Sigma analyzer is designed to batch and throttle execution of queries which\nIf you can, define the haystack OpenSearch has to query. This can be achieved by adding a check for `data_type:\"foosource\"`.\n-## Verify rules\n-\n-Deploying rules that can not be parsed by Sigma can cause problems on analyst side\n-as well as Timesketch operator side. The analyst might not be able to see\n-the logs and the errors might only occur when running the analyzer.\n-\n-Use the Status of a Sigma rule to tell analysts and analyzers when to use a rule.\n-\n-TODO: Write down status mapping to analyzer\n-\n-This is why a standalone tool can be used from:\n-\n-```shell\n-test_tools/sigma_verify_rules.py\n-```\n-\n-This tool takes the following options:\n-\n-```shell\n-usage: sigma_verify_rules.py [-h] [--config_file PATH_TO_TEST_FILE]\n- PATH_TO_RULES\n-sigma_verify_rules.py: error: the following arguments are required: PATH_TO_RULES\n-```\n-\n-And could be used like the following to verify your rules would work:\n-\n-```shell\n-sigma_verify_rules.py --config_file ../data/sigma_config.yaml ../data/sigma/rules\n-```\n-\n-If any rules in that folder is causing problems it will be shown:\n-\n-```shell\n-sigma_verify_rules.py --config_file ../data/sigma_config.yaml ../timesketch/data/sigma/rules\n-ERROR:root:reverse_shell.yaml Error generating rule in file ../timesketch/data/sigma/rules/linux/reverse_shell.yaml you should not use this rule in Timesketch: No condition found\n-ERROR:root:recon_commands.yaml Error generating rule in file ../timesketch/data/sigma/rules/data/linux/recon_commands.yaml you should not use this rule in Timesketch: No condition found\n-You should NOT import the following rules\n-../timesketch/data/sigma/rules/linux/reverse_shell.yaml\n-../timesketch/data/sigma/rules/linux/recon_commands.yaml\n-```\n-\n## Troubleshooting\n### How to find issues\n@@ -294,8 +288,6 @@ Feel free to contribute for fun and fame, this is open source :) -> https://gith\n### What to do with problematic rules\n-To reduce load on the system it is recommended to not keep the problematic rules in the directory, as it will cause the exception every time the rules folders are parsed (a lot!).\n-\n-The parser is made to ignore \"deprecated\" folders. So you could move the problematic rules to your rules folder in a subfolder /deprecated/.\n+Update the status of the rule to `deprecated`.\nIf the rules do not contain any sensitive content, you could also open an issue in the timesketch project and or in the upstream sigma project and explain your issue (best case: provide your timesketch sigma config and the rule file so it can be verified).\n"
}
] | Python | Apache License 2.0 | google/timesketch | update Sigma doc to match the new Web UI (#2427) |
263,093 | 01.12.2022 16:57:18 | -3,600 | f0bec45a358f2464b31b67b12bd247e5fb24a1bb | Update client.py
Ignore type errors running under Python 3.10. | [
{
"change_type": "MODIFY",
"old_path": "api_client/python/timesketch_api_client/client.py",
"new_path": "api_client/python/timesketch_api_client/client.py",
"diff": "@@ -713,7 +713,7 @@ class TimesketchApi:\nexcept ValueError:\nlogger.error(\"Parsing Error, unable to parse the Sigma rule\", exc_info=True)\n- return sigma_obj\n+ return sigma_obj # pytype: disable=name-error # py310-upgrade\ndef get_sigma_rule(self, rule_uuid):\n\"\"\"DEPRECATED please use get_sigmarule() instead: Get a sigma rule.\n@@ -752,4 +752,4 @@ class TimesketchApi:\nexcept ValueError:\nlogger.error(\"Parsing Error, unable to parse the Sigma rule\", exc_info=True)\n- return sigma_obj\n+ return sigma_obj # pytype: disable=name-error # py310-upgrade\n"
}
] | Python | Apache License 2.0 | google/timesketch | Update client.py (#2441)
Ignore type errors running under Python 3.10. |
263,157 | 05.12.2022 16:28:00 | -3,600 | 8c9249ce094c2304bf0194448a6ef5b3c552ad6b | Context lookup part 2 - front-end API client
* + Adding context links to the frontend API.
+ Storing the configuration data in the vue store.
+ Loading the configuration when the sketch is loaded.
* Removed an unused parameter for loading the context link data from the store. | [
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/store.js",
"new_path": "timesketch/frontend-ng/src/store.js",
"diff": "@@ -42,7 +42,8 @@ const defaultState = (currentUser) => {\ncolor: \"\",\nmessage: \"\",\ntimeout: -1\n- }\n+ },\n+ contextLinkConf: {},\n}\n}\n@@ -109,6 +110,9 @@ export default new Vuex.Store({\nObject.assign(state, defaultState(currentUser))\n})\n},\n+ SET_CONTEXT_LINKS(state, payload) {\n+ Vue.set(state, 'contextLinkConf', payload)\n+ },\n},\nactions: {\nupdateSketch(context, sketchId) {\n@@ -217,6 +221,13 @@ export default new Vuex.Store({\nmessage: snackbar.message,\ntimeout: snackbar.timeout\n});\n- }\n+ },\n+ updateContextLinks(context) {\n+ ApiClient.getContextLinkConfig()\n+ .then((response) => {\n+ context.commit('SET_CONTEXT_LINKS', response.data)\n+ })\n+ .catch((e) => { })\n+ },\n},\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/utils/RestApiClient.js",
"new_path": "timesketch/frontend-ng/src/utils/RestApiClient.js",
"diff": "@@ -391,4 +391,7 @@ export default {\nlet formData = { status: status }\nreturn RestApiClient.post('/sketches/' + sketchId + '/scenarios/' + scenarioId + '/status/', formData)\n},\n+ getContextLinkConfig() {\n+ return RestApiClient.get('/contextlinks/')\n+ },\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "timesketch/frontend-ng/src/views/Sketch.vue",
"new_path": "timesketch/frontend-ng/src/views/Sketch.vue",
"diff": "@@ -265,6 +265,7 @@ export default {\nthis.$store.dispatch('updateScenarios', this.sketchId)\nthis.$store.dispatch('updateScenarioTemplates', this.sketchId)\nthis.$store.dispatch('updateSigmaList', this.sketchId)\n+ this.$store.dispatch('updateContextLinks')\n})\n},\nupdated() {\n"
}
] | Python | Apache License 2.0 | google/timesketch | Context lookup part 2 - front-end API client (#2445)
* + Adding context links to the frontend API.
+ Storing the configuration data in the vue store.
+ Loading the configuration when the sketch is loaded.
* Removed an unused parameter for loading the context link data from the store. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.