Rehman Malik sees foreign hand behind terrorism