-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Add shutdown method to Exploit::Remote::Tcp #12031
Conversation
Would it be alright to prefer one of the symbolic representations instead, as mentioned in the ruby docs? |
Yeah, they're interchangeable. Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> connect
=> #<Socket:fd 19>
[2] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> disconnect
=> #<Socket:(closed)>
[3] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> connect
=> #<Socket:fd 19>
[4] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> shutdown
=> true
[5] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> sock
=> #<Socket:fd 19>
[6] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> sock.close
=> nil
[7] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)> sock
=> #<Socket:(closed)>
[8] pry(#<Msf::Modules::Exploit__Bsd__Finger__Morris_fingerd_bof::MetasploitModule>)>
1 0.000000 127.0.0.1 → 127.0.0.1 51153 79 TCP 68 51153 → 79 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=64 TSval=2564325313 TSecr=0 SACK_PERM=1
2 0.000056 127.0.0.1 → 127.0.0.1 79 51153 TCP 68 79 → 51153 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=64 TSval=2564325313 TSecr=2564325313 SACK_PERM=1
3 0.000065 127.0.0.1 → 127.0.0.1 51153 79 TCP 56 51153 → 79 [ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564325313 TSecr=2564325313
4 0.000076 127.0.0.1 → 127.0.0.1 79 51153 TCP 56 [TCP Window Update] 79 → 51153 [ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564325313 TSecr=2564325313
5 7.131531 127.0.0.1 → 127.0.0.1 51153 79 TCP 56 51153 → 79 [FIN, ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564332412 TSecr=2564325313
6 7.131560 127.0.0.1 → 127.0.0.1 79 51153 TCP 56 79 → 51153 [ACK] Seq=1 Ack=2 Win=408256 Len=0 TSval=2564332412 TSecr=2564332412
7 7.131611 127.0.0.1 → 127.0.0.1 79 51153 TCP 56 79 → 51153 [FIN, ACK] Seq=1 Ack=2 Win=408256 Len=0 TSval=2564332412 TSecr=2564332412
8 7.131633 127.0.0.1 → 127.0.0.1 51153 79 TCP 56 51153 → 79 [ACK] Seq=2 Ack=2 Win=408256 Len=0 TSval=2564332412 TSecr=2564332412
9 8.490880 127.0.0.1 → 127.0.0.1 51154 79 TCP 68 51154 → 79 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=64 TSval=2564333763 TSecr=0 SACK_PERM=1
10 8.490939 127.0.0.1 → 127.0.0.1 79 51154 TCP 68 79 → 51154 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=64 TSval=2564333763 TSecr=2564333763 SACK_PERM=1
11 8.490948 127.0.0.1 → 127.0.0.1 51154 79 TCP 56 51154 → 79 [ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564333763 TSecr=2564333763
12 8.490957 127.0.0.1 → 127.0.0.1 79 51154 TCP 56 [TCP Window Update] 79 → 51154 [ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564333763 TSecr=2564333763
13 10.527828 127.0.0.1 → 127.0.0.1 51154 79 TCP 56 51154 → 79 [FIN, ACK] Seq=1 Ack=1 Win=408256 Len=0 TSval=2564335784 TSecr=2564333763
14 10.527887 127.0.0.1 → 127.0.0.1 79 51154 TCP 56 79 → 51154 [ACK] Seq=1 Ack=2 Win=408256 Len=0 TSval=2564335784 TSecr=2564335784
15 10.527914 127.0.0.1 → 127.0.0.1 79 51154 TCP 56 79 → 51154 [FIN, ACK] Seq=1 Ack=2 Win=408256 Len=0 TSval=2564335784 TSecr=2564335784
16 10.527938 127.0.0.1 → 127.0.0.1 51154 79 TCP 56 51154 → 79 [ACK] Seq=2 Ack=2 Win=408256 Len=0 TSval=2564335784 TSecr=2564335784
Release NotesThe |
This PR exposes a
shutdown
method forExploit::Remote::Tcp.sock
.I encountered a protocol recently which required sending
sock.shutdown(1)
before replying. The server refused to return data until it received a promise that no more data was to be sent.