The article discusses the use of metaheuristic algorithms for feature selection in detecting cyber threats on the Internet of Things (IoT). The proposed GQBWSSA algorithm, an enhanced version of the Salp Swarm Algorithm, effectively reduces the number of dimensions in the data and combines with the LightGBM algorithm for efficient IoT attack detection. Experimental evaluations show superior performance compared to current algorithms.