security - How can USB vendor ID and product ID values be spoofed on OSX? -


we considering using vendor , product id of usb device (obtained via iokit) unlock features of application. i'm aware these values can spoofed, i'm not sure how can done on osx. involved in spoofing vendor , product id? non-programmer can easily?

a non-programmer cannot that. can writing kernel extension (an iokit driver) device, has matching dictionary matching real vendor-/product-id of device, causes system automatically load kernel extension when device connected , pass reference device object. driver responsible initializing device , create necessary user space information necessary iokit framework (the user space library) communicate device. apple has default iokit drivers usb device classes (that's why don't need driver every usb mouse or keyboard example), if there more specific driver found, driver used instead. , when creating user space data, of course driver may lie vendor-/product-id, causing user space program see false values. since iokit written in c++ , heavily depends upon objects , object inheritance, not necessary write driver scratch, instead can inherit apple's default driver , override methods , otherwise rely upon super implementation. however, writing iokit kernel drivers not easy , people developing mac software years may have no idea how , iokit documentation 1 of worst ones apple offering.

so answer question: possible? yes. easy? no. can non-programmers it? not, unless else has written ready use extension them, need install.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -