Rubysmb error communicationerror read timeout expired when reading from the socket timeout 30

Steps to reproduce How'd you do it? Selected the windows/smb/ms17_010_eternalblue exploit in msfconsole, filled out the parameters LHOST, LPORT, RPORT, ReverseListenerBindAddress and RHOSTS to ...

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

Assignees

@cdelafuente-r7

Labels

bug

Stale

Marks an issue as stale, to be closed if no action is taken

Comments

@colias-palaeno

Steps to reproduce

How’d you do it?

  1. Selected the windows/smb/ms17_010_eternalblue exploit in msfconsole, filled out the parameters LHOST, LPORT, RPORT, ReverseListenerBindAddress and RHOSTS to my public IP, port 445 (which was open), port 445 again, my private IP and the IP of my virtual machine that was running an old version of Windows 7.
  2. Ran the exploit with the exploit command.

I have —

  • opened the LPORT and made LPORT the same as the RPORT
  • set all the required parameters in show options
  • made the target a VM on the same network as mine and check if it crashed (spoiler alert: it didn’t)
  • ran set timeout 999 to increase the timeout NB — it didn’t change the timeout at all
  • made sure there wasn’t a SINGLE issue with my network that could stop it from working
    None of the previous issue threads have helped.

Were you following a specific guide/tutorial or reading documentation?

Yes. https://www.youtube.com/watch?v=Q1vbb3pmi4Y

Expected behavior

The expected behaviour would be for a meterpreter shell to open.

Current behavior

I received the error RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30).

System stuff

Metasploit version

5.0.101-dev

I installed Metasploit with:

  • Kali package via apt
  • Omnibus installer (nightly)
  • Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • Source install (please specify ruby version)

OS

Kali Linux

@colias-palaeno

somebody please help. it’s been 2 weeks already

@Nugetzrul3

I am also having this issue. However I am trying on tryhackme.org Blue challenge. I have restarted the machine twice and still not working

@GetRektBoy724

if you want to exploit using eternablue vulnerability…
it is more recommended if you’re using ElevenPaths’s eternalblue doublepulsar
and also dont make lport and rport the same,cause there is a posibility to interfere each other
try the lport 4444 and the rport should be 445(dont ever change the rport or the exploit wont work)

@github-actions

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

Oct 29, 2020

@smcintyre-r7

If all of the systems are on your private network, and Metasploit is running on the same LAN as your target VM then you shouldn’t need to set the ReverseListenerBindAddress option at all. Also are you certain that the target system is vulnerable? It would help if you included the output from Metasploit in the ticket so we could look at it.

@github-actions
github-actions
bot

removed
the

Stale

Marks an issue as stale, to be closed if no action is taken

label

Oct 31, 2020

@github-actions

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

Nov 30, 2020

@github-actions

Hi again!

It’s been 60 days since anything happened on this issue, so we are going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error please feel free to reopen this issue or create a new one if you need anything else.

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

Labels

bug

Stale

Marks an issue as stale, to be closed if no action is taken

@colias-palaeno

Steps to reproduce

How’d you do it?

  1. Selected the windows/smb/ms17_010_eternalblue exploit in msfconsole, filled out the parameters LHOST, LPORT, RPORT, ReverseListenerBindAddress and RHOSTS to my public IP, port 445 (which was open), port 445 again, my private IP and the IP of my virtual machine that was running an old version of Windows 7.
  2. Ran the exploit with the exploit command.

I have —

  • opened the LPORT and made LPORT the same as the RPORT
  • set all the required parameters in show options
  • made the target a VM on the same network as mine and check if it crashed (spoiler alert: it didn’t)
  • ran set timeout 999 to increase the timeout NB — it didn’t change the timeout at all
  • made sure there wasn’t a SINGLE issue with my network that could stop it from working
    None of the previous issue threads have helped.

Were you following a specific guide/tutorial or reading documentation?

Yes. https://www.youtube.com/watch?v=Q1vbb3pmi4Y

Expected behavior

The expected behaviour would be for a meterpreter shell to open.

Current behavior

I received the error RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30).

System stuff

Metasploit version

5.0.101-dev

I installed Metasploit with:

  • Kali package via apt
  • Omnibus installer (nightly)
  • Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • Source install (please specify ruby version)

OS

Kali Linux

@GetRektBoy724

you should not to set the lhost and rhost value same
they can interfere each other….
try the lhost 4444 and the rhost should be 445

@github-actions

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

Oct 29, 2020

@github-actions

Hi again!

It’s been 60 days since anything happened on this issue, so we are going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error please feel free to reopen this issue or create a new one if you need anything else.

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

