diff --git a/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeStatus.sh b/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeStatus.sh new file mode 100644 index 0000000..c3b28f1 --- /dev/null +++ b/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeStatus.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +################################################################################################### +# Script Name: jamf_ea_CrowdStrikeStatus.sh +# By: Zack Thompson / Created: 1/8/2019 +# Version: 1.0.0 / Updated: 1/8/2019 / By: ZT +# +# Description: This script gets the configuration of Crowd Strike. +# +################################################################################################### + +echo "Checking the Crowd Strike configuration..." + +################################################## +# Define Variables for each item that we want to check for +customerID="12345678-90AB-CDEF-1234-567890ABCDEF" +cloudConnectionState="102" +# A value of 102 indicates the host is connected directly to the CrowdStrike cloud. +# A value of 126 indicates the host is connected to the CrowdStrike cloud via a proxy. + +# Get the current values for the items we want to check +csCustomerID=$( /usr/sbin/sysctl -n cs.customerid 2>&1 ) +csCloudConnectionState=$( /usr/sbin/sysctl -n cs.comms.cloud_connection_state 2>&1 ) +kextsEnabled=$( /usr/bin/sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy "select * from kext_policy where team_id='X9E956P446' and allowed='0';" | /usr/bin/wc -l | /usr/bin/xargs ) + +# Hold statuses +returnResult="" + +################################################## +# Bits staged, collect the information... + +if [[ "${csCustomerID}" != "${customerID}" ]]; then + returnResult+="Invalid Customer ID;" +fi + +if [[ "${csCloudConnectionState}" != "${cloudConnectionState}" ]]; then + returnResult+=" Disconnected State;" +fi + +if [[ "${kextsEnabled}" != "2" ]]; then + returnResult+=" KEXTs are not enabled;" +fi + +################################################## +# Return any errors or the all good. + +if [[ -n "${returnResult}" ]]; then + echo "${returnResult%?}" +else + echo "Running" +fi + +exit 0 \ No newline at end of file diff --git a/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeVersion.sh b/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeVersion.sh new file mode 100644 index 0000000..bcffc9b --- /dev/null +++ b/Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeVersion.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +################################################################################################### +# Script Name: jamf_ea_CrowdStrikeVersion.sh +# By: Zack Thompson / Created: 1/8/2019 +# Version: 1.0.0 / Updated: 1/8/2019 / By: ZT +# +# Description: This script gets the version of Crowd Strike. +# +################################################################################################### + +echo "Checking the Crowd Strike Version..." + +# Querty for the version string +csVersion=$( /usr/sbin/sysctl -n cs.version 2>&1 ) + +# Check if the command was successful +if [[ $? == "0" ]]; then + echo "${csVersion}" +else + echo "Not installed or running" +fi + +exit 0 \ No newline at end of file