Comparative analysis of binaries for software supply chain security
Comparing how behaviors, functions, and other features have changed between different software versions, embodiments determine how the software has changed between versions and make an assessment as to whether or not the newer version of the software has unintended functionality.
1 . A method for identifying a risk level associated with an update to a software product, the method comprising:
extracting one or more first features from a first version of the software product;
identifying one or more first behaviors, associated with the extracted one or more first features, that can occur when the first version of the software product is executed on a computing device;
extracting one or more second features from a second version of the software product;
identifying one or more second behaviors, associated with the extracted one or more second features, that can occur when the second version of the software product is executed;
comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product, wherein the step of comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product comprises performing function alignment between functions identified in the first version of the software product and functions identified in the second version of the software product;
identifying a risk level associated with the one or more behavioral differences; and
outputting an indication of the risk level associated with the second version of the software product to a user;
wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
scoring the one or more behavioral differences by one or both of:
(a) reducing a score for each new behavior found in the second version of the software product which was not found in the first version of the software by:
(i) a first value if the new behavior is listed in one of one or more malware behavior libraries; or
(ii) a second value if the new behavior is not listed in the one of one or more malware behavior libraries; and
(b) reducing the score by a third value for each additional instance of the new behavior found in the second version of the software product.
2 . The method of claim 1 , wherein the first version of the software product is an aggregate of multiple versions of the software product or an aggregate of multiple versions of multiple software products.
3 . The method of claim 1 , wherein the one or more first features and the one or more second features include one or more of systems calls, strings, arguments to function calls, instructions, and file sections.
4 . The method of claim 1 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
determining whether the one or more behavioral differences are intended or unintended.
5 . The method of claim 4 , wherein the step of determining whether the one or more behavioral differences are intended or unintended includes one or both of (a) determining that a behavior is unintended because historic behaviors of the software product do not include this behavior; and (b) comparing a behavior to one or more libraries of malware behaviors.
6 . The method of claim 1 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing an anomaly detection procedure on the one or more second behaviors.
7 . The method of claim 1 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing a lineage analysis of previous versions of the software product and using output from the lineage analysis to score the risk level.
8 . The method of claim 1 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing a cluster analysis of previous versions of the software product and using output from the cluster analysis to score the risk level.
9 . A non-transitory, computer-readable medium containing computer-readable program code which, when executed on one or more processors, performs the steps of:
extracting one or more first features from a first version of the software product;
identifying one or more first behaviors, associated with the extracted one or more first features, that will can occur when the first version of the software product is executed on a computing device;
extracting one or more second features from a second version of the software product;
identifying one or more second behaviors, associated with the extracted one or more second features, that can occur when the second version of the software product is executed;
comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product, wherein the step of comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product comprises performing function alignment between functions identified in the first version of the software product and functions identified in the second version of the software product;
identifying a risk level associated with the one or more behavioral differences; and
outputting an indication of the risk level associated with the second version of the software product to a user;
wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
scoring the one or more behavioral differences by one or both of:
(a) reducing a score for each new behavior found in the second version of the software product which was not found in the first version of the software by:
(i) a first value if the new behavior is listed in one of one or more malware behavior libraries; or
(ii) a second value if the new behavior is not listed in the one of one or more malware behavior libraries; and
(b) reducing the score by a third value for each additional instance of the new behavior found in the second version of the software product.
10 . The non-transitory, computer-readable medium of claim 9 , wherein the first version of the software product is an aggregate of multiple versions of the software product or an aggregate of multiple versions of multiple software products.
11 . The non-transitory, computer-readable medium of claim 9 , wherein the one or more first features and the one or more second features include one or more of systems calls, strings, arguments to function calls, instructions, and file sections.
12 . The non-transitory, computer-readable medium of claim 9 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
determining whether the one or more behavioral differences are intended or unintended.
13 . The non-transitory, computer-readable medium of claim 12 , wherein the step of determining whether the one or more behavioral differences are intended or unintended includes one or both of (a) determining that a behavior is unintended because historic behaviors of the software product do not include this behavior; and (b) comparing a behavior to one or more libraries of malware behaviors.
14 . The non-transitory, computer-readable medium of claim 9 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing an anomaly detection procedure on the one or more second behaviors.
15 . The non-transitory, computer-readable medium of claim 9 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing a lineage analysis of previous versions of the software product and using output from the lineage analysis to score the risk level.
16 . The non-transitory, computer-readable medium of claim 9 , wherein the step of identifying a risk level associated with the one or more behavioral differences further comprises:
performing a cluster analysis of previous versions of the software product and using output from the cluster analysis to score the risk level.
17 . A method for identifying a risk level associated with an update to a software product, the method comprising:
extracting one or more first features from a first version of the software product;
identifying one or more first behaviors, associated with the extracted one or more first features, that can occur when the first version of the software product is executed on a computing device;
extracting one or more second features from a second version of the software product;
identifying one or more second behaviors, associated with the extracted one or more second features, that can occur when the second version of the software product is executed;
comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product;
identifying a risk level associated with the one or more behavioral differences; and
outputting an indication of the risk level associated with the second version of the software product to a user;
wherein the step of comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product further comprises:
performing function alignment between functions identified in the first version of the software product and functions identified in the second version of the software product by:
generating a Term Frequency-Inverse Document Frequency (TF-IDF) vector from position-independent code hashes of each function and each block, position dependent code hashes of each function and each block, function name, function identifier, number of blocks in the function, and the number of instructions in the function; and
using k-nearest neighbors with cosine similarity to determine which functions between the first version and the second version are most alike.
18 . A non-transitory, computer-readable medium containing computer-readable program code which, when executed on one or more processors, performs the steps of:
extracting one or more first features from a first version of the software product;
identifying one or more first behaviors, associated with the extracted one or more first features, that can occur when the first version of the software product is executed on a computing device;
extracting one or more second features from a second version of the software product;
identifying one or more second behaviors, associated with the extracted one or more second features, that can occur when the second version of the software product is executed;
comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product;
identifying a risk level associated with the one or more behavioral differences; and
outputting an indication of the risk level associated with the second version of the software product to a user
wherein the step of comparing the one or more first behaviors with the one or more second behaviors to identify one or more behavioral differences between the first version of the software product and the second version of the software product further comprises:
performing function alignment between functions identified in the first version of the software product and functions identified in the second version of the software product by:
generating a Term Frequency-Inverse Document Frequency (TF-IDF) vector from position-independent code hashes of each function and each block, position dependent code hashes of each function and each block, function name, function identifier, number of blocks in the function, and the number of instructions in the function; and
using k-nearest neighbors with cosine similarity to determine which functions between the first version and the second version are most alike.