Windows Server 2008 r2 针对上传脚本的安全性

发布于 2024-12-14 13:01:14 字数 297 浏览 5 评论 0原文

我开发了一个asp.net应用程序和windows桌面应用系统。我的客户可以将图像上传到 ASP.NET 应用程序(仅一个文件夹)。因此,如果有人上传 shell 脚本并执行,就可以获取其他客户端的数据库文件。 Asp.net应用程序在Windows Server 2008 r2(Web服务器版)操作系统和IIS 7.5下运行。目前具有管理员权限。我没有域和域控制器,因此没有高级用户权限管理。而且“applicationpoolidentiy”没有帮助(我什至无法打开页面。)。我想也许我可以拒绝执行上传的脚本?是否可以。或者有没有更好的方法来保护服务器免受上传脚本的影响?

I have developed an asp.net application and windows desktop application system. My clients can upload images to asp.net application(only one folder). So if someone uploads a shell script and executes, one can take the other clients' database files.
Asp.net application works under windows server 2008 r2(web server edition) OS and IIS 7.5.it has administrator rights for now. I don't have a domain and domain controller so i don't have advanced user rights management. And "applicationpoolidentiy" doesn't help(i even can't open page.). I thought maybe i can deny executing of uploaded scripts? Is it possible. Or are there any better ways to secure server from uploaded scripts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妄司 2024-12-21 13:01:14

您应该更改上传页面,以使用扩展名白名单拒绝所有扩展名不是图像的文件。

为了提高安全性,您应该将 IIS 配置为不执行该目录中的脚本。

You should change your upload page to reject all files with extensions that aren't images using an extension whitelist.

For additional security, you should configure IIS to not execute scripts in that directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文