0% found this document useful (0 votes)
12 views52 pages

Keerthika and Divyatharshini 3rd Cs Report

The document is an internship report detailing a project on implementing blockchain technology for evidence management in forensic science using Python in Anaconda Navigator. The project aims to enhance the integrity and security of evidence through a digitalized system that maintains the chain of custody, addressing current shortcomings in existing systems. The report includes sections on project objectives, system proposals, implementation, and literature survey, highlighting the advantages of the proposed solution over existing methods.

Uploaded by

yesudossj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views52 pages

Keerthika and Divyatharshini 3rd Cs Report

The document is an internship report detailing a project on implementing blockchain technology for evidence management in forensic science using Python in Anaconda Navigator. The project aims to enhance the integrity and security of evidence through a digitalized system that maintains the chain of custody, addressing current shortcomings in existing systems. The report includes sections on project objectives, system proposals, implementation, and literature survey, highlighting the advantages of the proposed solution over existing methods.

Uploaded by

yesudossj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 52

EVIDENCE PRODUCTION BLOCK CHAIN

TECHNOLOGY BY USING PYTHON IN


ANACONDA NAVIGATOR
INTERNSHIP REPORT

Submitted to Alagappa University in partial fulfillment of the requirements for the award of the

degree in

BACHELOR DEGREE IN COMPUTER SCIENCE

Submitted by

KEERTHIKA R,

(REG NO: 00000000)

&

DIVYATHARSHINI

M (REG NO: 00000)

Under the guidance of

Mr. YESUDOSS B.Tech,ME

DEPARTMENT OF COMPUTER SCIENCE

PURATCHI THALAIVAR DR.MGR ARTS AND SCIENCE COLLEGE FOR


WOMEN
(Affiliated to Alagappa University, Karaikudi)
Uchipuli-623534

2024-2025
PURATCHI THALAIVAR DR.MGR ARTS AND SCIENCE COLLEGE FOR
WOMEN
(Affiliated to Alagappa University, Karaikudi)
Uchipuli-623534

DEPARTMENT OF COMPUTER SCIENCE

BONAFIDE CERTIFICATE

This is to certify that the project work entitled “EVIDENCE PRODUCTION BLOCKCHAIN

BY USING PYTHON IN ANACONDA NAVIGATOR” done by KEERTHIKA R

(REG NO: 0000000) & DIVYATHARSHINI M (REG NO: 000000) is a bonafide work done

under the supervision during the Jan 2025 to Mar 2025.

INTERNAL GUIDE HEAD OF THE DEPARTMENT

Submitted for Viva-Voice Held On at PURATCHI THALAIVAR DR.MGR ARTS


AND SCIENCE COLLEGE FOR WOMEN, Uchipuli.

INTERNAL EXAMINER EXTERNAL EXAMINER


PURATCHI THALAIVAR DR.MGR ARTS AND SCIENCE COLLEGE FOR WOMEN
(Affiliated to Alagappa University, Karaikudi )
Uchipuli-623534.

DECLARATION

We hereby declare that this project work has done by KEERTHIKA R

(REG NO: 0000000) & DIVYATHARSHINI M (REG NO: 0000000) under the guidance of

Mrs.SHANTHI Department of Computer Science for the partial fulfillment of the degree of

Computer science. We hereby declare that this project work has not been carried out from any other

project work and has not been submitted for the similar degree.

KEERTHIKA R (REG NO: 000000)

&

DIVYATHARSHINI M (REG NO: 000000)


ACKNOWLEDGEMENT

First of all, we would like to thank the ALMIGHTY God for giving us the strength wisdom for

completing the project successfully.

Next we thank our beloved parent for their love, encourage and continuous support.

We wish to express our deep sense of gratitude to our principal MRS. CHITHRA for giving us

an opportunity to do this project with fullest spirit.

We express our sincere thanks to Mrs. SHANTHI head of the Department of Information

Technology, who encourage us with his constant support and guidance throughout the course of

study.

We take this opportunity to express our grateful thanks to our internal guide Mr. YESUDOSS

B.Tech,ME for her encouragement and valuable guidance in completing this project timely and

successfully.

We have great pleasure in giving our thanks Full words to all other staff members who have

shared their ideas to produce a valuable project.

We convey our great pleasure in thanking all the rest of teaching and non-teaching staff

members for their kind co-operation. We thank our friend who helped us in every situation and gave

us their valuable suggestion throughout this course of study.

Last but not least, we thank to my parents for supporting us to complete my degree.

KEERTHIKA R (REG NO: 000000)

&

DIVYATHARSHINI M (REG NO: 00000)


EVIDENCE PRODUCTION BLOCK
CHAIN TECHNOLOGY BY USING
PYTHON IN ANACONDA
NAVIGATOR
ABSTRACT
ABSTRACT

Evidence management is crucial in the field of forensic science.


