These are some creepy looking insects. Once you know that the remarkably long thorn extending seemingly miles from its long, skinny abdomen is an ovipositor and not a stinger, however, this insect becomes a little less creepy. That long ovipositor helps this wasp deposit eggs into wood and other hard-to-access areas. The tiny “waist” between the thorax and abdomen on these wasps in addition to the remarkably long and skinny abdomen that is longer than the rest of the body are characteristic of the Ichneumonidae family. I saw a jet black one walking clumsily through the leaf litter of northern New Hampshire just a couple weeks ago.
And here is a sketch of a generic ichneumon wasp that I did last spring, with some more information about them.