A flank, meaning one of the two sides of a military formation, can be either right or left (also southern or northern/eastern or western). So in the context of the attack on the opposing army "to attack (on) all(?) flanks" sounds rather odd in comparison to "to attack (on) both flanks". Note the use of preposition "on" where you can't do without it, for example:
They decided to attack their enemy's southern flank.
The army was attacked on the left flank.
In the context of flanking maneuver, you can use the verb outflank, which also can be used figuratively meaning get the better of. (See the examples in different contexts).
If it's frontal, from the rear, and flanking, all at the same time, the attack would be an attack from/on all sides.