In modern network confrontation, it is very important to improve the viability of web malicious code. According to the generation and propagation characteristics, we propose the web malicious code hidden solutions which are based on deformation and encryption. Combining with MS09002 vulnerabilities we give an application example of web Trojan hidden. Test results show that the proposed integrated solution has the better capacity of avoiding virus killing and the stronger hidden performance. The significant improvement of viability of web malicious code is very important of application.