I think movies like Terminator and the The Matrix (and probably a bunch of others I'm not thinking of) have really put that idea in people's heads. And more recently with the advancement of real AI, you're seeing tech gurus who like to act like prophets talking about this as a serious risk. Who knows, maybe they'll develop good AI that counters the malicious AI? But definitely not in the category of future hazards I have any have control over so I'm going to try not to lose too much sleep on this one (lol).
Currently, we lack any general AI and all are limited by machine learning. So once we make some general AI that can self-learn, then we may have issues. I doubt AI attacking is a major concern when compared to people using AI to attack security systems and such, but you never know.