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

Bump IRB #19709

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Bump IRB #19709

wants to merge 2 commits into from

Conversation

szymonj99
Copy link
Contributor

This PR bumps the IRB version.
Since Framework is now using 3.2.5, it is safe to unpin and bump IRB as per the original thread: #18432 (comment)

Verification

  • Start msfconsole
  • irb
  • Ensure it works as expected
  • Get a session
  • session -i -1
  • irb
  • Ensure it works as expected
  • Passing CI

@szymonj99
Copy link
Contributor Author

Reasoning for this bump:

  • I reported a bug in IRB's repo. IRB currently leaks its Reline changes globally meaning that when/if IRB fixes it, it would be nice to pull those changes in. Doing two smaller updates could be easier than a big version bump.
  • Since IRB 1.8, there has been built-in debug.gem support into IRB. This seems like nice functionality to have.

@jheysel-r7 jheysel-r7 self-assigned this Feb 4, 2025
@jheysel-r7
Copy link
Contributor

Hey @szymonj99, thanks for the update.

I was able to follow the testing steps and everything looks almost good to go.

I was seeing this following warning when starting up msfconsole when testing and was wondering if you noticed this as well (apologies in advance if this issue is unique to my environment):

➜  metasploit-framework git:(a2c2dba05d) gem uninstall stringio -v 3.0.4
Gem stringio-3.0.4 cannot be uninstalled because it is a default gem
➜  metasploit-framework git:(a2c2dba05d) ruby -v
ruby 3.2.5 (2024-07-26 revision 31d0f1a2e7) [x86_64-darwin23]
➜  metasploit-framework git:(a2c2dba05d) gem cleanup stringio
Cleaning up installed gems...
Clean up complete
➜  metasploit-framework git:(a2c2dba05d) ./msfconsole
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      stringio (>= 0)
      Available/installed versions of this gem:
      - 3.1.2
      - 3.0.4
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
Metasploit tip: View all productivity tips with the tips command
[*] Using configured payload windows/x64/meterpreter/reverse_tcp

@szymonj99
Copy link
Contributor Author

szymonj99 commented Feb 4, 2025

@jheysel-r7 Thank you! I will look into that and see what I can do 👍

I am experiencing rubygems.org issues right now, and will come back to this tomorrow. It seems like, after some local Docker testing, this PR would need to wait until we bump to around Ruby 3.4.1, as that's when the warning disappeared.

Either that, or we need to run gem update --system, as seen here: https://mikegriffin.ie/blog/20250122-fixing-unresolved-or-ambiguous-specs-warning-message

@szymonj99
Copy link
Contributor Author

CC: @jheysel-r7
Like I mentioned above, it might be best if we wait with this PR until we switch to a higher Ruby version as shown below, to not print any warnings for our users.

After some testing with Docker:

3.2.5

docker container run -it -v $(pwd):/framework ruby:3.2.5 /bin/bash
In the container run:

cd /framework
apt update
apt install libpcap-dev -y
bundle
bundle exec msfconsole -q

Results in the StringIO warning:

root@8ef719121304:/framework# bundle exec msfconsole -q
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      stringio (>= 0)
      Available/installed versions of this gem:
      - 3.1.2
      - 3.0.4
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
msf6 > exit

After running gem update --system, we have no StringIO warning:

root@8ef719121304:/framework# bundle exec msfconsole -q
msf6 >

3.4.1

docker container run -it -v $(pwd):/framework ruby:3.4.1 /bin/bash
In the container run:

cd /framework
apt update
apt install libpcap-dev -y
bundle
bundle exec msfconsole -q

Results in no StringIO warning:

root@c3f2f75c772d:/framework# bundle exec msfconsole -q
msf6 >

@jheysel-r7
Copy link
Contributor

Hey @szymonj99,

We appreciate you investigating this issue! Waiting for MSF to switch to a higher Ruby seems reasonable to me 👍

I'll add the blocked label on this PR for now and will circle back when the time comes.

@jheysel-r7 jheysel-r7 added the blocked Blocked by one or more additional tasks label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by one or more additional tasks
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants