Dear student,
Excretory organ of cockroach is called Malphigian tubules which is present in between the mid gut and hind gut. Malphigian tubules collects the salt water and nitrogenous waste from the hemolymph and sends into the hindgut where it moves along with the digestive material. Hind gut carries the digestive material after absorption into the rectum and then excretory waste and digestive waste both into the anus where it is removed.
Regards