The enormous growth in demand for WBAN services has resulted in a new set of security challenges. The capabilities of WBAN are developing to meet these needs. The complexity, heterogeneity, and instability of the mobile context make it difficult to complete these duties successfully. A more secure and flexible WBAN setting can be attained using a trust-untrust nodes classification, which is one method to satisfy the security needs of the WBAN. Considering this, we present a novel Deep Learning (DL) approach for classifying WBAN nodes using spatial attention based iterative DBN (SA-IDBN). Z-score normalization is used to remove repetitive entries from the input data. Then, Linear Discriminate Analysis (LDA) is employed to retrieve the features from the normalized data. In terms of accuracy, latency, recall, and f-measure, the suggested method's performance is examined and contrasted with some other current approaches. Regarding the classification of WBAN nodes, the results are more favorable for the suggested method than for the ones already in use.