Skip to content

Commit

Permalink
Add kibana client API wrappers for tamper protection E2E support (#141)
Browse files Browse the repository at this point in the history
* Add kibana client APIs for tamper protection E2E support
  • Loading branch information
aleksmaus committed Aug 7, 2023
1 parent 2c3df7a commit 81cae6b
Show file tree
Hide file tree
Showing 7 changed files with 701 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
.idea
.idea
.vscode
30 changes: 30 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,36 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/gofrs/uuid
Version: v4.4.0+incompatible
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/gofrs/uuid@v4.4.0+incompatible/LICENSE:

Copyright (C) 2013-2018 by Maxim Bublis <b@codemonkey.ru>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/hashicorp/go-multierror
Version: v1.1.1
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/elastic/go-structform v0.0.9
github.com/elastic/go-ucfg v0.8.5
github.com/fatih/color v1.13.0
github.com/gofrs/uuid v4.4.0+incompatible
github.com/hashicorp/go-multierror v1.1.1
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
github.com/magefile/mage v1.13.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/gobuffalo/here v0.6.0 h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
Expand Down
316 changes: 316 additions & 0 deletions kibana/endpoint_security_package.json.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
{
"id": "{{.ID}}",
"name": "{{.Name}}",
"namespace": "default",
"package": {
"name": "endpoint",
"version": "{{.Version}}"
},
"policy_id": "{{.PolicyID}}",
"vars": {},
"inputs": [
{
"type": "endpoint",
"enabled": true,
"streams": [],
"config": {
"integration_config": {
"value": {
"type": "endpoint",
"endpointConfig": {
"preset": "EDRComplete"
}
}
},
"artifact_manifest": {
"value": {
"manifest_version": "1.0.0",
"schema_version": "v1",
"artifacts": {
"endpoint-exceptionlist-macos-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-exceptionlist-macos-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-exceptionlist-windows-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-exceptionlist-windows-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-exceptionlist-linux-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-exceptionlist-linux-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-trustlist-macos-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-trustlist-macos-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-trustlist-windows-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-trustlist-windows-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-trustlist-linux-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-trustlist-linux-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-eventfilterlist-macos-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-eventfilterlist-macos-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-eventfilterlist-windows-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-eventfilterlist-windows-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-eventfilterlist-linux-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-eventfilterlist-linux-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-hostisolationexceptionlist-macos-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-hostisolationexceptionlist-macos-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-hostisolationexceptionlist-windows-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-hostisolationexceptionlist-windows-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-hostisolationexceptionlist-linux-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-hostisolationexceptionlist-linux-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-blocklist-macos-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-blocklist-macos-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-blocklist-windows-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-blocklist-windows-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
},
"endpoint-blocklist-linux-v1": {
"encryption_algorithm": "none",
"decoded_sha256": "d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"decoded_size": 14,
"encoded_sha256": "f8e6afa1d5662f5b37f83337af774b5785b5b7f1daee08b7b00c2d6813874cda",
"encoded_size": 22,
"relative_url": "/api/fleet/artifacts/endpoint-blocklist-linux-v1/d801aa1fb7ddcc330a5e3173372ea6af4a3d08ec58074478e85aa5603e926658",
"compression_algorithm": "zlib"
}
}
}
},
"policy": {
"value": {
"meta": {
"license": "trial",
"cloud": true
},
"windows": {
"events": {
"credential_access": true,
"dll_and_driver_load": true,
"dns": true,
"file": true,
"network": true,
"process": true,
"registry": true,
"security": true
},
"malware": {
"mode": "prevent",
"blocklist": true
},
"ransomware": {
"mode": "prevent",
"supported": true
},
"memory_protection": {
"mode": "prevent",
"supported": true
},
"behavior_protection": {
"mode": "prevent",
"supported": true
},
"popup": {
"malware": {
"message": "",
"enabled": true
},
"ransomware": {
"message": "",
"enabled": true
},
"memory_protection": {
"message": "",
"enabled": true
},
"behavior_protection": {
"message": "",
"enabled": true
}
},
"logging": {
"file": "info"
},
"antivirus_registration": {
"enabled": false
},
"attack_surface_reduction": {
"credential_hardening": {
"enabled": true
}
}
},
"mac": {
"events": {
"process": true,
"file": true,
"network": true
},
"malware": {
"mode": "prevent",
"blocklist": true
},
"behavior_protection": {
"mode": "prevent",
"supported": true
},
"memory_protection": {
"mode": "prevent",
"supported": true
},
"popup": {
"malware": {
"message": "",
"enabled": true
},
"behavior_protection": {
"message": "",
"enabled": true
},
"memory_protection": {
"message": "",
"enabled": true
}
},
"logging": {
"file": "info"
},
"advanced": {
"capture_env_vars": "DYLD_INSERT_LIBRARIES,DYLD_FRAMEWORK_PATH,DYLD_LIBRARY_PATH,LD_PRELOAD"
}
},
"linux": {
"events": {
"process": true,
"file": true,
"network": true,
"session_data": false,
"tty_io": false
},
"malware": {
"mode": "prevent",
"blocklist": true
},
"behavior_protection": {
"mode": "prevent",
"supported": true
},
"memory_protection": {
"mode": "prevent",
"supported": true
},
"popup": {
"malware": {
"message": "",
"enabled": true
},
"behavior_protection": {
"message": "",
"enabled": true
},
"memory_protection": {
"message": "",
"enabled": true
}
},
"logging": {
"file": "info"
},
"advanced": {
"capture_env_vars": "LD_PRELOAD,LD_LIBRARY_PATH"
}
}
}
}
}
}
]
}
Loading

0 comments on commit 81cae6b

Please sign in to comment.