It sounds (from your question and comment) that your dog is more afraid than anything else. Resource guarding (becoming 'aggressive' when something may be taken away) is typically a fear-based behavior. The same goes for lashing out when your dog is hiding under the bed or other furniture and you're trying to get him to come out, as well as acting out when scolded.
You mentioned that you rescued him from a bad situation. It's likely your pup is a bit traumatized from whatever he went through before he was with you. He may have learned that the only way to stay safe, secure, and fed is to bite and growl when he feels afraid and now that has become a conditioned response.
Luckily, with some love and consistency you should be able to decrease these undesirable behaviors. First things first, no more scolding. You might be wondering how you'll get your dog to behave without telling him 'no' or otherwise punishing him. This is easily accomplished by reinforcing the desired behavior with something positive (like a treat or praise), and also by setting him up for success by not putting him in a situation where he will act out (at least for the immediate future).
A great trick for eliminating resource guarding is to teach your dog that every time you take something away he gets something even better. Get of his regular food and go through the following:
- Pick up your dog’s bowl and make it look like you are filling it with his food.
- Place the empty bowl on the ground in front of him. Wait for him to investigate, see there is nothing there and look at you. As soon as he looks at you, praise him and add a bit of food into his bowl.
- After your dog has finished eating the food wait for him to look at you again and add more food into his bowl.
- Again, wait until all the food has been eaten. Walk a step or two away from his bowl and then back and add a little more. This teaches your pup that your approach and presence at his food bowl means he is going to get more food and you are a positive part of the experience.
- Feed your dog in this manner for several days and as your dog becomes more relaxed with your presence close to his bowl, gradually add larger handfuls of food until you get to the point where you can put down a full food bowl and he can eat with you standing right next to him.
- The next stage is to practice walking by an empty bowl and throwing a piece of high value food such as chicken into it. Every time you approach your dog’s empty bowl your dog will see your approach as something good.
- The last stage of this training is to throw a delicious treat into your dog’s bowl as he is in the process of eating. By this time he should be much more relaxed with your presence and able to accept you being close to him as he eats.
If he is never aggressive about food, but more about toys try the following:
- Get one of your dogs toys or bones (something you won't mind getting food on)
Place it on the ground in front of him. Wait for him to come over to it, when he does praise him and drop a bit of food onto the ground near the toy.
- After your dog has finished eating the food wait for him to look at you again and drop another morsel.
- Again, wait until he eats his treat. Now, take a step or two away from his toy and step back and drop another treat. This teaches your pup that your approach and presence near his toys means he is going to get something good and you are a positive part of the experience.
- Do this every day for several days and as your dog becomes more relaxed with your presence near his toys.
- The next stage is to practice walking by you pup while he is already playing and throwing a piece of high value food into the action. When you do this, don't look at or interact with him. Continue walking as you gently toss the treat.
- The last stage of this training is to be able to trade your dog a treat for his toy. This may take a lot of patience and practice, but the culmination of any resource guarding training is teaching "drop it". For this you should do in person training with a qualified positive reinforcement only trainer in your area.
Since you mentioned he is more timid in front of strangers, try to get a video of the behavior to show the trainer. You could even set up your smart phone, computer, or tablet to record your living room (or any other room) and capture the entire interaction from start to finish.