Catalysis of the reactions: cholest-5-ene-3beta,25-diol + NADPH + H+ + O2 = cholest-5-ene-3beta,7alpha,25-triol + NADP+ + H2O, and cholest-5-ene-3beta,27-diol + NADPH + H+ + O2 = cholest-5-ene-3beta,7alpha,27-triol + NADP+ + H2O.