During the Fourth Ninja World War, Uchiha Madara manage to escape Edo Tensei by releasing himself and put himself in Edo Tensei again. But how or when did Madara knew about the hand seals of Edo Tensei?
There are a few ways he could have learned it:
- Copying it from Tobirama
- Figuring it out himself
- Getting the information from a different source, like a scroll. Orochimaru learned ET from the scroll of forbidden jutsus.
There is no definite answer however. It has never been stated or shown how Madara learned ET.
I might have a more satisfying answer to this. After all Madara already awakened Rinnegan. And I think I heard Jiraiya or someone say that the specialty of Rinnegan is that it grants the Rinnegan user the ability of knowing every jutsu in existence. So of course he knows every jutsu. Simple logic, Right?