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

Small Updates to Example Modules #17972

Merged
merged 2 commits into from
May 9, 2023
Merged

Conversation

h00die
Copy link
Contributor

@h00die h00die commented May 7, 2023

Just a few small updates to some of the example modules to keep them in line with framework changes.

  1. Updated the check codes to return text instead of doing print_ before them.
  2. Added register_files_for_cleanup to linux privesc example
  3. added MIME example to webapp
  4. changed the fail type when root on the priv esc as per Linux sudoedit priv esc (CVE-2023-22809) #17929 (comment)

@jmartin-tech
Copy link
Contributor

@msjenkins-r7 test this please.

Comment on lines +171 to +175
data = Rex::MIME::Message.new
# https://github.com/rapid7/rex-mime/blob/master/lib/rex/mime/message.rb
file_contents = payload.encoded
data.add_part(file_contents, 'application/octet-stream', 'binary', "form-data; name=\"file\"; filename=\"uploaded.bin\"")
data.add_part('example', nil, nil, "form-data; name=\"_wpnonce\"")
Copy link
Contributor

Choose a reason for hiding this comment

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

We technically have a cleaner API available nowadays that could be suggested, vars_form_data

#16442

@adfoster-r7 adfoster-r7 merged commit 908f7ad into rapid7:master May 9, 2023
28 checks passed
@adfoster-r7 adfoster-r7 added the rn-enhancement release notes enhancement label May 9, 2023
@adfoster-r7
Copy link
Contributor

Release Notes

Updates the example modules to align with the latest Metasploit framework module conventions

@h00die h00die deleted the update_examples branch May 10, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants