It is not correct to say that
drugs are, for example, broadly illegal in many western countries
Some specific drugs, or specific categories of drugs, are illegal in certain circumstances, by specific statutes. Which ones vary by jurisdiction. So the analogy breaks down.
As for the main question, if by "software cracking" is meant creating a modified version of the software that operates differently, for example by-passes authentication, or allows unlimited "lives", that would most probably be creatign a derivative work of the software.
Creating a derivative work, even if it is never distributed, is copyright infringement under US law: 17 USC 106 (2) lists as one of the exclusive rights of the copyright holder the right
to prepare derivative works based upon the copyrighted work;
This also covers the right to authorize preparation such works. So merely creating a "cracked" version of the software is technically infringement. However, infringement (of this sort) is not a crime, and no border officer or other government official will care about it in the slightest. It is up to the copyright owner to take legal action, normally by filing suit. If the modified software is never distributed nor advertised, it seems unlikely that the owner will ever even learn of it, and less likely that the owner will sue if s/he does learn of it. Damages in such a case, if the owner brought one, would probably be small, indeed not enough to make it worth the owner's time and trouble.
If the cracker starts with an instance of the unmodified original software, and edits it in place, never making a new copy, s/he is still preparing a derivative work, and (unless permission was obtained, or the work constitutes a fair use) it is still, copyright infringement. The right to make copies and the right to prepare derivative works are legally separate, even though they are often used together. –
If the modified software were posted online, the owner could send a takedown notice to the hosting site. If it were being sold, then a suit would be more likely.
If what the cracker creates is not a modified version of the software, but instructions for modifying it, it is less clear that that would even be infringement. If the instructions are for evading an access control mechanism, that might be unlawful under 17 USC 1201 the anti-circumvention provisions of the DMCA. But again it would be up to the owner to take legal action, the government will not care until and unless the owner takes action.
Also relevant is 17 USC 103 which provides that:
(a) The subject matter of copyright as specified by section 102 includes compilations and derivative works, but protection for a work employing preexisting material in which copyright subsists does not extend to any part of the work in which such material has been used unlawfully.
(b) The copyright in a compilation or derivative work extends only to the material contributed by the author of such work, as distinguished from the preexisting material employed in the work, and does not imply any exclusive right in the preexisting material. The copyright in such work is independent of, and does not affect or enlarge the scope, duration, ownership, or subsistence of, any copyright protection in the preexisting material.
Thus the lawful creator of a derivative work (with permission or a valid claim of fair use) obtains a nerw copyright on the derivative work, but it protects only the new and original parts of that work
The above answer is specific to the united-states but on this point the laws of other North American and European countries are, i believe, similar, as is the Berne Copyright Convention, at least on the matter of derivative works.