Morality requires agency and conscious agreement. A machine/device doesn't choose to be made or operated nor can it act against its maker/operator any more than rocks can act against the Earth. Regardless of motive, a moral conclusion can't be reached about the object.