If you want to discredit your adversary's reputation, a good tactic involves dressing up as the enemy and conducting unethical operations (i.e. target civilians).
This attacks, or atleast the portions showing indiscriminate firing on civilians by Palestinians, inside Israeli occupied territory, behind Israeli lines, checkpoints, and a fully armed wall just wreaks of an inside job.. just like the Mumbai attack.
'Country under threat' canard plays well into the hands of the unpopular Netanyahu in domestic affairs. Israelis love violence and hate all Arabs, especially the Palestinians. An inside job staging a terrorist attack on national soil diverts attention away from Netanyahu's judicial failures that were wreaking havoc across the country, and a "revenge" canard, filled with thousands of strikes on Palestinians, pacifies the Israeli population.