Involved in the biosynthesis of sitosterol and campesterol. a Delta(7)-sterol + 2 Fe(II)-[cytochrome b5] + 2 H(+) + O2 = a Delta(5),Delta(7)-sterol + 2 Fe(III)-[cytochrome b5] + 2 H2O The histidine box domains may contain the active site and/or be involved in metal ion binding. Belongs to the sterol desaturase family.