German drugs and pesticides maker Bayer said it had detected a cyber attack on its computer networks but that data had not been stolen.