Then he showed me Joshua the high priest standing before the angel of the LORD, and Satan standing at his right side to accuse him.
References for Zechariah 3:1
The LORD said to Satan, “The LORD rebuke you, Satan! The LORD, who has chosen Jerusalem, rebuke you! Is not this man a burning stick snatched from the fire?”
References for Zechariah 3:2
Now Joshua was dressed in filthy clothes as he stood before the angel.
The angel said to those who were standing before him, “Take off his filthy clothes.” Then he said to Joshua, “See, I have taken away your sin, and I will put fine garments on you.”
References for Zechariah 3:4