How do you protect your software from illegal distribution? [closed]

There are many, many, many protections available. The key is: Assessing your target audience, and what they’re willing to put up with Understanding your audience’s desire to play with no pay Assessing the amount someone is willing to put forth to break your protection Applying just enough protection to prevent most people from avoiding payment, … Read more

Where do you store your salt strings?

The point of rainbow tables is that they’re created in advance and distributed en masse to save calculation time for others – it takes just as long to generate rainbow tables on the fly as it would to just crack the password+salt combination directly (since effectively what’s being done when generating rainbow tables is pre-running … Read more

With HTTPS, are the URL and the request headers protected as the request body is?

Quoting the HTTPS RFC: When the TLS handshake has finished. The client may then initiate the first HTTP request. All HTTP data MUST be sent as TLS “application data”. Essentially, the secure SSL/TLS channel is established first. Only then the HTTP protocol is used. This will protect all the HTTP traffic with SSL, including HTTP … Read more

Will HTML Encoding prevent all kinds of XSS attacks?

No. Putting aside the subject of allowing some tags (not really the point of the question), HtmlEncode simply does NOT cover all XSS attacks. For instance, consider server-generated client-side javascript – the server dynamically outputs htmlencoded values directly into the client-side javascript, htmlencode will not stop injected script from executing. Next, consider the following pseudocode: … Read more

Cross Domain Login – How to log a user in automatically when transferred from one domain to another

Single sign-on (SSO) is conceptually pretty simple. User hits domain1.com. domain1.com sees there’s no session cookie. domain1.com redirects to sso.com sso.com presents login page, and take credentials sso.com sets session cookie for the user sso.com then redirects back to domain1 to a special url (like domain1.com/ssologin) the ssologin URL contains a parameter that is basically … Read more

Is it safe to enable CORS to * for a public and readonly webservice?

Here’s something relevant from the Fetch spec (which defines CORS): Basic safe CORS protocol setup For resources where data is protected through IP authentication or a firewall (unfortunately relatively common still), using the CORS protocol is unsafe. (This is the reason why the CORS protocol had to be invented.) However, otherwise using the following header … Read more

Is it possible to reverse a SHA-1?

No, you cannot reverse SHA-1, that is exactly why it is called a Secure Hash Algorithm. What you should definitely be doing though, is include the message that is being transmitted into the hash calculation. Otherwise a man-in-the-middle could intercept the message, and use the signature (which only contains the sender’s key and the timestamp) … Read more