Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [asp.net]

ASP.NET is a Web application framework developed and marketed by Microsoft to allow programmers to build dynamic Web sites, Web applications and Web services.

1
vote
1answer
54 views

How to convert this .NET cryptography code to openssl command?

how to sign the message with the private key of the signer using openssl command line tool to get the same result as the code below? using System.Security.Cryptography.Pkcs; using System.Security....
2
votes
2answers
70 views

Unauthorized API Access Without Key Header

In order to test the security of my API, I want to act as sort of an attacker in order to try and gain access to my own API without an API key. In order for me to send requests to this endpoint, I ...
0
votes
0answers
4 views

Session Management to avoid session fixation [migrated]

How do I maintain the same session state with different session ID as we get a login request? Do I need to do anything else from the server end other than just assigning the session id in Response....
1
vote
0answers
166 views

ASP.NET SOAP Service XXE

Is it possible to do any type of XXE in a service developed using default C# SOAP service framework? I ask because any type of XXE payload I try to add, even XML header, whatever I add before SOAP ...
-1
votes
0answers
19 views

Does the ASP.NET vulnerability CVE-2011-3414 apply to ASP.NET Core?

I saw this bulletin from Microsoft in 2011 about CVE-2011-3414 which involves a vulnerability if form request body size is allowed to be big. The service bulleting mentions it affects Windows OSes ...
-1
votes
1answer
51 views

Local File Download(LFD) vulnerability exploit

I have found a arbitrary file download vulnerability in an asp.net application. I've downloaded the web.config and some other files. So what can i do with that "web.config" information ?(for example: ...
0
votes
0answers
49 views

Microsoft Cryptographic Service Providers

I have a few questions about Microsoft's Cryptographic Service Providers. I am creating an AES encryption method whose key is encrypted using the RSA. I am trying to figure out a way to store the RSA ...
0
votes
1answer
133 views

I'm not sure if this Website is SQL Injectable

I think I found an SQL vulnerability; the request and response can be found below. I'm not sure because it is showing a normal error (it's in French) instead of showing an SQL error. I also tried to ...
2
votes
0answers
92 views

HTML Form to PDF vulnerabilities

I have a form where the user inputs data. On the back end, I'm taking some of that data and embedding it into a PDF using ActiveReports. I then display it back to the user and save a copy on our ...
2
votes
0answers
37 views

Issuing Personal Access Tokens for my APIs

I have an intranet site, hosted locally within my organisation. The same site also exposes some data through various web services. It's written using ASP.NET MVC 5 and WebAPI 2. At the moment users ...
0
votes
0answers
165 views

XXE injection in root node of XML document

So I'm on an engagement and discovered an XXE injection point in a peculiar place on a ASP.NET app that I can't seem to get my head around. One of the post parameters controls what "form" the rest of ...
0
votes
0answers
121 views

Session Fixation in ASP.NET

I am testing ASP.NET application, where session id (ASP.NET_SessionId) is not renewed after login. Actually it is renewed when I use browser, on the login page server sends: Set-Cookie: ASP....
3
votes
0answers
95 views

String Serialization in .NET [closed]

I am currently performing a secure code review of Fortify reported issues and segments of code flagged relates to current session state being stored in memory. By default, the framework .NET ...
3
votes
1answer
844 views

Two solutions for CSRF on OWASP for ASP.NET WebForms

I am confused about differences between those two solutions from OWASP ASP.NET Web Froms Guidance Solution one: While viewstate isn't always appropriate for web development, using it can provide ...
1
vote
1answer
209 views

attack path alternatives for XXE

So I've found a blind Xml External Entity (XXE) attack against a SAML infrastructure while on a client engagement but it has been giving me fits trying to exploit it earlier. I can construct a simple ...
4
votes
2answers
235 views

How to securely store user-specific mail server credentials at the server side of a web application

I have an asp.net web app that generates emails when users perfrorm actions...these emails are generally notifications to other users that they should see/do something. The users can be internal to ...
0
votes
2answers
301 views

How to extract data using SQL injection on a vulnerable ASP.NET application?

