Browse CTFs New CTF Sign in

Point-of-Interest to Social Media Pivot: Geographic OSINT Chained to Instagram Profile Identification

forensic_file_artifacts Difficulté 1–5 30 min certifiable

Théorie

Why This Matters

Physical locations generate a continuous stream of social media intelligence that most visitors do not recognize they are contributing to. Counter-terrorism analysts have used Instagram location tag searches to identify participants at radicalization gatherings by searching photos tagged at specific mosques, community centers, or event venues. Missing persons investigators locate individuals by identifying where their most recent tagged photos were taken. Corporate intelligence teams track competitor executives by monitoring who posts from specific office building locations. Law enforcement has obtained warrants for Instagram's location-based search data to identify all users who tagged posts at crime scenes. Understanding how location-based social media intelligence collection works is essential for both offensive collection and defensive awareness.

Core Concept

Instagram location tags are the primary mechanism for geolocation-based social media collection. When a user adds a location to an Instagram post, Instagram associates the post with a Place ID — a numeric identifier corresponding to a named location in Instagram's location database (which derives from Facebook's Places database). All public posts tagged to the same Place ID are discoverable through Instagram's location search interface at instagram.com/explore/locations/PLACE_ID/.

The intelligence value comes from temporal aggregation: a single location search returns all public posts at that location over time, revealing a population of people who have visited the location. Frequent visitors (multiple posts at the same location) are identifiable from the grid view. Cross-referencing usernames found in location-tagged posts with other search results builds a picture of social networks centered on physical spaces.

Flickr offers radius-based geotagged photo search — a capability Instagram does not expose publicly. The Flickr API endpoint flickr.photos.search with lat, lon, and radius parameters returns all public geotagged photos within a specified radius of a coordinate pair, regardless of place name. This enables search by coordinate rather than place name, catching photos that are geotagged but not tagged to a named Instagram location.

Twitter/X location search uses the geocode parameter in the search API: geocode=lat,lon,radius. This returns tweets posted within the specified geographic radius, regardless of whether users tag a place name. Twitter's location data includes both user-set account location (self-reported, unreliable) and GPS-precise tweet location (if the user enabled location sharing, now rare).

Google Street View provides a ground-level visual reference for any coordinate pair, enabling analysts to confirm that a social media post was taken at a specific location by matching architectural features, signage, and landscape visible in the photo against the Street View imagery.

Reverse geolocation converts coordinate pairs to human-readable addresses using the Nominatim (OSM) API or Google Geocoding API. This is the final step in many workflows: extract coordinates from a URL or EXIF, reverse geocode to get the address, then search social media for posts tagged at that address.

Technical Deep-Dive

# Instagram location search (no authentication required for public posts)
# First, find the Instagram Place ID for a location:
# Manual: search the location name at instagram.com/explore/locations/
# The URL will be: instagram.com/explore/locations/PLACE_ID/PLACE_NAME/

# Example: enumerate all public posts at Place ID 213385402
# (In a browser or with cookies from a logged-in session)
curl -s "https://www.instagram.com/explore/locations/213385402/" 
  --cookie "sessionid=YOUR_SESSION_ID" 
  -H "X-Requested-With: XMLHttpRequest" | 
  python3 -c "
import json, sys, re
html = sys.stdin.read()
# Extract usernames from tagged posts (simplified)
usernames = re.findall(r'"owner":{"username":"([^"]+)"', html)
for u in set(usernames):
    print(u)
"
# Flickr geotagged photo search by radius
# Flickr API: free key at flickr.com/services/apps/create
import requests

FLICKR_API_KEY = "your_flickr_api_key"
LAT, LON, RADIUS = 48.8584, 2.2945, 0.5  # Eiffel Tower area, 500m radius

params = {
    "method": "flickr.photos.search",
    "api_key": FLICKR_API_KEY,
    "lat": LAT,
    "lon": LON,
    "radius": RADIUS,
    "radius_units": "km",
    "extras": "owner_name,date_taken,geo",
    "format": "json",
    "nojsoncallback": 1,
    "per_page": 50,
    "sort": "date-posted-desc",
}
resp = requests.get("https://api.flickr.com/services/rest/", params=params)
data = resp.json()
for photo in data.get("photos", {}).get("photo", []):
    print(f"{photo.get('owner_name'):20s} | {photo.get('datetaken','?')[:10]} | {photo['title'][:40]}")
# Reverse geocoding: coordinates to address (Nominatim, no API key required)
LAT=48.8584; LNG=2.2945
curl -s "https://nominatim.openstreetmap.org/reverse?lat=${LAT}&lon=${LNG}&format=json" 
  -H "User-Agent: OSINT-Research-Tool/1.0" | 
  python3 -c "
import json, sys
data = json.load(sys.stdin)
print(data.get('display_name', 'No result'))
addr = data.get('address', {})
print(f"  Road    : {addr.get('road', '?')}")
print(f"  City    : {addr.get('city', addr.get('town', '?'))}")
print(f"  Country : {addr.get('country', '?')}")
"

# Google Street View static image retrieval (requires API key)
GOOGLE_API_KEY="your_key"
curl -o streetview.jpg 
  "https://maps.googleapis.com/maps/api/streetview?size=640x480&location=${LAT},${LNG}&key=${GOOGLE_API_KEY}"

