There are many ways of doing it. It is really up to your imagination. Anything that we suggest...most likely a theif knows about it also. Heck, one can be reading this post right now. Just remember that the only thing these things will do is a slow down a theif. But it might be enough for you to save your equipment.
Many people use a strap to bolt down their headunit. In the rear of most head units there is a hole that can house a bolt. Many people will run a strap in there, then tie it down to the chassis. This will keep the headunit from being able to pull out with the keys. You will need to undo the strap first, then pull it out in order to remove it. I did this for my friends car. I installed about 2-3 feet worth of the strap onto the back. The strap I got from a hardware store. It just needs to be metal and be flexible. You can buy them with holes in it. Then I installed the headunit with the strap hanging down. Then I ran the strap tight down to part of a chassis. And I bolted the strap there. Then I put all the dash pieces back.
For the subwoofer box, theres a few ways of doing that also. You can just take your box and use some L-brackets and attach it to the chassis, NOT the piece of wood that the box sits on. Or you can do it the more difficult way...take your sub box and remove the woofer out. From the INSIDE of the box, drill a hole and run a bolt through it and into the chassis. Then put the sub back into the box. This makes removing the box much more difficult and time consuming. But be sure to seal up any holes you have.
*Be aware of what you are drilling into, especially while in the trunk. You dont want to drill into the gas tank.
__________________
.