FORENSIC ANALYSIS of PGP-ENCRYPTED FILES (From 20Th May- 15Th July)
Total Page:16
File Type:pdf, Size:1020Kb
SUMMER PROJECT REPORT Institute for Development and Research in Banking Technology (IDRBT) -Established by Reserve Bank of India, HYDERABAD FORENSIC ANALYSIS OF PGP-ENCRYPTED FILES (From 20th May- 15th July) Done By Vidya G, B.Tech Computer Science and Engineering, III Year Completed SASTRA UNIVERSITY (through Indian Academy of Sciences) Under the guidance of DR. B.M. MEHTRE, Associate Professor IDRBT, HYDERABAD 1 INSTITUTE FOR DEVELOPMENT AND RESEARCH IN BANKING TECHNOLOGY (IDRBT) Road No. 1, Castle Hills, Masab Tank, Hyderabad-500057 CERTIFICATE OF COMPLETION This is to certify that Miss Vidya G, pursuing B. Tech degree in the Department of Computer Science and Engineering at SASTRA University, Thanjavur, Tamil Nadu, has undertaken a project as an intern in the Institute for Development and Research in Banking Technology (IDRBT), Hyderabad from 20th May, 2013 to 15th July, 2013. She was assigned the project “FORENSIC ANALYSIS OF PGP ENCRYPTED FILES” which she completed successfully under my guidance at IDRBT. We wish her all the best for a bright future. Dr. B.M.MEHTRE (Project Guide) Associate Professor IDRBT, Hyderabad 2 ACKNOWLEDGEMENT I would like to express my sincere gratitude to the Institute for Development and Research in Banking Technology (IDRBT) and particularly Dr. B.M. Mehtre who was my guide for this project. This opportunity of learning about forensic analysis and cryptographic challenges was a boon to me as one rarely gets such exposure. I would like to add that this short period in IDRBT has added a different facet to my life as this is a unique organization being a combination of academics, research, technology, communication services, crucial applications, etc. I am extremely grateful to Dr. B.M. Mehtre for his advice, innovative suggestions and supervision. I thank him for introducing me to this excellent area of forensic analysis. I am thankful to IDRBT for providing such an amazing platform for students, like me, to work in real application oriented research. Finally, I thank one and all who made this project successful either directly or indirectly. Vidya G (SASTRA University) Project Trainee IDRBT Hyderabad 3 Contents Contents .............................................................................................................................................................................. 4 1.ABSTRACT: ........................................................................................................................................................................ 6 2.OBJECTIVES: ...................................................................................................................................................................... 6 3.INTRODUCTION: ............................................................................................................................................................... 7 3.1.Forensics and Cryptography: ..................................................................................................................................... 7 3.2. File extensions: ......................................................................................................................................................... 8 3.3[3][4][10][11] File headers: ......................................................................................................................................... 8 3.4. [1][12][13] About PGP and Open PGP message format (RFC 4880): ......................................................................... 9 3.4.1. [1]RFC 4880: (OPEN PGP MESSAGE FORMAT): ................................................................................................ 10 4.DISTINCTION BETWEEN THE EXISTING SYSTEM AND THE IMPLEMENTED SYSTEM: ...................................................... 15 5.DETAILS OF THE WORK DONE: ........................................................................................................................................ 16 5.1.Software used: ......................................................................................................................................................... 16 5.2.Environment: ........................................................................................................................................................... 16 5.3.Description of the Application: ................................................................................................................................ 17 5.4.CREATION OF OPEN PGP ARTIFACTS (FOR TESTING PURPOSES): ............................................................................. 18 5.4.1.CREATION OF NORMAL OPEN-PGP ENCRYPTED FILES: (WHICH WILL CONTAIN PUBLIC KEY ENCRYPTED SESSION KEY PACKET .................................................................................................................................................. 19 5.4.2.Creation of Symmetric key artifact using GnuPG: ............................................................................................. 25 5.4.3.Creation of Secret-Key Artifact: ........................................................................................................................ 25 5.5.FORENSIC IDENTIFICATION: ..................................................................................................................................... 26 6.RESULTS OBTAINED: ....................................................................................................................................................... 28 6.1.Proof of Concept: .................................................................................................................................................... 29 6.2.Pseudo –code (implemented as per RFC 4880): ...................................................................................................... 30 7.OBSERVATIONS MADE: ................................................................................................................................................... 32 8.ADVANTAGES AND LIMITATIONS: ................................................................................................................................... 32 8.1.ADVANTAGES: .......................................................................................................................................................... 32 8.2.LIMITATIONS: ........................................................................................................................................................... 32 4 9.CONCLUSION: ................................................................................................................................................................. 32 10.FUTURE WORK: ............................................................................................................................................................. 33 11.BIBLIOGRAPHY: ............................................................................................................................................................. 33 12.APPENDIX: ..................................................................................................................................................................... 34 5 1. ABSTRACT: Computer forensics is the process of examining digital media in a forensically sound manner with the aim of identifying, preserving, recovering, analyzing and presenting facts and opinions about the information which is acceptable in a court of law. Encryption is the process of turning plaintext into an unreadable cipher text using some algorithms. PGP (Pretty Good Privacy) is one such very strong algorithm that criminals may use to encrypt their data in order to inhibit investigators from accessing the suspected material. In addition to encrypting, they may also hide the very fact that it was encrypted by changing file extensions and make it to appear like a normal file thereby misleading the investigator. File headers are very useful in gathering information about the type of file even if the file extensions are tampered. The analysis of headers for PGP encrypted files has previously been done by checking static magic numbers or file signatures only for Public-key encrypted files. But as far as PGP encrypted files are concerned, there are different groups or types of files like Public –key encrypted files, secret key files, etc., (discussed later in the report) for which checking a single static file signature does not apply. In this project, instead of checking for a single static signature we have performed header analysis as per the format specification given in the Open PGP Message Format (RFC 4880) and we have identified the different groups of PGP encrypted files like Public-key encrypted files, symmetric key encrypted files and secret key files in a system that is considered to be the criminal’s system. 2. OBJECTIVES: The objectives of this project include: Identifying the Open PGP encrypted files even if their extensions have been tampered and have been made to seem like normal files. Identifying different groups of Open PGP encrypted files such as Public-key encrypted files, symmetric key encrypted files and secret key files as per the Open PGP Message Format (RFC 4880). By identifying: o Public-key encrypted files: We can obtain the Public-key algorithm used and the Key ID. Knowing this public-key algorithm will help in cryptanalysis and the Key ID helps us to identify the user on whose signature the encrypted