How can evil miracles occur even though the devil failed miserably in his attempt to overcome God? It is because he and his demons retained the same power (albeit with less freedom) they had before they rebelled and turned themselves evil (Ephesians 6:12).
The book of Job records some of the earliest miracles carried out through the agency of evil. The devil first brought fire from heaven in order to kill all of Job's sheep and murder his servants (Job 1:16). Satan then used his evil authority over earth's weather to bring an unusually strong wind upon a house that resulted in the death of all of Job's adult children (verses 18 - 19).
Pharaoh's magicians were able to mimic the first manifestations of God's power Moses and Aaron performed. When Moses' staff was transformed into a serpent they were able to duplicate this feat with their own staffs (Exodus 7:10 - 12). The magicians also used their powers of evil to duplicate the miracles of turning water into blood and bringing frogs upon the land (Exodus 7:22, 8:6 - 7).
One day Jesus encountered a man who had thousands of demons in him (Mark 5:9). They gave the man the super-human ability to constantly live outside while completely naked (Mark 5:3, 5, Luke 8:27, 29). They also enabled him to break any chain, fetter or restraint used on him (Mark 5:3 - 4).
Soon after the New Testament church was born, a man influenced by evil named Simon Magus was able to work awesome wonders that amazed the people of Samaria. His demonically inspired black magic was so spectacular and convincing that people we awed and listened to what he taught (Acts 8:9 - 11).
End Time Wonders
The Bible warns that, in the time just ahead of us, the forces of evil will show an unparalleled number of signs and wonders (Mark 13:22, 2Thessalonians 2:8 - 9). The end time False Prophet will perform countless miracles so that the earth is deceived into accepting the mark of the Beast (Revelation 13:11 - 14).
The plethora of lying, evil miracles, in the last days, will be so convincing that the world will worship the devil believing he is god on the earth (2Thessalonians 2:4, 2Corinthians 11:13 - 14). At the end of the Great Tribulation period fallen angels will manifest their supernatural abilities in order to gather humans to fight in the battle of Armageddon (Revelation 16:14)!