Содержание

  1. Кто сталкивался с такой проблемой?
  2. superuser
  3. «RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30)» in windows/smb/ms17_010_eternalblue #14121
  4. Comments
  5. Steps to reproduce
  6. Were you following a specific guide/tutorial or reading documentation?
  7. Expected behavior
  8. Current behavior
  9. System stuff
  10. Metasploit version
  11. I installed Metasploit with:
  12. «RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30)» in windows/smb/ms17_010_eternalblue #14018
  13. Comments
  14. Steps to reproduce
  15. Were you following a specific guide/tutorial or reading documentation?
  16. Expected behavior
  17. Current behavior
  18. System stuff
  19. Metasploit version
  20. I installed Metasploit with:
  21. RubySMB::Error::CommunicationError #93
  22. Comments
  23. Error after running ms17_010_eternalblue
  24. Rubysmb error communicationerror read timeout expired when reading from the socket timeout 30
  25. Suggested Topics

Кто сталкивался с такой проблемой?

superuser

Здравствуйте господа, помогите уже что только не делал не чего не выхотит. столкнулся с такой проблемай, есть комп win7 открытый 445 порт, сканировал MSF, NESSUS все говорят тачка уязвима. Запускаю exploit/windows/smb/ms17_010_eternalblue нажимаю run. и вот что появлеяться

[*] Started reverse TCP handler on 192.168.0.105:4444
[+] 10.16.116.39:445 — Host is likely VULNERABLE to MS17-010! — Windows 7 Ultimate 7601 Service Pack 1 x64 (64-bit)
[*] 10.16.116.39:445 — Connecting to target for exploitation.
[+] 10.16.116.39:445 — Connection established for exploitation.
[+] 10.16.116.39:445 — Target OS selected valid for OS indicated by SMB reply
[*] 10.16.116.39:445 — CORE raw buffer dump (38 bytes)
[*] 10.16.116.39:445 — 0x00000000 57 69 6e 64 6f 77 73 20 37 20 55 6c 74 69 6d 61 Windows 7 Ultima
[*] 10.16.116.39:445 — 0x00000010 74 65 20 37 36 30 31 20 53 65 72 76 69 63 65 20 te 7601 Service
[*] 10.16.116.39:445 — 0x00000020 50 61 63 6b 20 31 Pack 1
[+] 10.16.116.39:445 — Target arch selected valid for arch indicated by DCE/RPC reply
[*] 10.16.116.39:445 — Trying exploit with 12 Groom Allocations.
[*] 10.16.116.39:445 — Sending all but last fragment of exploit packet
[-] 10.16.116.39:445 — RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30)

Вот опций
Module options (exploit/windows/smb/ms17_010_eternalblue):

Name Current Setting Required Description
—- ————— ——— ————
RHOSTS 10.16.116.39 yes The target address range or CIDR identifier
RPORT 445 yes The target port (TCP)
SMBDomain . no (Optional) The Windows domain to use for authentication
SMBPass no (Optional) The password for the specified username
SMBUser no (Optional) The username to authenticate as
VERIFY_ARCH true yes Check if remote architecture matches exploit Target.
VERIFY_TARGET true yes Check if remote OS matches exploit Target.

Payload options (windows/x64/meterpreter/reverse_tcp):

Name Current Setting Required Description
—- ————— ——— ————
EXITFUNC thread yes Exit technique (Accepted: », seh, thread, process, none)
LHOST 192.168.0.105 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port

Id Name
— —-
0 Windows 7 and Server 2008 R2 (x64) All Service Packs

Источник

«RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30)» in windows/smb/ms17_010_eternalblue #14121

Steps to reproduce

  1. Selected the windows/smb/ms17_010_eternalblue exploit in msfconsole, filled out the parameters LHOST, LPORT, RPORT, ReverseListenerBindAddress and RHOSTS to my public IP, port 445 (which was open), port 445 again, my private IP and the IP of my virtual machine that was running an old version of Windows 7.
  2. Ran the exploit with the exploit command.
  • opened the LPORT and made LPORT the same as the RPORT
  • set all the required parameters in show options
  • made the target a VM on the same network as mine and check if it crashed (spoiler alert: it didn’t)
  • ran set timeout 999 to increase the timeout NB — it didn’t change the timeout at all
  • made sure there wasn’t a SINGLE issue with my network that could stop it from working
    None of the previous issue threads have helped.

Were you following a specific guide/tutorial or reading documentation?

Expected behavior

The expected behaviour would be for a meterpreter shell to open.

Current behavior

I received the error RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30).

System stuff

Metasploit version

I installed Metasploit with:

  • Kali package via apt
  • Omnibus installer (nightly)
  • Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • Source install (please specify ruby version)

The text was updated successfully, but these errors were encountered:

Источник

«RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30)» in windows/smb/ms17_010_eternalblue #14018

