2 Samuel 4:12
And David commanded his young men, and they slew them, and cut off their hands and their feet, and hanged them up over the pool in Hebron. But they took the head of Ish–bosheth, and buried it in the sepulchre of Abner in Hebron.
Cross-reference
2 Samuel 1:15
Parallel
In 2 Samuel 1:15, David similarly orders the execution of the Amalekite who claimed to kill Saul — same pattern of punishing those who strike anointed.
2 Samuel 21:9
Parallel
In 2 Samuel 21:9, David also has bodies hanged after execution — a similar practice of public display of judgment.
Deuteronomy 21:22
Citation
Deuteronomy 21:22 gives the law for hanging a executed criminal — David follows this procedure here.