Yeah, I've read opinions that some Israel intelligence agents within Hamas ranks convinced Hamas to make the attack since Netanyahu is weak and the response would be limited but this is just what Netanyahu needed to fight a sudden enemy and it only helped his political status when some thought he is truly heading for the exit door.
This kind of charade isn't anything new in politics, the same way de Gaulle "needed" OAS in the early 60s and they were at least inspired by inside French government agents to begin with.