用户是幸福的, 因为他们根本不知道他们的隐私信息在不经意之间泄露.
这些天在重温《不朽法医》, 里面有一集是关于网络时代根据网上用户的碎片信息抓捕罪犯的. 刚好也在看朋友圈的照片, 有感而发, 想到了手机照片的信息泄露.
手机拍摄的照片信息泄露主要来源于照片的 EXIF(Exchangeable Image File format) 信息. EXIF 是专门为数码相机的照片设定的, 可以记录数码照片的属性信息和拍摄数据. 常见的数据项如下:
项目 | 信息(举例) |
---|---|
制造厂商 | Canon |
相机型号 | Canon EOS-1Ds Mark III |
图象方向 | 正常(upper-left) |
图象分辨率 X | 300 |
图象分辨率 Y | 300 |
分辨率单位 | dpi |
软件 | Adobe Photoshop CS Macintosh |
最后异动时间 | 2005:10:06 12:53:19 |
YCbCrPositioning | 2 |
曝光时间 | 0.00800 (1/125) sec |
光圈值 | F22 |
拍摄模式 | 光圈优先 |
ISO 感光值 | 100 |
Exif 信息版本 | 30,32,32,31 |
图象拍摄时间 | 2005:09:25 15:00:18 |
图象存入时间 | 2005:09:25 15:00:18 |
曝光补偿(EV+-) | 0 |
测光模式 | 点测光(Spot) |
闪光灯 | 关闭 |
镜头实体焦长 | 12 mm |
Flashpix 版本 | 30,31,30,30 |
图象色域空间 | sRGB |
图象尺寸 X | 5616 pixel |
图象尺寸 Y | 3744 pixel |
GPS 经度 | 116/1, 19/1, 5169/100 |
GPS 维度 | 39/1, 58/1, 3543/100 |
GPS 海拔 | 33066/515 |
从上表可以看见, 透露的信息已经足以大概定位一个人.
下面我们来尝试一下, 人肉自己拍的一张照片.
步骤 1: 掏出手机, 随意拍摄一张照片
步骤 2: 将这张照片通过微信文件传送, 以原图的方式传输到电脑上.
步骤 3: 写几行代码读取这张照片的 exif 信息, 以下以 PHP 代码为例:
- $image = "/Users/UserA/Pictures/WechatIMG30.jpeg";
- $exifInfo = exif_read_data($image, 0, true);
- // 格式化数据信息, 方便肉眼查看
- foreach ($exifInfo as $key => $section) {
- foreach ($section as $name => $val) {
- if (is_array($val)){
- $val = implode(",", $val);
- }
- echo "$key.$name: $val\n";
- }
- }
步骤 4: 使用 PHP exifInfo.PHP 查看, 信息如下:
- FILE.FileName: WechatIMG30.jpeg
- FILE.FileDateTime: 1537426941
- FILE.FileSize: 1639310
- FILE.FileType: 2
- FILE.MimeType: image/jpeg
- FILE.SectionsFound: ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS
- COMPUTED.html: width="4032" height="3024"
- COMPUTED.Height: 3024
- COMPUTED.Width: 4032
- COMPUTED.IsColor: 1
- COMPUTED.ByteOrderMotorola: 1
- COMPUTED.ApertureFNumber: f/2.2
- COMPUTED.Thumbnail.FileType: 2
- COMPUTED.Thumbnail.MimeType: image/jpeg
- IFD0.Make: Apple
- IFD0.Model: iPhone SE
- IFD0.Orientation: 6
- IFD0.XResolution: 72/1
- IFD0.YResolution: 72/1
- IFD0.ResolutionUnit: 2
- IFD0.Software: 11.3
- IFD0.DateTime: 2018:09:20 15:02:00
- IFD0.YCbCrPositioning: 1
- IFD0.Exif_IFD_Pointer: 204
- IFD0.GPS_IFD_Pointer: 1646
- THUMBNAIL.Compression: 6
- THUMBNAIL.XResolution: 72/1
- THUMBNAIL.YResolution: 72/1
- THUMBNAIL.ResolutionUnit: 2
- THUMBNAIL.JPEGInterchangeFormat: 2050
- THUMBNAIL.JPEGInterchangeFormatLength: 6871
- EXIF.ExposureTime: 1/33
- EXIF.FNumber: 11/5
- EXIF.ExposureProgram: 2
- EXIF.ISOSpeedRatings: 125
- EXIF.ExifVersion: 0221
- EXIF.DateTimeOriginal: 2018:09:20 15:02:00
- EXIF.DateTimeDigitized: 2018:09:20 15:02:00
- EXIF.ComponentsConfiguration:
- EXIF.ShutterSpeedValue: 2297/454
- EXIF.ApertureValue: 7983/3509
- EXIF.BrightnessValue: 4489/1661
- EXIF.ExposureBiasValue: 0/1
- EXIF.MeteringMode: 5
- EXIF.Flash: 16
- EXIF.FocalLength: 83/20
- EXIF.SubjectLocation: 2015, 1511, 2217, 1330
- EXIF.MakerNote: Apple iOS
- EXIF.SubSecTimeOriginal: 777
- EXIF.SubSecTimeDigitized: 777
- EXIF.FlashPixVersion: 0100
- EXIF.ColorSpace: 1
- EXIF.ExifImageWidth: 4032
- EXIF.ExifImageLength: 3024
- EXIF.SensingMethod: 2
- EXIF.SceneType:
- EXIF.ExposureMode: 0
- EXIF.WhiteBalance: 0
- EXIF.FocalLengthIn35mmFilm: 29
- EXIF.SceneCaptureType: 0
- EXIF.UndefinedTag:0xA432: 83/20, 83/20, 11/5, 11/5
- EXIF.UndefinedTag:0xA433: Apple
- EXIF.UndefinedTag:0xA434: iPhone SE back camera 4.15mm f/2.2
- GPS.GPSLatitudeRef: N
- GPS.GPSLatitude: 39/1, 58/1, 3543/100
- GPS.GPSLongitudeRef: E
- GPS.GPSLongitude: 116/1, 19/1, 5169/100
- GPS.GPSAltitudeRef:
- GPS.GPSAltitude: 33066/515
- GPS.GPSTimeStamp: 7/1, 1/1, 5915/100
- GPS.GPSSpeedRef: K
- GPS.GPSSpeed: 0/1
- GPS.GPSImgDirectionRef: T
- GPS.GPSImgDirection: 52248/523
- GPS.GPSDestBearingRef: T
- GPS.GPSDestBearing: 52248/523
- GPS.GPSDateStamp: 2018:09:20
- GPS.UndefinedTag:0x001F: 65/1
首先, 我们作为一个非摄影专业人员来看下都有哪些信息是我们可以提取, 并且可能会泄露隐私的.
如果想深入了解 EXIF 并知道 EXIF 相关的协议, 可以查看参考 2 里的链接地址.
- IFD0.Make: Apple
- IFD0.Model: iPhone SE
- IFD0.Software: 11.3
- IFD0.DateTime: 2018:09:20 15:02:00
苹果手机, 型号 iPhone SE, iOS 版本 11.3, 拍摄时间为 2018:09:20 15:02:00. 手机型号软件版本信息被泄露了.
IFD0.Orientation: 6
这个照片的方向, 6:The 0th row is the visual right-hand side of the image, and the 0th column is the visual top. 意味你需要将脖子逆时针旋转 90° 看照片.
EXIF.UndefinedTag:0xA434: iPhone SE back camera 4.15mm f/2.2
使用的是后置摄像头
- GPS.GPSLatitudeRef: N
- GPS.GPSLatitude: 39/1, 58/1, 3543/100
- GPS.GPSLongitudeRef: E
- GPS.GPSLongitude: 116/1, 19/1, 5169/100
这是我认为最可怕的东西, 经纬度信息, 对应着东经 116.331, 北纬 39.9765. 让我们来看看这个坐标偏差有多大, 在 google map 里用得到的经纬度查询, 定位如图:
经纬度定位图
和我真实的地址, 偏差在 400 米以内, 好可怕. 如果泄露了地理位置信息, 那么被人肉的范围就缩到很小. 下面还有:
GPS.GPSAltitude: 33066/515
海拔 62 米左右. 这已经大概算出我在几层楼高的地方. 如果出现海拔略高, 并且刚好周边有个非常高的建筑, 那基本上可以判断在哪栋楼的第几层了.
- GPS.GPSSpeedRef: K
- GPS.GPSSpeed: 0/1
- GPS.GPSImgDirectionRef: T
- GPS.GPSImgDirection: 52248/523
可以看到我拍照时, 速度是 0km/h, 方向是 100° 左右. 如果我在开车, 那就可以知道我拍照瞬间的车速多少, 往哪个方向开.
一张很随意的照片, 如果以原图的方式发布到网上, 在不查看照片视觉内容的时候, 就已经可以泄露手机型号, 操作系统版本, 精度在 400 米以内的地理位置, 海拔, 速度和方向. 而这些信息都是线下可以和真实人物结合的敏感信息.
最关键的是, 这些信息都是在用户不经意的时候泄露了, 大部分网民应该都发过自己手机里拍摄的照片. 而有多少用户有考虑过照片里的信息泄露呢? 甚至说, 有多少用户知道照片 EXIF 信息可以携带这么多照片内容除外的信息?
幸运的是, 不少软件在传输照片时, 出于带宽成本考虑, 会在本地将图片压缩, 抹除大部分 EXIF 信息. 这压缩的过程, 降低了信息泄露的风险.
总结: 用户隐私保护, 任重而道远.
参考:
- https://en.wikipedia.org/wiki/Exif
- Exchangeable image file format for digital still cameras: Exif Version 2.3
相关的佚闻趣事:
In December 2012, anti-virus programmer John McAfee was arrested in Guatemala while fleeing from alleged persecution in Belize, which shares a border. Vice magazine had published an exclusive interview on their website with McAfee "on the run" that included a photo of McAfee with a Vice reporter taken with a phone that had geotagged the image.The photo's metadata included GPS coordinates locating McAfee in Guatemala, and he was captured two days later.
详情:
来源: https://www.qcloud.com/developer/article/1345276