Hmm... That's a tough one.
You can easily stick a perk on them using a
Mod Incoming Damage Multiply 0.00 entry point with contionals for
HasKeyword WeapTypeSilver OR and
HasKeyword WeapTypeDaedric OR run on the Attacker Weapon.
But that wouldn't include enchanted weapons. There is no way to single-out a weapon's enchantment and work with it. However, in attempting to do so, I did find a way to detect if a weapon was enchanted. If a target has a weapon equipped that is enchanted, then conditionals run to see if a Contact-ranged spell is equipped
will return true when run on the hand that enchanted weapon is in. This means when an enchanted weapon is equipped, you are considered to both be using a weapon and simultaneously be using a contact-ranged spell. Use this method to detect enchanted weapons on that perk, and you'll officially have an Oblivion-style ghost that's immune to any weapons that aren't silver, daedric, or enchanted.