Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
ANALYSIS OF
(UNKNOWN)
FILE FORMATS
22nd September 2011
Mario Suvajac
Hi, I’m
Mario Suvajac
@msuvajac
suvajac.org
reversinglabs.com
FILE
   FORMATS


http://www.tripleman.com/index.php?showimage=6
FILE FORMATS
• Structured information storage/carriers
  – Compressed
  – Encrypted
  – All of the above
CATEGORIZATION



http://www.flickr.com/photos/fotomele/1072932978
CATEGORIZATION
• Availability
  – Open
  – Proprietary
• Different for each information type or
  contained in generalized container format
• Executables, archives...
Resources


           Overlay*

 UPX       Overlay
 1.25         Data1.cab
                               Setup.ibt
                            LZsetup.ibt*.*
              Data1.hdr
             Engine32.cab
              Layout.bin
                             Engine32.cab
              Setup.exe      Engine32*.*
               Setup.ibt
Unpacked       Setup.ini
               Setup.inx       File N
  PE32
WHY IS ANALYSIS
   IMPORTANT?


http://www.flickr.com/photos/marodesu/5932256377
WHY IS ANALYSIS IMPORTANT?
• Writing unpackers & validators
  – Anti-virus protection
  – Computer forensics
  – General software development
  – ...
HOW TO
   DO IT?



http://www.flickr.com/photos/karenilagan/2163284814
HOW TO DO IT?
• Specifications
• Reverse Engineering
• Asking Please
http://www.flickr.com/photos/19666640@N00/2884433955
FILE FORMAT PATTERNS
• File header
  – Magic
  – Sizes
  – Offsets
  – Algorithm ids
  – Block descriptors
  – ...
• Data
ZIP FILE FORMAT
Reverse
   engineering


http://www.tripleman.com/index.php?showimage=520
BY Just Observing
• Experience based
• Hex editor
• Diffing’
BY Debugging
• Watching reads & further data manipulation
• Compression & encryption algorithms
  reversing
CODING TIPS



http://www.flickr.com/photos/the8rgrl/4642045
CODING TIPS
• Security risks
• Problems in practice
• corelib
THANKS,
QUESTIONS?!
Btw.
IS HIRING

More Related Content

Analysis of (unknown) file formats