# Securing Blockchain-Based Supply Chain Workflow against Internal and External Attacks
## 2 Proposed Methodology
### Constraints
To this end, we have introduced our methodology, which is applicable to any arbitrary stakeholder for attestation of the supply chain process as demonstrated in the following subsection. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type** & **Name** & **Role** \\ \hline \multirow{2}{*}{Internal} & Warehouse & Inventory Management \\  & Procurement & Supply and Quotation Management \\  & Finance & Financial Management \\ \hline \multirow{2}{*}{External} & Suppliers & Management of Supplies \\  & Manufacturer & Product Evaluation and Quotation \\  & Others & Product Evaluation \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Types of supply chain process entities. ## 6 Threat Detection

In this section, we discuss a simulation of example scenarios for internal and external attacks based on the previously-mentioned threat model and our detection mechanism to detect such attacks. Later, we explain how our threat detection mechanism can strengthen blockchain-based supply chain solutions. ### Example--Internal Attack

This section elaborates on an example attack simulation scenario for an internal attack using the following steps, in order. 1. A stakeholder \(W\) initiates a supply process for buying some product \(P\) by using the ICT application \(W_{a}\). 2. Stakeholders \(X\), \(Y\), and \(Z\) bid for the product \(P\) using their apps \(X_{a}\), \(Y_{a}\), and \(Z_{a}\). For simplicity we assume \(W_{a}\), \(X_{a}\), \(Y_{a}\), and \(Z_{a}\) are the same portal and are connected to each other to support digital operations. 1. The execution of the applications is protected by a run-time security monitor, which reports any violations when detected. The security monitor's focus is to protect the local ICT applications. 2. All interactions among the applications are recorded in a distributed ledger (i.e., blockchain-based) with smart contracts that only protect the collective role (i.e., agreement) of the stakeholders in the supply chain process. 3. Analogous to Stuxnet, an attacker attempts to modify the execution of \(W_{a}\) (attack scenario). For instance, providing incorrect bid values to \(W_{a}\) that the blockchain cannot detect because it does not know the local state of the stakeholder (the attack happens locally in the stakeholder's system) and is not part of the collective agreement among stakeholders. Our prototype monitor is able to detect this attack, being a violation to the observed current state of the system that is maintained by the constraints through the monitor. Consider the following--we have a blockchain-based supply chain system and now someone tries to modify the stakeholder's application (e.g., malware), as discussed in the scenario above. The blockchain cannot detect such an attack because it does not have access to the

Figure 4: Proposed secure supply chain business processstakeholder's application. Our prototype is able to detect such attacks through internal information, as the monitor uses the constraints (for different values and processes) that need to be respected through monitoring (on top of the blockchain solution). Whenever any stakeholder's application behaviour differs from its constraints, the deviation will be characterized as suspicious activity or an attack. Consequently, to detect such threats, our prototype monitor compares the run-time data with the rules of normal behaviour of the business process to detect such violations that may be suspicious incidents. As sketched in Table 2, our monitor was able to detect internal threats in real-time with an average negligible overhead of approximately 1%. The table shows the time (in seconds) required to complete the execution of a normal operation (as shown in the column \"Normal Execution\") and also the time required to detect the threats (as shown in the column \"Threat Detection\"). Threat detection involves fetching constraints from the database and then comparing the constraints based on the application data to avoid their violation.