From 31d499779878cd34d27b570766bfd1f284127700 Mon Sep 17 00:00:00 2001 From: Souradip Ghosh Date: Wed, 10 Sep 2025 16:09:13 +0530 Subject: [PATCH] feat: introduce vulnerable sample --- Program.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Program.cs diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..f8dbbb9 --- /dev/null +++ b/Program.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using System.Data.SqlClient; +using System; +var app = WebApplication.Create(); +app.MapGet("/token", () => new Random().Next().ToString()); +app.MapGet("/user", (string id) => { + var conn = new SqlConnection("..."); + var cmd = new SqlCommand("SELECT * FROM Users WHERE Id = '" + id + "'", conn); + return "ok"; +}); +app.Run();