This paper discusses the challenges posed by selfish nodes in ad hoc networks, which do not forward packets to conserve their resources. It presents various types of availability attacks, focusing on detection methods for selfishness based on reputation and credit systems, and proposes two approaches to manage node cooperation: a reputation-based approach and a credit-based approach. The study concludes that the presence of malicious nodes can significantly reduce packet delivery ratios and throughput, but the proposed methods can help improve these metrics.