Storing Credentials Locally In Registry Encryption Methods?
Nov 3, 2010
I'm having to store a user account locally on a machine, what would be the best method to store this? (Needs to be reversable encryption rather than hash)I'm accessing a UNC share as mentioned here: url...Can anyone suggest a better method or changes to the above to secure the credentials as much as possible?
I have an application that authenticates against a third party web service by sending a username and password. At the moment I'm typing the password on a winform each time I start the application - but I need it to login automatically.
I'd like to store the username/password somewhat more securely than
Dim username as String = "username" Dim password as String = "password"
I understand that I probably won't stop a determined hacker with access to my source code, but storing them as plaintext feels wrong. I've found some similar questions on here but none that provide me with an answer I can use.
Edit: The web service isn't mine, it's an API that requires me to login to use.
I've been storing SQL connection strings in web.conf which is fine but now I need to store SMTP credentials somewhere protected. web.conf seems like the likeliest place since its protected but how can they be stored?
I've added the details to my web.conf but amnot sure how to reference them
We don't want to get the password, we only want to store the user credentials so when they do work on the application we can apply their usernameto each operation and when they are done with an operation and do a digital signature by scanning their badge we want to compare the user's credentials with the stored credentials to ensure the user has logged in and is the current user.1. User 1 logs into the program using their username/password for windows.5
I am trying to get a subset of locally declared methods in a webform code behind using GetMethods but cannot figure out the proper BindingFlags settings (see code below)....and some further specific questions:
1) Is it possible to differentiate between Procedures and Functions?
2) Furthermore, I only want to fetch a certain subset of these....is there some way I can decorate the ones I want with an attribute, and then further filter based on that?
Private Sub LoadFunctions() Dim thisClass As Type = Me.GetType For Each method As MethodInfo In thisClass.GetMethods(BindingFlags.Instance Or BindingFlags.Public Or BindingFlags.DeclaredOnly)
I have a question in security programming. As all of us know, when we have a database with passwords or anything sensitive, we would like to encrypt it so it is not readable by other. Now I want to know, which of the method is secured or less secured. Is it Iterative Salting (1000x iterative) or Encryption method such as SHA 256, MD5, and all others. Kindly give me your opinion on this please.
I've been trolling for a long time now and have decided to register as I finally have some time to start jumping into VB. The last time I coded VB, the current version was VB 4. I've been out of programming for a good while now and considered myself a beginner (tutorial example coder haha).
My question is: Where is a good place to start learning VB.NET?
I know it's an often asked and answered question - but let me give you a bit more information so more specialized replies might be given.
I'm in INFOSEC/COMSEC and would like to (eventually) develop a program that contains a DB of information that is read by the application and saves input information into a DB (encrypted) as well. The program will be a 800-53 C&A control assessment program; used for tracking system compliance for federal information systems. I would like to be able to develop such a tool to make my life easier at work instead of using Excel spreadsheets to track everything.
I would like to learn: - Input / Output methods and validation (for secure coding) - Read/Write DB Encryption (RSA or other 128-bit) for user input information - Ability to generate PDF reports from the primary keys and data sets from the above DB
My goal is to create a program that allows a user to install the program, setup a 'master' account that a serial/key has been generated for - that master account is then allowed to create new projects (progress saved in DB). A project asks the user certain questions pertaining to information systems and takes the input and saves it into the DB (encrypted). When the assessment is completed, I would like the program to be able to generate a PDF report from the DB (from a layout template I created).
We decided to use the registry for handling our deployment with connection strings in our VB.net application.
The requirements are:
If the program cannot connect to the server, first check the registry for a connection string. IF not, create the folder and fill in the name, type, and data. Make sure its encrypted.
I have never edited or created anything in the registry.
I want to store a string variable value in the windows registry If the below is a correct statement. My.Computer. Registry. SetValue ("HKEY_ LOCAL_ MACHINESYSTEMMyKey", "Start", "ABC")i will declare a string variable Dim strvalue as String strval = InputBox("Enter a string")and now i want to insert the User given value in the Registry Key as above in place of "ABC".
I'm rewriting a legacy application in .NET. In the earlier version, I used a few control .INI files that could be edited by the advanced user to provide variation in certain program options. (The program also permitted override of these same variabes via menus and such.) I used the API functions to read the .INI files and rewrite them to alter the user's environment for subsequent runs.
public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository { public CategoryRepository(IDatabaseFactory databaseFactory) : base(databaseFactory)
[Code]...
Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?
I have set up a method in vb.net and in xcode for encrypting a string using as far as i can tell the same parameters for an AES encryption.I've looked all over the place but cannot find information on whether they use the same encryption algorithm and settings.
this is the vb.net code:
Dim encryptAES As New AesCryptoServiceProvider() Dim encoding As New UTF8Encoding() Dim encryptor As ICryptoTransform encryptAES.Key = encoding.GetBytes("12345678901234567890123456789032") encryptAES.IV = encoding.GetBytes("1234567890123416") encryptAES.Mode = CipherMode.CBC
I am working with a vb program, but there is something strange on one of my .vb code pagewhen i put the "dot" afther the object name its dont show the methods availables for this objectbut on other vb code pages i can see it. but in this one no.for exmaplethis is a piece of code: Dim sb As New StringBuilder()
I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables.
I am not sure if you can do that in VB but I know you can in Objective-C by using either a "+" or "-" sign in front of the method declaration. And in C++ (at least I think, I can't remember) you put the static keyword or const keyword in front of the function.How would I do this in VB if it is possible? Or should I just make a separate set of functions that are not members of a class?
Question: When you have a .NET GUID for inserting in a database, it's structure is like this:
60 bits of timestamp, 48 bits of computer identifier, 14 bits of uniquifier, and 6 bits are fixed,
128 bits total Now I have problem with a GUID, because it's a 128 bit number, and some of the DBs I'm using only support 64 bit numbers. Now I don't want to solve the dilemma by using an autoincrement bigint value, since I want to be able to do offline replication.
Well whenever I reference a file I have been doing so using the full C://location/here kinda way, but my next program will be on CD so I need to figure a way to locate files that will be on the CD drive.In other languages I have used, %A_ScriptDir% and then go from there, is there something similar in vb?
I a function belows which is being used to preview an image but that involves saving the image locally in my drive. I am using this feature in an data entry form which means if the user discards the form, I have to delete the image which I feel is not efficient. How can I go about previewing the image and only save it locally if the user saves the form.
Protected Sub save_btn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_Save.Click If uifuVouTypeUploadfile.PostedFile IsNot Nothing Then
I created a program in MS Visual Web Developer 2010. It has a form that simply launches a script that manipulates a database. The project lives in several files and they are all inherited so they see each other and it accesses a MSSQL Express DB on one of our servers.
When I F5-Run the project locally on my PC it works fabulously. When I copy it to a web-enabled (application) folder on the server it executes but almost my very first line of code fails with this error[code]...
I'm looking for the best way to locally save settings to an application.I want the settings to "attach" themselves to the executable of the application so that I can send the application to another PC and still have the settings.The purpose of this is for a server that is going to issue an executable to anyone who requests it, the server sends an executable with the callback settings hardcoded into the application (for example IP, port and other settings) so that the application can connect to the server.I can't hardcode the settings in the source code because the application is going to be issued by different servers which of course, will need a different connection setting.I also don't want the settings to be stored on a file or any other "external" resource since then, the settings could be changed which could open security holes to exploit the application.So what I want to do: I want an executable to have some settings attached which will be set by another application. How can I set the settings of one application with another? And how can I efficiently save the settings internally on an application and then copy the file to another PC while still having the settings?
I have an application that runs just fine if I execute it from a local drive, however when I deploy the files to a network location and run the file I get a "Common Language Runtime Debugging Serivces - Application has generated an exception that could not be handled process id bla bla bla, OK to terminate, Cancel to debug"
My desktop application is developed in VB.Net and can be run through two types of users, one who install it on their local machine and execute locally.
Second type of users will run the application remotely from the server.i.e. Application will install on the server and user will execute that application from client side. Server can be a Citrix Meta Frame or any server accessed through Remote Desktop Connection. I want to maintain single exe for both types of users.
Is there any mechanism/way through which I can come to know programmatically whether application is running locally or remotely?
I have two main troubles. The most important is the telnet one. I have another program which sends data via telnet locally on the PC. It requires a login and optional pass. I can connect and draw data which comes in 77 byte packets.
The problem is, the first packet of data doesn't display until the 2nd one comes in, which for this arrangement could 10s or 24 hours depending on the final user's intended use. This staggered data rx continues until termination of the program. I've used tcpClient.Available() to confirm that my app is seeing the data almost the instant it leaves the other program but for some reason the message isn't passed until the 2nd packet arrives. I'm sure I've probably implemented this in a most cumbersome way so any streamlining.
The second issue (which is contributing in part to the first) is the timer which here uses a freeby snip from a forum somewhere - it screws with the app's menu's controls and program flow. I've tried the VB2008 timer but can't seem to make sense of the best way to use it in this context. I think I've been looking at the screen too long and can't see the obvious.
My desktop application is developed in VB.Net and can be run through two types of users, one who install it on their local machine and execute locally.
Second type of users will run the application remotely from the server.i.e. Application will install on the server and user will execute that application from client side. Server can be a Citrix Meta Frame or any server accessed through Remote Desktop Connection.
I want to maintain single exe for both types of users.
Question:
Is there any mechanism/way through which I can come to know programmatically whether application is running locally or remotely?
<p>I cannot for the life of me figure out why the below code works when I fire it from my localhost but does not work when I publish it. I am unable to remote Debug </p><p>but it seems that I am getting Error 2250... I've tried searching for it but its too damned generic a code?</p><p> </p><p>All I want is the UNC, why is everything in .NEt so damned difficult?
I am creating html code as a string (named htmlString) in a Visual Basic .Net program and want to show the created html as a new page
Dim path As String = Server.MapPath("~/tmp/") Dim strWriter As StreamWriter = New IO.StreamWriter(path & "SomeHtml.html") strWriter.Write(htmlString) strWriter.Close() System.Diagnostics.Process.Start(path & "SomeHtml.html")
This works locally but when published on the server it does not open the html page. (Nothing happens when I click on the button that is supposed to trigger the piece of code to create .html and display it.
I'm looking for a method of generating unique identifiers for a record class being created locally and then persisted in various formats (XML, SQL, etc.) I've seen people using DateTime and GetHashCode, but that seems to lend itself to duplicate identifiers depending upon the sample size. GUID is a bit overkill, as I don't need anything that unique (large) at the global level. I'm also aware of using GUIDs and GetHashCode to get the size down a bit, but duplicates tend to crop up here as well. Any best practice or method for generating simple unique identifiers?
I am currently developing an application that will require each end user to specify a rather large set of tabular data specific to his/her own preferences. Each time the user starts the application, it will load this set of data.
what is the best way to store this data locally on the end user's local machine? Should I use XML, Access mdb, flat text files?
The code works fine when I run it locally, yet as soon as I have uploaded to our dev server it doesnt run, but also doesnt error.I did some research and found that I should have the thread impersonate the WindowsIdentity, which I have done but still the thread does not work, I also tried increasing the max threads in IIS and still nothing.Im running IIS 7.5 on Windows 2008 R2.The method being executed on a new thread is in a class in the App_Code folder and looks like:
Public Class RosterEmailer Inherits System.Web.UI.Page Dim thisID As String Dim thisName As String