Satan is pure evil as we all know. A Christian is someone who believes in God, Jesus, & The Holy Spirit. Satan believes this and he knows this to be true. So, before the Fall, he had an infased knowledge of God & then to use his will to adore, love & worship God. Knowing God comes in different forms. To "know God" might mean: know that there is a God; understand the make of God; be aware of God's current eventual destiny, & know God's plan or design.
Every so often, God allows Satan to enter His kingdom (or heaven) to give an account of his activities. He will do so until the end times. God summons him, he doesn't come & go as he pleases. Examples: [
Job 1:6] where Satan stands in the presence of God. See [
2 Chronicles 18:18-21] for a similar situation involving a "lying spirit." God does command a sinful being to temporarily stand in His presence in order to commission Him [
Isaiah 6], or to judge him, see [
Rev. 20:11-15]without compromising His holiness.