File Hiding: Minor Project Report
File Hiding: Minor Project Report
File Hiding: Minor Project Report
On
File hiding
Submitted in Partial fulfillment for the Award of the degree of
Bachelor of Technology
In
COMPUTER SCIENCE & ENGINEERING (CYBER SECURITY)
Submitted to
RAJIV GANDHI PROUDYOGIKI VISHWAVIDHYALAYA, BHOPAL (M.P)
Submitted by
Ajinkya Asati
Under the guidance of
Prof. Roopali Soni
Head of Department (CSE-CY)
ORIENTAL COLLEGE OF TECHNOLOGY, BHOPAL
Department of Computer Science & Engineering (Cyber Security)
CANDIDATE’S DECLARATION
I hereby declare that the Minor Project report on “File hiding” which is being presented here
for the partial fulfillment of the requirement of Degree of “Bachelor of Technology” has been
carried out at Department of Computer Science & Engineering (Cyber Security), Oriental
College of Technology Bhopal. The technical information provided in this report is
presented with due permission of the authorities from the training organization .
Ajinkya Asati
0126CY201008
Phone No.-0755-2529015, 2529016
Fax: 0755-2529472
E-mail: directoroct@oriental.ac.in
Website: http://www.oriental.ac.in/oct-bhopal/
ORIENTAL COLLEGE OF TECHNOLOGY, BHOPAL
Approved by AICTE, New Delhi & Govt. of M.P. Affiliated to Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal
Oriental Campus, Raisen Road, Bhopal-462021 (MP) INDIA
CERIFICATE OF INSTITUTE
This is to certify that Mr. AJINKYA ASATI of B.Tech. Computer Science & Engineering (Cyber Security)
Department Enrollment No.0126CY201008 has successfully completed his Minor Project during the
academic year 2021-2022 as partial fulfillment of the Bachelor of Technology in Computer Science &
Engineering (Cyber Security).
I would like to convey my heartfelt gratitude to Prof. Roopali Soni, HOD (CSE-CY), Oriental
College of Technology, Bhopal, for the support and inspiring guidance for the successful completion
of our work. I would also like to extend my heartfelt gratitude to my co-guide Prof. Priyanka
Saxena, Assistant Professor, Oriental College of Technology, Bhopal. The completion of the project
would not have been possible without their help and insights.
There are so many people whom I would like to thank. I am so grateful to all the faculty members
for their constant support throughout this work. I would also like to thank my teammates. I would also like
thank to seniors for their support, encouragement and help in various forms.
I would also like to thank my friends, who encouraged me and supported me by providingme
with help in various ways to make my work successful.
AJINKYA ASATI
0126CY201008
iv
List of figures
RDW, Read-Delete-Write method is a way in which we are reading the data of text file and then copy the
data written in the file . After this we are copying the data, after this we are deleting the file. The data
that we have copied is pasted at safe path.
In our project we are only focusing on text file. A text file is a kind of computer file that is structured as
a sequence of lines of electronic text. A text file exists stored as data within a computer file system. Our
project is increases the security of the file.
The idea of making such a software is came from an incident, that is, I hide a file but my friend un-hide
it easily so I have decided to find a way so that it has better solution. Hiding a file also increases the
security of file and insures the safety from the attackers. The attackers can easily access any file or if it a
password protected then they can get easily access with cracking the password.
In our project, the user is verifying with the OTP sending on the registered email. The user must first
register here. The OTP we send is only consist numbers. The user data is saving on the data base. In our
project we are using MY SQL for database language. User data and information is saving here. The main
functioning of our project is that its first it read the file data and stored it in data base and delete the file.
And when the user wants to unhide the file we will write it to in a new file and save it to in required path.
In this way we are using the RDW technique.
The main task is to hide a text file to provide more security for the future and also we need it today also.
The world is increasing toword new generation and now we need more security to a file.
Since the File Hiding is more secure than the password, therefore, we are implementing it to secure the
file, maintain the authenticity of the user. This synopsis will provide background on the RDW technique,
describe the implementation, and present the results as our expected outcomes.
Table of Content
Candidate’s Declaration ii
Certificate of Institute iii
Acknowledgement iv
List of Figures v
List of Symbols & Abbreviations vi
Executive Summary vii
Chapter 1: Introduction 1
Chapter 2: Literature Review 4
Chapter 3: Proposed Methodology 7
(i) Flow Chart and Algorithm 9
(ii) Technology Used 10
Chapter 4: Implementation and Testing 12
Chapter 5: Result and Discussion 21
Chapter 6: Conclusion and Future Scope 23
References 25
CHAPTER 1
INTRODUCTION
1
Today, privacy issues are a major problem. Everyone is worried that his/her personal thingsmay
not leak, especially the things kept on a computer. For that, they keep their devices protected
by passwords, PINs, or pattern-type locks. But due to the rapid advancement of technology,
attackers are now able to crack the password or PIN. For this people make strongpasswords
by generating random passwords with special letters, alphabets, and numbers. But then also
the passwords can be cracked by many permutations and combinations of numbers,
alphabets, and special characters. Although it can take many years to crack it, still, it will crack
at some point of time.
So, the best solution to come up with is a “File Hiding,” here the file is hide and when the user
need it will be unhide. It is because File hiding are more secure than passwords as they hide
the data by using Read-Delete-Write.
For this project, we are using IntelliJ IDEA, IntelliJ IDEA is an integrated development
environment written in Java for developing computer software written in Java, Kotlin, Groovy,
and other JVM-based languages. It is developed by JetBrains and is available as an Apache 2
Licensed community edition, and in a proprietary commercial edition. Along with IntelliJ, we
are using My SQL, MySQL is an open-source relational database management system. Its
name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and
"SQL", the abbreviation for Structured Query Language.
To develop the project, we are first register new user in by taking some useful
information about the user and while taking data we also verify the user email (the most
important for the project). We are verifying the email by sending an OTP. Here when the user
is registered, we are going to login in process. The login process is simple as we just ask
registered email then verify it by sending email on it. After login the user get 3 choices that
are-see the file that are hide, to hide a file, and unhide a file.
The one of the best parts of project is to sending OTP to email. We searched API but we are
not satisfied with it so we move toward some other point. And we find out a way by sending it
by our own email. We look sites to sites and searches. We write a code that send the email
automatically to email. Here we use STTP library for it. The STTP client is an open-source
library which provides a clean, programmer-friendly API to describe HTTP requests and how
to handle responses.
Now, one of the most difficult tasks to hide a file when we are researching on hiding a file, we
are seen that they are just hiding it from frontend but it is present in backend and we don’t get
2
satisfied. After researching so much we finally come up with an idea and that idea is based on
Read-Delete-Write technique.
The technique we are using in this project is the Read-Delete-Write technique Recall-based
pproach. In this technique the user data is read and after this it going to be saved in database
and delete the file and when the user wants to un hide the file we simply paste the data to the
selective path with same name of file.
3
CHAPTER 2
LITERATURE REVIEW
4
In this section, we will discuss some of the literature reviews done by us while understanding
the knowledge of the file hiding.
In 2016, Mr. Abhijeet Tanaji Khot and Mr. Chetan J. Awati proposed a way of hiding the useful
information or data through images. Their approach was the Reversible Image Transformation
Approach. An approach where user data is hiding through the image. They proposed a new
image reversible technique, this technique not only enhances the quality of the encrypted image
but also it can restore the secret image in lossless manner. Furthermore, is delegate data to the
cloud. Therefore, the cloud can easily add additional data into the encrypted image by any RDH
methods. It is very crucial to secure data and allow the cloud server to manage the data at the
meantime. Under such demands, proposes a method of Reversible Data Hiding in Encrypted
Image based on Reversible Image Transformation. Other from all existing encryption methods,
RIT based method allow user to transmute the data of original image into another target image
with the same size.
Which secure the original image, the transmuted image which appears like the target image
which is used as the encrypted image, and the transmutation can be done between the micro
blocks with small size, which enhance the quality of the encrypted image.
Conclusion of their report is, techniques of reversible data hiding in encrypted image had some
limitation, which are unable to protect image content, it cannot protect the privacy of data, low
hiding capacity and complex computations, clarity of the image will be poor, data compression
is not efficient, some problem in the decoding section. Under such demands to overcome this
kind of drawbacks proposes a novel framework of Data Hiding in Encrypted Image by
Reversible Image Transformation (RIT), which can transform a secret image to a randomly
selected target image for getting a encrypted image which is used as the encryption of secret
image with good visual quality, and the secret image can be restored without any loss. It can
protect the image content. So it is interesting to implement RDH in encrypted images (RDH-
EI), by which the cloud server can reversibly embed data into the image but cannot get any
knowledge about the image contents. Our further work includes improving the transformation
and RDH methods, transmuting the two encrypted image (secret image) into only one target
image and extend idea to the video or audio.
5
In 2018, Jeremy Davis, Joe MacLean, David Dampier Research on Methods of Information
Hiding and Detection in File System Information hiding, accomplished by exploiting a
computer's file system and various other operating system characteristics, can take on many
forms. In many cases, information hiding is a intentional activity that an individual employs to
store away sensitive information in an attempt to make it invisible to everyone else. However,
there are some exceptions, such as digital watermarking, that are used for appropriate purposes.
Some common methods of information hiding include: hidden files, deleted files, hidden
partitions, alternate data streams, steganography, and slack space hiding. There are many
computer forensics tool kits available that allow a user to detect multiple types of information
hiding. Taking a more in depth look to how these tool kits detect the types of information hiding
mentioned gives a deeper understanding of how the information hiding was accomplished.
The most widely used file systems for Windows operating systems are the file allocation table
(FAT) file systems and the new technologies file system (NTFS). These file systems both
perform the same basic tasks, but for the purposes of information hiding, their subtle
differences change the ways that some methods of information hiding are accomplished. Thus,
a brief overview of each file system, along with a small discussion of their differences is
warranted and shall be presented prior to the discussion of the various methods of information
hiding.
Conclusion of the report is that information hiding is a factor in each computer forensics
investigation. There are several methods of information hiding that a suspect can use to conceal
incriminating evidence. Most modern tool kits provide methods for detecting, recovering, and
viewing most all types of information hiding. Thus, the investigator's job is made much easier
with the advent of these tool kits. However, as these tool kits make detecting the common
methods of information hiding more trivial, it is plausible that new and more innovative ways
of information hiding will be developed to circumvent the current methods and thwart the tool
kits' capabilities
6
CHAPTER 3
PROPOSED METHODOLOGY
7
In our project , we are using Read-Delete-Write technique because here the important thing is to hide the
the file. We planned our project in such way that the hiding a file in a new way. We also planned for user
authentication by sending otp to user’s registered email. In our project we also make a singup method .the singup
method is used for registering new user . we also verify the user’s email at the registering time by sending email.
The technique we used here is different and simple.
We have collected data by researching paper by many devolper who tries top create a way of hiding data
. After this we think a new way of hiding tect file. In this we planned to use Read-Delete-Write technique.We
also watch videows on youtube and reads books about file hiding Also we are planned to sending otp to
registered
email.
The technique we used here is one of new way of hiding data that is Read-Delete-Write technique. In this
first user text file is read and save the data to secure place and then delete the file and when user tries to unhide
the data we move the data that is saved in database to the required path. In our project no. of user can registered
here . And there data is saved .when a user want to hide a file first user has to login if new user then singup first.
And then the user has to mention the correct path of text file .after this we read the the file and copy the data to
database and delete the file after this when the user want to unhide the file we first create a file of same name to
same path and save the data . In this way we hide/unide a text file.
8
(i) Flow Chart
The project works on the Read-Delete-Write technique where users want to hide a text file.
When a user want to register
For login
9
(ii) Technology used
Java
Java is a popular programming language, created in 1995.
It is owned by Oracle, and more than 3 billion devices run Java.
It is used for:
• Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
• It is one of the most popular programming language in the world
• It has a large demand in the current job market
• It is easy to learn and simple to use
• It is open-source and free
• It is secure, fast and powerful
• It has a huge community support (tens of millions of developers)
• Java is an object oriented language which gives a clear structure to programs and allows code to be
reused, lowering development costs
• As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa
10
What is SQL?
11
CHAPTER 4
12
Welcome.java
package views;
import Dao.UserDAO;
import Model.User;
import Service.GenerateOtp;
import Service.SendOTPService;
import Service.UserService;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.SQLException;
import java.util.Scanner;
13
case 0 -> System.exit(0);
default -> System.out.println("Invalid input");
}
}
} else {
System.out.println("wrong otp");
}
} else {
System.out.println("User not found");
}
} catch (SQLException ex) {
ex.printStackTrace();
}
14
System.out.println("Enter email");
String email = sc.nextLine();
String genOTP = GenerateOtp.getOtp();
SendOTPService.sendOTP(email, genOTP);
System.out.println("Enter otp ");
String otp = sc.nextLine();
if (otp.equals(genOTP)) {
User user = new User(name, email);
int response = UserService.saveUser(user);
System.out.println(response);
switch (response) {
case 0 -> System.out.println("User registerd");
case 1 -> System.out.println("User already exists");
}
} else {
System.out.println("wrong otp");
}
}
private void about(){
System.out.println("---------------------------");
System.out.println("Made by");
System.out.println("Ajinkya Asati \n0126cy201008\nAmir Ali\n012cy201013");
System.out.println("---------------------------");
System.out.println();
System.out.println();
}
}
15
Fig 4.1 welcome page
16
UserViews.java
package views;
import Dao.DataDAO;
import Model.Data;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.Scanner;
UserVeiw(String email) {
this.email = email;
}
17
System.out.println("ID - File Name");
for (Data file : files) {
System.out.println(file.getId() + "-" + file.getFileName());
}
} catch (SQLException e) {
e.printStackTrace();
}
}
case 2 -> {
System.out.println("Enter the file path ");
String path = sc.nextLine();
File f = new File(path);
Data file = new Data(0, f.getName(), path, this.email);
try {
DataDAO.hideFile(file);
} catch (SQLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
case 3 -> {
List<Data> files = null;
try {
files = DataDAO.getAllFiles(this.email);
18
int id = Integer.parseInt(sc.nextLine());
boolean isValid = false;
for (Data file : files) {
if (file.getId() == id) {
isValid = true;
break;
}
}
if (isValid) {
DataDAO.unhide(id);
} else {
System.out.println("wrong id");
}
} catch (SQLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
case 0 -> {
System.exit(0);
}
}
} while (true);
}
}
19
Fig 4.3 login up page
20
CHAPTER 5
21
As we already discussed, hiding a file is better then password security. In our project we
discussed about Read-Delete-Write technique. There are othere method also that are use to hide
a file like image Encruption.
We also use verification of user . And here no. of user can registered .the interface we made is
very easy and simple to understand by the user. We also verifing user by sending otp to
registered email which means the developers doesn’t know as it changes every time. In our
project we implement idea and techniques and knoweledge from research papers and article ,
the outcomes that we are expecting are that the security of the file will increase as no password
cracking attacks will work on this techniques.
The interface we made here is user friendly we set all the methods and which is semple and
easy for user. Here the otp is changed so user doesn’t need to recall any password and the otp
is verify always. The technique is we used here is Read-Delete-Write .And it is complete
different from other method of hiding a file .The main expected outcome is giving more
security to text file than a password.
In the discussion we found that our technique is more efficence than other techenique. It is
better then the the password-based security. In the discussion we also found in this technique
the user dose’nt have to memories the password as we do not use any type of password.
22
CHAPTER 6
CONCLUSION
23
After all the research and study we found the technique we used is quite different and simple.
As today simple password is not as much secure because today attackers easily steal the
password so we are tring to solve this problem. The hiding a file is much more secure than
password. This technique is a much more secure version
of image encruption.
We introduce our approach which is the Read-Delete-Technique. The proces we use simple
and different from others . This project is based on increasing the security of a text file by
hiding it. Today passwords are not secure as much. They are easily hacked by the attackers so
we are resolving the problem. This project is best alternative for the password-based security.
To do so, we went through many research papers and articles and finally came up with the idea
to use the Read-Delete-Write technique for implementing the base for this project.
In our project, the user is verifying with the OTP sending on the registered email. The user
must first register here. The OTP we send is only consist numbers. The user data is saving on
the data base. In our project we are using MY SQL for database language. User data and
information is saving here. The main function of our project is that its first it read the file data
and stored it in data base and delete the file. And when the user wants to unhide the file we will
write it to in a new file and save it to in required path. In this way we are using the Read-Delete-
Write technique.
The future work is to study the drawbacks of this technique and fix them, and next is increasing
more security on it.
24
REFERENCES
25
Steganography in GIF and BMP Images. International Journal of Soft Computing and
Engineering (IJSCE) ISSN, 2231-2307.
26