Evidences obtained from a crime scene are important in solving
the case and delivering justice to the parties involved. Hence,
protecting these evidences from any form of alteration is of
utmost important. Chain of Custody is the process which
maintains the integrity of evidence. Inability to maintain the chain
of custody will make the evidence inadmissible in court,
eventually leading to the case dismissal. Digitalization of forensic
evidence management system is a need of time as it is an
environment friendly model. Blockchains are digitally distributed
ledgers of transactions signed cryptographically in chronological
order that are sorted into blocks and is completely open to
anyone in the blockchain network. Hyperledger Fabric is a
consortium blockchain framework created by the Linux foundation
and is mainly used for enterprise use. Based on the concept of
Hyperledger Fabric, present study aimed to create a framework
and further propose an algorithm to implement Blockchain
Technology to digitalize forensic evidence management system
and maintain Chain of Custody.
CONTENTS
PAGE
CHAPTER TITLE
NO
ABSTRACT
1. INTRODUCTION 1
1.1. General Introduction 1
1.2. Project Objectives 1
1.3. Problem Statement 1
2. SYSTEM PROPOSAL 2
2.1. Existing System 2
2.2. Proposed System 2
2.3. Literature Survey 2
3. SYSTEM DIAGRAMS 11
3.1. Architecture Diagram 11
3.2. Flow Diagram 12
3.3. ER Diagrams 17
4. IMPLEMENTATION 18
4.1. Modules 18
4.2. Modules Description 18
5. SYSTEM REQUIREMENTS 23
5.1. Hardware Requirements 23
5.2. Software Requirements 23
5.3. Software Description 23
5.4. Testing of Products 27
6. CONCLUSION 31
7. FUTURE ENHANCEMENT 32
8. SAMPLE CODING 33
9. SAMPLE SCREENSHOT 35
10. REFERENCES 41
CHAPTER 1
INTRODUCTION
1.1 General
Introduction:

Blockchain technology is a ground-breaking innovation that has drawn a lot of interest in recent years
because of its potential to upend established data storage and exchange methods. It is a distributed,
decentralized digital ledger that securely and openly records transactions. Blockchain technology,
which was first developed for Bitcoin, the first decentralized cryptocurrency, is now being used in a
number of sectors, including banking, healthcare, and supply chain managementA blockchain is
essentially a database made up of a sequence of blocks. Once a block is included in the chain, it
cannot be changed or removed. Each block comprises a series of transactions. A network of nodes
that collaborate to validate transactions and add them to the blockchain maintains the chain. The
blockchain is controlled by no central authority or middleman thanks to the decentralized nature of
this network of nodes.Security is one of the biggest benefits of blockchain technology. Blockchain
data is spread throughout the network, making it impossible to alter with or hack. It is practically
hard to modify the data since numerous network nodes verify each transaction. Also, the use of
cryptographic techniques guarantees the encryption and security of the data.The transparency of
blockchain technology is another benefit. Every transaction is documented on the blockchain, making
it accessible to everyone using the network. As a result, there is no requirement for a central authority
or middleman to validate transactions. Instead, the network itself validates transactions, improving
both the effectiveness and efficiency of the process.The potential uses for blockchain technology are
numerous and diverse. Blockchain technology is being utilized in the banking sector to develop new
varieties of virtual currencies like Bitcoin and Ethereum. Also, it is utilized to simplify payment
procedures and lower transaction fees. Blockchain technology is being utilized in the healthcare
industry to securely store and exchange medical data.

1.2 Project Objectives


 The objective of our project to Secure and trusted for using block
chain to store industrial network data.
 High security purpose to use encryption and decryption process.
 To implement proposed Machine learning Algorithm to detect
network attack and high enhancing performance.
1.3 Problem Statement
 To compute the trust of IoT devices to prevent the malicious devices
to be part of network.

1
CHAPTER 2
SYSTEM PROPOSAL

2.1 EXISTING SYSTEM:


In Existing Approach, Industrial Internet-of-Things (IIoT) is a powerful IoT
application which remodels the growth of industries by ensuring transparent
communication among various entities such as hubs, manufacturing places and
packaging units. Introducing data science techniques with in the IIoT improves the
ability to analyse the collected data in a more efficient manner, which current IIoT
architectures lack due to their distributed nature. From a security perspective,
network anomalies/attackers pose high security risk in IIoT. In this paper, we have
addressed this problem, where a coordinator IoT device is selected to compute the
trust of IoT devices to prevent the malicious devices to be part of network. Further,
the transparency of the data is ensured by integrating a block chain-based data
model. The performance of the proposed framework is validated extensively and
rigorously against various security metrics such as attack strength, message
alteration, and probability off else authentication. The simulation results suggest
that the proposed solution increases IIoT network security by efficiently detecting
malicious attacks in the network.
2.1.1 DISADVANTAGES:

 The loss value is very high when compared with proposed.


 Time consumption is high.
 Theoretical limit.

2
2.2 PROPOSED SYSTEM:

