Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AD ID Logging Dashboards and New Wec Config XML File #388

Merged
merged 24 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7add658
New wec config xml for ad id logging and new dashboards
Jul 25, 2024
5079548
updated zip to contain new GPOs
Jul 29, 2024
c16c534
Divine's dashboards
Jul 29, 2024
bbff833
Fixed bug in lme_wec_config, missing asterisk in queries
Jul 29, 2024
633529d
Fixed casing on Query ID, must be Id
Jul 29, 2024
e58045e
Fixed typo empty path string
Jul 29, 2024
1b731b8
Fixed scheduler typo
Jul 30, 2024
429db5c
Renamed dashboards to fit convention
Jul 30, 2024
021cb48
Dashboard descriptions
rgbrow1949 Jul 30, 2024
6aa8ab5
Fixed spacing
rgbrow1949 Jul 30, 2024
47a63fc
Fixed spacing 2
rgbrow1949 Jul 30, 2024
6e2652b
Adjusted dashboard names
rgbrow1949 Jul 30, 2024
3aac1ef
Typo fix
rgbrow1949 Jul 30, 2024
a08bbf5
Merge branch 'release-1.4.0' into ad-id-logging-dashboards
cbaxley Aug 2, 2024
88c3d5c
Upgrade instructions for release 1.4.0 for ID Logging
rgbrow1949 Aug 7, 2024
144c9aa
removing text
rgbrow1949 Aug 7, 2024
472bc6f
Adds code to upgrade to 1.4.0
cbaxley Aug 8, 2024
a153028
Merge remote-tracking branch 'origin/ad-id-logging-dashboards' into a…
cbaxley Aug 8, 2024
59c1d8e
Check the latest and version in the upgrade section
cbaxley Aug 8, 2024
1d80e52
Adds a better check for upgrading from 1.3.x to 1.4.x
cbaxley Aug 9, 2024
a072a4d
Modify the version check for upgrades
cbaxley Aug 9, 2024
6da6574
Updates the dashboards to be all exported by the exporter script
cbaxley Aug 13, 2024
57740f6
Adds the updated menu to all of the dashboards
cbaxley Aug 13, 2024
65d37f5
Update the upgrade directions for those who downloaded the version
cbaxley Aug 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Chapter 1 Files/lme_gpo_for_windows.zip
Binary file not shown.
640 changes: 639 additions & 1 deletion Chapter 1 Files/lme_wec_config.xml

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions Chapter 3 Files/dashboard_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ -r /opt/lme/lme.conf ]; then
#reference this file as a source
. /opt/lme/lme.conf
#check if the version number is equal to the one we want
if [ "$version" == "1.3.0" ] || [ "$FRESH_INSTALL" = "true" ]; then
if [ "$version" == "1.3.0" ] || [ "$version" == "1.4.0" ] || [ "$FRESH_INSTALL" = "true" ]; then
echo -e "\e[32m[X]\e[0m Updating from git repo"
git -C /opt/lme/ pull
#make sure the hostname variable is present
Expand All @@ -19,8 +19,11 @@ if [ -r /opt/lme/lme.conf ]; then
echo -e "\e[32m[X]\e[0m Uploading the new dashboards to Kibana"
for db in ${Dashboards};
do
echo -e "\e[32m[X]\e[0m Uploading ${db%%*.} dashboard\n"
curl -X POST -k --user dashboard_update:dashboardupdatepassword -H 'kbn-xsrf: true' --form file="@${dashbaord_dir}/${db}" "https://127.0.0.1/api/saved_objects/_import?overwrite=true"
filename=${db##*/}
filename_no_ext=${filename%.*}
echo -e "\e[32m[X]\e[0m Uploading ${filename_no_ext} dashboard\n"
curl -X POST -k --user dashboard_update:dashboardupdatepassword -H 'kbn-xsrf: true' --form file="@${db}" "https://127.0.0.1/api/saved_objects/_import?overwrite=true"

echo
done

Expand Down
24 changes: 22 additions & 2 deletions Chapter 3 Files/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1087,11 +1087,31 @@ function upgrade() {

info "Updating dashbaords"
sudo /opt/lme/dashboard_update.sh
elif [ "$(printf '%s\n' "$version" "1.3.0" | sort -V | head -n1)" = "1.3.0" ] && \
[ "$(printf '%s\n' "$version" "1.3.9" | sort -V | head -n1)" = "$version" ]; then
info "Copying lme.conf -> lme.conf.bku"
sudo cp -rapf /opt/lme/lme.conf /opt/lme/lme.conf.bku

info "Copying dashboard_update.sh -> dashboard_update.sh.bku"
sudo cp -rapf /opt/lme/dashboard_update.sh /opt/lme/dashboard_update.sh.bku

info "Setting up new dashboard_update.sh"
sudo cp -rapf /opt/lme/Chapter\ 3\ Files/dashboard_update.sh /opt/lme/dashboard_update.sh
old_password=$(grep -P -o "(?<=dashboard_update:)[0-9a-zA-Z]+ " /opt/lme/dashboard_update.sh.bku)
sudo sed -i "s/dashboardupdatepassword/$old_password/g" /opt/lme/dashboard_update.sh

#update VERSION NUMBER
info "Updating Version to $latest"
sudo cp -rapf /opt/lme/lme.conf /opt/lme/lme.conf.bku
sudo sed -i -E "s/version=[0-9]+\.[0-9]+\.[0-9]+/version=$latest/g" /opt/lme/lme.conf
chmod u+rwx /opt/lme/dashboard_update.sh

info "Updating dashbaords"
sudo /opt/lme/dashboard_update.sh
elif [ "$version" == $latest ]; then
info "You're on the latest version!"
elif [ "$version" > "1.3.0" ]; then
info "There are no upgrades in this version. $latest"
elif [ "$(printf '%s\n' "$version" "1.4.0" | sort -V | tail -n1)" == "$version" ]; then
info "There are no upgrades in this version. Version: $version Latest: $latest"
else
error "Updating directly to LME 1.0 from versions prior to 0.5.1 is not supported. Update to 0.5.1 first."
fi
Expand Down
34 changes: 17 additions & 17 deletions Chapter 4 Files/dashboards/alerting_dashboard.ndjson

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Chapter 4 Files/dashboards/computer_software_overview.ndjson

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Chapter 4 Files/dashboards/identity_access_management.ndjson

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Chapter 4 Files/dashboards/process_explorer.ndjson

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions Chapter 4 Files/dashboards/security_dashboard_security_log.ndjson

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Chapter 4 Files/dashboards/sysmon_summary.ndjson

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Chapter 4 Files/dashboards/user_hr.ndjson

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions Chapter 4 Files/dashboards/user_security.ndjson

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions Chapter 4 Files/export_dashboards.py
100644 β†’ 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,20 @@ def get_basic_auth(username, password):
return base64.b64encode(f"{username}:{password}".encode()).decode()

def get_ids(self):
url = f'{self.root_url}/api/kibana/management/saved_objects/_find?perPage=500&page=1&fields=id&type=dashboard&sortField=updated_at&sortOrder=desc'
url = f'{self.root_url}/api/kibana/management/saved_objects/_find?perPage=500&page=1&type=dashboard&sortField=updated_at&sortOrder=desc'

try:
response = requests.get(url, headers={'Authorization': f'Basic {self.basic_auth}'}, verify=False)

if response.status_code == 200:
data = response.json()
ids = {item['id']: item['meta']['title'] for item in data.get('saved_objects', [])}
#ids = {item['id']: item['meta']['title'] for item in data.get('saved_objects', [])}
#return ids
ids = {
item['id']: item['meta']['title']
for item in data.get('saved_objects', [])
if '[' not in item['meta']['title'] and ']' not in item['meta']['title']
}
return ids
else:
print(f"HTTP request failed with status code: {response.status_code}")
Expand Down
17 changes: 13 additions & 4 deletions docs/markdown/maintenance/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,18 @@ sudo ./deploy.sh uninstall
sudo ./deploy.sh install
```

The deploy.sh script should have now created new files on the Linux server at location /opt/lme/files_for_windows.zip . This file needs to be copied across and used on the Windows Event Collector server like it was explained in Chapter 3 sections [3.2.4 & 3.3 ](/docs/markdown/chapter3/chapter3.md#324-download-files-for-windows-event-collector).
The deploy.sh script should have now created new files on the Linux server at location /opt/lme/files_for_windows.zip . This file needs to be copied across and used on the Windows Event Collector server like it was explained in Chapter 3 sections [3.2.4 & 3.3 ](/docs/markdown/chapter3/chapter3.md#324-download-files-for-windows-event-collector).

## 8. v1.4.0 - Upgrading Group Policy Objects
## 8. Upgrade to v1.4.0
To upgrade, you will need to update the LME Group Policy Objects and the Windows Event Collector.

### 8.1 Updating Group Policy Objects
1. On the domain controller, open Group Policy Management, and delete "LME-WEC-Client" and "LME-WEC-Server".
2. Follow Chapter 1 instructions 1.3 and 1.4 to re-download LME, create the GPOs, import the v1.4.0 GPOs, and link them to your OU. Note: You will not need to create a new OU. You may reuse the OU used in prior installation. (https://github.com/cisagov/LME/blob/main/docs/markdown/chapter1/chapter1.md#13-download-lme)
3. Right click on the OU the v1.4.0 GPOs are linked to and click "Group Policy Update"
2. Follow Chapter 1 instructions 1.3 and 1.4 to re-download LME, create the GPOs, import the v1.4.0 GPOs, and link them to both your Clients OU and your Domain Controllers OU. Note: You will not need to create a new OU. You may reuse the OU from your prior installation. (https://github.com/cisagov/LME/blob/main/docs/markdown/chapter1/chapter1.md#13-download-lme)
3. Right click on the OUs the v1.4.0 GPOs are linked to and click "Group Policy Update".

### 8.2 Updating Windows Event Collector
1. On the domain controller, open Event Viewer, go to Subscriptions, and delete "LME".
2. Re-download LME.
3. Follow steps 4-6 in 1.5 in Chapter 1 instructions to create a new subscription using the new lme_wec_config.xml file.
4. Open Group Policy Management and right click on the OU the v1.4.0 GPOs are linked to and click "Group Policy Update".
16 changes: 16 additions & 0 deletions docs/markdown/reference/dashboard-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ The Alert Dashboard enables users to define rules that detect complex conditions

The HealthCheck Dashboard gives users the ability to view different processes such as unexpected shutdowns, events by each machine, total hosts and total number of logged in admins with data that is based on a selected date range. Users can verify the health of their system by observing events such as if there are more admin users than expected or if an unexpected shutdown occurs.

## Policy Changes and System Activity

The Policy Changes and System Activity dashboard enables users to monitor policy changes and important system activity. Users will be able to monitor the status of their firewall, including when it is turned on, off, its settings are changed, or exception rules are added or modified. This dashboard will also show when firewall, audit, or Kerberos policies are changed on their domain. Users will also be able to monitor when their PCs are turned on, off, and when RPC (Remote Procedure Call) connections are attempted on their domain.

## Identity Access Management

The Identity Access Management dashboard provides users with a collection of important security events involving identity and critical object access. This includes when registry objects, task scheduler jobs, and when password hashes are accessed. Users will also be able to monitor when passwords are reset, changed, and when users are locked out of their accounts. This dashboard also tracks when the default domain policy is changed which involves the domain password policy.

## Privileged Activity Log

The Privileged Activity Log dashboard enables users to carry on audits related to non-sensitive and sensitive events by showcasing the number of privileged service attempts, sensitive privilege attempts and non-sensitive privilege attempts made per host name. It also shows the number of processes created and terminated per host name. Such as process creation count, process termination counts as well as assigned token creation count per host.

## Credential Access Log

The Credential Access Log dashboard, focuses on account logon and account logoff audit events. In this dashboard, users will be able to monitor, audit logon attempts per hosts, logon using explicit credential attempts, account lockout attempts per host, special logon attempts per hosts, disconnection attempts, and credential validation attempts per host. Dashboard panels will also showcase Kerberos authentication services per host.



For more information or to seek additional help, [Click Here](https://github.com/cisagov/LME)
2 changes: 1 addition & 1 deletion testing/development/upgrade_lme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export current_branch=$(git rev-parse --abbrev-ref HEAD)
# Get the version that we are going to upgrade to
. ./merging_version.sh

# Checkout the version we are on
# Checkout the version in /opt/lme that we are on in ~/LME
sudo echo "Current branch: $current_branch"
sudo echo "Forcing version: $FORCE_LATEST_VERSION"
sudo sh -c "cd '/opt/lme/' && git checkout 'Chapter\ 3\ Files/deploy.sh' && git checkout -t origin/$current_branch && git pull"
Expand Down
Loading