tagged [security]

What are all the user accounts for IIS/ASP.NET and how do they differ?

What are all the user accounts for IIS/ASP.NET and how do they differ? Under Windows Server 2008 with ASP.NET 4.0 installed there is a whole slew of related user accounts, and I can't understand which...

20 Apr at 12:38

Hiding a password in a python script (insecure obfuscation only)

Hiding a password in a python script (insecure obfuscation only) I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this con...

1 May at 20:9

Why should I care about hashing passwords anyway?

Why should I care about hashing passwords anyway? If a hacker has access to the hashes in my DB, he has access to the rest of the information in the DB anyways. So why would he bother trying to decryp...

13 Nov at 17:30

ServiceStack XML Bomb and External Entity Attacks

ServiceStack XML Bomb and External Entity Attacks I read an older article (circa 2009) on MS' site regarding [XML Denial of Service Attacks and Defenses](http://msdn.microsoft.com/en-us/magazine/ee335...

4 Jun at 13:28

ASP.NET MVC Authorize user with many roles

ASP.NET MVC Authorize user with many roles I need to authorize a Controller in my ASP.NET MVC application to users which have two roles. I am using Authorize attribute like this: > [Authorize(Roles = ...

Transport security has blocked a cleartext HTTP

Transport security has blocked a cleartext HTTP What setting do I need to put in my `info.plist` to enable HTTP mode as per the following error message? > Transport security has blocked a cleartext HT...

How to secure database passwords in PHP?

How to secure database passwords in PHP? When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login f...

13 Jan at 07:53

How do I use SecureString securely?

How do I use SecureString securely? All of the examples I have seen end up converting a SecureString back to a standard string before using it, defeating the object. What's a good way of using a secur...

10 Jun at 22:7

Any coding security issues specific to C#?

Any coding security issues specific to C#? In C++ world there is a variety of ways to make an exploitable vulnerability: buffer overflow, unsafe sting handling, various arithmetic tricks, printf issue...

3 Mar at 18:51

Check if a file exists locally using JavaScript only

Check if a file exists locally using JavaScript only I want to check if a file exists locally, where the HTML file is located. It has to be JavaScript. JavaScript will never be disabled. jQuery is not...

Keystore type: which one to use?

Keystore type: which one to use? By looking at the file `java.security` of my `JRE`, I see that the keystore type to use by default is set to `JKS`. [Here](http://docs.oracle.com/javase/6/docs/technot...

20 Apr at 22:21

What to use Windows CardSpace for?

What to use Windows CardSpace for? I'm doing some funky authentication work (and yes, I know, open-id is awesome, but then again my open-id doesn't work right at this moment!). Stumbling across Window...

21 May at 10:6

Insecure deserialization using Json.NET

Insecure deserialization using Json.NET A static security scanner has flagged my C# code on this line: `response` will contain a JSON response from a web API. The scanner has flagged this as "insecure...

30 Apr at 16:3

Does the Log4j security violation vulnerability affect log4net?

Does the Log4j security violation vulnerability affect log4net? I have recently read about the [zero-day](https://en.wikipedia.org/wiki/Zero-day_(computing)) issue in Log4J. I work with a few applicat...

4 Jan at 22:59

In .NET/C# test if process has administrative privileges

In .NET/C# test if process has administrative privileges Is there a canonical way to test to see if the process has administrative privileges on a machine? I'm going to be starting a long running pro...

12 Feb at 23:22

What's the minimal set of characters I need to filter before passing a string to a system call?

What's the minimal set of characters I need to filter before passing a string to a system call? Assume that the following Perl code is given: ``` my $user_supplied_string = &retrieved_from_untrusted_u...

7 Sep at 16:10

Sanitizing SQL data

Sanitizing SQL data Google turns up all sorts of discussions on sanitizing queries for web access but I'm not finding anything addressing what I'm concerned with: Sanitizing user input data in a c# pr...

13 Aug at 17:50

Add "Everyone" privilege to folder using C#.NET

Add "Everyone" privilege to folder using C#.NET I have used the code below to allow Everyone access to a folder: ``` System.Security.AccessControl.DirectorySecurity sec = System.IO.Directory.GetAcce...

30 Jun at 15:55

Authorization Asp.net web.config

Authorization Asp.net web.config I have an application that has a backoffice. This backoffice was isolated with the use of roles like this: But now we have another type of role that needs access. T

13 Mar at 12:46

MSTEST PrincipalPermission

MSTEST PrincipalPermission How do you unit test code decorated with the PrincipalPermission attribute? For example, this works: ``` class Program { static void Main(string[] args) { AppDomain...

9 Jul at 20:21

Accessing Active Directory from ASP.Net MVC using C#

Accessing Active Directory from ASP.Net MVC using C# I need to access Active Directory to get information about groups that customers belong to. The project I have is an ASP.Net MVC application using ...

Remove Server Response Header IIS7

Remove Server Response Header IIS7 Is there any way to remove "Server" response header from IIS7? There are some articles showing that using HttpModules we can achieve the same thing. This will be hel...

10 May at 07:22

Does SecTrustEvaluate() look for root certificates in the application keychain?

Does SecTrustEvaluate() look for root certificates in the application keychain? The docs say: “If not all the certificates needed to verify the leaf certificate are included in the trust management ob...

12 Jan at 13:22

JWT authentication for ASP.NET Web API

JWT authentication for ASP.NET Web API I'm trying to support JWT bearer token (JSON Web Token) in my web API application and I'm getting lost. I see support for .NET Core and for OWIN applications. I'...

29 Jan at 09:57

How to solve "Kernel panic - not syncing - Attempted to kill init" -- without erasing any user data

How to solve "Kernel panic - not syncing - Attempted to kill init" -- without erasing any user data I was trying to update libc in our Ubuntu server but it failed and now when I reboot the server I ge...