It's rather like the art of giving a really good boll*cking, or making an effective threat: work out what you want to say in advance, stick to it, and adhere to what is realistic.You need to confront this person in private - it needs to be done whether you want to or not, and in private so that you can both convey sufficient menace to make it work and so that this person does not go immediately on the defensive. Think of it like game's theory - if he tries to win all the time, no one will win. If no one person tries to win, everyone will win.Rehearse what you want to say, and confront him in a calm manner where you cannot be overheard. Make it clear that you are aware of what he is doing, understand why he is doing it, and that you have the option of proving his lack of contribution - to senior management if necessary. Can of worms on table time. Don't open the can of worms yet. If he wants to share some of the credit then let him - so long as he acknowledges you also. Explain this to him so he has the option. But underline it with the stark warning that it is YOU who is creating the value, and if you then withdraw that contribution, by asking to move to another project, speaking to senior managers whatever the route it, it will soon become very transparent not only that he is taking credit for your work, but just how little he is actually doing. He knows there is a recession on out there right? Not a good time to be shown up to be a passenger yes? When you have made your point, emphasise that this is the only time you are addressing this with him.Stay calm, don't lose your temper; say your piece and leave.