security

How to restrict usage of an API key with Hash comparison

断了今生、忘了曾经 提交于 2021-02-10 06:22:07
问题 I'm currently using Spotify in my Android app, but I am required to use a Secret in order to refresh tokens and such. I would like to transmit the secret from my Backend to the app, so the secret does not reside in the APK and cannot be found when decompiling. I've read a lot only about securing secrets in your app, via various ways like proxies, just using your own backend, putting the code into native C++ code (NDK) in the app or using the Hash of the app to determine whether the app is

Preventing cookie replay / cookie use by more than one client

℡╲_俬逩灬. 提交于 2021-02-10 06:08:54
问题 What is the "best practice" to prevent a valid cookie from being used by more than one client at a time in ASP.NET MVC? In this scenario, we are using all the OWASP tricks. Strict HSTS: HTTPS/SSL on every page Cookies are listed as HTTPS-only Cookies are marked secure Cookies have a short expiration There is also code to prevent cross-site request forgery (XSRF) from altering values page to page. That's all great and prevents users from changing values, but it doesn't prevent a bad actor from

Preventing cookie replay / cookie use by more than one client

我的未来我决定 提交于 2021-02-10 06:04:24
问题 What is the "best practice" to prevent a valid cookie from being used by more than one client at a time in ASP.NET MVC? In this scenario, we are using all the OWASP tricks. Strict HSTS: HTTPS/SSL on every page Cookies are listed as HTTPS-only Cookies are marked secure Cookies have a short expiration There is also code to prevent cross-site request forgery (XSRF) from altering values page to page. That's all great and prevents users from changing values, but it doesn't prevent a bad actor from

Why am I allowed to exit main using ret?

杀马特。学长 韩版系。学妹 提交于 2021-02-10 05:14:20
问题 I am about to figure out how exactly a programm stack is set up. I have learned that calling the function with call pointer; Is effectively the same as: mov register, pc ;programcounter add register, 1 ; where 1 is one instruction not 1 byte ... push register jump pointer However, this would mean that when the Unix Kernel calls the main function that the stack base should point to reentry in the kernel function which calls main. Therefore jumping "*rbp-1" in the C - Code should reenter the

Why am I allowed to exit main using ret?

白昼怎懂夜的黑 提交于 2021-02-10 05:10:46
问题 I am about to figure out how exactly a programm stack is set up. I have learned that calling the function with call pointer; Is effectively the same as: mov register, pc ;programcounter add register, 1 ; where 1 is one instruction not 1 byte ... push register jump pointer However, this would mean that when the Unix Kernel calls the main function that the stack base should point to reentry in the kernel function which calls main. Therefore jumping "*rbp-1" in the C - Code should reenter the

Why am I allowed to exit main using ret?

独自空忆成欢 提交于 2021-02-10 05:07:11
问题 I am about to figure out how exactly a programm stack is set up. I have learned that calling the function with call pointer; Is effectively the same as: mov register, pc ;programcounter add register, 1 ; where 1 is one instruction not 1 byte ... push register jump pointer However, this would mean that when the Unix Kernel calls the main function that the stack base should point to reentry in the kernel function which calls main. Therefore jumping "*rbp-1" in the C - Code should reenter the

Why not have the public key in JWT payload for convenience

为君一笑 提交于 2021-02-10 05:01:17
问题 As I understand it: to check the validity of a JWT created using an asymmetric public/private key encryption algorithm, you require the public key along with the JWT header, claim (aka payload) and signature. The JWT header and claim can be decoded freely but can't be verified without the public key to validate the signature with (which is based on the header & claim and created with the private key). My question is, why not just bundle the public key into the claim payload of the token. That

Why not have the public key in JWT payload for convenience

孤街浪徒 提交于 2021-02-10 04:57:06
问题 As I understand it: to check the validity of a JWT created using an asymmetric public/private key encryption algorithm, you require the public key along with the JWT header, claim (aka payload) and signature. The JWT header and claim can be decoded freely but can't be verified without the public key to validate the signature with (which is based on the header & claim and created with the private key). My question is, why not just bundle the public key into the claim payload of the token. That

Determining the current security checks being made (SQL Server)

白昼怎懂夜的黑 提交于 2021-02-09 01:57:25
问题 One thing that I've always hated more than just about anything in MS SQL Server is the way that security works. The security context constantly switches if you look at the server funny and it's often very hard (for me anyway) to predict or debug. In dealing with an issue today, I though, "I wish I could just add a line to my code that would display the security context that SQL Server is using when this code runs." Does such a command exist? For example, SELECT security_context() To be a

Guidelines to build a secure JWT authentication process?

女生的网名这么多〃 提交于 2021-02-08 15:14:54
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 3 hours . AndreaCostanzo1 wants to draw more attention to this question. Recently I needed to build a simple REST API and I read different articles on best practices to reduce as far as possible the vulnerabilities of my web app. Searching online I found different tutorials on how to implement JWT tokens, every one different in some aspects, and I couldn't find a well