Denso, a Toyota Motor Corp. affiliate and supplier, was targeted by a ransomeware attack last week, the partsmaker said.