# theHarvester: enumerate email addresses for domain associated with a discovered location
theHarvester -d discovered-company.com -b google,bing,hunter -l 200 -f harvester_output

Intelligence Collection Methodology

  1. Identify the target location: Obtain the precise location either as a named place (restaurant, venue, building) or as coordinates. Named places can be searched directly in Instagram's explore/locations interface. Coordinates require conversion to a named Instagram location via Instagram's location search or Nominatim reverse geocoding.
  2. Search Instagram location tags: Navigate to instagram.com/explore/locations/PLACE_ID/ for the target location. Scroll through all public posts and collect usernames of frequent visitors. For systematic collection, use the instaloader command instaloader "#HASHTAG" --geotags or the location-specific collection mode.
  3. Build a visitor profile: For each username appearing in location-tagged posts, note post frequency and dates. Accounts with 3+ posts at the same location over different dates are likely regular visitors (employees, residents, members). Accounts with a single post are likely one-time visitors.
  4. Expand the search with Flickr: Use the Flickr API with flickr.photos.search and the target coordinates to collect geotagged photos from the same area. Flickr usernames may cross-reference to Instagram, Twitter, or other platforms via sherlock or holehe.
  5. Cross-reference with Twitter/X: Search Twitter with geocode=LAT,LNG,RADIUSm using the Twitter API or the recon-ng recon/locations-pushpins/twitter module. Twitter GPS-tagged posts are rare but highly precise when present.
  6. Perform reverse geolocation for context: Run Nominatim reverse geocoding on extracted coordinates to get the full address. This enables searching for the location by address on additional platforms (Foursquare/Swarm, Yelp, Google Reviews) to find more check-in data.
  7. Validate with Google Street View: Download the Street View image at the target coordinates using the Google Static Street View API. Compare architectural features visible in the Street View image against those in social media posts to confirm geolocation accuracy.
  8. Map the social network: Use Maltego to create a graph: location node → Instagram usernames tagged there → each username's followers/following (if public) → shared followers indicating social connections. This identifies the social community associated with the physical location.
  9. Document inadvertent disclosures: For each identified subject, note every location tag in their posting history. A pattern of location tags at home, workplace, gym, and regular social venues constitutes a comprehensive movement profile built entirely from voluntary public disclosures.

Common Intelligence Collection Errors

  • Assuming all visitors of a location appear in location-tagged posts: Only users who explicitly add a location tag to their post appear in location searches. The majority of people at any location do not post publicly tagged content. Location tag searches reveal a biased sample — typically younger, more active social media users — not a complete visitor list.
  • Conflating Instagram's location database with GPS precision: Instagram location tags correspond to named places (restaurants, landmarks, neighborhoods) which may cover large areas. A post tagged "Downtown Manhattan" tells you the borough, not a specific address. Only posts tagged to very specific venues (a particular restaurant, a specific building) provide address-level precision.
  • Ignoring post timestamps when building movement timelines: Instagram's location search displays posts in reverse chronological order but does not filter by date by default. Older posts may represent past residences or workplaces, not current ones. Always note the posting date for every collected post before drawing conclusions about current location.
  • Missing tagged photos posted by others: Instagram allows other users to tag a subject in their photos. A subject's own location-tagged posts may be private, but a friend's public post tagging the same subject at a location reveals the same intelligence. Search the subject's tagged photos (the "Tag" tab on their profile) in addition to their own posts.
  • Treating Flickr ownership as the photographer's current identity: Flickr accounts are often old and may use email addresses or usernames that no longer match the subject's current online identity. Always verify cross-platform identity matches with at least two corroborating signals before linking a Flickr account to a subject.
  • Using Google Street View imagery without checking the capture date: Google Street View images are not always current — some coverage in less-populated areas is years old. The capture date appears in the lower left corner of the Street View interface. Using outdated imagery to confirm a "current" location can introduce false corroboration.

NICE Framework Alignment

Code Knowledge/Skill/Task Statement How This Card Develops It
K0058 Knowledge of network protocols Understanding how Instagram's location explore endpoint, Flickr's API radius search, and Nominatim's reverse geocoding REST endpoints return location-correlated social data
K0145 Knowledge of security assessment approaches Applying a systematic geolocation-to-social-media pivot methodology across multiple platforms
K0272 Knowledge of network security architecture Understanding how platform location tagging architectures aggregate user-contributed geolocation data into searchable intelligence sources
K0427 Knowledge of encryption algorithms Recognizing that HTTPS encryption of social media traffic does not protect location metadata that users voluntarily attach to public posts
S0040 Skill in identifying and extracting data of interest from various sources Extracting usernames, posting patterns, and visitor profiles from location-tagged post collections across Instagram and Flickr
T0569 Apply and utilize authorized cyber capabilities to achieve objectives Deploying Instaloader, Flickr API, Nominatim, Google Street View, and Maltego in authorized geolocation intelligence collection

Further Reading

  • Open Source Intelligence Techniques, 9th Edition — Michael Bazzell, Chapter 12: Location Intelligence (IntelTechniques)
  • Geolocating Images: A Bellingcat Guide — Bellingcat (bellingcat.com/resources/how-tos)
  • Social Media Investigation for Law Enforcement — Rob Grace & Chris Brown, Chapter 7: Geographic Search Techniques (Charles C Thomas Publisher)

Challenge Lab

Renforcez votre apprentissage avec un défi généré basé sur la compétence de cette carte.