News for hackers. Stuff that matters.
Re:Finding an authorization bypass on my own website by btschaegg on Sunday March 06, 2022 @03:37AM (#30576022)
If ADO.NET counts as a library for you: Parameterized queries for MS SQL through ADO.NET.

They are seemingly run through a stored procedure on the server side, with each parameter passed in as an argument. This has some consequences that lead to very obscure behavior, too [1].

For example, you should never create temporary tables in an SQL statement that was initialized with parameters, as they won't survive the end o the statement; they will be destroyed as soon as the innermost scope (within the stored procedure call) finishes.

I ran into this because I tried setting up a single "run this query" method in a more complicated database routine in order to keep my C# code clean... didn't work out as I'd hoped ;)

[1]: https://stackoverflow.com/a/46311328

Edit: I just realized that this still isn't a guarantee that parameters are handled as a separate structure by the underlying network protocol. I hope they are -- but I don't know how to check. Maybe the according .NET Core code is on GitHub?

Re:Finding an authorization bypass on my own website by nightski on Sunday March 06, 2022 @01:32PM (#30579801)
Just run SQL Server Profiler. You can see what is hitting your server, it's a very useful tool.