Our proposed approach, In this system, the industrial network attack detection
dataset was taken as input. The input data was taken from the dataset repository.
To store secure and trusted mechanism Block chain using to store the industrial iot
data and high security purpose to use encryption and decryption technique. Next to
check the validation process then, we have to implement the data pre-processing
step. In this step, we have to handle the missing values for avoid wrong prediction,
and to encode the label for input data. Then, we have to split the dataset into test
and train. The data is splitting is based on ratio. In train, most of the data’s will be
there. In test, smaller portion of the data’s will be there. Training portion is used to
evaluate the model and testing portion is used to predicting the model. (i.e.)
Machine learning algorithm to detect industrial network attack. Finally, the
experimental results shows that some performance metrics such as accuracy and
prediction status.
2.2.1 ADVANTAGES

 It is efficient for large number of datasets.

 The experimental result is high when compared with existing system.

 Time consumption is low.

 Provide accurate prediction results.

2.3 LITERATURE SURVEY:

2.3.1 Data Collection and Wireless Communication in Internet of Things


(IoT) Using Economic Analysis and Pricing Models: A Survey,2017
Author: Nguyen Cong Luong, Dinh Thai Hoang, Student Member

3
Methodology
This paper provides a state-of-the-art literature review on economic analysis and
pricing models for data collection and wireless communication in Internet of
Things (IoT). Wireless Sensor Networks (WSNs) are the main component of IoT
which collect data from the environment and transmit the data to the sink nodes.
For long service time and low maintenance cost, WSNs require adaptive and robust
designs to address many issues, e.g., data collection, topology formation, packet
forwarding, resource and power optimization, coverage optimization, efficient task
allocation, and security. For these issues, sensors have to make optimal decisions
from current capabilities and available strategies to achieve desirable goals. This
paper reviews numerous applications of the economic and pricing models, known
as intelligent rational decision-making methods, to develop adaptive algorithms
and protocols for WSNs. Besides, we survey a variety of pricing strategies in
providing incentives for phone users in crowdsensing applications to contribute
their sensing data. Furthermore, we consider the use of some pricing models in
Machine-to-Machine (M2M) communication. Finally, we highlight some
important open research issues as well as future research directions of applying
economic and pricing models to IoT.
Advantages:
 If it work conceivable catch any possible attack.
 If it work conceivable catch any possible attack that we have n’t seen before

Disadvantages:
 Too Many False Negatives.
 Run to failure prediction is low.

4
2.3.2 The Effect of IoT New Features on Security and Privacy: New
Threats, Existing Solutions, and Challenges Yet to Be Solved,2016
Author: Wei Zhou, Yan Jia, Anni Peng, Yuqing Zhang, and Peng Liu

Methodology
Internet of Things (IoT) is an increasingly popular technology that enables physical
devices, vehicles, home appliances, etc. to communicate and even inter-operate
with one another. It has been widely used in industrial production and social
applications including smart home, healthcare, and industrial automation. While
bringing unprecedented convenience, accessibility, and efficiency, IoT has caused
acute security and privacy threats in recent years. There are increasing research
works to ease these threats, but many problems remain open. To better understand
the essential reasons of new IoT threats and the challenges in current research, this
survey first proposes the concept of “IoT features”. Then, we discuss the security
and privacy effects of eight IoT features including the threats they cause, existing
solutions to threats and research challenges yet to be solved. To help researchers
follow the up-to-date works in this field, this paper finally illustrates the
developing trend of IoT security research and reveals how IoT features affect
existing security research by investigating most existing research works related to
IoT security from 2013 to 2017.
Advantages:
 Monitor any data source, including user logs, devices, networks, and servers.

Disadvantages:
 it can be intimidating.

2.3.3 Personal Data Trading Scheme for Data Brokers in IoT Data

5
Marketplaces

Author: hyeontaek oh, sangdon park

Methodology

With the widespread use of the Internet of Things, data-driven services take the
lead of both online and off-line businesses. Especially, personal data draw heavy
attention of service providers because of the usefulness in value-added services.
With the emerging big-data technology, a data broker appears, which exploits and
sells personal data about individuals to other third parties. Due to little
transparency between providers and brokers/consumers, people think that the
current ecosystem is not trustworthy, and new regulations with strengthening the
rights of individuals were introduced. Therefore, people have an interest in their
privacy valuation. In this sense, the willingness-to-sell (WTS) of providers
becomes one of the important aspects for data brokers; however, conventional
studies have mainly focused on the willingnessto-buy (WTB) of consumers.
Therefore, this paper proposes an optimized trading model for data brokers who
buy personal data with proper incentives based on the WTS, and they sell valuable
information from the refined dataset by considering the WTB and the dataset
quality. This paper shows that the proposed model has a global optimal point by
the convex optimization technique and proposes a gradient ascentbased algorithm.
Consequently, it shows that the proposed model is feasible even if the data brokers
spend cost to gather personal data.
Advantages:
 Change of detecting unknown attack.
 Anomoly Detection more efficient than signature detection, if signature
detection file is large.

6
Disadvantages:
 Cannot use anamoly detection must be used with signature detection.
 Reliability is unclear.

2.3.4 A Host-based Intrusion Detection and Mitigation


