Not Living Virus
Its not my field either, but from my understanding, it is considerably simpler than that. For viruses and other similar bodies, docking with a cell is less a matter of knowing anything, and more like a pair of magnets becoming attracted to each other. For the virus, protein sequences meeting the proper match (Ie the outer surface of a cell) cause other proteins to contract, changing the shape of the virus such that it injects.
Have you ever seen fresh squid legs dancing when soy sauce is applied? In spite of them being quite dead, and definitely severed from anything designed to make them move, the salts cause an automatic reaction. What we're talking about is the microcellular equivalent of that kind of reaction.