M.P.
I urge you to read some parenting books and develop a consistent way of disciplining him. How to Talk So Kids Will Listen and Listen So Kids Will Talk by Adele Farber and Elaine Mazlish will help you communicate better with him. 1,2,3 Magic is another one that can help you develop a way of parenting. I also highly recommend Parenting Through Love and Logic by Foster Cline and ?
He needs a few firm rules with consistent consequences for disobeying them. The consequences should be as close to natural as you can make them. For example, when he talks back you can send/take him to his room and tell him he has to stay there until he can come out and apologize. Make and enforce this rule, calmly and without anger. You will have to repeat the same thing over and over until he knows you mean business.
Do you hit him when he misbehaves? If so, I suggest you'll have to stop hitting him. He's only doing what you've shown him to do when he disagrees.
First of all, I recommend that you stop thinking of him as rebelling. Instead consider that he's searching for boundaries, a normal step in maturation. By changing the way you think of him you will be better able to maintain your cool and not get upset with him. To be effective discipline needs to be given in a calm, firm but unemotional manner.
Give him approval every chance you get. Spend more time telling him what he's done right than what he's done wrong. He very much wants your approval. When he thinks good about himself he will be better able to be good. When possible reward good behavior and either ignore or provide a natural consequence for bad behavior.
I've found that I can end some behaviors by completely ignoring them. Whining is an example. I say, "I cannot hear you when you whine," the first few times/days. After that, I don't hear them. Same with name calling. I tell them, I don't respond to those names. When a child calls me a name, I turn and walk away. In my experience, most children call names or say mean things to get attention. When they don't get the attention they stop doing that and try something else.
Speaking of attention, your son needs lots of love and attention. Is it possible that his behavior has reached the point that most of your time with him is spent in anger and unhappiness? IF so, find ways to have fun with him. Give him attention when he's being good so that he doesn't have to act out to get your attention.
Parenting is the most difficult job we have and yet we don't get training to do it. This is why it's so important to take parenting classes and read parenting books and to ask questions on this site.
Provide opportunities for him to explore so that he won't have to do the dangerous things.