-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from hazcod/feat/overview
Feature: Workspace ONE support
- Loading branch information
Showing
9 changed files
with
395 additions
and
65 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,102 @@ | ||
# crowdstrike-spotlight-slacker | ||
Nags users on Slack about outstanding application vulnerabilities found by Crowdstrike Spotlight so they patch their software. | ||
# 🤖 security-slacker | ||
Nags users on Slack about outstanding risks found by Crowdstrike Spotlight or vmware Workspace ONE so they can secure their own endpoint. | ||
|
||
Self-service security culture! :partying_face: | ||
|
||
![slack example](.github/readme/screenshot.png) | ||
|
||
## Instructions | ||
|
||
1. Tag your Falcon hosts with `email/user/company/com` if their email is `[email protected]`. | ||
2. Fetch a binary release or Docker image from [Releases](https://github.com/hazcod/crowdstrike-spotlight-slacker/releases). | ||
3. Create a Falcon API token to use in `API Clients and Keys` with `Read` permission to `Hosts` and `Spotlight`. | ||
4. Create a Slack app and get the bot token. | ||
5. Create a configuration file: | ||
|
||
2. Assign compliance policies to your devies in Workspace ONE. | ||
3. Fetch a binary release or Docker image from [Releases](https://github.com/hazcod/crowdstrike-spotlight-slacker/releases). | ||
4. Create a Falcon API token to use in `API Clients and Keys` with `Read` permission to `Hosts` and `Spotlight`. | ||
5. Create a Workspace ONE API token and user to use. | ||
6. Create a configuration file: | ||
```yaml | ||
slack: | ||
# slack bot token | ||
token: "XXX" | ||
# Slack user that receives messages if the user is not found | ||
security_user: "[email protected]" | ||
# skip sending a security overview if there is nothing to mention | ||
skip_no_report: true | ||
|
||
# falcon crowdstrike | ||
falcon: | ||
# falcon api credentials | ||
clientid: "XXX" | ||
secret: "XXX" | ||
# your falcon SaaS cloud region | ||
cloud_region: "eu-1" | ||
# skip vulnerabilities without patches available | ||
# skip vulnerabilities without available patches | ||
skip_no_mitigation: true | ||
|
||
email: | ||
# email domain | ||
domain: "mycompany" | ||
# vmware workspace one | ||
ws1: | ||
api_url: "https://xxx.awmdm.com/api/" | ||
api_key: "XXX" | ||
user: "XXX" | ||
password: "XXX" | ||
|
||
# email domains used in your Slack workspace for filtering | ||
# e.g. for a Slack account [email protected] | ||
email.domains: ["mycompany.com"] | ||
|
||
# what is sent to the user in Go templating | ||
templates: | ||
user_message: | | ||
*:warning: We found security vulnerabilities on your device(s)* | ||
Hi {{ .Slack.Profile.FirstName }} {{ .Slack.Profile.LastName }}! One or more of your devices seem to be vulnerable. | ||
Luckily we noticed there are patches available. :tada: | ||
Can you please update following software as soon as possible? | ||
*:warning: We detected security issues on your device(s)* | ||
Hi {{ .Slack.Profile.FirstName }} {{ .Slack.Profile.LastName }}! | ||
{{ range $device := .User.Devices }} | ||
{{ if not (eq (len .Falcon.Devices) 0) }} | ||
One or more of your devices seem to be vulnerable. | ||
Luckily we noticed there are patches available. Please install following patches: | ||
{{ range $device := .Falcon.Devices }} | ||
:computer: {{ $device.MachineName }} | ||
{{ range $vuln := $device.Findings }} | ||
`{{ $vuln.ProductName }}` | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ if not (eq (len .WS1.Devices) 0) }} | ||
One or more of your devices seem to be misconfigured in an insecure way. | ||
Please check the below policies which are violated: | ||
{{ range $device := .WS1.Devices }} | ||
:computer: {{ $device.MachineName }} | ||
{{ range $finding := $device.Findings }} | ||
- :warning: {{ $finding.ComplianceName }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
Please update them as soon as possible. In case of any issues, hop into *#security*. | ||
Please resolve those issues as soon as possible. In case of any issues, hop into *#security*. | ||
Thank you! :wave: | ||
security_overview_message: | | ||
:information_source: *Device Posture overview* {{ .Date.Format "Jan 02, 2006 15:04:05 UTC" }} | ||
{{ if not .Results }}Nothing to report! :white_check_mark: {{ else }} | ||
{{ range $result := .Results }} | ||
{{ if and (not .Falcon) (not .WS1) }}Nothing to report! :white_check_mark: {{ else }} | ||
{{ range $result := .Falcon }} | ||
:man-surfing: *{{ $result.Email }}* | ||
{{ range $device := $result.Devices }} | ||
:computer: {{ $device.MachineName}} | ||
{{ range $vuln := $device.Findings }}- {{ $vuln.ProductName }} ({{ $vuln.CveSeverity }}) ({{ $vuln.TimestampFound }}) ({{ $vuln.CveID }}){{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ range $result := .WS1 }} | ||
:man-surfing: *{{ $result.Email }}* | ||
{{ range $device := $result.Devices }} | ||
:computer: {{ $device.MachineName }} | ||
Compromised: {{ $device.Compromised }} | ||
Last seen: {{ $device.LastSeen.Format "Jan 02, 2006 15:04:05 UTC" }} | ||
{{ range $finding := $device.Findings }}- :warning: {{ $finding.ComplianceName }}{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ if .Errors }} | ||
|
@@ -67,5 +106,6 @@ templates: | |
{{ end }} | ||
{{ end }} | ||
``` | ||
4. Run `css -config=your-config.yml`. | ||
5. See it popup in Slack! | ||
4. Run `css -config=your-config.yml -log=debug -dry` to test. | ||
5. See the security overview popup to you in Slack! | ||
6. Now run it for real with `css -config=your-config.yml`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.