Preventing Misbehavior In Cooperative Distributed Systems