System and method to use past computer executable instructions to evaluate proposed computer executable instructions
Computer executable instructions including code sections are received and compared to previously analyzed computer executable instructions. The code sections are then analyzed and assigned a risk score. If the risk score is over a threshold, an alarm may be communicated or the system may substitute computer executable instructions that may have been created according to a standard or have been previously approved.
1 . A method of analyzing pending computer executable instructions for risk comprising:
receiving pending computer executable instructions, wherein the pending computer executable instructions are yet to be executed;
determining a proposed risk factor for the pending computer executable instructions, wherein determining the proposed risk factor comprises:
determining an unrecognizable section of code level analyzable elements from the pending computer executable instructions based on one or more of:
comments in the pending computer executable instructions;
libraries used by the pending computer executable instructions;
indentation lines of codes of the pending computer executable instructions;
uses of sub-routines of the pending computer executable instructions;
existence of commands in the pending computer executable instructions; or
lack of commands in the pending computer executable instructions;
inputting the unrecognizable section into a Natural Language Processing (NLP) unit, wherein the NLP unit is configured to perform a vectorization process on the unrecognizable section based on an attribute of a code level analyzable element to produce an NLP output;
inputting an analyzable vector associated with the unrecognizable section into a recurrent neural network (RNN) comprising a risk model to determine a risk score associated with the unrecognizable section,
wherein the analyzable vector is determined from an output of the NLP unit,
wherein the risk model is configured to output the risk score based on a comparison of the inputted analyzable vector with previously analyzed computer executable instructions; and
calculating the proposed risk factor based on the risk score associated with the unrecognizable section; and
executing a risk response based on the proposed risk factor exceeding a threshold.
2 . The method of claim 1 , wherein the NLP unit is configured to perform the vectorization process based on a word of the unrecognizable section.
3 . The method of claim 2 , wherein the attribute of the vectorization process is word frequency.
4 . The method of claim 3 , wherein an end position of the analyzable vector comprises a frequency associated with the word of the unrecognizable section.
5 . The method of claim 2 , wherein the analyzable vector is indicative of a position of the word within the unrecognizable section.
6 . The method of claim 1 , wherein the NLP output comprises a matrix of analyzable vectors.
7 . The method of claim 1 , wherein the risk model is configured to output the risk score based on a comparison of the inputted analyzable vector with previously approved computer executable instructions.
8 . The method of claim 7 , wherein the previously approved computer executable instructions are clustered into N dimensions, and wherein the comparison of the inputted analyzable vector with previously approved computer executable instructions comprises a comparison of the inputted analyzable vector with each of the N dimensions.
9 . The method of claim 1 , wherein the risk model is configured to output the risk score based on a comparison of the inputted analyzable vector with computer executable instructions previously determined to be malicious code.
10 . The method of claim 1 , further comprising:
separating unrecognizable sections of code level analyzable elements from recognizable sections; and
determining a second risk score associated with a recognizable section.
11 . The method of claim 10 , wherein the proposed risk factor is calculated based on the risk score associated with the unrecognizable section and the second risk score associated with the recognizable section.
12 . The method of claim 1 , further comprising:
determining the threshold for the proposed risk factor according to one or more of a government authority with grades of thresholds or a past history of the proposed risk factor of the pending computer executable instructions; and
performing a comparison of the proposed risk factor and the threshold.
13 . The method of claim 1 , wherein the risk response comprises one or more of communicating a risk warning associated with the computer executable instructions, replacing the computer executable instructions identified as risk with a comparable computer executable instructions that have been determined to have an acceptable risk, or placing a hold on the computer executable instructions.
14 . A computer system comprising an input output circuit, a memory and a processor physically configured according to computer executable instructions, the computer executable instructions comprising instructions for:
receiving pending computer executable instructions to be analyzed;
determining a proposed risk factor for the pending computer executable instructions, wherein determining the proposed risk factor comprises:
determining an unrecognizable section of code level analyzable elements from the pending computer executable instructions based on one or more of:
comments in the pending computer executable instructions;
libraries used by the pending computer executable instructions;
indentation lines of codes of the pending computer executable instructions;
uses of sub-routines of the pending computer executable instructions;
existence of commands in the pending computer executable instructions; or
lack of commands in the pending computer executable instructions;
inputting the unrecognizable section into a Natural Language Processing (NLP) unit, wherein the NLP unit is configured to perform a vectorization process on the unrecognizable section based on an attribute of a code level analyzable element to produce an NLP output;
inputting an analyzable vector associated with the unrecognizable section into a recurrent neural network (RNN) comprising a risk model to determine a risk score associated with the unrecognizable section,
wherein the analyzable vector is determined from an output of the NLP unit,
wherein the risk model is configured to output the risk score based on a comparison of the inputted analyzable vector with previously analyzed computer executable instructions; and
calculating the proposed risk factor based on the risk score associated with the unrecognizable section; and
executing a risk response based on the proposed risk factor exceeding a threshold.
15 . The computer system of claim 14 , wherein the risk model and the previously analyzed computer executable instructions are stored in the memory.
16 . The computer system of claim 15 , the computer system further comprising instructions for storing the risk score associated with the unrecognizable section in the memory as an update to the risk model.
17 . The computer system of claim 14 , wherein determining an unrecognizable section of code level analyzable elements from the pending computer executable instructions comprises comparing a word of the unrecognizable section with a database of reserve words stored in the memory.
18 . The computer system of claim 17 , the computer system further comprising instructions for storing the word of the unrecognizable sections in the memory as an update to the database of reserve words.
19 . The computer system of claim 14 , the computer system further comprising a machine learning algorithm configured to update the risk model stored in the memory based on one or more of the calculated proposed risk factor or the risk score associated with the unrecognizable section.
20 . A tangible non-transitory computer readable medium comprising computer executable instructions for:
receiving pending computer executable instructions to be analyzed;
determining a proposed risk factor for the pending computer executable instructions, wherein determining the proposed risk factor comprises:
determining an unrecognizable section of code level analyzable elements from the pending computer executable instructions based on one or more of:
comments in the pending computer executable instructions;
libraries used by the pending computer executable instructions;
indentation lines of codes of the pending computer executable instructions;
uses of sub-routines of the pending computer executable instructions;
existence of commands in the pending computer executable instructions; or
lack of commands in the pending computer executable instructions;
inputting the unrecognizable section into a Natural Language Processing (NLP) unit, wherein the NLP unit is configured to perform a vectorization process on the unrecognizable section based on an attribute of a code level analyzable element to produce an NLP output;
inputting an analyzable vector associated with the unrecognizable section into a recurrent neural network (RNN) comprising a risk model to determine a risk score associated with the unrecognizable section,
wherein the analyzable vector is determined from an output of the NLP unit,
wherein the risk model is configured to output the risk score based on a comparison of the inputted analyzable vector with previously analyzed computer executable instructions; and
calculating the proposed risk factor based on the risk score associated with the unrecognizable section; and
executing a risk response based on the proposed risk factor exceeding a threshold.