Images contains valuable personal useful data in images metadata. In this digital forensic tutorial we are going to learn how we can get location and other useful information from a image file and how to change them.
In this digitalised world we usually share photos online. We share our images, selfies on social media platform. We don’t have any idea that we are unknowingly sharing information about us, like extract location and other information. Anyone can reach to us using those information.
In this tutorial we view and remove/change image metadata to make our privacy stronger.
Whenever we click photos on our DSLR, digital camera and mobiles it stores device information on images metadata. It also saves locations it device’s location metadata. It also saves locations it device’s location turned on. Those details calls exif information.
Even if we edit this image then it saves editing details and used software.
Here we have some images in photos folder in Desktop. We collect information from this photos.
We open the terminal in our Kali Linux system to install couple of tools, exif and exiftool. We use apt-get to install them as following:-
apt-get install exif libimage-exiftool-perl
The screenshot of the command is following:
After downloading those tools we move to the directory where the images are stored, by using following command:-
Now we check the list of image files using ls command:-
Now we run exif tool followed by image name as shown in following command:-
This command will show the information about the image,as shown in following screenshot:-
We can see various information of images.
To more detailed information we run exiftool as shown in following command:-
The screenshot is following:-
In the above screenshot we can see more information in details. exif and exiftools can extract lots of information like location, device model, date and time, exposure, ISO, Focal length, Shutter speed, white balance, F-number, flash details and many more.
If the camera or mobile device have turned on location permission then exif/exiftool can recover latitude and longitude where the image was captured.
This also can collect information if we edit the image. Metadata stores editing information also. These information will very helpful for cyber forensic and professional photographer. They can gain all the device settings during the snap, and use those information.
To modify and remove image metadata we also can edit them in exiftool. If we want to change copyright information of an image then the command will be following:-
exiftool DSCN0010.jpg copyright=KaliLinux
The screenshot is following:-
We run again exif on the image and we can see the copyright has been changed.
If we want to delete some information from an image like GPS information then we run following command:-
exiftool -gps:all= DSCN0010.jpg
This command will remove all the GPS and location information from an image.
Again if we want to remove all the metadata from all the image then we apply following command:-
exiftool -all= DSCN0010.jpg
This command will remove all metadata from all the images. Then we run exif on any image then we see nothing as following screenshot:-
To remove all exif metadata from all jpg images we can apply following command:
exiftool -all= *.jpg
That is how we can use exif tool to extract metadata and change/remove them using Kali Linux.
If we don’t have Linux environment then we also can use some online tools to check metadata of an image.
Jeffrey’s Image Metadata Viewer is an online tool to see metadata on an image.
Jeffrey's Image Metadata Viewer
We need to upload our picture here and verify the captcha to know the metadata of our image.
There is another website called pic2map.com. We upload our image and this website shows the geo-location in map, where the image was taken. Location can be know if the device have turned on location during clicking the image.
As we have upload our personal image in online so there might be a change to breach our personal image data. That’s why we give so much importance to offline method(exif and exiftool, as it is more safe according to us then that online method.
This is how we can collect information and location of a photo using Kali Linux and web. Enjoyed our tutorial then follow our blog. Follow us on Twitter for more updates.
Credit: kalilinux in