Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 40 guests online
Free Business and Tech Magazines and eBooks
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Forensics
Filetypes and encryption
EH-Net
May 19, 2013, 10:21:07 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Forensics
(Moderator:
don
) >
Filetypes and encryption
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Filetypes and encryption (Read 7213 times)
0 Members and 1 Guest are viewing this topic.
pomi
Newbie
Offline
Posts: 4
Filetypes and encryption
«
on:
March 13, 2010, 03:05:38 PM »
Hi Guys,
I have two questions:
1. Whilst assessing a raw drive image, how do you determine the filetypes of files. Its easy to ID a text file for example since its visible in plaintext and same with images/videos etc as they have meta tag information at the beginning of the file, but then you have files which are just complete gobbledygook. How does one determine the filetype of such files ?
2. Ive been looking into various encryption algorithms and want to know if there any established way of determining what encryption a file is using (when assessing the raw output of file).
Logged
mambru
Jr. Member
Offline
Posts: 98
Re: Filetypes and encryption
«
Reply #1 on:
March 13, 2010, 04:46:08 PM »
Hi pomi, regarding your questions:
1) In digital forensics there is a technique called data carving, which takes raw data as input and tries to detect/recover files. The are quite a few tools out there doing it, right know the only name I remember is Scalpel, but I'm pretty sure some live cd's for forensics, such as Helix, contains some of these tools.
2) A good algorithm shouldn't give anything away about how a file was encrypted (note I'm not saying an encryption algorithm should be driven by "obscurity"), so you shouldn't expect to see certain frequencies or traits that allow you to pinpoint the algorithm used. But, there could be cases of bad implementations that somehow do it.
Logged
Ketchup
Hero Member
Offline
Posts: 1021
Re: Filetypes and encryption
«
Reply #2 on:
March 13, 2010, 06:12:44 PM »
Hi pomi,
1. There are really two kinds of files, plain text and binary. As you have already realized, text files are easily recognizable. Binary files typically have a header and a footer element that identifies the file. The header or footer are just a series of characters that are going to be common to all files of that type. When you are looking for a file, you can search for a particular header to identify the beginning of a file. Identifying the end can be somewhat more challenging though. If the file doesn't have a footer, you can just cut chunks of a certain size and hope that the native software viewer can reconstruct the file using error correction.
For example, a windows executable has a header signature of 4D5A.
Like mambru said, data carving software will look for file headers. Typically you set the headers you are seeking and a target file size. The software will search for the header and copy out data chunks of the size you specified.
The above is assuming that you don't have access to the file system table. Most forensic software can interpret the file system type and its table of files and folders. Rather than relying on file signatures, the software will simply reconstruct the directory and file structure.
2. Some encryption protocols will include a header to identify itself. Some will not. In forensics, we get used to looking at data in hex. If we see a long stream of hex without any recognizable text, it could indicate encryption or some sort of encoding, but it isn't always the case.
Logged
~~~~~~~~~~~~~~
Ketchup
pomi
Newbie
Offline
Posts: 4
Re: Filetypes and encryption
«
Reply #3 on:
March 13, 2010, 08:42:11 PM »
Thanks guys. Do you have any tool recommendations (*nix and windows) ? ATM I am using winhex.
Moving on, I was messing around with a RIFF file and changed some of its hex values. As a result the file would not play in some players and in others like VLC I was requested to 'repair' the file before it could be played. If I make a change to a file, what other values need to be adjusted in order for it to work ? I presume it has something to do with MFT.
Also, I have been trying to workout a way to read remapped sectors (at the moment in NTFS). Is there any way this can be done ?
Logged
Ketchup
Hero Member
Offline
Posts: 1021
Re: Filetypes and encryption
«
Reply #4 on:
March 13, 2010, 10:42:41 PM »
Scalpel is a great data carving tool like mambru mentioned. Of course, EnCase, X-Ways, FTK all have these capabilities and much more. These are commercial and expensive tools though.
If you change data in a binary file, you are changing the structure of a file. This has nothing to do with the MFT. Each binary file will have its own structure as set forth by the developer. Check the following article on the RIFF file structure:
http://www.tactilemedia.com/info/MCI_Control_Info.html
By remapped sectors, do you mean those moved the HDD firmware when bad sectors are discovered? If so, you would need specialized hardware + software solution that allows access to the HDD firmware. There are two such products that are popular. One is from SalvationData and the other is from ACE Labs.
Logged
~~~~~~~~~~~~~~
Ketchup
pomi
Newbie
Offline
Posts: 4
Re: Filetypes and encryption
«
Reply #5 on:
March 14, 2010, 10:07:08 AM »
Quote from: Ketchup on March 13, 2010, 10:42:41 PM
If you change data in a binary file, you are changing the structure of a file. This has nothing to do with the MFT. Each binary file will have its own structure as set forth by the developer. Check the following article on the RIFF file structure:
http://www.tactilemedia.com/info/MCI_Control_Info.html
I have that document lying around somewhere. Its a long read which is why I keep putting it off.
In theory, if I change a few hex values of the file it 'should' still work, but I am trying to workout what other areas need to be 'updated' so the file doesnt give an error when executed. Since VLC is able to repair the file this indicates that updating the values which manage the integrity of the file is possible. The only problem now is finding them.
Quote
By remapped sectors, do you mean those moved the HDD firmware when bad sectors are discovered? If so, you would need specialized hardware + software solution that allows access to the HDD firmware. There are two such products that are popular. One is from SalvationData and the other is from ACE Labs.
Yes, Im referring to bad sectors. I was planning on writing a tool which could read/extract data from bad sectors. I was really hoping I wouldn't need to hack/RE the firmware but it looks like that might be the only solution.
Logged
Ketchup
Hero Member
Offline
Posts: 1021
Re: Filetypes and encryption
«
Reply #6 on:
March 14, 2010, 10:48:06 AM »
Pomi,
Unless you strategically change a few hex values that are non-essential to the operation of a file, you are going to "break" the file. Think of a binary file is a file system (some actually are). It depends on which file you delete, whether or not the operating system will still boot.
The firmware area on a hard drive sits on the platters. The issue is that hard disk controllers, not software, do not have access to this area. A software tool alone will not be able to access the firmware. What makes this even worse is that the access to this area varies from manufacturer to manufacturer. For example, some Seagate drives make this area accessible through a custom serial interface. None of this is well documented. ACE Labs and SalvationData figured this out by reverse engineering and stealing engineers from the hard drive manufacturers
Logged
~~~~~~~~~~~~~~
Ketchup
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
General Certification
: Red Team/Blue Team
(0) by
n37sh@rk
General Certification
: CPT Practical Submission
(0) by
z28power4u
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(5) by
MrTuxracer
Career Central
: Starter cert?
(0) by
Alert
Web Applications
: Nessus and Nikto
(4) by
Seen
Tutorials
: Need guidance
(7) by
impelse
Malware
: EICAR?
(2) by
SephStorm
Network Pen Testing
: Cracking salted MD5 hash
(4) by
n37sh@rk
CEH - Certified Ethical Hacker
: Passed my C|EH
(3) by
n37sh@rk
Mass Media
: EC-council hacked, irony at his best?
(0) by
j0rDy
Web Applications
: SQL Injection into an INSERT statement.
(6) by
eyenit0
Network Pen Testing
: Solution for sipXtapi INVITE Message CSeq Field Header Remote Overflow
(1) by
m0wgli
Web Applications
: dns
(2) by
H1t M0nk3y
Other
: BSides Boston
(0) by
3xban
Career Central
: InfoSec in Central, FL
(2) by
tturner
Web Applications
: Web vulnerability scanner
(4) by
H1t M0nk3y
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
Free Business and Tech Magazines and eBooks
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.