Framework for Smart Home IoT using OpenFlow,
2019

Author: Mehdi Nobakht, Vijay Sivaraman


Methodology
Smart devices are gaining popularity in our homes with the promise to make
our lives easier and more comfortable. However, the increased deployment of
such smart devices brings an increase in potential security risks. In this work,
we propose an intrusion detection and mitigation framework, called IoT-IDM,
to provide a network-level protection for smart devices deployed in home
environments. IoT-IDM monitors the network activities of intended smart
devices within the home and investigates whether there is any suspicious or
malicious activity. Once an intrusion is detected, it is also capable of blocking
the intruder in accessing the victim device on the fly. The modular design of
IoT-IDM gives its users the flexibility to employ customized machine learning
techniques for detection based on learned signature patterns of known attacks.
Software-defined networking technology and its enabling communication
protocol, OpenFlow, are used to realise this framework. Finally, a prototype of
IoT-IDM is developed and the applicability and efficiency of proposed
framework demonstrated through a real IoT device: a smart light bulb.

Advantages:
 Rate of missing report is low.
 Simple and Effective method.

7
Disadvantages:
 Needs to be trained, and trained model carefully otherwise tends to be
false positive.
 Low Accuracy rate.

2.3.5 Improving IoT Botnet Investigation Using an Adaptive


Network Layer

Author: Dr. Lisandro Z. Granville


Methodology
IoT botnets have been used to launch Distributed Denial-of-Service (DDoS)
attacks affecting the Internet infrastructure. To protect the Internet from such
threats and improve security mechanisms, it is critical to understand the botnets’
intents and characterize their behavior. Current malware analysis solutions, when
faced with IoT, present limitations in regard to the network access containment and
network traffic manipulation. In this paper, we present an approach for handling
the network traffic generated by the IoT malware in an analysis environment. The
proposed solution can modify the traffic at the network layer based on the actions
performed by the malware. In our study case, we investigated the Mirai and
Bashlite botnet families, where it was possible to block attacks to other systems,
identify attacks targets, and rewrite botnets commands sent by the botnet controller
to the infected devices.

Advantages:
 Flexibility, fault tolerance, high sensing fidelity, low-
cost and rapid deployment.

Disadvantages:
 Sensor nodes are prone to failures.

8
2.3.6 Machine Learning for Anomaly Detection: A
Systematic Review,2017

Author: Fatima mohamad dakalbab


Methodology

Anomaly detection has been used for decades to identify and extract anomalous
components from data. Many techniques have been used to detect anomalies. One
of the increasingly significant techniques is Machine Learning (ML), which plays
an important role in this area. In this research paper, we conduct a Systematic
Literature Review (SLR) which analyzes ML models that detect anomalies in their
application. Our review analyzes the models from four perspectives; the
applications of anomaly detection, ML techniques, performance metrics for ML
models, and the classification of anomaly detection. In our review, we have
identified 290 research articles, written from 2000-2020, that discuss ML
techniques for anomaly detection. After analyzing the selected research articles, we
present 43 different applications of anomaly detection found in the selected
research articles. Moreover, we identify 29 distinct ML models used in the
identification of anomalies.
Advantages:
 Simplest and Easiest Data Mining Aproach.

DisAdvantages
 Handling of Anamoly detection is difficult

2.3.7 A Taxonomy of Botnet Behavior, Detection and Defense.2018

9
Author: Sheharbano Khattak, Naurin Rasheed Ramay, Kamran Riaz Khan, Affan A

Methodology
A number of detection and defense mechanisms have emerged in the last decade to
tackle the botnet phenomenon. It is important to organize this knowledge to better
understand the botnet problem and its solution space. In this paper, we structure
existing botnet literature into three comprehensive taxonomies of botnet behavioral
features, detection and defenses. This elevated view highlights opportunities for
network defense by revealing shortcomings in existing approaches. We introduce
the notion of a dimension to denote different criteria which can be used to classify
botnet detection techniques. We demonstrate that classification by dimensions is
particularly useful for evaluating botnet detection mechanisms through various
metrics of interest. We also show how botnet behavioral features from the first
taxonomy affect the accuracy of the detection approaches in the second taxonomy.
Advantages:
 Change of Detecting unknown attack.
 May be more efficient.

Disadvantages:
 Must be used with signature detection.
 Anamoly implises unusual activity.

10
CHAPTER 3
SYSTEM DIAGRAMS

3.1 SYSTEM ARCHITECTURE:

Industrial Data Selection


Network data

Block chain Encryption (Fernet)

Remove
unwanted Preprocessing
column

Training
Handling Data
Missing Values Data Splitting

Testing
Data

Classification
Result
DT Generation
Accuracy
Performance precision
F1 Score
Recall

11
3.2 Flow Diagram

Select and Block


Start Load Data
chain Preprocessing
Dataset

Data
Splitting

Prediction Classification

DT

Performance
Analysis
Report
Generation

12
3.3 Use Case Diagram

Dataset Selection

Load Dataset

