Great question, and one that is rarely discussed in the over-worked trolley problem literature, mainly because the cases are set up to illuminate a conflict between the utilitarian response that seems to suggest killing 1 to save 5 regardless of the means of doing so and the Kantian response that seems to allow switching the track to save 5 (with a mere side-effect of allowing 1 to die), while disallowing pushing 1 intentionally as a means of saving 5. But what would a virtue theorist like Aristotle, or the originator of the trolley problem Philippa Foot, say?
Well, there's no simple answer since virtue theory is (intentionally) open-ended and detail-driven. It would say that right thing to do in each case is what a virtuous person would recognize as the right thing to do, given the specific details of the case. Personally, I think the virtuous person would say it is morally required to switch the track in that case and morally wrong to push someone to stop the trolley in the other case. In part, that's because a virtuous person will recognize that the agent in the 'push' case is not justified in believing that it will work to save 5 people (hence it risks killing 6), while she is justified in believing that switching the track will save 5 at the cost of 1.
But one worry is that I may be justifying my intuitions about the cases by ascribing them to the virtuous judge.