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

bash_profile_persistence: Add notes and resolve rubocop violations #15986

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

bcoles
Copy link
Contributor

@bcoles bcoles commented Dec 21, 2021

Removes a couple of quotes " in the module description. Not sure why they were there.

Resolved rubocop violations while I was at it. Also added notes, as missing notes is also a rubocop violation.

@adfoster-r7
Copy link
Contributor

Looks like the description was initially committed with extra quotes, and Rubocop just formatted it nicely

'Description' => %q{"
This module writes an execution trigger to the target's Bash profile.
The execution trigger executes a call back payload whenever the target
user opens a Bash terminal. A handler is not run automatically, so you
must configure an appropriate exploit/multi/handler to receive the callback.
"},

Copy link
Contributor

@adfoster-r7 adfoster-r7 left a comment

Choose a reason for hiding this comment

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

Awaiting sanity tests to pass

rescue
hostname = cmd_exec("hostname")
hostname = session.sys.config.sysinfo['Computer']
rescue StandardError
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'm going to presume this change is ok. If it isn't we'll find out soon enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rescue StandardError
rescue NoMethodError

Since sysinfo will return nil if not on meterpreter this should just return a NoMethodError for [].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since sysinfo will return nil if not on meterpreter this should just return a NoMethodError for [].

Fixed.

@jmartin-tech jmartin-tech merged commit 90df765 into rapid7:master Dec 28, 2021
@jmartin-tech
Copy link
Contributor

Release Notes

Module notes added to bash_profile_persistence now describe impacts of utilizing the module in a target environment.

@bcoles bcoles deleted the bash_profile_persistence branch December 28, 2021 14:38
@erran-r7 erran-r7 added rn-modules release notes for new or majorly enhanced modules rn-enhancement release notes enhancement and removed rn-modules release notes for new or majorly enhanced modules labels Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy module rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants