Q. Does the shaitan (satan) know what crosses our minds, which no one knows except Allah, and thus whisper to us what is in accordance with our thoughts?
A. Evidence suggests that the shaitan is close to man. Safiyyah bint Huyayy (may Allah be pleased with her) narrated that the Prophet (Pbuh) said: “The shaitan flows through man like blood.” (Al-Bukhari, 3281 and Muslim, 2175).
When man remembers Allah, the satan withdraws, and when he neglects to remember Him, he whispers to him. He knows whether he is remembering Allah or is neglecting in remembering Him, and he knows the whims and desires of his heart and makes them appear attractive to him.
The closeness of the angels and the shaitan to the heart of the son of Adam is something that is confirmed in many reports, whether the person is a believer or a disbeliever.”
Shaitan is aware of what a person is thinking to himself, and he knows his inclinations and his whims and desires, both good and bad, so he whispers to him accordingly.
Shaikh Ibn Baaz was asked: “If someone intends to do something good, does the shaitan come to know and try to divert him from it?” He replied: “Every person has a devil and an angel with him, as the Prophet said: ‘There is no one who does not have a companion from among the jinn and a companion from among the angels.’ They asked: ‘Even you, O Messenger of Allah?’ He said: ‘Even me, but Allah helped me with him and he became Muslim (that is: ‘and I am safe from him’), so he only enjoins me to do that which is good.’ And he (Prophet) told us that the shaitan dictates evils to man and calls him to evil, and he has some control over a person’s heart. And he can see, by Allah’s will, what a person wants and intends to do of both good and bad deeds. The angel also has some control over his heart that makes him inclined towards good and calls him to good.
The point here is that every person has with him a companion from among the angels and a companion from among the devils. The believer suppresses his shaitan by obeying Allah and adhering to His religion; and he humiliates his shaitan until he becomes weak and is unable to prevent the believer from doing good or to make him fall into evil except that which Allah wills. But the sinner, through his sins and bad deeds helps his shaitan until he becomes strong enough to help him to follow falsehood and he encourages him to do so and he becomes strong enough to keep him from doing good.
“The believer has to fear Allah and strive to resist his shaitan by obeying Allah and His Messenger, and seeking refuge with Allah from the shaitan. And he should be keen to support his angel to obey Allah and His Messenger and to follow the commands of Allah