You are attracting these beings because of having a fear of darkness and having a fear of being possessed or restricted by beings in the lower astral world.
You can take care of all this if you take up a regiment of meditation.
One important thing is to realise that the astral world is quite similar to this world, in the sense that if you go to a bad part of town in the middle of the night, it is likely that you will be mugged. If you go to a better part of town, it is likely that no one will interfere with you.
But the other take on this is that the muggers and other criminal elements in the physical and in the astral world, are also living beings like anybody else and for that reason there is really no cause to fear any of them.
Question is what do they want from you?
If someone mugs you for money, then he needs cash.
If someone does it just for the sake of cruelty, then he need psychological help. So when you begin to see things in that way, the whole ball game changes.
Take up meditation practice and you will get over the hump.