This study investigates the pivotal role of sink configuration in enhancing the lifetime of Wireless Sensor Networks (WSNs). A comparative analysis between configurations employing 2 sinks and 3 sinks reveals that the latter significantly outperforms the former in terms of network longevity. The study delves into the integration of an intrusion-aware protocol, providing resilience during security breaches. This protocol stabilizes network lifetime amidst intrusion attacks, which is crucial for maintaining system efficiency. This work introduces a novel machine learning model tailored for WSNs, exhibiting superior accuracy on a WSN-specific dataset. Through these combined efforts, it presents a comprehensive approach to improving WSN lifetime, encompassing sink configuration optimization, intrusion tolerance, and innovative machine learning techniques.