I have an entirely speculative answer. Whilst the current answers do address your question, I have more of an overall general theory.
Barty Crouch Jr. was planning on impersonating Mad-Eye Moody for a year. He had a plan in place to ensure Harry got into the Triwizard tournament, came first and grabbed the cup in order to be transported to Wormtail.
That means that he needed to know Mad-Eye Moody well enough to be able to impersonate him until at least the end of the school year. Perhaps if he had not been found out, he could have spied on the Order for even longer impersonating Alistair.
In order to keep up the charade that he was Mad-Eye Moody, he would have needed to do meticulous research into his life. He was going into a place where dozens of people who knew Mad-Eye Moody well were going to be, and convince them that that was who he was.
He was in constant contact with previous Order of the Phoenix members and colleagues of Moody, not to mention Dumbledore himself, so he would have to have at least some idea about his life in case someone off-handedly said "hey, you remember that time that we did that thing?"
Whether he did this magically or not is not stated (I don't think. Barty may have forced out Moody's memories and seen them in a Pensieve or something), but he would have needed to have a good idea about Mad-Eye's past in order to keep up the act and not arouse suspicion, which he did very well.
In this case, knowing who Lupin was and who the Weasleys were would have been a trivial detail. If Alistair knew who they were, then Crouch needed to as well. This means he would have definitely known who Lupin was, as they served in the Order together.
Even if Mad-Eye didn't know who Arthur was personally, Malfoy knew who Ron was immediately just by his father's descriptions (presumably. Apparently one can spot a Weasley from a mile off thanks to their red hair and hand-me-down robes.)