We have developed a mechanism which prevents abuse of trusted Java applets, such as digitally signed applets. A signed applet is usually permitted by a user to perform certain functions. However, an attacker may improperly recompose the signed applet to include malicious components and harm the user by abusing such functions of a signed applet. In this paper, we call this a malicious recomposition attack and propose an innovative mechanism to solve the problem of such attacks. Before deployment, a target signed applet is encapsulated into a special signed applet, called a cozilet, in an indecomposable format. On its execution, the cozilet isolates the classes and resources of the encapsulated applet by assigning a special class loader unique to the applet. It also enforces applet-document binding so that it is never executed from untrusted HTML documents. The mechanism is easily applicable to target signed applets because it is transparent not only to target applets, but also to curre...