One of well known Ninjustu "Using a sword as a step when climbing a wall."
I'm not sure who or when the myth was created but there's a description about it on the Edo period book called "Kenko Shinron" (剣甲新論 1865) written by Oken Suzuki.
The book is about swords.
(referred from https://ameblo.jp/o-deco-3/entry-11964473059.html)
(Following is ) Nothing more than a myth. When castle siege, tie one end of Sageo cord to Kurikata, the other end to Obi sash, lean the sword against the wall and climb the wall by stepping on Tsuba. Pull the cord to bring the sword back. This is the reason why Kurikata need to be sturdy.
The myth existed as a myth in the 19th century already.
And the myth was nothing to do with Ninja.
＊Kurikata, Sageo, Tsuba are name of Japanese sword parts.