Australia had the DRS to thank for taking full control of the second Test in an action-packed third night session.