gitwtfhub

wtf is geolocation_bof?

codextf2/geolocation_bof — explained in plain English

Analysis updated 2026-05-18

26CAudience · ops devopsComplexity · 4/5Setup · moderate

TL;DR

A Cobalt Strike tool that finds the physical location of a Windows computer by reading its GPS or Wi-Fi location data, running directly in memory to avoid detection.

Mindmap

mindmap
  root((repo))
    What it does
      Gets Windows GPS location
      Runs inside Cobalt Strike
      In-memory execution
    Tech stack
      C language
      Cobalt Strike
      Windows APIs
      Make build tool
    How it works
      Changes registry settings
      Starts lfsvc service
      Reverts changes after
    Use cases
      Penetration testing
      Security assessments
      Physical location discovery
    Requirements
      Admin privileges needed
      Windows target required
      Location services enabled

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Determine the physical location of a Windows machine during an authorized penetration test.

REASON 2

Gather GPS coordinates from a compromised Windows system using Cobalt Strike.

REASON 3

Check whether location services are enabled on a target Windows computer.

What's in the stack?

CCobalt StrikeWindows APIMake

How it stacks up

codextf2/geolocation_bofjessetbh/wcwvsnwoworldtourrecompnagaa95/gtasa_nx
Stars262626
LanguageCCC
Setup difficultymoderatemoderatehard
Complexity4/54/54/5
Audienceops devopsgeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a Cobalt Strike environment and a Windows target with admin privileges, users must compile with make and import the script manually.

No license is mentioned in the explanation, so usage rights are unknown.

Wtf does this do

GeolocationBOF is a small program written in C that runs inside Cobalt Strike, a tool used by security professionals during penetration tests. Its purpose is to figure out the physical location of a Windows computer by asking the operating system for GPS or Wi-Fi based coordinates. The tool tries a newer Windows API first, and if that fails it falls back to an older one. The program works directly in memory, which the author describes as running without "fork and run." This is a technical detail about how Cobalt Strike executes code on a target machine. Running in this way avoids starting a separate process, which matters during security assessments because it draws less attention from monitoring software. To get location data, the tool changes several Windows registry settings. These settings control whether apps are allowed to access location information. Some changes only affect the current user, while others, such as enabling the location service and overriding privacy policies, require administrator privileges. The tool also temporarily starts a Windows service called "lfsvc," which handles location requests on the system. The author notes that all registry changes are reverted after the program finishes. The output is straightforward: it prints the latitude, longitude, and accuracy radius in meters. However, results depend on the target having location services available and enabled. If privacy settings or administrator policies block location access entirely, the tool may return nothing. Admin context is required to grant permissions if they are not already present. The README is sparse but honest about limitations. There is no built-in evasion or stealth beyond the in-process execution method. Users are expected to handle their own operational security. To compile the tool, you clone the repository and run "make." To use it, you import a script into Cobalt Strike and run the command "geolocation_bof."

Yoink these prompts

Prompt 1
How do I compile and run geolocation_bof inside Cobalt Strike to get the GPS coordinates of a Windows target?
Prompt 2
What Windows registry changes does geolocation_bof make to enable location access, and does it revert them automatically after running?
Prompt 3
Why does geolocation_bof use in-memory execution instead of fork and run, and what does that mean for detection during a penetration test?
Prompt 4
What admin privileges does geolocation_bof require, and what happens if the target has location services disabled?

Frequently asked questions

wtf is geolocation_bof?

A Cobalt Strike tool that finds the physical location of a Windows computer by reading its GPS or Wi-Fi location data, running directly in memory to avoid detection.

What language is geolocation_bof written in?

Mainly C. The stack also includes C, Cobalt Strike, Windows API.

What license does geolocation_bof use?

No license is mentioned in the explanation, so usage rights are unknown.

How hard is geolocation_bof to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is geolocation_bof for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.