Depends on who's laws you're following.
Is it ethical to dox a pregnant woman seeking an abortion in a southern US state?
Is it ethical to dox a gay human rights defender in Russia?
Is it ethical to dox a woman seeking an education in Afghanistan?
Not all criminals have done something wrong.