内网渗透流程
1 minute read
假设已有webshell,无本地管理员权限
Step0 获取本地管理员权限
- 各种exp尝试,如果失败免杀再试
- 本机配置文件,敏感文件查找
- win下:
- linux下:
for suffix in *history *record *.csv *.sql *.bak *.py *.txt *.pl *.xml *.md *.json *.config *.php *.asp *.jsp *.aspx *.ini *.inc *.reg *.doc *.docx *.xls *.xlsx *.pdf;do locate $suffix|xargs grep -r -E "(password=)|(password:)|(password =)|(password :)|(passwd=)|(passwd:)|(passwd =)|(passwd :)" >> /tmp/log.log;done 无locate时: for suffix in *history *record *.csv *.sql *.bak *.py *.txt *.pl *.xml *.md *.json *.config *.php *.asp *.jsp *.aspx *.ini *.inc *.reg *.doc *.docx *.xls *.xlsx *.pdf;do find / -name $suffix|xargs grep -r -E "(password=)|(password:)|(password =)|(password :)|(passwd=)|(passwd:)|(passwd =)|(passwd :)" >> /tmp/log.log;done (grep中有-r是因为find也会找出符合条件的文件夹名,-r表示递归查找文件夹中文件,用于在find找到文件夹名时的情况)
- 内网机器扫描开放端口情况,弱口令爆破 (webshell下或reGeorg代理后用扫描器扫,如果失败则用msf生成马上传后用扫描模块,或者用hydra for win,或者用hscan, 或者用scanline,或者用superscan命令行,优选scanline) eg.扫到一台1433 sa空口令,可用:
Step 1 获取域控管理员权限
- 1.找域控
- 2.找域控登录过的机器
- 3.抓密码
- 4.嗅探口令
- 5.dns+arp欺骗布置网马