├── License ├── Vulnerabilty.sol └── readme.md /License: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2015 Harsh Patel. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Vulnerabilty.sol: -------------------------------------------------------------------------------- 1 | contract VM { 2 | address maker; 3 | uint status; 4 | struct Company { 5 | uint c_id; 6 | string c_name; 7 | string c_details; 8 | string c_link; 9 | address c_addr; 10 | } 11 | struct Product { 12 | uint p_id; 13 | uint p_c_id; 14 | string p_name; 15 | string p_details; 16 | 17 | string p_version; 18 | string p_link; 19 | } 20 | 21 | struct Vuln { 22 | uint vl_id; 23 | string v_name; 24 | string v_link; 25 | uint v_p_id; 26 | uint v_c_id; 27 | uint v_cvss; 28 | } 29 | uint co_no; 30 | uint pr_no; 31 | uint vl_no; 32 | mapping (uint => Company) Companys; 33 | mapping (uint => Product) Products; 34 | mapping (uint => Vuln) Vulns; 35 | 36 | function start(){ 37 | if (status != 1 ){ 38 | maker = msg.sender; 39 | status = 1; 40 | co_no =1; 41 | pr_no =1; 42 | vl_no =1; 43 | } 44 | } 45 | 46 | function register_vendor ( string c_name , string c_details , string c_link) returns (uint co_id) { 47 | co_id = co_no++; 48 | Companys[co_id] = Company ( co_id , c_name , c_details , c_link, msg.sender ); 49 | } 50 | 51 | function add_prod(string p_name , string p_details , string p_version , string p_link , uint p_c_id ) returns (uint pr_id){ 52 | if ( Companys[p_c_id].c_addr == msg.sender ){ 53 | pr_id = pr_no++; 54 | Products[pr_id]= Product ( pr_id ,p_c_id, p_name , p_details, p_version , p_link ); 55 | } 56 | } 57 | 58 | function add_vuln(string v_name , string v_link , uint v_p_id , uint v_c_id ,uint v_cvss ) returns (uint vl_id){ 59 | if ( Companys[v_c_id].c_addr == msg.sender ){ 60 | if ( Products[v_p_id].p_id == v_p_id ){ 61 | vl_id = vl_no++; 62 | Vulns[vl_id] = Vuln (vl_id, v_name , v_link, v_p_id, v_c_id,v_cvss); 63 | } 64 | } 65 | } 66 | function list_vendor_details(uint co_id) returns ( uint a, string b , string c , string d ) { 67 | if (Companys[co_id].c_id == co_id ){ 68 | a=Companys[co_id].c_id; 69 | b=Companys[co_id].c_name; 70 | c=Companys[co_id].c_details; 71 | d=Companys[co_id].c_link; 72 | } 73 | } 74 | function list_products_details(uint p_id) returns (uint a, string b, string c , string d, string e ){ 75 | if (Products[p_id].p_id ==p_id){ 76 | a = Products[p_id].p_id; 77 | b = Products[p_id].p_name; 78 | c = Products[p_id].p_details; 79 | d = Products[p_id].p_version; 80 | e = Products[p_id].p_link; 81 | } 82 | } 83 | function list_vuln_details(uint vl_id) returns (uint a, string b, string c , uint d){ 84 | if (Vulns[vl_id].vl_id ==vl_id){ 85 | a = Vulns[vl_id].vl_id; 86 | b = Vulns[vl_id].v_name; 87 | c = Vulns[vl_id].v_link; 88 | d = Vulns[vl_id].v_cvss; 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Project-Basil 2 | A Decentralized Vulnerability Management 3 | 4 | ##Aim of the Project-Basil 5 | To facilitate a decentralized Vulnerability feed management for IT vendors. Thereby creating a common platform for sharing information about vulnerabilities in a transparent manner. 6 | 7 | ##Problem addressed 8 | The Cyber-security is a very complex problem as evolution of technology is mainly by intersection of technologies forming new technologies with different use cases, and any flaw in the basic technology create major havoc across multiple technology sets. Hence disbursement of the information pertaining to the bugs or security flaws becomes important in order to minimize the cost of impact for vulnerabilities. 9 | 10 | In Current scenario the issue is handled by creating centralized repositories for mapping vulnerabilities identified in products of vendors. E.g. List like NVD maintained by NIST or Vulnerability database managed by various CERT's or other private Vulnerability feed providers. 11 | 12 | ##Why decentralize 13 | Following are the reasons to decentralize the vulnerability feed management. 14 | - Cost Reduction 15 | - Universal and uniform access of data. 16 | 17 | ##Target Audience 18 | - IT Companies 19 | - CERT's 20 | - Information Security verticals of Organization ( Govt / Pvt Co's ) 21 | 22 | ## Tools of trade 23 | To decentralization of the vulnerability feed management is done via using a contracts in [Ethereum] (https://www.ethereum.org/) Blockchain and a feed mentioning the updates for corresponding bugs maintained by Vendor for each product relased by him. 24 | 25 | ##Strucuture of the Dapps 26 | 27 | - Register the admin 28 | - Register IT Vendor who has active product 29 | - Register IT product made by the user 30 | - Update Information about the product 31 | - Release a Vulnerability 32 | Current version is a simple version of the contract however far more detailed DAPP for Vulnerability Feed is possible. 33 | 34 | ##Usage 35 | - Currently UI has not been made but contract is interactive via web3 console and can be deployed using scripts kept in [Test_Script](https://github.com/18dew/Algorythmix/tree/master/Test_work) 36 | 37 | ## Future work 38 | - To add CVSS type scoring mechanism. 39 | - To add various other methods of Security intelligence like MAEC etc on the decentralized world. 40 | --------------------------------------------------------------------------------