Skip to content

Msf::Post::File: readable? / exists? / read_file methods crash sessions with EOFError on Solaris #20103

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

Open
bcoles opened this issue Apr 29, 2025 · 1 comment
Labels

Comments

@bcoles
Copy link
Contributor

bcoles commented Apr 29, 2025

  1. Get a solaris/x86/shell_reverse_tcp session on Solaris (tested on Solaris 10u2)
  2. Run a module which reads a file, or create a module which uses readable? / exists? / read_file
msf6 post(solaris/gather/enum_packages) > run
[*] 192.168.200.166 - Command shell session 3 closed.
[-] Post failed: EOFError EOFError
[-] Call stack:
[-]   /var/lib/gems/3.3.0/gems/rex-core-0.1.33/lib/rex/io/stream.rb:224:in `get_once'
[-]   /root/Desktop/metasploit-framework/lib/msf/base/sessions/command_shell.rb:668:in `shell_read'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/session/provider/single_command_shell.rb:64:in `block (2 levels) in shell_read_until_token'
[-]   <internal:kernel>:187:in `loop'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/session/provider/single_command_shell.rb:63:in `block in shell_read_until_token'
[-]   /var/lib/gems/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:185:in `block in timeout'
[-]   /var/lib/gems/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:38:in `handle_timeout'
[-]   /var/lib/gems/3.3.0/gems/timeout-0.4.3/lib/timeout.rb:194:in `timeout'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/session/provider/single_command_shell.rb:60:in `shell_read_until_token'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/session/provider/single_command_shell.rb:158:in `shell_command_token_base'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/session/provider/single_command_shell.rb:130:in `shell_command_token_unix'
[-]   /root/Desktop/metasploit-framework/lib/msf/base/sessions/unix_escaping.rb:4:in `shell_command_token'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/post/common.rb:197:in `cmd_exec'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/post/file.rb:313:in `exist?'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/post/file.rb:279:in `readable?'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/post/file.rb:488:in `read_file'
[-]   /root/Desktop/metasploit-framework/lib/msf/core/post/solaris/system.rb:17:in `get_sysinfo'
[-]   /root/Desktop/metasploit-framework/modules/post/solaris/gather/enum_packages.rb:32:in `run'
[*] Post module execution completed
Copy link

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label May 29, 2025
@adfoster-r7 adfoster-r7 removed the Stale Marks an issue as stale, to be closed if no action is taken label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants