In Israel , Mr. Finkelstein used similar attacks against the Labor Party as an adviser to Prime Minister Ariel Sharon and as a consultant to the winning and losing campaigns of Benjamin Netanyahu , the former prime minister .