In the very beginning, we are to stress the fact that Islam cares much for the maintenance of the highest level of morality and modesty. Indeed, Muslim men and women are both required to keep their sense of commitment to Allah and preserve their chastity. To achieve this noble goal Islam blocks the way before any chance of sin. It commands Muslim men to lower their gaze and avoid any stirring scenes or situations. In the meantime, it commands Muslim women to put on Hijab so as to preserve their modesty from the hungry eyes of those who have nothing to do with piety.
Dr. `Ali As-Sawwa, professor of Shari`ah at Jordinian Universities, states the following: It is allowable for a girl to put off her Hijab in front of her stepfather. The reason for this is that he is considered to be her Mahram. To him, she is considered to be a daughter. Almighty Allah, talking about women forbidden to marry, says: (and your stepdaughters who are under your protection (born) of your women unto whom ye have gone in but if ye have not gone in unto them, then it is no sin for you (to marry their daughters)) (An-Nisa’: 23)

The juristic rule reads: “Consummating marriage with mothers makes their daughters forbidden and making marriage contract to a daughter makes he mother forbidden.”
Based on this, a girl is permitted to take off her Hijab before her stepfather because he is considered to be her Mahram. However, it is to be noted that a woman is permitted to expose her hair, ears, neck, upper part of the chest, arms, and legs before her Mahram male relatives. Other parts of her body, such as the back, abdomen, thighs and the private parts, are not to be shown to anyone, man or woman, with the exception of her husband.
As for the taking off Hijab in front of stepbrothers, it is to be made clear that those stepbrothers are still strangers and thus are not to see any bodily part of the woman except hands and face. Thus, a girl should cover herself in front of her stepbrothers because they are still strangers and non-Maharem for her.