I recently installed a new printer in our network. Just because I was interested, I switched to wireshark when scanning for and adding the printer on windows. I noticed that it was discoverd through mdns and then instructed windows to download some drivers in form of dll files. Now I wonder: What if I would setup a rogue udp server that listens for mdns queries and then responds with a fake printer service that sends malicous dlls to windows hosts. Since they are automatically "installed" (and executed?), it would provide a very good way into a system. I also wonder how one could fix this (issue?) without breaking the comfort this feature gives users.
I tried to setup a socket that listens for mdns queries to respond to in python3, but cannot get it to work. And before wasting much more of my time. I figured I'll ask about this attack vector here.