How much of what is going on is getting attention for bad behaviour? Ask yourself honestly.
You mention trouble when DS is with friends - there are two elements to that -
First - some of what he is doing is treating her badly in order to build credibility with the friends.
Approach him with the suggestion that his friends are not actually all that impressed by his showing off, and that what he is doing is immature and all his friends see through it.
Second - when he is with his friends, don't let DD horn in. Ditto the other way round if that ever happens.
Boys can sometimes argue that when girls cry they are 'cheating' in the context of the rivalry dynamic. They tend to be very harsh with other boys who cry in similar situations.
Maybe this is how he defines 'getting him into trouble'?
You need to sit him down and get to the bottom of his perspective here, and correct if necessary. He may argue that you mete out more punishment when DD cries. (Ask yourself if this is true). Of course focusing on the negatives associated with crying is also a way of shrugging off responsibility on his part (and the part of many boys) for causing someone else to feel so overwhelmed. At almost 8 though, your DS is old enough to separate truth from self-serving narrative, so you need to impress upon him that other people's feelings are valid, that the way people are treated by others can cause them distress, and he needs to stop reacting the way he does to how feelings of others are expressed.
You need to keep on repeating this.
Is DS's father in the picture?
He needs to speak very strongly to DS if so, with the same message about the validity of other people's feelings, how they express them, and how people can cause distress in others.
He also needs to address the ganging up and meanness when with friends, and to reinforce 'what other boys are really thinking of him, deep down'.
The mob type behaviour must be commented on and there must be consequences. Don't be afraid to call out your DS and the other boys on this even while they are together.
Does DS usually complain that others are getting him into trouble, apart from DD?
Does he take personal responsibility and apologise if hauled up for any mischief or bad behaviour outside of his interactions with DD?
Does he make excuses or blame others or resent being given out to or given consequences?
If so, try to refocus him on his specific role, and responsibility.
Assure him that you, the parent, will deal justly with any others who behave badly, and that how you choose to do that is not the focus of the present discussion.
Watch out for goading and manipulation on the part of both children. When they are together, make the time to observe without being seen.
You can increase DS's self esteem by giving him some household chores, making him do them, giving praise for a job well done and informative feedback if the job was not up to scratch. This requires commitment and consistency from you (and DS's father or father figure if present). Both DCs could be encouraged to work together on limited tasks with supervision.
Teach him to cook a simple meal. Eat together as much as possible as a family. Compliment the meal.
When DD gets to almost 8, do the same.
Compliment both the DCs daily as much as possible on accomplishments or good behaviour. Keep a fridge door gallery of photos, artwork, certificates from activities, etc. Balance each child's representation.
Make time to spend with each child separately. An hour or two of undivided attention per week. Keep things positive during this time. Time can be spent folding sheets together, mucking out a neglected cupboard, etc. Doesn't have to be a fun filled expensive outing at all. Much better if not. Don't use this time as a bargaining chip/withdrawal of time as a punishment.
Lots of really good points here:
www.mottchildren.org/posts/your-child/sibling-rivalry
Some good reading suggestions at the end too.