Block Chain

Encryption Fernet

Preprocessing

Data Splitting

Classification

Prediction

Result Generation

13
3.4 Activity Diagram

Input Data

Block chain

Encryption Fernet

Preprocessing
Data splitting

Classification

Prediction

Performance metrics

14
3.5 Sequence Diagram

DATA DATA CLASSIFI


SELECTI Block DATA
SPLITTING CATION
ON & PREPROCESS RESULT
chain GENERATI

Unwanted
Select Column
Dataset removal

Train

Secure
Test
Algorithm
implementation

Missing
data

15
3.6. Class Diagram

Input data Blockchain


Datasplitting
Select Data
Load Data Encryption
Fernet Preprocessing Train
View Data
Test

Result Classification
Generation
Accuracy
Precision DT
F1 Score Prediction
Recall

16
3.7 ER DIAGRAM

Select
Missing
values Label encode
Load Import

Data
Preprocessing
selection

Classification Data Splitting


report Classificatio
n
Recall
Accuracy

Prediction
F1 Score

Test Train

17
CHAPTER-4
IMPLEMENTATION

4.1 MODULES:
 Data selection
 Block chain
 Encryption – Decryption
 Data preprocessing
 Data Splitting
 Classification
 Performance metrics

4.2 MODULES DESCRIPTION:


4.2.1 DATA SELECTION:
 The input data was collected the dataset form the internet for the website
called kaggle.com.
 In this work all having test dataset and train dataset in the test data set having
a 5000 dataset and in the train data having a 8000 data.
In our collected dataset was read in this process using pandas.

4.2.2 BLOCK CHAIN

18
 Blockchain is a system of recording information in a way that
makes it difficult or impossible to change, hack, or cheat the
system.
 A blockchain is essentially a digital ledger of transactions that is
duplicated and distributed across the entire network of computer
systems on the blockchain.
 Each block in the chain contains a number of transactions, and
every time a new transaction occurs on the blockchain, a record of
that transaction is added to every participant’s ledger.
 The decentralised database managed by multiple participants is
known as Distributed Ledger Technology (DLT).
 Blockchain is a type of DLT in which transactions are recorded with
an immutable cryptographic signature called a hash.

4.2.3 ENCRYPTION DECRYPTION

 Cryptography is the practice of securing useful information while


transmitting from one computer to another or storing data on a computer.

 Cryptography deals with the encryption of plaintext into cipher text and
decryption of cipher text into plaintext.
 Python supports a cryptography package that helps us encrypt and decrypt
data. The fernet module of the cryptography package has inbuilt functions
for the generation of the key, encryption of plaintext into cipher text, and
decryption of cipher text into plaintext using the encrypt and decrypt
methods respectively.
 The fernet module guarantees that data encrypted using it cannot be
further manipulated or read without the key.

19
4.2.4 DATA PREPROCESSING:
 Data pre-processing is the process of removing the unwanted data from the
dataset.

 Pre-processing data transformation operations are used to transform the dataset


into a structure suitable for machine learning.

 This step also includes cleaning the dataset by removing irrelevant or


corrupted data that can affect the accuracy of the dataset, which makes it more
efficient.

 Missing data removal

 Missing data removal: In this process, the null values such as missing values
and Nan values are replaced by 0.

 Missing and duplicate values were removed and data was cleaned of any
abnormalities.

4.2.5 DATA SPLITTING

 During the machine learning process, data are needed so that learning can
take place.
 In addition to the data required for training, test data are needed to evaluate
the performance of the algorithm but here we have training and testing dataset
separately.
 In our process, we have to divide as training and testing into x_train,
y_train, x_test, y_test.

20
 Data splitting is the act of partitioning available data into two portions,
usually for cross-validator purposes.

 One Portion of the data is used to develop a predictive model and the other
to evaluate the model's performance.

4.2.6. CLASSIFICATION

Decision Tree

 A decision tree is a flowchart-like tree structure where an internal node


represents feature(or attribute), the branch represents a decision rule, and
each leaf node represents the outcome.
 The topmost node in a decision tree is known as the root node. It learns to
partition on the basis of the attribute value.
 It partitions the tree in recursively manner call recursive partitioning. This
flowchart-like structure helps you in decision making. It's visualization like
a flowchart diagram which easily mimics the human level thinking.
 The time complexity of decision trees is a function of the number of records
and number of attributes in the given data.
 The decision tree is a distribution-free or non-parametric method, which
does not depend upon probability distribution assumptions. Decision trees
can handle high dimensional data with good accuracy.

4.2.7 PERFORMANCE METRICS

21
Accuracy

Accuracy simply measures how often the classifier correctly predicts. We


can define accuracy as the ratio of the number of correct predictions and the
total number of predictions.

Precision

Precision explains how many of the correctly predicted cases actually turned out to
be positive. Precision is useful in the cases where False Positive is a higher concern
than False Negatives.

F1 Score

It gives a combined idea about Precision and Recall metrics. It is maximum when
Precision is equal to Recall.

Recall

