ge-high-assurance / VERDICT

DARPA's Cyber Assured Systems Engineering (CASE) project named Verification Evidence and Resilient Design in Anticipation of Cybersecurity Threats (VERDICT)
https://ge-high-assurance.github.io/VERDICT
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

The results portion swapped for the XML and txt files generated by Soteria++ #194

Closed baoluomeng closed 2 years ago

baoluomeng commented 2 years ago

Soteria++ generates two kinds of XML files: ApplicableDefenseProperties.xml and ImplProperties.xml for security analysis. The GSN functionality uses information from ImplProperties.xml to create GSN graphs.

@AbhaMoitra reported that for DeliveryDrone_CASE_v0 example there is a situation where if you set supplyChainSecurity of deliveryItemMechanism to 0 and invoke "Create GSN assurance case fragments", all the branches of GSN graph are green, which is not right.

It turns out that the result portion of the two files somehow were swapped, which causes the GSN functionality to generate all green GSN graphs. Also the content of the txt evidence file is swapped.

Please also check xml and txt files generated by the safety analysis.

Below are two sample xml files (have to change the xml suffix to txt in order to upload it here) for my DeliveryDrone_CASE_v0 example. ApplicableDefenseProperties.txt ImplProperties.txt

kityansiu commented 2 years ago

@AbhaMoitra, @chrisage, and I looked into this. We used the project Additive_Machine_V3 (AdditiveMachine.aadl, lines 310-336). Specifically, in line 330, here's what happens when changing the DAL level:

We detected that the error is the following:

The fix should be the following:

Actions from meeting on Wed, 4/6/2022

baoluomeng commented 2 years ago

Hi Kit, GSN is looking at and also should read the results in xml files not the txt files as txt files are not machine readable. The txt files i uploaded in this issue are actually xml files. I have to change their suffixes to txt to be able to upload them here.

Also, GSN should look at the ImplProperties.xml file when rendering the colors because that is the result file for the analysis of implemented defenses in the model.

baoluomeng commented 2 years ago

The interesting thing is that I cannot reproduce the issue anymore using the latest versions of the tools on the DeliveryDrone_CASE_v0 model.

Can someone try to reproduce it using the latest OSATE and the latest dev version of VERDICT? @kityansiu @AbhaMoitra @chrisage You can download the latest OSATE from here: https://osate-build.sei.cmu.edu/download/osate/stable/latest/products/ And you can install the latest dev version of VERDICT using this link: https://raw.githubusercontent.com/ge-high-assurance/VERDICT-update-sites/master/verdict-dev

kityansiu commented 2 years ago

@baoluomeng, yes, understood. I was using the txt files to describe the observations, but you're right that the GSN looks at the xml files.

Below is the equivalent observations in xml from the Additive_Machine_V3 project. See "1e-09" on the left in ImplProperties.xml and "1." on the right in ApplicableProperties.xml. image

@chrisage, in case it wasn't clear, your modifications should be on the portion of the code that works off the .xml files.

chrisage commented 2 years ago

Can someone try to reproduce it using the latest OSATE and the latest dev version of VERDICT?

I'll need more info on which cyber property DAL was tested in the Delivery_Drone_CASE_v0 test. Below is a comparison of Additive_Machine_v3 run results between stable and latest osate/verdict versions (versions in screenshot). I'm seeing the same results. The GSN graph is all green in both cases but the solution 1 edge is expected to be red.

image
baoluomeng commented 2 years ago

In *ApplicableDefenseProperties.txt, the Calculated likelihood of successful attack (line 2) is 1 (which is also correct according to the applicable defense cutset).

@kityansiu I am not sure that why there could be cases that the calculated likelihood of successful attack in the "ApplicableDefenseProperties.txt" could be 1 unless there are attacks that have no known defenses, which is not covered by STEM.

kityansiu commented 2 years ago

@baoluomeng, this is because the "Applicable" first lists the cutsets and then uses the DALs to calculate the likelihood. I agree, though, that what's listed in "Applicable" and "Implemented" got intermixed. "Applicable" is reporting the applicable cutset, but then uses the user entered DAL numbers to do the calculation, which can arguably be thought of as "Implemented". This requires more reworking, which I hope can be done with Issue #228.

AbhaMoitra commented 2 years ago

@baoluomeng @chrisage @kityansiu : While I have not downloaded the latest VERDICT version; I did re-run it on DeliveryDrone and I still see the issue and I am not aware of any changes that would alter this behavior. I also noticed additional things that may help; specifically for deliveryItemMechanism, in line 786 if DAL of both properties is set to 0 then VERDICT works correctly. If only one of the DALs is set to 0 then GSN shows incorrect results.

image

chrisage commented 2 years ago

The accurate MBAS report uses the ApplicableDefenseProperties.xml while the inaccurate (DAL 0 case only) GSN risk fragments are sourced from ImplProperties.xml. In cases ImplProperties DAL 0 properties are "unimplemented" and omitted from the cutset rules rather than valued at risk 0e-1. Populating the GSN from ApplicableDefense will show risk and complete CAPEC cutset rules (even if unimplemented).

baoluomeng commented 2 years ago

Switching the GSN to populate from ApplicableDefense will show risk using complete CAPEC cutsets.

Hi Chris, I think you should not switching the GSN to "ApplicableDefenseProperties.xml" as the names of the files (whether they are ImplProperties or ApplicableDefenseProperties) indicate the content in the files. And GSN uses the ImplProperties file to populate the graphs because the file reflect the actual computation results for the model; whereas the ApplicableDefenseProperties file do not and it just shows you the ideal computation results for the model.

baoluomeng commented 2 years ago

Also, MBAA use both the "Applicable" and "Impl" xml files to display the results because it needs to figure out the missing defense properties in the (implemented) model in case the cyber requirements fail.

chrisage commented 2 years ago
// AD Tree Synthesis implementation of single rule DAL=0 cutsets vs partially implemented cutsets (rules DAL>0)  
[ALeaf (("mainPC", "CAPEC-176"), 1.); ALeaf (("mainPC", "CAPEC-184"), 1.);
    C (ALeaf (("mainPC", "CAPEC-440"), 1.), DSUM [DPRO [DLeaf (("mainPC", "systemAccessControl"), 9)]]);

C (ALeaf (("IO_Module", "CAPEC-176"), 1.),
       DSUM [DPRO [DLeaf (("IO_Module", "remoteAttestation"), 9); DLeaf (("IO_Module", "memoryProtection"), 9)]]);

STEM provides Defense.csv which maps CAPECs to applicable and implemented cutsets. Both excluded and DAL=0 cutset rules are represented with null (with null DALs respectively) in ImplProperties but can be inferred from the applicable rules in soteria++. e.g.

"CompType","CompInst","CAPEC","Confidentiality","Integrity","Availability","ApplicableDefenseProperties","ImplProperties","DAL"
"IO_Module","IO_Module","CAPEC-176",null,"Integrity",null,"RemoteAttestation;MemoryProtection;SecureBoot","remoteAttestation;memoryProtection;null","9;9;null"