Steps to reproduce

  1. Selected the windows/smb/ms17_010_eternalblue exploit in msfconsole, filled out the parameters LHOST, LPORT, RPORT, ReverseListenerBindAddress and RHOSTS to my public IP, port 445 (which was open), port 445 again, my private IP and the IP of my virtual machine that was running an old version of Windows 7.
  2. Ran the exploit with the exploit command.
  • opened the LPORT and made LPORT the same as the RPORT
  • set all the required parameters in show options
  • made the target a VM on the same network as mine and check if it crashed (spoiler alert: it didn’t)
  • ran set timeout 999 to increase the timeout NB — it didn’t change the timeout at all
  • made sure there wasn’t a SINGLE issue with my network that could stop it from working
    None of the previous issue threads have helped.

Were you following a specific guide/tutorial or reading documentation?

Expected behavior

The expected behaviour would be for a meterpreter shell to open.

Current behavior

I received the error RubySMB::Error::CommunicationError: Read timeout expired when reading from the Socket (timeout=30).

System stuff

Metasploit version

I installed Metasploit with:

  • Kali package via apt
  • Omnibus installer (nightly)
  • Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • Source install (please specify ruby version)

The text was updated successfully, but these errors were encountered:

Источник

RubySMB::Error::CommunicationError #93

Error after running ms17_010_eternalblue

