Yes, you can apply while in Australia (Subclass 820/801). There are extra eligibility criteria and your current visa or any visa refusals may impact your ability to make an onshore application.