Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

File Hiding: Minor Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

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)

Approved by AICTE New Delhi & Govt. of MP


Affiliated to Rajiv Gandhi Proudyogiki Vishwavidhyalaya, Bhopal
NOVEMBER 2022
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

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

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


(CYBER SECURITY)

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).

Prof. Priyanka Saxena Prof. Roopali Soni

Assistant Professor Head of Department (CSE-CY)


ACKNOWLEDGEMENT

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

Figure no. Title Page no.

Fig 3.1 Sign up 9

Fig 3.2 Login up 9

Fig 4.1 welcome 17

Fig 4.2 About us 17

Fig 4.3 Login page 21


List of Symbols & Abbreviations

OTP One time password

RDW Read delete write

SQL Structured quarry language


Executive Summary
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 cracked by the hackers 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.

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.

Therefore, this Read-Delete-Write technique is safer than the password authentication


technique as the method we use here is different. We implemented this idea in such a way that
the hiding the file for the user. And when it needed, we unhide the file. Here the login OTP is
always changed So, the developers themselves cannot know the OTP as it always changed,
which makes this technique the best alternative for the password authentication.

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

Fig 3.1 Sing up

For login

Fig 3.2 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:

• Mobile applications (specially Android apps)


• Desktop applications
• Web applications
• Web servers and application servers
• Games
• Database connection
• And much, much more!

Why use java?

• 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?

• SQL stands for Structured Query Language


• SQL lets you access and manipulate databases
• SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the
International Organization for Standardization (ISO) in 1987

What Can SQL do?

• SQL can execute queries against a database


• SQL can retrieve data from a database
• SQL can insert records in a database
• SQL can update records in a database
• SQL can delete records from a database
• SQL can create new databases
• SQL can create new tables in a database
• SQL can create stored procedures in a database
• SQL can create views in a database
• SQL can set permissions on tables, procedures, and views

11
CHAPTER 4

IMPLEMENTATION AND TESTING

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;

public class Welcome {


public void welcomeScreen() {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Welcome to app");
System.out.println("Press 1 to login");
System.out.println("Press 2 to signup");
System.out.println("Press 3 to about");
System.out.println("Press 0 to exit");
int choice = 0;
try {
choice = Integer.parseInt(br.readLine());
} catch (IOException ex) {
ex.printStackTrace();
}
switch (choice) {
case 1 -> login();
case 2 -> signUp();
case 3 -> about();

13
case 0 -> System.exit(0);
default -> System.out.println("Invalid input");
}
}

private void login() {


Scanner sc = new Scanner(System.in);
System.out.println("Enter email");
String email = sc.nextLine();
try {
if (UserDAO.isExists(email)) {
String genOTP = GenerateOtp.getOtp();
SendOTPService.sendOTP(email, genOTP);
System.out.println("Enter otp ");
String otp = sc.nextLine();
if (otp.equals(genOTP)) {
new UserVeiw(email).home();

} else {
System.out.println("wrong otp");
}
} else {
System.out.println("User not found");
}
} catch (SQLException ex) {
ex.printStackTrace();
}

private void signUp() {


Scanner sc = new Scanner(System.in);
System.out.println("Enter Name");
String name = sc.nextLine();

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

Fig 4.2 about 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;

public class UserVeiw {


private String email;

UserVeiw(String email) {
this.email = email;
}

public void home() {


do {
System.out.println("Welcome " + this.email);
System.out.println("Press 1 to show hidden file");
System.out.println("Press 2 to hide a new file");
System.out.println("Press 3 to unhide a file");
System.out.println("Press 0 to exit");
Scanner sc = new Scanner(System.in);
int ch = Integer.parseInt(sc.nextLine());
switch (ch) {
case 1 -> {
try {
List<Data> files = DataDAO.getAllFiles(this.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);

System.out.println("ID - File Name");


for (Data file : files) {
System.out.println(file.getId() + "-" + file.getFileName());
}
System.out.println("Enter the id of file to unhide");

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

RESULT AND DISCUSSION

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

1. Poornima, R., & Iswarya, R. J. (2013). An Overview of Digital Image Steganography‖.


International Journal of Computer Science & Engineering Survey (IJCSES), 4(1), 23-
31.
2. Akar, F., Yalman, Y., & Varol, H. S. (2012). Data hiding in digital images using a
partial optimization technique based on classical LSB method. Turkish Journal of
Electrical Engineering & Computer Sciences, 21, 2037-2047.
3. Hussain, M., & Hussain, M. (2013). A Survey of Image Steganography Techniques.
4. Shilpa, T., Monika, A. (2013). A Review –Steganography. International Journal of
Advanced Research in Computer Science and Software Engineering.
5. Gu, C., & Cao, X. (2012, April). Research on information hiding technology. In
Consumer Electronics, Communications and Networks (CECNet), 2012 2nd
International Conference on (pp. 2035-2037). IEEE.
6. Chou, Y. C., & Chang, H. H. (2010, July). A data hiding scheme for color image using
BTC compression technique. In Cognitive Informatics (ICCI), 2010 9th IEEE
International Conference on (pp. 845-850). IEEE.
7. Sumathi, C. P., Santanam, T., & Umamaheswari, G. (2014). A Study of Various
Steganographic Techniques Used for Information Hiding. arXiv preprint
arXiv:1401.5561.
8. Reiland, K., Oblitey, W., Ezekiel, S., & Wolfe, J. (2005). Steganography and Covert
Channels. In PACISE conference.
9. Sirsikar, S., & Salunkhe, J. (2014, January). Analysis of Data Hiding Using Digital
Image Signal Processing. In Electronic Systems, Signal Processing and Computing
Technologies (ICESC), 2014 International Conference on (pp. 134-139). IEEE.
10. Sharma, V. K., & Shrivastava, V. (2012). A Steganography Algorithm for hiding
image in image by improved LSB substitution by minimize detection. Journal of
Theoretical and Applied Information Technology, 36(1), 1-8.
11. Kaur, S., Bansal, S., & Bansal, R. K. (2014, March). Steganography and classification
of image steganography techniques. In Computing for Sustainable Global Development
(INDIACom), 2014 International Conference on (pp. 870-875). IEEE.
12. Agarwal, M. (2013). Text Steganographic Approaches: A Comparison. arXiv preprint
arXiv:1302.2718. Elgabar, E. E. A., & Alamin, H. A. A. Comparison of LSB

25
Steganography in GIF and BMP Images. International Journal of Soft Computing and
Engineering (IJSCE) ISSN, 2231-2307.

26

You might also like