# Toward Blockchain-Enabled Supply Chain Anti-Counterfeiting and Traceability
## 5 Security Analysis on NAS
### Threat Analysis  
Based on the result of asset analysis and system components identified, which are susceptible to security risks, a threat analysis is therefore performed against NAS, with every threat as described in Appendix B.2. Every possible threat to NAS could be categorized into either (1) physical NFC tag threats or (2) system threats. Regarding physical NFC tag threats, the most probable and risky threats identified are as follows:  
1. _Tag cloning (T01)_ for which each NFC tag used for product tagging and anti-counterfeiting purpose has a unique identifier. If the identifier information is exposed to attackers, the data stored in a tag could easily be cloned into another tag. 2. _Tag disabling (T03)_ for which adversaries could take advantage of wireless nature of NFC systems in order to disable tags, from any further interaction with NFC tags, temporarily or permanently, by changing the state of NFC tags. 3. _Tag's data modification (T04)_ for which NFC tags use writable memory and so an adversary can take advantage of such a feature to modify or delete valuable data from memory of any involved NFC tag, during any tag reading and tag writing process. Unsecured configuration or even misconfiguration on NFC tags could also allow attackers compromising NAS as a whole. These physical NFC tag threats are primarily attributed by a weak and fully centralized authentication and authorization mechanism adopted to change data states stored in NFC tags and any unsecured configuration on NFC tags during every tag writing and tag reading process. While regarding system threats, the most probable and risky threats identified are as follows:  
1. _Man-in-the-middle relay attack (T08)_ for which in a relay attack, an adversary acts as a man-in-the-middle. An adversarial device is placed surreptitiously between a legitimate NFC tag and mobile applications or mobile applications with dedicated backend database which is on logged-in state. Adversaries could obtain unauthorized access or unintentional information disclosure on the confidential data related to transactions or the supply chain as a whole. 2. _Tracking and tracing (T10)_, for which, via sending queries and obtaining same responses from an NFC tag at various locations, it can then determine where an NFC tag of a specific product is located physically with location data supplied. A malicious hacker may also obtain login data, via brute-forcing or dictionary attacks, to spoof and log in to mobile applications or web applications registered with the same login data as legitimate users. 3. _Denial-of-service (T11)_ for which DoS attacks are usually physical attacks, such as jamming the system with noise interference, blocking radio signals, removing, or even disabling NFC tags, causing different system components or the entire system to work improperly. Without sufficient auditing logs and monitoring functionalities of different system components, it would be unable to investigate any system misuse and compromise, security breach over leakage of confidential data. 4. _Spoofing attack on data of product records (T14)_ when attackers get some information about the identity of NFC tags either by detecting communication between mobile applications and legitimate NFC tags or by physical exploration on these NFC tags, attackers could then clone the NFC tags. Poor code quality on microservices enabling interaction between mobile applications and the backend database of product records, such as weak authorization and authentication with dummy passwords or without database backup path, could lead to data theft on the confidential data of processed product records maintained in NAS. These system threats are majorly attributed by the single-point processing, storage, and failure due to the fact that operations and data of NAS are managed and controlled solely by winemakers as the anti-counterfeiting and traceability features of NAS are builton specific winemakers and around industrial operations enabled by NFC technology or other tag-communication technologies.