Recall explains how many of the actual positive cases we were able to predict
correctly with our model

22
CHAPTER 5
SYSTEM REQUIREMENTS
5.1 HARDWARE REQUIREMENTS:

 System : Pentium IV 2.4 GHz


 Hard Disk : 200 GB
 Mouse : Logitech.
 Keyboard : 110 keys enhanced
 Ram : 4GB

5.2 SOFTWARE REQUIREMENTS:

 O/S : Windows 7.
 Language : Python
 Front End : Anaconda Navigator – Spyder

5.3 SOFTWARE DESCRIPTION:

5.3.1 Python

Python is one of those rare languages which can claim to be both simple and
powerful. You will find yourself pleasantly surprised to see how easy it is to
concentrate on the solution to the problem rather than the syntax and structure of
the language you are programming in. The official introduction to Python is
Python is an easy to learn, powerful programming language. It has efficient high-
level data structures and a simple but effective approach to object-oriented
programming. Python's elegant syntax and dynamic typing, together with its

23
interpreted nature, make it an ideal language for scripting and rapid application
development in many areas on most platforms. I will discuss most of these features
in more detail in the next section.

5.3.2 Features of Python


 Simple

Python is a simple and minimalistic language. Reading a good Python


program feels almost like reading English, although very strict English! This
pseudo-code nature of Python is one of its greatest strengths. It allows you to
concentrate on the solution to the problem rather than the language itself.

 Easy to Learn

As you will see, Python is extremely easy to get started with. Python has an
extraordinarily simple syntax, as already mentioned.

 Free and Open Source

Python is an example of a FLOSS (Free/Libré and Open Source Software).


In simple terms, you can freely distribute copies of this software, read its source
code, make changes to it, and use pieces of it in new free programs. FLOSS is
based on the concept of a community which shares knowledge. This is one of the
reasons why Python is so good - it has been created and is constantly improved by
a community who just want to see a better Python.

 High-level Language

When you write programs in Python, you never need to bother about the
low-level details such as managing the memory used by your program, etc.

24
 Portable

Due to its open-source nature, Python has been ported to (i.e. changed to
make it work on) many platforms. All your Python programs can work on any of
these platforms without requiring any changes at all if you are careful enough to
avoid any system-dependent features.

You can use Python on GNU/Linux, Windows, FreeBSD, Macintosh,


Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX,
VMS, Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE
and PocketPC!

You can even use a platform like Kivy to create games for your computer
and for iPhone, iPad, and Android.

 Interpreted

This requires a bit of explanation.

A program written in a compiled language like C or C++ is converted from


the source language i.e. C or C++ into a language that is spoken by your computer
(binary code i.e. 0s and 1s) using a compiler with various flags and options. When
you run the program, the linker/loader software copies the program from hard disk
to memory and starts running it.

Python, on the other hand, does not need compilation to binary. You just run
the program directly from the source code. Internally, Python converts the source
code into an intermediate form called bytecodes and then translates this into the
native language of your computer and then runs it. All this, actually, makes using
Python much easier since you don't have to worry about compiling the program,

25
making sure that the proper libraries are linked and loaded, etc. This also makes
your Python programs much more portable, since you can just copy your Python
program onto another computer and it just works!

 Object Oriented

Python supports procedure-oriented programming as well as object-oriented


programming. In procedure-oriented languages, the program is built around
procedures or functions which are nothing but reusable pieces of programs. In
object-oriented languages, the program is built around objects which combine data
and functionality. Python has a very powerful but simplistic way of doing OOP,
especially when compared to big languages like C++ or Java.

 Extensible

If you need a critical piece of code to run very fast or want to have some
piece of algorithm not to be open, you can code that part of your program in C or
C++ and then use it from your Python program.

 Embeddable

You can embed Python within your C/C++ programs to give scripting
capabilities for your program's users.

 Extensive Libraries

The Python Standard Library is huge indeed. It can help you do various
things involving regular expressions, documentation generation, unit testing,
threading, databases, web browsers, CGI, FTP, email, XML, XML-RPC, HTML,
WAV files, cryptography, GUI (graphical user interfaces), and other system-

26
dependent stuff. Remember, all this is always available wherever Python is
installed. This is called the Batteries Included philosophy of Python.

Besides the standard library, there are various other high-quality libraries
which you can find at the Python Package Index.

5.4 TESTING PRODUCTS:

System testing is the stage of implementation, which aimed at ensuring


that system works accurately and efficiently before the live operation
commence. Testing is the process of executing a program with the intent of
finding an error. A good test case is one that has a high probability of finding
an error. A successful test is one that answers a yet undiscovered error.

Testing is vital to the success of the system. System testing makes a


logical assumption that if all parts of the system are correct, the goal will be
successfully achieved. . A series of tests are performed before the system is
ready for the user acceptance testing. Any engineered product can be tested in
one of the following ways. Knowing the specified function that a product has
been designed to from, test can be conducted to demonstrate each function is
fully operational. Knowing the internal working of a product, tests can be
conducted to ensure that “al gears mesh”, that is the internal operation of the
product performs according to the specification and all internal components have
been adequately exercised.

