Ninja vs Castle — The 'Cat and Mouse Game' of Attack and Defense, and the Evolution of Security
Published: 3/6/2026
The history of security is a history of the "cat and mouse game" between attack and defense. When new defenses emerge, new attacks arise to breach them. The battle between ninja and castle fortifications is the most dramatic example of this universal law.
The origins of ninja (shinobi) trace back to the Muromachi period. As feudal lords recognized the importance of information warfare, specialized groups were organized to conduct reconnaissance and sabotage operations against enemy castles.
Early castles prioritized habitability over defense, making ninja infiltration relatively easy. Castles surrounded by earthen ramparts and wooden palisades could be breached by approaching under cover of darkness.
As the ninja threat grew, castle defenses evolved. The greatest turning point was the introduction of stone walls.
Compared to earthen ramparts, stone walls made climbing dramatically more difficult. But ninja quickly found countermeasures. "Stone wall climbing" techniques using mortar joints, and methods exploiting corner stones (sumishi), rapidly developed.
Shinobi gaeshi emerged as a counter to ninja who scaled stone walls. By lining the tops of stone walls and ramparts with sharp iron protrusions, even ninja who successfully climbed the wall couldn't get over it.
Ninja countered this as well. Ninja manuals describe tools for overcoming shinobi gaeshi, including "kaginawa" (hooked ropes) and "shinobi-bashigo" (ninja ladders). Methods of covering shinobi gaeshi with cloth or finding spots where the spikes were spaced wider apart were also documented.
The castles of the Azuchi-Momoyama period, epitomized by Oda Nobunaga's Azuchi Castle and Toyotomi Hideyoshi's Osaka Castle, represented the perfection of defense. Multiple moats, towering stone walls, shinobi gaeshi, loopholes, and masugata barbicans — multiple defensive layers organically combined into a complete "defense in depth."
The most dramatic historical example of the battle between ninja and castles is the two Tensho Iga Wars of 1579 and 1581.
Oda Nobunaga's second son Nobukatsu invaded Iga Province with approximately 8,000 troops. However, Iga's ninja forces used their knowledge of terrain and ninjutsu to confound the Oda army.
The ninja avoided direct combat, instead repeatedly conducting night raids, fire attacks, and ambushes. Unable to grasp Iga's terrain and with supply lines severed, the Oda army was forced to retreat.
This battle is cited in modern security analysis as a failure case of "attackers underestimating defenders' capabilities."
Nobunaga himself besieged and attacked Iga with approximately 44,000 troops. This time, simultaneous advances from multiple directions and overwhelming force superiority subdued the Iga ninja.
Yet remarkably, several hundred ninja resisted an army of tens of thousands for months. Defense leveraging terrain and structures (a prototype of modern CPTED) compensated for the overwhelming disparity in force.
This dynamic of attack and defense applies directly to modern security technology.
As the Tensho Iga Wars demonstrate, with sufficient resources and time, any defense can be breached. However, what matters in residential security isn't "a defense that can never be broken."
The essence of security is "raising the cost of crime."
Residential burglars are not national armies. They don't deploy specialized tools or large numbers of personnel. What they seek is "a home they can enter easily, quickly, and without risk."
The role of shinobi gaeshi is to eliminate that "ease." There's no need to prevent intrusion perfectly. If the criminal decides "this house costs too much," the security has succeeded.
The most important lesson from Warring States castle architecture is the philosophy of "defense in depth" — never relying on a single defense.
Multi-layered defense design for modern homes:
Shinobi gaeshi span both Layer 1 (Deterrence) and Layer 2 (Denial), making them the cornerstone of multi-layered defense.
The 500-year battle between ninja and castles teaches us that security never reaches "completion." But it simultaneously demonstrates that basic physical barriers remain the most effective first line of defense in any era.
Just as stone walls and shinobi gaeshi protected Warring States castles, walls and shinobi gaeshi protect modern homes. Technology evolves, but the principles of security remain unchanging.
The Birth of Ninja and the Evolution of Castle Defenses
Muromachi Period: The Beginning of Shinobi
The origins of ninja (shinobi) trace back to the Muromachi period. As feudal lords recognized the importance of information warfare, specialized groups were organized to conduct reconnaissance and sabotage operations against enemy castles.
Early castles prioritized habitability over defense, making ninja infiltration relatively easy. Castles surrounded by earthen ramparts and wooden palisades could be breached by approaching under cover of darkness.
Early Warring States Period: The Arrival of Stone Walls
As the ninja threat grew, castle defenses evolved. The greatest turning point was the introduction of stone walls.
Compared to earthen ramparts, stone walls made climbing dramatically more difficult. But ninja quickly found countermeasures. "Stone wall climbing" techniques using mortar joints, and methods exploiting corner stones (sumishi), rapidly developed.
Mid-Warring States Period: The Emergence of Shinobi Gaeshi
Shinobi gaeshi emerged as a counter to ninja who scaled stone walls. By lining the tops of stone walls and ramparts with sharp iron protrusions, even ninja who successfully climbed the wall couldn't get over it.
Ninja countered this as well. Ninja manuals describe tools for overcoming shinobi gaeshi, including "kaginawa" (hooked ropes) and "shinobi-bashigo" (ninja ladders). Methods of covering shinobi gaeshi with cloth or finding spots where the spikes were spaced wider apart were also documented.
Azuchi-Momoyama Period: The Perfected Defense
The castles of the Azuchi-Momoyama period, epitomized by Oda Nobunaga's Azuchi Castle and Toyotomi Hideyoshi's Osaka Castle, represented the perfection of defense. Multiple moats, towering stone walls, shinobi gaeshi, loopholes, and masugata barbicans — multiple defensive layers organically combined into a complete "defense in depth."
The Tensho Iga Wars: The Reality of Attack and Defense
The most dramatic historical example of the battle between ninja and castles is the two Tensho Iga Wars of 1579 and 1581.
First Tensho Iga War (1579)
Oda Nobunaga's second son Nobukatsu invaded Iga Province with approximately 8,000 troops. However, Iga's ninja forces used their knowledge of terrain and ninjutsu to confound the Oda army.
The ninja avoided direct combat, instead repeatedly conducting night raids, fire attacks, and ambushes. Unable to grasp Iga's terrain and with supply lines severed, the Oda army was forced to retreat.
This battle is cited in modern security analysis as a failure case of "attackers underestimating defenders' capabilities."
Second Tensho Iga War (1581)
Nobunaga himself besieged and attacked Iga with approximately 44,000 troops. This time, simultaneous advances from multiple directions and overwhelming force superiority subdued the Iga ninja.
Yet remarkably, several hundred ninja resisted an army of tens of thousands for months. Defense leveraging terrain and structures (a prototype of modern CPTED) compensated for the overwhelming disparity in force.
The Modern "Cat and Mouse Game"
This dynamic of attack and defense applies directly to modern security technology.
Locks vs. Lock Picking
- Defense: Pin tumbler locks → Disc cylinder locks → Dimple keys → Electronic locks
- Attack: Wire picking → Bump keys → Electromagnetic interference
- Present: The era of smart locks + biometric authentication
Windows vs. Glass Breaking
- Defense: Single-pane glass → Double glazing → Security glass → Security film
- Attack: Smashing with rocks → Pry bars → Thermal cracking
- Present: Combining laminated glass + vibration sensors
Walls vs. Climbing
- Defense: Low walls → Tall walls → Tall walls with shinobi gaeshi
- Attack: Ladders → Climbing techniques → Shinobi gaeshi bypass tools
- Present: Multi-layered defense with shinobi gaeshi + sensor lights + security cameras
"Perfect Security" Is Unnecessary
As the Tensho Iga Wars demonstrate, with sufficient resources and time, any defense can be breached. However, what matters in residential security isn't "a defense that can never be broken."
The essence of security is "raising the cost of crime."
Residential burglars are not national armies. They don't deploy specialized tools or large numbers of personnel. What they seek is "a home they can enter easily, quickly, and without risk."
The role of shinobi gaeshi is to eliminate that "ease." There's no need to prevent intrusion perfectly. If the criminal decides "this house costs too much," the security has succeeded.
Designing Defense in Depth
The most important lesson from Warring States castle architecture is the philosophy of "defense in depth" — never relying on a single defense.
Multi-layered defense design for modern homes:
Layer 1: Deterrence
- Visual deterrence from shinobi gaeshi
- Presence of security cameras
- "Security system active" signage
Layer 2: Denial
- Physical barriers from shinobi gaeshi
- Reinforced locking with security locks
- Window reinforcement with security glass
Layer 3: Detection
- Illumination from sensor lights
- Recording from security cameras
- Vibration sensors and door/window sensors
Layer 4: Response
- Automatic notification to security companies
- Alarm alerts to neighbors
- Police notification
Shinobi gaeshi span both Layer 1 (Deterrence) and Layer 2 (Denial), making them the cornerstone of multi-layered defense.
What the History of Attack and Defense Teaches Us
The 500-year battle between ninja and castles teaches us that security never reaches "completion." But it simultaneously demonstrates that basic physical barriers remain the most effective first line of defense in any era.
Just as stone walls and shinobi gaeshi protected Warring States castles, walls and shinobi gaeshi protect modern homes. Technology evolves, but the principles of security remain unchanging.