Extension Attribute to RF Receiver

Michael_vogel
New Contributor II

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.

1 REPLY 1

Michael_vogel
New Contributor II

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