I have built a WebApp on ASPNET Boilerplate fw and used protocol HTTPS. I used Burp Suite Community Edition to test and found a risk related to Replay Attack. The root cause is from Token based design, the token is not revoked after user logout. So is there any walkaround to overcome it?
Testing steps:
Could anyone give me some advices? Thanks
I have resolved this issue by update security stamp. This will hurt performance but fix my security risk. If anyone have a better solution, please share. Thanks
In AccountController.cs
var user = await _userManager.FindByNameAsync(User.Identity.Name);
await _userManager.UpdateSecurityStampAsync(user);
await HttpContext.SignOutAsync(IdentityServerConstants.DefaultCookieAuthenticationScheme);
In StartUp.cs
services.Configure<SecurityStampValidatorOptions>(options =>
{
//Enables immediate logout, after updating the user's stat.
options.ValidationInterval = TimeSpan.Zero;
});