Jesus, in Mark 7:20-23, provides clear insight as to the location of the generator of man's drive to possess. Notice especially what He lists first, as it is the generator that leads to the other sins. His instruction thus also points out where the other sins can be stopped. A person's evil thoughts do not exist because of brainlessness, but because of confusion of values and lack of concern for godly, spiritual truth, leading to careless, shoddy moral choices.
Paul adds in Romans 7:7: "What shall we say then? Is the law sin? Certainly not! On the contrary, I would not have known sin except through the law. For I would not have known covetousness unless the law had said, 'You shall not covet.'" Some of God's laws are self-evident even to the natural mind, but only God can tell us that it is absolutely wrong to lust. By contrast, a major theme of the modern culture is"You can have whatever you want, if you only make the effort."
The tenth commandment deals with attitude and motivation. Even if an individual secretly rejects God's standard and way in his heart and lusts after something he cannot or will not lawfully possess or do, then eventually, this mental rebellion will break out in sin. Action will manifest what the mind has been doing all along.