5.4.1 UNIT TESTING:


Unit testing is the testing of each module and the integration of the overall
system is done. Unit testing becomes verification efforts on the smallest unit of

27
software design in the module. This is also known as ‘module testing’. The
modules of the system are tested separately. This testing is carried out during the
programming itself. In this testing step, each model is found to be working
satisfactorily as regard to the expected output from the module. There are some
validation checks for the fields. For example, the validation check is done for
verifying the data given by the user where both format and validity of the data
entered is included. It is very easy to find error and debug the system.

5.4.2 INTEGRATION TESTING


Data can be lost across an interface, one module can have an adverse
effect on the other sub function, when combined, may not produce the desired
major function. Integrated testing is systematic testing that can be done with
sample data. The need for the integrated test is to find the overall
system performance. There are two types of integration testing. They are:
i) Top-down integration
testing.
ii) Bottom-up integration
testing.

5.4.3 TESTING TECHNIQUES/STRATEGIES:

 BLACK BOX TESTING:

1. Black box testing is done to find incorrect or missing function

2. Interface error

3. Errors in external database access

28
4. Performance errors.

5. Initialization and termination errors

In ‘functional testing’, is performed to validate an application conforms to its


specifications of correctly performs all its required functions. So this testing
is also called ‘black box testing’. It tests the external behaviour of the system.
Here the engineered product can be tested knowing the specified function that a
product has been designed to perform, tests can be conducted to demonstrate
that each function is fully operational.
 WHITE BOX TESTING:

White Box testing is a test case design method that uses the control structure of
the procedural design to drive cases. Using the white box testing methods, we
Derived test cases that guarantee that all independent paths within a module have
been exercised at least once.
5.4.4 SOFTWARE TESTING
STRATEGIES VALIDATION TESTING:

 After the culmination of black box testing, software is completed assembly


as a package, interfacing errors have been uncovered and corrected and final
series of software validation tests begin validation testing can be defined as
many,
 But a single definition is that validation succeeds when the software
functions in a manner that can be reasonably expected by the customer

USER ACCEPTANCE TESTING:

29
User acceptance of the system is the key factor for the success of the
system. The system under consideration is tested for user acceptance by
constantly keeping in touch with prospective system at the time of developing
changes whenever required.

OUTPUT TESTING:
After performing the validation testing, the next step is output asking the user
about the format required testing of the proposed system, since no system
could be useful if it does not produce the required output in the specific format.
The output displayed or generated by the system under consideration. Here
the output format is considered in two ways. One is screen and the other is
printed format. The output format on the screen is found to be correct as the
format was designed in the system phase according to the user needs. For the
hard copy also output comes out as the specified requirements by the user.
Hence the output testing does not result in any connection in the system.

30
CHAPTER 6

CONCLUSION

A secure framework based on trust management and blockchain to deal with the
issues caused by MDs at various levels in IIoT networks. Using high security
purpose to encryption and decryption process .Our Machine learning algorithm
give high performance result. The accuracy, Precision, Recall and F1 score have
reached high confidence result and accurate prediction status.

31
CHAPTER 7

FUTURE ENHANCEMENT

In future, discovery of additional information based on industrial iot attack


detection.
We working on a Particular Dataset than we got an online website we
work on any Dataset.

32
CHAPTER 8
SAMPLE
CODING
Install Required :
Libraries

pip install blockchain scikit-learn


First, set up the blockchain functionality. We'll use a simple blockchain implementation

from blockchain import Blockchain, Block

blockchain = Blockchain()

# Define your evidence data (e.g., features for machine learning)


evidence_data = [
{"feature1": 0.1, "feature2": 0.5},
{"feature1": 0.2, "feature2":
0.6}, # Add more evidence data
]

# Generate blocks for each piece of evidence data


for data in evidence_data:
block = Block(data)
blockchain.add_block(block)
Machine Learning Setup: Next, set up the machine learning model using scikit-
learn. Here, we'll use a simple linear regression model:

from sklearn.linear_model import LinearRegression

33
import numpy as np

# Sample features and labels (replace with your actual data)


X = np.array([[0.1], [0.2]])
y = np.array([0.5, 0.6])

# Train the model


model =
LinearRegression()
model.fit(X, y)

# Make predictions (you would use your actual evidence data here)
predictions = model.predict(X)
Blockchain Integration with Machine Learning: Integrate the blockchain with
machine learning to store the evidence data and model predictions:

# Store evidence data and model predictions in the blockchain


for i, data in enumerate(evidence_data):
evidence_hash = blockchain.chain[i + 1].hash
blockchain.chain[i + 1].data["prediction"] = predictions[i]
blockchain.chain[i + 1].data["evidence_hash"] = evidence_hash

# Print the blockchain


for block in blockchain.chain:
print(f"Block {block.index}: {block.data}")

34
CHAPTER 9

SAMPLE SCREENSHOTS

Dataset

