cbcvebase.
CVE-2004-1388
published 2004-12-31

CVE-2004-1388: Format string vulnerability in the gpsd_report function for BerliOS GPD daemon (gpsd, formerly pygps) 1.9.0 through 2.7 allows remote attackers to execute…

PriorityP358high7.5CVSS 2.0
AVNACLAuNCPIPAP
EXPLOIT
EPSS
68.19%
99.2th percentile
Format string vulnerability in the gpsd_report function for BerliOS GPD daemon (gpsd, formerly pygps) 1.9.0 through 2.7 allows remote attackers to execute arbitrary code via certain GPS requests containing format string specifiers that are not properly handled in syslog calls.

Affected

22 ranges
VendorProductVersion rangeFixed in
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
berliosgps_daemon
debiangpsd< gpsd 2.7-4 (bookworm)gpsd 2.7-4 (bookworm)
gpsd_projectgpsd>= 0 < 2.7-42.7-4
gpsd_projectgpsd>= 0 < 2.7-42.7-4
gpsd_projectgpsd>= 0 < 2.7-42.7-4
gpsd_projectgpsd>= 0 < 2.7-42.7-4

Detection & IOCsextracted from sources · hover to see the quote

port2947
port2947
bytes
\xd9\xee\xd9\x74\x24\xf4\x5b\x31\xc9\xb1\x16\x81\x73\x17\x13\x99\x37\xe2\x83\xeb\xfc\xe2\xf4\x22\x42\xc0\x01\xa3\xff\x64\xa1\x40\xda\x64\x6b\xf2\xd2\xfa\x62\x9a\x5e\x65\x84\x7b\x8c\xf5\xa1\x75\xca\xbe\x03\xa3\x89\x67\xb3\x44\x10\xd6\x52\x75\x54\xb7\x52\x75\x2a\x33\x2f\x93\xc9\x67\xb5\x9a\x78\x74\x52\x75\x54\xb7\x6b\xca\x10\xf4\x52\x2c\xd0\xfa\x62\x52\x7b\xcf\xb3\x7b\xf7\x18\x91\x7b\xf1\x18\xcd\x71\xf0\xbe\x01\x42\xca\xbe\x03\xa3\x92\xfa\x62
  • Monitor TCP connections to port 2947 (gpsd default port) for format string specifiers such as %x, %n, %hn in the request payload, which are characteristic of this exploit.
  • After successful exploitation, a reverse/bind shell is spawned on TCP port 5570 on the victim; monitor for unexpected outbound or inbound connections on this port from gpsd processes.
  • The vulnerability is in the gpsd_report function where user-controlled GPS request data is passed unsanitized to syslog(); look for syslog entries from gpsd containing format specifiers as evidence of exploitation attempts.
  • The exploit payload uses a NOP sled of 3000 bytes prepended to shellcode; large NOP sleds in gpsd TCP/2947 traffic are a strong indicator of exploitation.
  • ·Exploit bad characters that must be avoided in payload: null byte, newline, carriage return, and form feed. Payloads containing these bytes will not be delivered correctly.
  • ·Payload space is limited to 1004 bytes; detection rules should account for the fact that the shellcode portion of the exploit is constrained to this size.
  • ·Fixed in Debian package version 2.7-4; affected versions are gpsd 1.9.0 through 2.7.

CVSS provenance

nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv7.5HIGH
vendor_debian7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.