One of the major security issues in the Internet of Things (IoT) is maintaining the network availability against attacks and traffic congestion. In practice, the greedy behavioral attack is considered as an intelligent Denial of Service (DoS), which aims to compromise the availability of the network by consuming as much as possible the bandwidth of the deployed network. This attack is achieved by tuning the CSMA-CA network communication parameters that plays at the physical layer. In this paper, we propose an efficient modeling technique of attacks proper to the behavior of the greedy node in IoT networks while respecting unslotted IEEE 802.15.4. In fact, our developed greedy nodes algorithm relies on CSMA-CA protocol. This fashioned way of attack representation helped us to easily detect greedy nodes on large-scale IoT networks through simulations. Indeed, the obtained numerical results of different scenarios allow us to validate our approach and showed that the greedy nodes can monopolize the transmission channel during a significant period of time. Various relevant parameters (the number of sent/lost packets, the collision rate, and energy consumption) are considered to analyze and evaluate the impact of selfish nodes on the IoT networks.