I tested hypotheses derived from the agent–system model of justice specifying that, among the different types of justice, interpersonal and informational justice explain the most unique variance in counterproductive work behavior (CWB) directed toward one's supervisor, and procedural justice explains the most unique variance in CWB directed toward one's organization. I also tested whether individuals' desires for revenge against one's supervisor and one's organization mediate certain justice–CWB relationships. Results (N = 424) provided considerable support for the study hypotheses, showing that employees tend to direct their CWB toward the source of perceived mistreatment, and that desires for revenge explain part, but not all, of the relationships between some types of injustice and CWB. Implications for theory, research, and practice are discussed. Copyright © 2008 John Wiley & Sons, Ltd.