Questions tagged [securestring]

Represents text that should be kept confidential. The text is encrypted for privacy when being used, and deleted from computer memory when no longer needed

SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until the application marks it as read-only, and can be deleted from computer memory by either the application or the .NET Framework garbage collector.

224 questions
1
vote
1 answer

Secure String can't be decrypted after Sysprep

I have two PowerShell scripts I'm building for a Windows 7 image. Prior to the image I run PRE-IMAGE.ps1, and it has a line like this in it: $JoinDomainPassword = Read-Host -Prompt "Please enter the password for $joinDomainUser"…
Medos
  • 305
  • 1
  • 3
  • 9
1
vote
1 answer

How should I store sensitive data for use by my application in VB.net?

A problem I've happened upon is trying to find a way to securely store certain pieces of information. I am still learning and experimenting with .NET as an introductory language along with C. So if I lack basic logic, bear with me. The…
Samuel Nicholson
  • 3,587
  • 3
  • 20
  • 37
1
vote
1 answer

How I can use a string from a xml for a string variable in c#?

Hi I have a xml file with two values. The first value is the username for Powershell The second value is the password as securestring for powershell Now I want to read this values and set this for the variables string ps_user and SecureString…
Tarasov
  • 3,625
  • 19
  • 68
  • 128
1
vote
1 answer

secure social websockets play framework

How do I secure a websocket call in the play framework using scala securesocial? def statusfeed() = WebSocket.using[String] { implicit request => if (logged in) { ... else { } } Thanks, edit 1: Tried this but didn't work, always…
Peter
  • 129
  • 6
1
vote
3 answers

Burning in memory System.String

I am trying to remove any traces of a normal string from memory, to do so I am creating an instance of SecureString from a reference of the normal string. Like so: public static unsafe void Burn(this string input) { fixed (char* c = input) …
Bruno Klein
  • 3,217
  • 5
  • 29
  • 39
1
vote
2 answers

How to protect WinForms ConnectionString

How to protect connectionstring especially db password ? I've found some examples but it's hard to understand them. Does anyone have actual code examples? Thanks. EDIT: Protect against standard users. Basic protection for sa password in…
Carlo
  • 97
  • 2
  • 13
1
vote
1 answer

How to pass SecureString from one process to another?

I need to pass a SecureString from my client process to my service. Both are written using .NET and C#. I'm using named pipes to pass the data between processes. My question is how to get access to the SecureString as byte array to pass it to…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
1 answer

Storing email-id securely on website's backend

I'm making a site in which users will login with OpenID. I'll though, only give them the choice of Google, Yahoo, and AOL. They'll login or signup with their OpenID providers' accounts (Google/Yahoo/AOL) and after they are redirected back to my…
Tony K
  • 61
  • 3
  • 10
1
vote
1 answer

CredUIPromptForCredentials from .NET with SecureString

I'd like to show the standard system dialog to ask the user for an account username and password to use this information to start a process with these credentials. I've been pointed to the CredUIPromptForCredentials function that shows that dialog.…
ygoe
  • 18,655
  • 23
  • 113
  • 210
1
vote
3 answers

Password encryption using SecureString for plink.exe command

I would like to encrypt a password in PowerShell I tried this : In CLI : Read-Host -prompt "Password ?" -AsSecureString | ConvertFrom-SecureString | out-file "D:\root.pwd" In my script.ps1 : $pwsNAS = Get-Content "D:\root.pwd" |…
jgoup
  • 115
  • 1
  • 2
  • 7
1
vote
1 answer

Can I change the server administrator password using PowerShell SecureString?

I'm looking to write a script that will change the administrator password on a remote server using PowerShell. The following command will do this $Admin=[adsi]("WinNT://" + MyServer + "/Administrator, user") $Admin.SetPassword("NewPassword") But I…
user1890242
  • 69
  • 1
  • 10
  • 19
1
vote
1 answer

Processing a PowerShell SecureString as a parameter or console entry

I'm having a lot of difficulty with a PowerShell script that I'm trying to call a DirectoryServices query from. Currently, if I do a $password = read-host "Password" -asSecureString and subsequently $credential = New-Object…
jackwmc4
  • 33
  • 1
  • 5
1
vote
1 answer

WPF PasswordBox & SecureString: Can't MakeReadOnly()?

Is it possible to mark the PasswordBox.SecurePassword as ReadOnly? Consider this simple code: XAML:
Joe
  • 2,496
  • 1
  • 22
  • 30
1
vote
1 answer

How to initialize SecureString for readonly

I would like to create a variable, a secure one, that is more or less a CONST to use in my code. I've looked into using System.Security.SecureString, and that looks like it could be the ticket as I don't want the user to find out this password. …
Nick
  • 2,913
  • 12
  • 40
  • 52
0
votes
2 answers

SecureString and IIS?

user has an ASPX page. it has textox input ( for password). the user fill his password. the page is submitted to the IIS. it first goes to the iis. by this stage the password is in memory at plain text. now Asp.net put its password in Secure…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792