Skip to content

Penetration Testing Lab

Offensive Techniques & Methodologies

  • Methodologies
    • Red Teaming
      • Credential Access
      • Persistence
  • Resources
    • Papers
      • Web Application
    • Presentations
      • Defcon
      • DerbyCon
      • Tools
    • Videos
      • BSides
      • Defcon
      • DerbyCon
      • Hack In Paris
  • Contact
    • About Us
Posted on February 20, 2013

Extracting Metada From Files

Unknown's avatar by Administrator.In Information Gathering.3 Comments on Extracting Metada From Files

Penetration testers must be able to think outside of the box and to use whatever method is necessary in order to discover information about their targets.Malicious attackers will not stop in the conventional tactics and this should apply and to the penetration tester.Many organizations are uploading in their websites word documents and excel files without been aware that they expose sensitive information.This information is hidden in the metadata of the files.Also in application assessments (web or mobile) it is a good practice except of the common vulnerabilities to check and the metadata in order to see if this information can be used in a malicious way.In this article we will examine some of the tools that we can use for metadata extraction and what kind of information can unveil.

Exiftool

One of the tools that can extract Metadata information is the exiftool.This tool is found in Backtrack distribution and can extract information from various file types like DOC,XLS,PPT,PNG and JPEG.Typically the information that we would look for are:

  • Title
  • Subject
  • Author
  • Comments
  • Software
  • Company
  • Manager
  • Hyperlinks
  • Current User

Below is the information that we have obtained from an image and the metadata from a doc file.

Extracting metadata of an image - exiftool
Extracting metadata of an image – exiftool
Metadata of a doc file
Metadata of a doc file
Metadata of a doc file 2
Metadata of a doc file 2

FOCA

FOCA is another great tool for analyzing metadata in documents.It is a GUI based tool which make the process a lot of easier.The only thing that we have to do is to specify the domain that we want to search for files and the file type (doc,xls,pdf) and FOCA will perform the job for us very easily.Below you can see a screenshot of the metadata that we have extracted from a doc file.As you can see we have obtained a username an internal path and the operating system that the file has created.

FOCA - Metadata
FOCA – Metadata

 

Conclusion

As we have seen in this article metadata can unveil important information which can be used in conjunction with other attacks.Companies should be aware about this exposure of information that exist in their documents and before they upload something on public domain must use the appropriate tools first in order to remove the metadata from their files and to mitigate the risk.

Rate this:

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to email a link to a friend (Opens in new window) Email
Like Loading...

Related

backtrackexiftoolFOCAMetadata

3 Comments

  1. MikeW's avatar MikeW says:
    February 20, 2013 at 2:52 pm

    As always, great article, thanks.
    Could you give examples as to how the hidden metadata could be used maliciously?
    Say for example, am I right in saying a hidden hyperlink url may accidently be linking to an open web address/folder, or an exposed author name could give the pen tester a name to social engineer etc?
    Are there any other common uses / examples of metadate being used?

    Reply
  2. Administrator's avatar netbiosX says:
    February 20, 2013 at 3:25 pm

    These data can be used in social engineering attempts as you mentioned correctly but it is not only that.If for example you obtain a user account as the last image indicates then you already have a valid username to play with and you need to discover the password in an infrastructure penetration test.If you find an internal path this is considered an information disclosure vulnerability so you should mention it on your report and you could potentially use this information as soon as you got access to the company’s network in order to discover and other valid paths or network shares.

    Reply
  3. Daron wolff's avatar daronwolff says:
    February 7, 2014 at 10:11 pm

    Great Article!!!!!!!
    Many thanks..
    Will be usefull

    Reply

Leave a reply to daronwolff Cancel reply

Post navigation

Previous Previous post: Metasploit – Storing Pen Test Results
Next Next post: SQL Injection Authentication Bypass With Burp

Support pentestlab.blog

Pentestlab.blog has a long term history in the offensive security space by delivering content for over a decade. Articles discussed in pentestlab.blog have been used by cyber security professionals and red teamers for their day to day job and by students and lecturers in academia. If you have benefit by the content all these years and you would like to support us on the maintenance costs please consider a donation.

One-Time
Monthly
Yearly

Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount

£5.00
£15.00
£100.00
£5.00
£15.00
£100.00
£5.00
£15.00
£100.00

Or enter a custom amount

£

Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly

Enter your email address to follow this blog and receive notifications of new articles by email.

Join 2,357 other subscribers

Supported by

VISIT MALDEV ACademy

Search Topic

Recent Posts

  • Web Browser Stored Credentials
  • Persistence – DLL Proxy Loading
  • Persistence – Explorer
  • Persistence – Visual Studio Code Extensions
  • AS-REP Roasting

Categories

  • Coding (10)
  • Exploitation Techniques (19)
  • External Submissions (3)
  • General Lab Notes (22)
  • Information Gathering (12)
  • Infrastructure (2)
  • Maintaining Access (4)
  • Mobile Pentesting (7)
  • Network Mapping (1)
  • Post Exploitation (13)
  • Red Team (132)
    • Credential Access (5)
    • Defense Evasion (22)
    • Domain Escalation (6)
    • Domain Persistence (4)
    • Initial Access (1)
    • Lateral Movement (3)
    • Man-in-the-middle (1)
    • Persistence (39)
    • Privilege Escalation (17)
  • Reviews (1)
  • Social Engineering (11)
  • Tools (7)
  • VoIP (4)
  • Web Application (14)
  • Wireless (2)
February 2013
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728  
« Jan   Mar »

Pen Test Lab Stats

  • 7,809,960 hits

Facebook Page

Facebook Page

Blog at WordPress.com.
  • Methodologies
    • Red Teaming
      • Credential Access
      • Persistence
  • Resources
    • Papers
      • Web Application
    • Presentations
      • Defcon
      • DerbyCon
      • Tools
    • Videos
      • BSides
      • Defcon
      • DerbyCon
      • Hack In Paris
  • Contact
    • About Us
  • Comment
  • Reblog
  • Subscribe Subscribed
    • Penetration Testing Lab
    • Join 2,357 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Penetration Testing Lab
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d