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

Suppress 'Permission denied' errors in `Msf::Post::Linux::System.get_suid_files` #11062

Merged
merged 1 commit into from Dec 7, 2018

Conversation

Projects
None yet
2 participants
@bcoles
Contributor

bcoles commented Dec 5, 2018

This PR removes array elements from Msf::Post::Linux::System.get_suid_files which contain Permission denied.

This change brings the method inline with the similar get_suid_files method in the Solaris lib.

This approach is locale-dependent (as is pretty much the entirety of MSF). An alternative solution would be piping stderr to /dev/null.

Before

[*] get_suid_files: ["find: `/tmp/.private': Permission denied"]

After

[*] get_suid_files: []

@wvu-r7 wvu-r7 changed the title from Supress 'Permission denied' errors in `Msf::Post::Linux::System.get_suid_files` to Suppress 'Permission denied' errors in `Msf::Post::Linux::System.get_suid_files` Dec 5, 2018

@busterb busterb self-assigned this Dec 7, 2018

@busterb

This comment has been minimized.

Contributor

busterb commented Dec 7, 2018

sure, makes sense

@busterb busterb merged commit 6040f77 into rapid7:master Dec 7, 2018

2 of 3 checks passed

Metasploit Automation - Sanity Test Execution Running automation sanity tests. Details available on completion.
Details
Metasploit Automation - Test Execution Successfully completed all tests.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

busterb added a commit that referenced this pull request Dec 7, 2018

@busterb

This comment has been minimized.

Contributor

busterb commented Dec 7, 2018

Release Notes

This fixes the Msf::Post::Linux::System.get_suid_files post exploitation API to not include files that are unreadable due to permissions in the output.

msjenkins-r7 added a commit that referenced this pull request Dec 7, 2018

@bcoles bcoles deleted the bcoles:get_suid_files branch Dec 7, 2018

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