I managed to find a vulnerability in a so-called friend of mines website and I want to show him that his website is vulnerable to data extraction. When I use something like yes')-- as post I get the ...
0
votes
0answers
1k views

Prevention of host header injection in ASP.NET?

How can we mitigate host header injection in ASP.NET? I have already configured application binding in IIS and set static hostname but still, the vulnerability exists.
0
votes
0answers
162 views

ViewStateUserKey .NET CSRF protection

In a typical PHP web application you append a hidden CSRF Token in each form and this token is validated when the request is submitted in the server side. I am performing a penetration test in a .NET ...
2
votes
2answers
547 views

XSS issues for hidden fields in .NET

We have a .NET 4 web application with a few hidden form fields. When the site was tested for XSS vulnerabilities, these hidden fields were the first victims. How can we protect and safeguard our ...
1
vote
0answers
52 views

Is my website being checked for vulnerabilities or being attacked? [duplicate]

I have a website running on windows hosting with plesk 11 version and website is based on .net 4.5 by default PHP is also active for this website but is not being used. I have disabled PHP as i am not ...
2
votes
1answer
77 views

Is AntiForgeryToken needed for newsletter subscription?

General recommendation is to include an anti-forgery token in all POST requests, but is it needed for email newsletter subscription form? Many single page scrolling sites have email subscription ...
0
votes
1answer
84 views

What attacks is my website subceptable to and how can I prevent them? [closed]

I am developing a website using this book. From my knowledge and from the book, the major issues that I would have to look out for are XSS, CRSF and SQL injection attacks. I have found that there is ...
-4
votes
1answer
150 views

Why isn't ASP.NET source code compiled before it is published?

Why doesn't Visual Studio compile the source code (.cs) automatically before publishing, since they know perfectly well that the end-product website is going public? (Unless you're just building the ...
0
votes
2answers
210 views

Is this a true CSRF attack?

I have been fixing a asp.net web forms application that has a number of vulnerabilities that were discovered by an outside pen testing firm. I have recently implemented a double submit cookie with ...
3
votes
1answer
117 views

A security audit wants encypted user/pass for login in asp.net - this seems pointless or is it not?

We are using asp.net mvc, using forms authentication. Username and password is sent to the server with TLS with a strong secure certificate. Their justification for this: threat: "the web server uses ...
5
votes
2answers
543 views

Vulnerable framework and IIS server version's are being displayed in an error page of a 3rd party application

As security tester, I need to report and justify that a security misconfiguration in a 3rd party application is a risk to us. Following is the scenario: 1.) There is a 3rd party application which ...
2
votes
1answer
6k views

Secure flag not set to Cookies in .Net MVC application

I have included the below lines of codes in my Web.Config and Glbal.asax.cs files, but still when I use developer tools in the browser I the secure flags were not set for the below cookies. Also ...
1
vote
1answer
132 views

How background services perform token based Api Authentication?

