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

Fixed OSX crashes for python meterpreter #103

Merged
merged 1 commit into from Jul 12, 2016

Conversation

Projects
None yet
4 participants
@geckom
Contributor

geckom commented May 23, 2016

SystemConfiguration is no longer needed in the python meterpreter (already loaded in ext_server_stdapi.py where needed).

Also has_osxsc variable is no longer used.

SystemConfiguration is causing crashes in certain versions of python on OSX including but not limited to 2.6.9 and 2.7.10. Suspect this is due to the double loading. Everything seems to work correctly when this is taken out of the meterpreter.py and only loaded when needed in stdapi.

@metasploit-public-bot

This comment has been minimized.

Show comment
Hide comment
@metasploit-public-bot

metasploit-public-bot May 23, 2016

Can one of the admins verify this patch? For more information see: https://github.com/rapid7/metasploit-payloads/wiki/CI-Testing

metasploit-public-bot commented May 23, 2016

Can one of the admins verify this patch? For more information see: https://github.com/rapid7/metasploit-payloads/wiki/CI-Testing

@bcook-r7

This comment has been minimized.

Show comment
Hide comment
@bcook-r7

bcook-r7 May 23, 2016

Contributor

jenkins, this is ok to test

Contributor

bcook-r7 commented May 23, 2016

jenkins, this is ok to test

@@ -22,14 +22,6 @@
else:
has_windll = hasattr(ctypes, 'windll')
# this MUST be imported for urllib to work on OSX

This comment has been minimized.

@bcook-r7

bcook-r7 May 24, 2016

Contributor

@zeroSteiner you originally added this, but I haven't seen it needed on 10.9 -10.11. Do you recall what the precondition or python version was to cause the problem?

@bcook-r7

bcook-r7 May 24, 2016

Contributor

@zeroSteiner you originally added this, but I haven't seen it needed on 10.9 -10.11. Do you recall what the precondition or python version was to cause the problem?

This comment has been minimized.

@zeroSteiner

zeroSteiner May 24, 2016

Contributor

Yes, this was related to rapid7/metasploit-framework#5013 and rapid7/metasploit-framework#5220. According to the description it's for Python 2.7.6 on OSX 10.10.

@zeroSteiner

zeroSteiner May 24, 2016

Contributor

Yes, this was related to rapid7/metasploit-framework#5013 and rapid7/metasploit-framework#5220. According to the description it's for Python 2.7.6 on OSX 10.10.

This comment has been minimized.

@bcook-r7

bcook-r7 May 24, 2016

Contributor

Thanks @zeroSteiner , I was thinking more in relation to this commit: b5b1c9f

@bcook-r7

bcook-r7 May 24, 2016

Contributor

Thanks @zeroSteiner , I was thinking more in relation to this commit: b5b1c9f

This comment has been minimized.

@zeroSteiner

zeroSteiner May 24, 2016

Contributor

I remember the two isinstance blocks were to deal with a difference in how versions of Python 3 have __builtins__ defined. As for the rest of the changes I don't quite remember.

@zeroSteiner

zeroSteiner May 24, 2016

Contributor

I remember the two isinstance blocks were to deal with a difference in how versions of Python 3 have __builtins__ defined. As for the rest of the changes I don't quite remember.

@bcook-r7

This comment has been minimized.

Show comment
Hide comment
@bcook-r7

bcook-r7 May 25, 2016

Contributor

Been testing this a bit on 10.11.5, and found a different crash: python2.6 staged fails on OS X 10.11.5

Maybe we should just just whitelist 2.7.11 or switch to parsing ifconfig

Contributor

bcook-r7 commented May 25, 2016

Been testing this a bit on 10.11.5, and found a different crash: python2.6 staged fails on OS X 10.11.5

Maybe we should just just whitelist 2.7.11 or switch to parsing ifconfig

@bcook-r7 bcook-r7 merged commit a26e97b into rapid7:master Jul 12, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

bcook-r7 added a commit that referenced this pull request Jul 12, 2016

@bcook-r7

This comment has been minimized.

Show comment
Hide comment
@bcook-r7

bcook-r7 Jul 12, 2016

Contributor

Release Notes

Improve Reliability of Python Meterpreter on OS X Python Meterpreter on OS X can occasionally crash when loading OS-dependendent modules. This fix improves the reliability of Python Meterpreter on OS X.

Contributor

bcook-r7 commented Jul 12, 2016

Release Notes

Improve Reliability of Python Meterpreter on OS X Python Meterpreter on OS X can occasionally crash when loading OS-dependendent modules. This fix improves the reliability of Python Meterpreter on OS X.

bcook-r7 added a commit to rapid7/metasploit-framework that referenced this pull request Jul 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment