I have these group policies set on my personal computer and it seems to me they should protect against Rubber Ducky attack (however I've read other threads that say it's hard to protect against, hence I'd like to verify):
1. Block all devices:
gpedit.msc -> Computer Configuration\Administrative Templates\System\Device Installation\Device Installation Restrictions -> Prevent installation of devices not described by other policy settings [enabled]
2. Whitelist only specific instances of devices you trust (doesn't enable entire device categories but specific devices by their instance ID):
gpedit.msc -> Computer Configuration\Administrative Templates\System\Device Installation\Device Installation Restrictions -> Allow installation of devices that match any of these device instance IDs [enabled]
Would these indeed suffice to protect against Rubber Ducky attack?