A major ransomware attack hit computers at Russia's biggest oil company, the country's banks, Ukraine's international airport and a global shipping firm.