Shell-encrypted shc vulnerability and shell-encrypted shc Vulnerability
Recently, I have been compiling Shell scripts for customers to use. I will inevitably encounter some sensitive information that I don't want them to know. So I used Shc script encryption to compile binary files and submit them to customers, the SHC encryption vulnerability is discovered. This article describes the vulnerability methods:
SHC: shc-3.8.3
Shell script code: 300 lines +
Shell script logic processing is complicated
SHC compilation parameter: shc-v-T-r-f (the specific meaning can be found online. I will not describe it here)
Due to the large amount of shell script code and complicated logic processing, the shell script code will always be visible in the ps process during each execution, which is always plagued by this vulnerability, as shown in:
Test_v12 is the binary file compiled by the script for execution:
In the execution process, open a shell window to view the ps process, as shown in the following figure (because of information sensitivity, some scripts are cut out for description ):
The above two figures completely show that SHC encryption is not so reliable when the shell script volume is a little large or the logic is slightly complicated.
Original statement: the content of this document is original, not reprinted, author Email: fabian01@qq.com