Ronald Reagan actually said...
Probably the only defense you have against terrorist attacks is really infiltration to try and find out in advance what their plans are.
Context
Exchange With Reporters on Terrorism
01/17/1982