EXIF: compass triangulation
A surveillance team photographed an important site near Samarkand from different points and placed the data in the photos.zip archive. The archive contains 6 JPEG photographs (photo_1.jpg .. photo_6.jpg), an offline reference of 200 sites in the area (places.csv: id,name,category,lat,lon) and an encrypted secret.bin file.
In the EXIF GPS section of each photograph, the coordinates of the point where the camera stood (GPSLatitude, GPSLongitude) and the compass azimuth of the camera facing the site — GPSImgDirection (tag 0x0011, in degrees clockwise from true north: 0° = North, 90° = East, 180° = South, 270° = West) are recorded. Note: 5 of the 6 photos face the real target site, while 1 photo is a decoy (outlier) whose GPS and azimuth point in a different direction!
Compute the intersection point of the EXIF GPS coordinates and azimuth rays in the photographs (on a local plane dx = (lon_T - lon_i) * cos(lat_i), dy = lat_T - lat_i), discard the decoy (outlier) ray, and find the id value of the site closest to the true intersection point from places.csv. Then XOR the secret.bin file with SHA256(id) (a 32-byte raw hash) to decrypt the BAYROQ{EXIF_TRIANGULYATSIYA_...} flag. (Note: the last 16 characters of the flag are lowercase hexadecimal digits).