dongle3217 2013-04-03 16:14
浏览 151
已采纳

Web.config上写入权限的安全问题

I currently have a PHP site running on an IIS7.5 server.

I use the built url rewriting tool for IIS in the web.config.

My CMS admin has the ability to allow the user to write their own rewrite. So my admin tool, written in PHP needs write modify permissions for the IUSER in order for PHP to modify the file. However I figured that was probably not good practice for security so I decided to move the rewrites into a rewrite.config file that the web.config references. I then give write/modify permissions to the rewrite file and not the web.config.

The only problem is that IIS caches the external rewrite file and won't reload it unless the web.config's last modified date is cached. I can manually force the server to reload my rewrite.config file by opening the web.config in a text editor, adding a space or something and then clicking save, the server then notices the last modified date has changed and then reloads the rewrite file with the new rewrite.

I can't continue to do this forever though, I need my admin tool to allow users to add their own rewrites without having to call me to make a change in the web.config before their rewrites take effect.

I learned that I can call the touch function in PHP on the web.config file and that solves my problem, because it changes the last modified date on the web.config file. However in order for touch to work PHP needs the IUSER to have write permissions to do so but not modify permissions.

So finally my question is... security wise, is it okay to leave the web.config with IUSER permissions to read and write but not modify? Or is that still a security issue.

If so, what vulnerablities am I creating for this site? And, how can I change my approach to not open myself up to these vulnerablities?

  • 写回答

1条回答 默认 最新

  • dslk6326846 2019-04-05 21:47
    关注

    Answering my own question. It's best practice to avoid giving I_USER permission to the web.config. We ended up rewriting our code to no longer require this.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题