[*] test:139 — Connecting to target for exploitation.
[-] test:139 — RubySMB::Error::CommunicationError
[-] test:139 — An error occured reading from the Socket
[-] test:139 — /root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/dispatcher/socket.rb:59:in rescue in recv_packet’ /root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/dispatcher/socket.rb:45:in recv_packet’
/root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/client.rb:229:in send_recv’ /root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/client/negotiation.rb:36:in negotiate_request’
/root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/client/negotiation.rb:14:in negotiate’ /root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/ruby_smb-0.0.18/lib/ruby_smb/client.rb:186:in login’
/opt/metasploit/modules/exploits/windows/smb/ms17_010_eternalblue.rb:359:in smb1_anonymous_connect_ipc’ /opt/metasploit/modules/exploits/windows/smb/ms17_010_eternalblue.rb:165:in smb_eternalblue’
/opt/metasploit/modules/exploits/windows/smb/ms17_010_eternalblue.rb:117:in block in exploit’ /root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/activesupport-4.2.8/lib/active_support/core_ext/range/each.rb:7:in each’
/root/.rvm/gems/ruby-2.4.1@metasploit-framework/gems/activesupport-4.2.8/lib/active_support/core_ext/range/each.rb:7:in each_with_time_with_zone’ /opt/metasploit/modules/exploits/windows/smb/ms17_010_eternalblue.rb:113:in exploit’
/opt/metasploit/lib/msf/core/exploit_driver.rb:206:in job_run_proc’ /opt/metasploit/lib/msf/core/exploit_driver.rb:167:in run’
/opt/metasploit/lib/msf/base/simple/exploit.rb:136:in exploit_simple’ /opt/metasploit/lib/msf/base/simple/exploit.rb:161:in exploit_simple’
/opt/metasploit/lib/msf/ui/console/command_dispatcher/exploit.rb:110:in cmd_exploit’ /opt/metasploit/lib/rex/ui/text/dispatcher_shell.rb:430:in run_command’
/opt/metasploit/lib/rex/ui/text/dispatcher_shell.rb:392:in block in run_single’ /opt/metasploit/lib/rex/ui/text/dispatcher_shell.rb:386:in each’
/opt/metasploit/lib/rex/ui/text/dispatcher_shell.rb:386:in run_single’ /opt/metasploit/lib/rex/ui/text/shell.rb:205:in run’
/opt/metasploit/lib/metasploit/framework/command/console.rb:48:in start’ /opt/metasploit/lib/metasploit/framework/command/base.rb:82:in start’
/opt/metasploit/msfconsole:48:in `

The text was updated successfully, but these errors were encountered:

Источник

Rubysmb error communicationerror read timeout expired when reading from the socket timeout 30

I’ve been playing around with the EternalBlue exploit recently. I’ve downloaded a Windows 10 iso file from 2016 and used it to set up a Windows 10 Pro VM as my sandbox. I also ran the nmap script and metasploit scanner module to ensure that it is indeed vulnerable to ms17-010. However, when I run the exploit module, I get this:

I’ve spent the past hour testing out every single payload available and even tried the other eternalblue modules (which all didn’t work). Does anyone know what is denying me from gaining entry to my virtual machine here?

(PS I turned off the Windows Firewall and Windows Defender real-time protection on the win10 machine already)

That module doesn’t support Windows 10 targets. You can see from the targets that it supports Windows 7 and Server 2008.

The ms17_010_eternalblue_win8 module (despite it’s name) works on Windows 10. Says it was tested successfully on Windows 10 build 10240 and build 10586 so the build of your target is quite a bit newer but it may work.

FYI, it’s a known issue that these modules are separate and targeting is difficult which is why there’s an effort to combine them into one.

Suggested Topics

Looks like your connection to SOFTWARE TESTING was lost, please wait while we try to reconnect.

Источник

aidanbxyz

ms17_010_eternalblue RubySMB::Error::CommunicationError: Read timeout expired when reading from the socket

Steps to reproduce

  1. Opened metasploit and used exploit/windows/smb/ms17_010_eternalblue
  2. Set options and exploited.

Victim: Windows 10 build 1511 (Virtual Machine)

Expected behavior

I expected it to complete the exploit and I would have a shell to the victim’s computer.

Current behavior

Does everything like expected until..

[] 192.168.2.19:445 — Sending all but last fragment of exploit packet
[-] 192.168.2.19:445 — RubySMB::Error::CommunicationError: Read timeout expired when reading from the socket (timeout=30)
[
] Exploit completed, but no session was created.

~/.msf4/logs/framework.log : https://pastebin.com/LL7ebz0r

System stuff

Metasploit version

Framework: 5.0.89-dev
Console: 5.0.89-dev

I installed Metasploit with:

  • [+] Kali package via apt
  • Omnibus installer (nightly)
  • Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • Source install (please specify ruby version)

OS

Kali Linux amd64

aidanbxyz

It is possible that the problem could be in the remote machine. I tested it on Blue on tryhackme and everything worked just fine.

The Metasploit log for my test machine was showing some unexpected errors, though.

adfoster-r7

Hi, it looks like your log shows an error with ms17_010_eternalblue_win8 rather than ms17_010_eternalblue.

Could you try these steps instead?

  use windows/smb/ms17_010_eternalblue
  set RHOSTS x.x.x.x
  set LHOST x.x.x.x
  set PAYLOAD windows/x64/meterpreter/reverse_tcp
  options
  run

Remember to set RHOSTS to the target machine’s IP, and LHOST to your IP on the tryhackme network. I have verified that the above works on the tryhackme blue room.

adfoster-r7

Closing as a duplicate of #13478

Zeker62

see your waf or security software

HOOLY123M

How do I bypass the waf of the target
help me?

Marc-André Lafortune’s solution is still the best if you can’t upgrade to ruby 2.x.

Starting from 2.x, a subclass of Timeout::Error will be raised depending on which timeout was triggered:

  • Net::OpenTimeout
  • Net::ReadTimeout

However, the read_timeout behavior is strange on 2.x, because it seems to double the value you set. This article explains why.

Here’s a test for both timeouts (tested on 1.8.7, 1.9.3, 2.1.2, 2.2.4).

EDIT: The open_timeout test works on Mac, but on Linux, the client gets a «connection refused» error.

require "net/http"
require "socket"

SERVER_HOST = '127.0.0.1'
SERVER_PORT = 9999

def main
  puts 'with_nonlistening_server'
  with_nonlistening_server do
    make_request
  end
  
  puts
  puts 'with_listening_server'
  with_listening_server do
    make_request
  end
end

def with_listening_server
  # This automatically starts listening
  serv = TCPServer.new(SERVER_HOST, SERVER_PORT)
  begin
    yield
  ensure
    serv.close
  end
end

def with_nonlistening_server
  raw_serv = Socket.new Socket::AF_INET, Socket::SOCK_STREAM, 0
  addr     = Socket.pack_sockaddr_in SERVER_PORT, SERVER_HOST

  # Bind, but don't listen
  raw_serv.bind addr
  begin
    yield
  ensure
    raw_serv.close
  end
end

def make_request
  http = Net::HTTP.new(SERVER_HOST, SERVER_PORT)
  http.open_timeout = 1
  http.read_timeout = 1  # seems to be doubled on ruby 2.x
  start_tm = Time.now
  begin
    http.start
    begin
      http.get('/')
    rescue Timeout::Error => err
      puts "Read timeout: #{err.inspect}"
    end
  rescue Timeout::Error => err
    puts "Open timeout: #{err.inspect}"
  end
  end_tm = Time.now
  puts "Duration (sec): #{end_tm - start_tm}"
end

if __FILE__ == $PROGRAM_NAME
  main
end

Example output on 1.9.3:

with_nonlistening_server
Open timeout: #<Timeout::Error: execution expired>
Duration (sec): 1.002477

with_listening_server
Read timeout: #<Timeout::Error: Timeout::Error>
Duration (sec): 1.00599

Example output on 2.1.2:

with_nonlistening_server
Open timeout: #<Net::OpenTimeout: execution expired>
Duration (sec): 1.005923

with_listening_server
Read timeout: #<Net::ReadTimeout: Net::ReadTimeout>
Duration (sec): 2.009582

Понравилась статья? Поделить с друзьями:
  • Ruby runtime error
  • Ruby http error
  • Ruby error message
  • Ruby argument error
  • Ruantiblock update error another instance of update is already running