I am implementing JWT token based authentication for our WebAPI in order to restrict data access through the API (e.g. client sends username / password and the api provides a jwt token valid for x ...
3
votes
1answer
687 views

Securing a multi-tenant API with SSO and different roles per tenant

I am working on developing a REST API that will be used by first party clients that we develop, and third party clients in the future. The first party clients include a SPA client side application, ...
3
votes
1answer
1k views

How to brute force a login page of an IP camera created in .asp?

I am new to stackexchange. I desperately need some help. I am doing my thesis on 'IoT Threats', one of my objectives is to try to brute force into an IP camera. I am using Kali Linux Hydra to do the ...
3
votes
1answer
328 views

ASP.NET - why default SecurityStamp validation interval is set to 30 minutes?

I'm currently studying authentication mechanisms in ASP.NET Core and came across SecurityStamp feature, which is known also from ASP.NET Standard. From what I understand from the answer here, this was ...
1
vote
2answers
865 views

Is CSRF protection useless with AJAX?

I've asked a question regarding an ASP.NET WebAPI implementation of CSRF protection: https://stackoverflow.com/questions/45389512/the-anti-forgery-cookie-token-and-form-field-token-do-not-match-when-...
1
vote
2answers
585 views

Can http referrer value be used to stop spam bots?

I have a public sign up site, and when they click submit, a verification text message goes out to the phone number specified in sign up by calling an aspx page via ajax. I don't want spam bots sending ...
1
vote
1answer
416 views

ASP.Net usage of the Machine.config file

In ASP.Net, the normal way of encrypting an object ( as an exmaple a user cookie in the server side ) is read the shared key located in the machine.config file. The machine config file contains ...
5
votes
1answer
256 views

ASP.Net Secure Connection String in Cloud Hosting

Background In a normal bare metal hosting (IIS) we can use Integrated Security(eg : With AD) and hence, the config entry do not contain the connection string's plain text password. Or we can ...
0
votes
2answers
479 views

Is it safe and secured to use Mono-Project for Ubuntu to run a ASP.NET with a MySQL database?

I am looking to rent a VPS server to host a game server, MySQL database and an ASP.NET site on it. A Windows server is too expensive for me but Mono-Project for Ubuntu does everything that I need it ...
3
votes
1answer
362 views

ASP NET Core Identity password reset form prompts for email address

I notice that the default ASP.NET Core Identity templates ask for email address after the reset email notification link has been followed (i.e. the "choose a new password" form in the ResetPassword....
4
votes
1answer
758 views

User authentication in JavaScript application

I'm developping a web application which will be communicating with a server over WebAPI. The server side will be on Azure and the client side will be on custom hosting with a JavaScript application (...
2
votes
3answers
581 views

How to defend against web server security scanners? [closed]

I'm developing/hosting an Asp.Net IIS Website on AWS. I have added StackExchange.Exceptional, and in the first days, I get exceptions about attempts to access pages like: /CFIDE/administrator/ and ...
0
votes
1answer
276 views

Secure compiled .NET source code applications ASP.NET and Windows Forms [closed]

Right now I'm working as a software development leader in my enterprise. Here's the main issue of everything. A software developer that works with us. There has been some rumours about this user ...
1
vote
1answer
148 views

What does setting Unrestricted = false on PrincipalPermission supposed to do?

I am doing some maintenance on a 10 year old ASP.net web-forms application. It has a business layer that has its methods protected by System.Security.Permissions.PrincipalPermissionAttribute, like ...
2
votes
1answer
5k views

Bypass Asp.Net 4.6 “A potentially dangerous Request.QueryString value was detected from the client”

I'm testing an application where the application does not handle special characters but request validation in ASP.NET picks it up and throws an exception. There have been some different ways to ...
1
vote
1answer
36 views

Returning parameterised view

So I just came across this nasty looking piece of code. public ActionResult Display(string viewName) { return View(viewName); } I would avoid having that parameter or at least I would get ...
1
vote
1answer
370 views

asp.net+bearer token: Tampering of claims possible?

I am experimenting with an OAuth2 authentication in an asp.net web-service. When accidentally generating a huge amount of claims I've discovered that the bearer token increases drastically in size. ...
3
votes
2answers
1k views

Code injection in .NET possible?

I wonder whether code injection is possible for .NET-based web applications as defined by OWASP. After performing some research on .NET and code injection there is something called code injection in ...
4
votes
1answer
1k views

What specifically is “potentially dangerous” about an ampersand in a URL

ASP.NET includes a request validation system that halts page processing if any of the following characters are present in the path portion of the URL < > * % & : \ ?. Instead of the normal ...
-1
votes
1answer
637 views

windows authentication vs ADFS

I have an ASP.NET website hosted on premises and only accessible by my company. I discovered that if I connect it to a server in the DMZ (open to the internet) even though the IIS folder is set to ...
1
vote
0answers
94 views

How can I audit the modules and stage markers in OWIN's authentication pipeline?

ASP.NET's OWIN (in MVC4 and Katana) allows for various objects to be added to the HTTP processing pipeline. I want to ensure that there are no rogue Nuget packages no hard to find partial classes ...
2
votes
3answers
1k views

ASP.Net Web API make HTTPS Mandatory

Is there any programmatic way that where I can mandate the HTTPS in my ASP.Net Web API? I need to perform this for all HTTP methods in my Web API. Can we mandate HTTPS to specific HTTP messages as ...