Block chain

35
Preprocessing

Removing Unwanted Column

36
Label Encoding

Data splitting into training and testing data

37
38
Performance

39
Prediction

Confusion Matrix

40
CHAPTER 10
REFERENCES
[1] A. Karpatne, G. Atluri, J. H. Faghmous, M. Steinbach, A. Banerjee, A.
Ganguly, S. Shekhar, N. Samatova, and V. Kumar, “Theoryguided data science: A
new paradigm for scientific discovery from data,” IEEE Transactions on
Knowledge and Data Engineering, vol. 29, no. 10, pp. 2318–2331, 2017.
doi:10.1109/TKDE.2017.2720168.
[2] Y. Mehmood, F. Ahmad, I. Yaqoob, A. Adnane, M. Imran, and S. Guizani,
“Internet-of-Things Based Smart Cities: Recent Advances and Challenges,” IEEE
Communications Magazine, vol. 55, no. 9, pp. 16–24, 2017. doi:
10.1109/MCOM.2017.1600514.
[3] H. Oh, S. Park, G. M. Lee, H. Heo, and J. K. Choi, “Personal data trading
scheme for data brokers in iot data marketplaces,” IEEE Access, vol. 7, pp. 40120–
40132, 2019. doi:10.1109/ACCESS.2019.2904248.
[4] Merolla,J.V.Arthur,R.Alvarez-Icaza,A.S.Cassidy,J.Sawada, F. Akopyan, B. L.
Jackson, N. Imam, C. Guo, Y. Nakamura, et al., “A million spiking-neuron
integrated circuit with a scalable communication network and interface,” Science,
vol. 345, no. 6197, pp. 668– 673, 2014. doi:10.1126/science.1254642.
[5] C.-X. Wang, F. Haider, X. Gao, X.-H. You, Y. Yang, D. Yuan, H. M.
Aggoune, H. Haas, S. Fletcher, and E. Hepsaydir, “Cellular architecture and key
technologies for 5g wireless communication networks,” IEEE communications
magazine, vol. 52, no. 2, pp. 122– 130, 2014. doi:10.1109/MCOM.2014.6736752.
[6] E. Bertino and N. Islam, “Botnets and internet of things security,” Computer,
no. 2, pp. 76–79, 2017. doi:10.1109/MC.2017.62.
[7] L. Zhou, D. Wu, J. Chen, and Z. Dong, “When computation hugs intelligence:
Content-aware data processing for industrial iot,” IEEE Internet of Things Journal,

41
vol. 5, no. 3, pp. 1657–1666, 2017. doi:10.1109/JIOT.2017.2785624.
[8] J. Huang, L. Kong, G. Chen, M.-Y. Wu, X. Liu, and P. Zeng, “Towards secure
industrial iot: Block chain system with credit-based consensus mechanism,” IEEE
Transactions on Industrial Informatics, 2019. doi:10.1109/TII.2019.2903342.
[9] F. Al-Turjman and S. Alturjman, “Context-sensitive access in industrial
internet of things (iiot) healthcare applications,” IEEE Transactions on Industrial
Informatics, vol. 14, no. 6, pp. 2736–2744, 2018. doi:10.1109/TII.2018.2808190.
[10] J. Wan, J. Li, M. Imran, and D. Li, “A blockchain-based solution for
enhancing security and privacy in smart factory,” IEEE Transactions on Industrial
Informatics, vol. 15, pp. 3652–3660, June 2019. doi:10.1109/TII.2019.2894573.
[11] J. A. Shamsi and M. A. Khojaye, “Understanding privacy violations in big
data systems,” IT Professional, vol. 20, no. 3, pp. 73–81, 2018.
doi:10.1109/MITP.2018.032501750.
[12] X.Li,Q. Wang, X.Lan, X.Chen, N.Zhang, andD. Chen, “Enhancing cloud-
based iot security through trustworthy cloud service: An integration of security and
reputation approach,” IEEE Access, vol. 7, pp. 9368–9383, 2019.
doi:10.1109/ACCESS.2018.2890432
[13] H. Moosavi and F. M. Bui, “Delay-aware optimization of physical layer
security in multi-hop wireless body area networks,” IEEE Transactions on
Information Forensics and Security, vol. 11, no. 9, pp. 1928–1939, 2016.
doi:10.1109/TIFS.2016.2566446.
[14] Z. Chen, W. Dong, H. Li, P. Zhang, X. Chen, and J. Cao, “Collaborative
network security in multi-tenant data center for cloud computing,” Tsinghua
Science and Technology, vol. 19, no. 1, pp. 82– 94, 2014.
doi:10.1109/TST.2014.6733211.
[15] P. Danzi, A. E. Kalør, ˇC. Stefanovi´c, and P. Popovski, “Delay and
communication tradeoffs for blockchain systems with lightweight iot clients,”

42
IEEE Internet of Things Journal, vol. 6, no. 2, pp. 2354– 2365, 2019.
doi:10.1109/JIOT.2019.2906615.

43

You might also like