This paper studies the effects of and countermeasures against adversarial behavior in network resource allocation mechanisms such as auctions and pricing schemes. It models the heterogeneous behavior of users, which ranges from altruistic to selfish and to malicious, within the analytical framework of game theory. A mechanism design approach is adopted to quantify the effect of adversarial behavior, which ranges from extreme selfishness to destructive maliciousness. First, the well-known result on the Vicrey-Clarke-Groves (VCG) mechanism losing its efficiency property in the presence of malicious users is extended to the case of divisible resource allocation to motivate the need to quantify the effect of malicious behavior. Then, the Price of Malice of the VCG mechanism and of some other network mechanisms are derived. In this context, the dynamics and convergence properties of an iterative distributed pricing algorithm are analyzed. The resistance of a mechanism to collusions is investigated next, and the effect of collusion of some malicious users is quantified. Subsequently, the assumption that the malicious user has information about the utility function of selfish users is relaxed, and a regression-based iterative learning scheme is presented and applied to both pricing and auction mechanisms. Differentiated pricing as a method to counter adversarial behaviors is proposed and briefly discussed. The results obtained are illustrated with numerical examples and simulations.