Posted on 02-19-2020 10:03 AM
We are attempting to determine how many of our machines in our environment are using the LG Unifying RF receiver because of a vulnerability in them that allows for them to be hijacked. I believe an extension attribute would be the best way to determine if one of these are plugged into a device. Would that be the best way to do that? Is there a better way to determine which machines in our environment have that hardware plugged into it? Maybe an ioreg script?
Here is the information we are looking for: USB Receiver:
Product ID: 0xc52b Vendor ID: 0x046d (Logitech Inc.) Version: 12.03 Speed: Up to 12 Mb/s Manufacturer: Logitech Location ID: 0x14400000 / 1 Current Available (mA): 500 Current Required (mA): 98 Extra Operating Current (mA): 0
So I need to make an extension attribute that detects when something with that product ID and that version number are plugged into any Mac on our system.
Posted on 02-20-2020 11:40 AM
Built out the following Extension Attribute:
#!/bin/bash
#Determine Logitech adapter status
USB=$(system_profiler SPUSBDataType | grep '0xc52b')
if [[ "$USB" != "" ]]; then
#Determine firmware version
Version=$(system_profiler SPUSBDataType | grep 'Product|Version' | awk '/0xc52b/ { getline; print $2 }')
if [[ "$Version" != "12.11" ]]; then
echo "<result>Needs Update</result>"
else
echo "<result>Updated</result>"
fi
else
echo "<result>Not found</result>"
fi