To understand how the devil is able to perform spectacular signs and wonders at Medjugorje, it may be helpful to review a few basic principals from Sacred Scripture as follows:
According to Revelation 12:7–9, a great war broke out in heaven and Satan was thrown down to the earth along with his legions of fallen angels. Today, this vast army of demonic entities prowl around like a roaring lion looking for the ruin of souls. To protect ourselves from Satan's deadly presence, God has given his beloved children the power of the Holy Spirit and an assignment of holy warring angels to stand guard over us night and day.
Because Christians are expected to live in a fallen world of darkness, God has given us the wisdom and resources we need to protect ourselves, and also the power to drive darkness out of our lives through our authority in Christ. A good example of how Catholics can protect themselves from evil comes from a man who dedicates his home to Christ.
To begin this process, the man would simply focus his mind and heart to God and say a simple prayer. To make this step more concrete, the man can place anointed rocks around the perimeter of his property. He could also drive stakes annointed with oil into the ground to establish a protective barrier around his property. He could also enclose his property by sprinkling holy water and saying to the spiritual realm, "I hereby dedicate this property to the Blessed Trinity—God the Father, the Lord, Jesus Christ and the Holy Spirit."
This man could also ask for a spiritual canopy to be built around his property. He could ask Jesus to send holy warring angels to stand guard over his property day and night. He should also invite the presence of the Lord, Jesus Christ, and the Holy Spirit to dwell with him inside his house. Before this can occur, the man would need to live a holy and obedient life. It would not be possible for the man to commune with the Lord, God Almighty inside his home if he was watching sex and violence on television every evening or committing the sin of idolatry by praying to false gods.
For example, if the man's teenage son brought a Ouija board into the basement and started playing with it, attempting to communicate with spiritual entities other than the Blessed Trinity, then the man's spiritual canopy would be breached. In the spirit realm, there could be thousands of angelic warriors standing guard over the man's property, but once the teenage boy commits the sin of idolatry, the demons would have the right to enter the premises and answer the boy's prayer request.
In the spirit realm, the demons would say to the angelic warriors, "Move aside! The boy wants to communicate with us! He is calling out for our guidance!" Because God allows the devil and his legions of fallen angels to roam the earth looking for the ruin of souls, the angelic warriors would stand aside. The demons would have access to the man's house to interact with his teenage son.
When the teenage boy was finished playing with the Ouija board, the demons would still have the right to remain in the man's house until the boy repented of his sin, broke all agreements with the devil through his sin of idolatry, and removed the Ouija board from the premises.
Now just imagine what would happen to the man's spiritual canopy if a group of Satanists were allowed to enter the basement and perform child sacrifices. After killing innocent babies, the Satanist would then invoke curses over the property as they buried the children's remains in the basement underneath the concrete slab. If this were to occur, the sins of the Satanists, along with the curses and buried remains, would give the devil the right to manifest even more power and presence inside the man's house.