Cyber security risk to smart grids and intelligent buildings