Question: I need a mechanism/organism similar to rust and virus, that will both impair the ship's components AND will kill crew, so the only thing left are a few lucky survivors on a crippled ship. Presumably the hull is breached by a tiny comet containing the mechanism.

For the component damage, maybe it just attacks wiring or some electronic components (affect only copper, silicon, semiconductors etc) or certain structural elements (affects only aluminum, carbon-fibre, rubber, etc)

Answer: 
I'll suggest [FOOF](https://en.wikipedia.org/wiki/Dioxygen_difluoride) and then back away very quickly. That stuff is so dangerous I don't even like to *read* about it for fear of getting burned, I don't know if it can occur in nature easily enough that a ship could get hit with it but if it did any survivors would be very lucky indeed. That is to say it does occur in nature but not very often to my knowledge. It is pretty indiscriminate though so if you want to realistically cripple non-contiguous systems with it you'd need multiple tiny point sources rather than one big one.
[Strangelets](https://worldbuilding.stackexchange.com/a/52154/21222).

A strangelet is a subatomic particle that converts other subatomic particles into more strangelets. This is theoretical, but the theory has it that such a thing would grow like a katamari.

From [Wikipedia](https://en.wikipedia.org/wiki/Strangelet#Dangers):

> 
> If the strange matter hypothesis is incorrect and its surface tension is larger than the aforementioned critical value, then a larger strangelet would be more stable than a smaller one. One speculation that has resulted from the idea is that a strangelet coming into contact with a lump of ordinary matter could convert the ordinary matter to strange matter. This "ice-nine"-like disaster scenario is as follows: one strangelet hits a nucleus, catalyzing its immediate conversion to strange matter. This liberates energy, producing a larger, more stable strangelet, which in turn hits another nucleus, catalyzing its conversion to strange matter. **In the end, all the nuclei of all the atoms of Earth are converted, and Earth is reduced to a hot, large lump of strange matter.**
> 
> 
> 

I could never find online the rate of conversion... But you could tailor it to your worldbuilding needs. Anyway, when a ship gets hit by a strangelet it is only a matter of time until it completely dissolves, and the only way to survive is to get out of the ship while you can.