The neural key exchange algorithm for choosing the relevant inputs is sufficient to achieve a more or less secure key-exchange protocol, however A and B could improve it by taking more information into account, including queries in the training process of the neural networks. Alternatively A and B are generating an input which is correlated with its state and A or B is asking the partner for the corresponding output bit. The overlap between input and weight vector is so low that the additional information does not reveal much about the internal states. But queries introduce a mutual influence between A and B which is not available to an attacking network E. In this work query incorporated to the case of the Hebbian training rule. The probability of a successful attack is calculated for different model parameters using numerical simulations. The results show that queries restore the security against cooperating attackers.