Cut about ½ in/1 cm behind the eyes and mouth of the crab and squeeze out the content of the sac behind the eyes. Remove the gills from under the pointed end of the crab. Remove the apron from under the crab and rinse and pat the crab dry.
In a wok over moderate heat, stir-fry the ginger, garlic, and chiles in the vegetable oil until fragrant, about 30 seconds.