A long-beaked bird that lives in marshes and swamps is called a snipe. As a verb, to snipe is to attack someone in a snide way — something a snipe would never do, because birds aren't that petty.
You can find the well-camouflaged shorebird known as the snipe just about everywhere in the world. These birds are famously difficult for hunters to shoot, as they blend in well with their surroundings and have an erratic flight pattern. This is where the word sniper, or sharpshooter, comes from, in addition to the definition of snipe that means "shoot from a hiding place." The figurative sense of "attack someone verbally" followed.