The sharingan can see chakra a color as well as differences and irregularities. Id think madara would be able to see mahoragas changing "chakra" when he lands an attack and would also notice sukuna having mahoragas wheel on the top of his head, and would start to a hypothesis.