IIS(如何?)IIS存储自定义应用程序池标识?

时间:2016-06-21 16:59:39

标签: asp.net iis

我有一个用于开发的应用程序池......我在我的凭据下运行它(因此我不必担心权限/访问问题)。有两件事让我觉得我的凭据可能只是坐在文件(或注册表项)中......这很令人担忧:

  • 当我更改密码时,我必须更新存储的凭据
  • 设置对话框中有确认密码字段

如果IIS只是存储一些身份验证令牌,我希望只输入一次密码(因为身份验证是立即发生的)。

任何人都知道我的凭据存储在哪里?它们是刚刚使用某些系统密钥加密,然后在应用程序池旋转时拉出并使用它?

这是我输入身份凭证的对话框:

configuring the Custom Identity for an application pool

我从应用程序池的高级设置中打开该对话框:

app pool's Advanced Settings

其他信息

Windows 7上的IIS 7.5

使用其他应用程序池的虚拟帐户,但我在这里使用的是:我使用的是实际的Windows帐户凭据

更新

根据尼古拉斯 - 迪特里希的回应,我发现了以下内容......

IIS 7.5的应用程序池凭据(和常规设置)存储在%systemroot%\System32\Inetsrv\config\applicationHost.config

加密由 AesProtectedConfigurationProvider 处理,这是protect sensitive config info的标准(?)方式(如数据库连接字符串或 - 你知道 - 密码)< / p>

以下是使用省略号(...)替换敏感/无关信息的相关章节:

<configProtectedData>
    <providers>
        <!-- … -->
        <add name="IISWASOnlyAesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="…" />
    </providers>
</configProtectedData>

<system.applicationHost>
    <applicationPools>
        <add name="DefaultAppPool" queueLength="5000" managedRuntimeVersion="v4.0" />
        <add name="GeneralDev" queueLength="5000" autoStart="true">
            <processModel identityType="SpecificUser" userName="mydomain\myusername" password="[enc:IISWASOnlyAesProvider:…:enc]" />
        </add>
        <!-- … -->
        <applicationPoolDefaults managedRuntimeVersion="v4.0">
            <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="false" />
        </applicationPoolDefaults>
    </applicationPools>        
    <!-- … -->
</system.applicationHost>

希望足够安全吗? ¯\_(ツ)_/¯

1 个答案:

答案 0 :(得分:2)

在IIS6中,AppPool标识存储在IIS元数据库(%systemroot%\ System32 \ Inetsrv \ metabase.xml)中,位于W3SVC / AppPools // WAMUserPass下的加密字符串中。

虽然可以解密并将其显示为纯文本(http://www.jasonsamuel.com/2010/04/28/how-to-get-the-iusr-and-iwam-user-account-passwords-on-an-iis-server/

,但这并不是那么安全