An Effective Method To Protect Python Bytecode
Chen Wu;Gu Naijie;Du Yunkai;School of Computer Science and Technology,University of Science and Technology of China;Anhui Province Key Laboratory of Computing and Communication Software;Institute of Advanced Technology,University of Science and Technology of China;
The proposed approach is intended to mitigate the threat of decompilation attacks of Python bytecode. It is an effective protection method for Python bytecode based on encryption and import hook. The proposed approach first encrypts the bytecode file using encryption algorithm and later hides the information of keys on the bytecode on developer side. In this way the resultant bytecode loses the regularity of its original structure. Through registering a decryption Python import hook, the main procedure could decrypt the bytecode dynamically and the encrypted python software could run as the same way of unencrypted software at client end. Experimental results show this method is effective to resist the attack of the decompiling tools with little negative performance impact which is not more than 0.5% and is able to meet the practical requirements of both safety and performance.
【CateGory Index】： TP309