

Crypt your config files with PowerShell
source link: https://blog.vermorel.com/journal/2007/10/31/crypt-your-config-files-with-powershell.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Crypt your config files with PowerShell
sysadmin
ASP.Net 2.0 comes with a convenient native support for configuration file encryption. Yet, things are still not that easy for WinForms, Console applications or Windows Services since the aspnet_regiis.exe
utility only supports Web Configuration files.
My own μISV has its share of distributed applications which involve securing a few connection strings over several machines. Securing the connection strings through encryption is not an ultimate defense (if the attacker gains executions rights on the local machine, connection strings will get disclosed anyway), but it can still save you a lot of trouble such as involuntary disclosure.
Download crypt-config.zip
I have found a practical way to solve the issue through PowerShell (see the PowerShell team blog for regular tips), namely two functions ```crypt-config and ``decrypt-config. The source code comes as single PSH script contains the function definitions.
To get started, extract the PS1 file from the Zip archive, then
PS docs:> . ($directory + “\crypt-config.ps1”) ;
PS docs:>crypt-config ‘MyConsole.exe’ ‘section’;
PS docs:>decrypt-config ‘MyConsole.exe’ ‘section’;
Typically, section
will be replaced by connectionStrings
. Note that you do not need to add the .config
at the end of the configuration file path.`` ```
Reader Comments (1)
Notes: if you are just interested in password encryption within PowerShell, just have a look at http://abhishek225.spaces.live.com/Blog/cns!13469C7B7CE6E911!273.entry
November 1, 2007 | joannes
Recommend
-
21
Linux uses dm-crypt in order to provide transparent disk or partition encryption. What are the options in case you need to recover passphrase from such encryption? There are already ready-made tools, but we have also produ...
-
48
README.org
-
12
Implementation of SHA512-crypt vs MD5-crypt If you have a new installation, you’re probably using SHA512-based passwords instead of the older MD5-based passwords described...
-
5
Jan 6, 2015 - 27 minute read - Comments - Crypto
-
10
Latency penalty [Date Prev][Date Next][
-
18
add post processing queue · torvalds/linux@cabf08e · GitHubPermalink
-
19
use io thread for reads only if mempool exhausted · torvalds/linux@20c8253 · GitHubPermalink
-
9
A Simple Guide For Updating Encrypted Files When Using Git-Crypt When working with codebases, it’s necessary to encrypt s...
-
8
Using PowerShell to Read a NAVISION File .CONFIG advertisements I have an config file from a NAVISION instance. The file format is like...
-
6
web.config PowerShell 更新函式庫-黑暗執行緒有些 IIS 設定要靠改 web.config 完成,有些環境較一致,可以預先寫好覆寫即可,但如果更新的 web.config 有多個且內容不同,最無腦的做法是寫成操作指示請相關人員執行:「打開 web.conf,找到 system.webSesrver/...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK