What is idiom of attacking behind the back?
Solution 1:
stab in the back
play judas
sell down the river
lay an ambush can be used both literally and figuratively
Solution 2:
To backbite also is relevant; its senses include “(informal) To attack from behind or when out of earshot with spiteful or defamatory remarks” and “To speak badly of an absent individual”. (It also has a sense that doesn't quite apply in the context of the question: “To make spiteful, slanderous, or defamatory statements about someone”.)
Solution 3:
Pull the rug from under somebody/something: to suddenly stop helping or support from someone and harm them.
Solution 4:
The most common word (that I can think of, at least) is ambushing, for example:
We were ambushed by a guerrilla faction while crossing the mountain pass.
Edit:
I must have read over the question too quickly—I didn’t see that it said “behind the back”, I somehow just read it as “attacking from behind”. Ambushing someone just means to attack them from behind.
‘Behind [someone’s] back’ means ‘done in a secretive, furtive manner’, and therefore “attacking behind someone’s back” has a slightly different meaning: it implies that you are being indirectly attacked by someone in a non-literal sense, and it is being done without you knowing it. If someone bad-mouths you to all your friends, making them think that you did something bad (when in reality you hadn’t), they would be attacking you behind your back.
This situation can, as user49727 mentioned, be described as stabbing someone in the back. This implies that someone whom you previously trusted betrays you in the back—in order for someone to stab you in the back (which is a cowardly thing to do), you have to first allow them to get very close to you (trust) and then turn your back to them (letting down your defences—more trust).
As it happens, all the expressions I can think of that deal with attacking someone without letting them know about it assume that the attacker is already in a position of trust with the victim. I cannot think of an expression that neutrally describes furtively attacking an oblivious victim at all—possibly there isn’t one. You can say that someone is scheming/plotting against someone else, but that deals only with the planning stages of the attack. If the actual attack itself is also secretive, that is a different matter.