It's simple... a Hav-A-Hart trap. I trapped 4 raccoons that invaded my attic that way, a mother and two kits, and another adult. Then re-location at least a few miles away. There are Hav-A-Hart traps for different size animals. However, it can take several days to a week or two to finally catch the animal. Raccoons, rats, and squirrels are smart, and if they've been trapped before they are wary. Right now I have a contractor trapping, removing, and relocating squirrels using these traps (too much for me to handle, including the repairs). I explicitly told the contractor I don't want them killed. He said not to worry, they don't do that. Besides, in NJ it is illegal to euthanize caught animals unless they are clearly ill, especially with rabies.
Worthy, wise and virtuous: Who is energetic and not indolent, in misfortune unshaken,
flawless in manner and intelligent, such one will honor gain. - Digha Nikaya III 273