This is the phrase that describes the foundation for most of this offensive behavior. It's a phrase guys understand. A percentage of men take private joking about wives, girlfriends, female bosses, etc. on to the next level of showing off their 'manliness' in front of other men, and the confidence they place in their actions comes from their belief in a trust between men that other men won't object and other men actually silently agree - which we know, and most guys know, isn't true. But the guys don't know what to do about it any more than we do, and don't know a good vocabulary to discuss this problem which doesn't insult all men.
Use the term "locker room bravado" and you'll get immediate understanding from a lot of guys about what's going on. They'll buy into what you are saying and won't feel up against the wall about it, they'll be supportive of you (us).