Recipient non-repudiation in secure e-mail transport PGP works well to provide many key aspects of information security; message confidentiality and integrity, sender and recipient authenticity, and sender non-repudiation (the sender, who has digitally signed the message using their own private key, cannot claim that they did not in fact send the e-mail). However, one thing it doesn't seem to provide is recipient non-repudiation; the recipient can still claim that they didn't receive the sender's e-mail, when in fact it was received, read and understood.

Most measures in place to provide this are voluntary on the part of the recipient; they can choose to send a "read receipt" to the sender indicating they received the message. These are e-mails, and like any, they can be spoofed unless the receipt is digitally signed by the recipient as the original message was by the sender. Or, the recipient can opt not to send the read receipt. In some cases, some e-mail providers and some e-mail programs/plugins even allow a recipient to send a fake "undeliverable" response to the sender (this is a strategy for fighting spam; by making your address look invalid to the spammer, he's encouraged to remove it from his mailing lists).

So, two questions; first, is there any existing scheme that enforces mandatory recipient non-repudiation measures? And second, if there isn't, what might you posit as a workable solution to provide this as an extension to PGP?

Something I thought of would require third-party participation of some kind. Normally, a PGP -encrypted message includes the symmetric key, encrypted with the recipient's public key, both sent directly to the recipient. What if, instead, that encrypted key were sent to a trusted third party "key holder", such as the sender's "home" e-mail server, along with the recipient's public-key certificate? The key holder can be authenticated with its own public-key certificate, thus also allowing secure communication between all parties including the key holder. Then, the message sent to the recipient would include a "pointer" to the key holder and a nonce identifying the message.

In order to actually read the message, the recipient needs to get the key from the key holder, so the recipient crafts a request for the key, signed with their certificate, and sends it to the key holder. The key holder uses the recipient's certificate (which the sender had provided along with the encrypted message key) to verify that it is the intended recipient asking for the key, and complies. The key holder now has proof that the intended recipient received the message they were asking about and is attempting to read it, and can inform the sender of that fact. This is a pretty strong "read receipt", IMO; you can't prove, beyond a shadow of a doubt, that the message actually was read top to bottom, line by line, and its content understood by the end user, but you can at least prove that you led the horse to water.

Thoughts?

There are several challenges in transposing the "read receipt" concept to the world of emails. An important point to make is that read receipts are legal weapons aimed at the recipient; they are meant to be used as proofs, during some litigation against the recipient, that he indeed received it and thus can be presumed to have been aware of the message contents. The recipient is then the attacker, the villain in our story. We cannot expect his full collaboration.

There are two distinct scenarios here: the recipient might be interested in the message contents, or he might not be (for instance, he might expect a legally heavy notification and will not want to touch it with a 10 feet pole).

Let's see what happens with classical mail:

The sender (let's call him Stuart) wants to send an important message to the recipient (Robert), and wishes to obtain a receipt that, should the worst happen, will be flourished by Stuart's lawyer during a subsequent trial, as a proof of Robert's duplicity.
Stuart writes the letter and trusts it into the care of the local Postal service.
The letter ultimately comes into the hands of the postman (sorry, the mail-delivery person) who will knock at Robert's door.
If Robert answers, he will have to sign a receipt, under the supervision of the postman. The postman will not give him the letter until he has signed. If Robert is not present, the postman will leave a notice in Robert's mailbox, and Robert will go fetch his letter as the Post office; a similar signature procedure will take place there, with the office clerk.
The receipt is again transferred back to Stuart by the Postal service.

The postman is rather central in the whole procedure. Let's see what he does:

Confidentiality

Until he has signed the receipt, Robert has no knowledge of the message contents. This whole process assumes that the Postal service is trustworthy and ensures total mail confidentiality over the entire transit of the message. This property does not translate well to emails, because emails may travel unencrypted over the wires; PGP encryption with Robert's public key would not help, because in our scenario Robert is the eavesdropper.

Simultaneity

In the classic mail scenario, when the postman faces Robert, the postman is the Master of Ceremony: he ensures that Robert will not get the letter until he has signed the receipt, but he also ensures that Robert will get the letter if he has signed the receipt. When Robert is on the verge of signing, the letter is already on the premises; there is very little risk of losing it. Even if a really freak event occurred (e.g. a stray dog deftly snatches the letter from the hands of the postman and runs away with it), the postman would know it, and cancel the receipt. Also, Robert, by signing the receipt, shows that he is awake, understands what is going on, and is generally in full possession of his legal abilities. All of this occurs under the eyes of the postman, who could testify about the proceedings.

These characteristics allow the judiciary power to assume that if Robert signed the receipt, then he did receive the message. Reading the message is his responsibility; Robert will be considered as having read it (if he wants to claim otherwise, the burden of proof will be on him).

Electronic communications do not allow for such simultaneity. In email delivery protocols, like IMAP, POP or all the Webmail reader engines, there are only two possibilities: either the the recipient first gets the message and then acknowledges reception, or the recipient first sends the acknowledge and then obtains the message (most protocols choose the former). An honest Robert would be wont to send a signed receipt for a message he did not obtain yet and might never obtain (he has no actual guarantee that the server on the other side will not crash at that exact point); a dishonest Robert will arrange for never sending the final acknowledge, so that he could claim that his computer crashed at the wrong moment.

One partial solution is to have a trusted reliable delivery service -- a virtual postman, really. That is a service which will be imbued with all the official blessings that can be bestowed upon an administrative organization by the State; its mission is to deliver messages, but also to keep copies for a long time (say, three months). Honest Robert would agree to send a signed receipt to the Virtual Postman because he trusts that if the VP sent him a notification, then the message exists, the VP will not lose it, and he will be able to obtain it again from the VP even if his computer catches fire and he has to buy a new one. Under these conditions, a signed receipt before delivery can be legally required from Robert. This potentially fixes the technical issues of Robert obtaining the message first. But it requires a trusted VP.

The system you describe with the message key and the nonce is of that kind; the "sender's home e-mail server" plays the role of the trusted VP. But bear in mind that the VP must be trusted by both Stuart (Stuarts need the VP to keep the message from Robert until the receipt is duly signed) and Robert (Robert needs the VP to guarantee the delivery of the message, otherwise he will not sign the advance receipt).

Signature

To have any legal validity, Robert's signature on the receipt must fulfill the characteristics required by the Law. This depends on the country and its legal framework. For classical mails, the signature's power is not really in the squiggly line that Robert draws on the paper; it is known that some good con-artists can forge signatures, and, anyway, simply verifying that the signature is correct requires training. The real force of the signature comes from, again, the postman. The postman is a witness: he saw Robert signing. Refusing to recognize one's own signature is a serious offense, which is often punished with much greater severity than whatever a letter could entail.

In the world of computers, there is no witness. Robert could claim that his computer caught a virus and was under the control of someone else; the legislator cannot realistically enforce a requirement for all citizens to have virus-free computers. If the signature mechanism is of the asymmetric cryptography persuasion, then Robert could claim that the key is not his. This is especially true of decentralized systems like PGP and its Web of Trust: at one point, I counted no less than five distinct PGP keys bearing my own email address and uploaded on key servers, none of which being mine.

For any legal value attached to the receipt signed with an asymmetric algorithm, the corresponding public key must be provably bound to the signer's legal identity. This requires a lot of legislation and a State-operated (or at least State-subsidized) PKI: vital records and citizenship are, by definition, a monopoly of the State. I seriously doubt that a State would use the OpenPGP format for that; this is more a job for a hierarchical PKI, for which OpenPGP has no specific support (hierarchical PKI is about delegation of trust and power; this entails a lot of details which can be seen in the complexity of X.509, which tries to deal with it upfront).

Evasive Maneuvers

Robert may try to "play dead". This is hard to do with classical mail: you have to avoid the postman, hide when he rings at your door. You must not confront him because he is, as we saw, a presumed trustworthy witness. Positively refusing to sign the receipt is incriminating: it shows that you are aware that officially reading the message contents may have consequences. The bottom line is that playing dead with classical mails often equates to forfeiting mail reception altogether; this is not a ultimately tenable situation. All Roberts must yield, and sign the receipts, because the alternative is to figuratively cross the sea and then burn their vessels.

There is no such thing with emails. An email address can be dropped, since new ones are just free. It took me some effort to actually maintain my primary email address since 2001. Also, if I receive a notification telling me that an important message awaits me on some server somewhere (that I did not heard of before), then I can ignore it altogether: what does this server matter to me?

(For a substantial proportion of the population, the classical mail model could be transposed to Facebook: Facebook could be the postman, forcing the recipient to either sign the receipt, or totally abandon Facebook, an unthinkable eventuality for the millions of addicts to that site.)

Summary

This is a hard problem for which no solution exists yet; the technical tools are ready (e.g. asymmetric signature algorithms), but it also needs some infrastructure which will need official support, will be expensive, and won't be of any use until is has become so important that it cannot be ignored. This looks like a problem which will not be solved any time soon.


How can I execute a XSS when a web application transforms a data from lowercase to uppercase? I'm testing a web application, when I send an input data to web application, this places the data in an onclick function, something like this:

link

But, the web application transforms that data from lowercase to uppercase, then if I replace dataFromServer for ','0');alert('XSS');someFunction(', I have the following result:

link

So, my XSS exploit doesn't work, because, the browser says "ALERT is undefined", I have tested on Firefox and IE.

Is there some way to execute a XSS in this case?

You can encode the letters using ampersand and numbers (html encoding). a = &#x41; or &#x65; and so on.

JavaScript code can be encoded without using alphanumeric characters. The easiest way to do this is to check out: http://www.jsfuck.com/
This site can encode it for you.


Why do we need IDS/IPS if a firewall is present? Why do we need IDS/IPS if a firewall is present?

Functionally, they are two different applications, but they are often meshed together because the monitoring process tends to be at the edge off the network. Many times you see UTM (Unified Threat Management) which are firewalls with IPS/IDS services integrated as a subscription.

Firewalls serve to control the inbound/outbound connections into an environment based on static rules (Stateful Firewalls). Your more advanced firewalls can work up at the application level (Application Firewalls), which is why at some companies you can browse FB, but not play any of its games.

IPS/IDS serve to monitor connections for malicious activities mainly through signature based detection (similar to AV). Attacks have certain patterns and depending on your setup you can be alerted or have the system take action on those patterns.

You can generalize it, I suppose, to firewalls limit the types of connections you will allow into the network based on static rules, and IPS/IDS monitor those connections for malicious activity based on signatures and understanding of attacks.

As CoverosGene and Xander said, it part of using Defense in Depths, but technically they're two different services that tend to operate in tandem.


What are Security Practices for NoSql databases I want to know what are the best practices to secure NoSql database like MongoDB. How is it possible? Any tips?

For mongodb i have written this answer

First vulnerability similar to sql injection can be done in mongodb or nosql databases too.
which would be mongodb injection.

Try to run mongodb on different port instead on default 27017 to avoid exposing.
For official security practices you can always check out
 http://docs.mongodb.org/manual/administration/security/

It tell security practices that should be used with mongodb server.

Mongodb Injection :

its fully describes here for php how mongodb injection can take place in phpwebapp if client side data is not filtered properly. Also solution to mongodb injection too

http://www.idontplaydarts.com/2010/07/mongodb-is-vulnerable-to-sql-injection-in-php-at-least/

Mongodb Null byte injection attack

http://www.idontplaydarts.com/2011/02/mongodb-null-byte-injection-attacks/

This is also a type of attack that is well written on this site , Have a look how
certain fields in mongo collection can be overwritten using this method can this can be done in any webapp.


Can timing attacks over a webservice be eliminated by standardizing the time it takes to return a request? For example, would this (pseudo)-code work?

let t = timeRightNow()
let message = stuffWhoseTimingCantBeLeaked()
waitUntilTime(t+1 second)
send message

Or similar? That way the time that the message is sent doesn't depend on the timing of stuffWhoseTimingCantBeLeaked().

Would an attacker still be able to determine how long stuffWhoseTimingCantBeLeaked() took to run?

As long as t + s is sufficient to cover any delays in responses introduced by a DDoS style attack, where s is the number of seconds.

That is, hitting a service listener that calls the above in order to encourage stuffWhoseTimingCantBeLeaked() to take longer than s could reveal to the attacker how long, on average, stuffWhoseTimingCantBeLeaked() takes to execute, once the t + s barrier is broken.

To mitigate this, you could mask this extra time by detecting when your function takes longer:

let t = timeRightNow()
let s = 1
let waitTime = t + s
let message = stuffWhoseTimingCantBeLeaked()
let executeTime = timeRightNow() - t

if timeRightNow() > waitTime
  waitUntilTime(timeRightNow() + executeTime * csprng(2,1)) # Random wait of between 1 and 2 times the original execution time (integer)
else
  waitUntilTime(waitTime)
send message

Note though, with enough requests it might be possible to get an average that will even out, leaking the time taken to execute stuffWhoseTimingCantBeLeaked().

With higher values of s, the risk can be lowered further, at the expense of performance. You could also introduce detection of whether your web service is requested repeatedly from a certain user or IP address and then rate limit the connection.


How to demo Skype-decryption using FOSS tools? I'm preparing a presentation on Skype networking. And I'd like to demo decryption.

I found a good approach to decrypting the TLS packets captured with WireShark in this blog post:

Rob Andrews, BlueCoat.com, 2014-01-02, Exploring encrypted Skype conversations, in clear-text (Archived here.)

And I'd like to replicate the general setup scheme on Linux but without using the proprietary tools from the original setup shown here:

I've looked around and found that ssldump could be a suitable tool but some of the tutorials on it are quite complicated. Moreover, they use ssldump independently and without WireShark.

Background:

Just to clarify, this is for research purposes so you can assume that we have all the certificates or permissions that might be required.

My question is:

Has anybody reproduced this scheme with free tools?
If so, what would be the main steps to follow?

After reading this post you provided, they only seem to be doing MITM and re-signing the certificates that Skype is using during the transmission (something really common when we use HTTP/S proxies), but in this case, for other TCP traffic that is not HTTP.

TCPcatcher may help you, more specifically, this tutorial (as a guidance, but applying for Skype ports/protocol): http://www.tcpcatcher.org/monitoring_IMAPS.php

Also, take a look at this thread, where they discuss about doing SSL MITM for all kind of TCP traffic: https://security.stackexchange.com/a/33376

Hope it helps.


Why don't WiFi networks tell you that you have the wrong password? On my Ubuntu if I enter the incorrect password for a WiFi, there is a brief pause and then I am prompted to enter it again. With the identical dialogue. I noticed the same, or similar behavior with several other devices. That is, you are not explicitly told that you gave the wrong password, instead you see that something is not working, but don't know what.

I am wondering, is this behavior specific to the user interface that handles connection to the WiFi, or is it an intrinsic part of a protocol or a standard that is used by WiFi? Are there some safety reasons behind this behavior?

Normally, behaviour like this is implemented to prevent Side Channel attacks.
The different behaviour of getting a message that is completely invalid and one that is partly correct can be exploited to recover the key.

This allows for a very hollywood-style decryption; recovering the high-order bytes first (here RSA)

In WPS this type of attack allows you to brute force the 8-digit key in max 1.1*10e4-2 tries. one digit is a checksum, so this is known. The access point returns a different error if 3 digits are correct. So this is bruteforced first in max 999 tries, leaving max 9999 tries for the rest of the PIN

However:

The RFC protocol specification of EAP, a widely used authentication, does not forbid the signaling of failed authentication
And
the IPhone does show this specific error


How can I know if my PC is getting infected? I have installed an antivirus, but as no antivirus is perfect, what can I do to diagnose if my PC is getting infected?

For example, keeping a close eye on what programs and tasks run when I turn my PC on. And after installing new programs, see if there are changes, etc... If there is a change that I cant justify, I will kill that thing while I can, right?

Also I can get feedback from google to see if a process is malicious or healthy, but sometimes virus are names like healthy proceses... mmmmm

The short, pithy answer is that you don't. There is some extremely stealthy malware out there. Look at stuxnet, flame, and some of the banking trojans as examples. If a sophisticated enemy is out to get you chances are you won't know you've been hacked.

That being said it's extremely unlikely that you are ever going to be targeted by anything that sophisticated. Chances are you are like the majority of people trying to defend themselves against an average level of threat, in which case you do what we all do:

patch your system. Most of your typical hacks target well-known vulnerabilities that have been patched for weeks, or even years. They target OS vulnerabilities but also adobe flash, java, adobe reader, etc. Make sure that you patch all your software as soon as patches come out
Install a good AV and run scans frequently (looks like you've got this covered)
narrow your system's attack surface. The more software you have installed the wider your attack surface is, so uninstall all software you don't use, especially the crappy bloatware that most out of the box systems have installed
harden your system. Ensure that you have no guest accounts, and that all accounts have strong passwords. Turn off any service or process that isn't needed

As for knowing if you've been hacked it's usually pretty obvious unless you have been infected by stealth malware: you'll get pop-up ads, redirects to sites you didn't intend to visit, threatening messages telling you to pay money or have your life destroyed, your fiends will tell you that they are receiving spam from your email address, somebody in Timbuktu will buy a laptop using your credit card details, and you'll find out that somebody's used your personal information to apply for 40 different loans completely destroying your credit rating, or someone will siphon your life savings into a cayman islands bank account.

Good luck, and happy browsing.


Could SAML assertion/token be shared or reused between service providers? SAML noob here, I have an idea implementing permission(authorization) outside of IdP, which effectively become a "Permission Service Provider", so  say when an application (another service provider) that authenticate against the IdP via saml protocol, is there something the application could use in the saml response from the IdP to pass to the Permission Service Provider to authenticate the request?

In an OAuth2 world I presume this is done via the OAuth token but I am unfamiliar with SAML.

Just did a bit more digging, found something call ”SAML 2.0 federation“, according to the wiki about ADFS and IBM doc it's a built in feature.


Why are packets constantly being sent to international ISPs? When using a packet sniffer, I notice a lot of packets being sent to a bunch of ISPs (such as axion.ca, wanadoo.fr/orange?, bresnan.net, zebra.lt) usually all at the same time. Here's a screenshot of the hosts in SmartSniff. I happen to live in none of these hosts' countries, so this is very strange.

Is this a normal thing, or maybe a side-effect of an infection?

Given the uncommon high ports and that the hostnames look like IP addresses from normal consumers I would suggest that this is peer-to-peer traffic. There are several legal or mostly legal programs which are doing peer-to-peer like Skype, Bittorrent and other file exchange programs. But peer-to-peer techniques are also used by malware like Zeus.

Since it is not known what you deliberitly run on your system one can not decide if these connections are caused by software which you run intentionally or by software which you run unknowingly, i.e. malware.


Is it dangerous to compile arbitrary C? I have a small server and I would like to check compile times on C programs provided by users.  The programs would never be run only compiled.

What risks are there to allowing users to compile arbitrary C using gcc 5.4.0?

A bit of a weird one, but: it's a denial-of-service risk, or potential information disclosure.

Because C's preprocessor will cheerfully include any file specified in an #include directive, somebody can #include "../../../../../../../../../../dev/zero" and the preprocessor will try to read to the end of /dev/zero (good luck).

Similarly, especially if you let people see the output of their compilation attempts, somebody could try including various files that may or may not be present on your system, and could learn things about your machine. Combined with clever usage of #pragma poison, they might even learn things about the file contents even if you don't provide full error messages.

Relatedly, pragmas can alter a lot of preprocessor, compiler, or linker behavior, and are specified in source files. There's probably not one that lets somebody do something like specify the output file name or something like that, but if there is, it could be abused to override sensitive files, or get itself executed (by writing into cron or similar). There might be something similarly dangerous. You really should be careful about compiling untrusted code.


Is CIFS/SMB (Folder Sharing in Windows) secure? I have to back up some data from windows 7 machines over the internet, and I rarely use windows so am distrustful of it in general.  Specifically:

Is there any sort of check that the server is the same as it was last time, so you have some assurance you are not being MITM attacked, before giving authentication information?
Is authentication information (e.g., passwords) sent in plaintext to eavesdroppers (ala telnet/ftp)?
Is the data sent in plaintext to eavesdroppers?
If I only setup a read-only share for one user (who has no other permissions), have I opened myself up to any other security holes?

This isn't high security stuff -- just backup of routine small business data (should not contain billing/financial/confidential stuff, though cannot guarantee), but I'm trying to see if I need to setup a VPN or choose try running rsync under windows.

no, you could be MITM'd unless you're using AD and/or IPsec
passwords are encrypted
the data is in the clear
yep, it's a nightmare to keep on top of Windows SMB/CIFS holes.  You also have to watch for being brute-forced.  Even if you limit it to one account, that account has access to all the data, and privilege escalation on SMB is not unheard of.

The VPN would be simplest if you're locked to SMB.  You don't want to expose your clients to the Internet anyway, so VPN to the firewall for all of this kind of traffic.


Is there any way I can block (or conditionally approve of) iFrames on the client side? Given that iFrames are used in many common exploits, I'd like to conditionally disable iFrames except for sites that require it such as GMail, or MasterCard SecureCode.

I also suspect the <object> tag has related functionality.

Is there any way to conditionally block the usage of iFrames (and/or <object>) on the client side, perhaps in a similar way a  pop up blocker works?

Normally this would be a tough one as iFrames are a part of the HTML spec.  Hooray Browser Scripting!

One solution could be to use a greasemonkey script for FireFox or an embedded script in Chrome.  Here is a link to a Greasemonkey script which claims to do what you want and a bit more.

http://userscripts.org/scripts/show/32192

You may have to tweak it slightly to get the exact desired results but this should get you going.

Share and enjoy.


Loki How to crack the password hash OSPF? I have created for myself a lab of routers in GNS3 . Routing protocol between routers is OSPF.

Now,by Loki penetration testing, I found that routers are the feature authentication.
Using wireshark, I do sniff network traffic. I see only Hello Packet in attacker's system.That is very normal.

Within this package do not see any hash password (MD5) that it would crack, Using crack sites online.

My question is how Loki crack passwords by the list of words?

Loki has access to the password hash value? Where in the packet is the hash value?

Hash authentication of protocol packets is not on by default in OSPF, you'll only see hash digests if digest authentication is on with a pre-shared key configured. If you're looking for the encrypted digest packets you'll find the information you're looking for in RFC 2328 section D.3

'Using this authentication type, a shared secret key is configured in all routers attached to a common network/subnet. For each OSPF protocol packet, the key is used to generate/verify a "message digest" that is appended to the end of the OSPF packet. The message digest is a one-way function of the OSPF protocol packet and the secret key. Since the secret key is never sent over the network in the clear, protection is provided against passive attacks. `

Looking forward in section D.3 it looks like the way forward is to look for the key ID, then pull the length of the digest from the auth len section. Then all you have to do is read that length from the back of the packet, minus any footer, and you have the digest. See D.4 as to how it is generated.


Any "cleaned" virus that's been successfully re-released? Anti-malware software has to keep track of all bad software there is. To ease this load, it seems like a good idea to stop looking for threats that's been dead for years.

Is there any example of some malware that was "big", cleaned enough to be removed from anti-malware software and then re-released by someone or left on some offline infected computer for some time or similar, that actually got a noticable second spread?

"Re-releases" happen by accident all the time, when an infected, mothballed system gets re-activated, or old, infected media gets pulled out of archive.  Case in point, my webserver has a log entry for a Code Red infection attempt in 2013, twelve years after the worm was originally released.

Because of this, antivirus software does not normally remove things from their virus lists.  I would not be surprised to find signatures for the Morris worm or Elk Cloner in modern antivirus software.


How to protect HMAC key embedded in code from someone who would copy entire source? I and a friend are developing a web game. The front-end to back-end communication will be carried out by the means of an API.

We realized that someone could then easily hook up to our API and make a clone that uses our API.

So we googled a bit and found out about HMAC signatures. While it sounds great, how could we protect its key that is embedded in the code from someone who would just copy the entire source and make slight visual modifications?

How could we do this in a better way? Is there a way of implementing the key code that is copy proof? Or maybe we should use a completely different approach (because I am not so sure if embedding the key in the code itself is that smart)?

Sources:

https://softwareengineering.stackexchange.com/a/369938

https://security.stackexchange.com/a/20301

https://www.approov.io/blog/simple-app-authentication.html

https://en.m.wikipedia.org/wiki/HMAC

I did very similar project before. I assume your source code will be distributed to 3rd party as open-source or obfuscated open source.

Let me explain in two conditions:

If you do not store the key in the source code

This solution is similar as DannyNiu's answer above. Receive the key from server only when need the key. It can enhance the security in some aspect. The disadvantage is that, in real application environment, the key must be stored locally for many reasons.
If you store the key in the code

The people have your code can be static and dynamic code analysis to retrieve the key. Thus, you need the code protection methods. For example:

2a. Code obfuscation

There are many code obfuscation projects available online, such as ollvm. The objective is to make the code algorithm not human readable. It can prevent static code analysis efficiently. But people can still read variable values through dynamic debug. The challenge is to decide which parameter's value is the key value.

2b. white-box cryptography

The key is still stored in the code, but not the normal format. The key hides in a crypto table (at least hundreds of kbs). The whole table is the key. For example, white-box AES and github project here. You input the ciphertext/plaintext to the tables and receives the plaintext/ciphertext. The value is exactly same as standard AES. Reverse engineering the key from tables is challenging. You can google more on this. For example, static white-box and dynamic white-box cryptography.


Redirecting/rickrolling intruders While browsing for Node.js packages, I came across this one. It's purpose is to redirects crawlers away from a site, and by default it Rickrolls them. I find the idea amusing, but is it a good idea to do this to intruders, given that unvalidated redirects are a security risk?

Unvalidated redirects do not necessarily apply here. An unvalidated redirect is something more along the lines of an attacker being able to send a victim to a destination of the attacker's choosing. If you read the example on the OWASP page you linked at the bottom, you will see that the attacker crafts a URL that can be sent to a victim using social engineering or otherwise. A static redirect coming from a server is a completely different scenario.

While rickrolling an attacker may seem amusing, legitimate users would be quite confused if they are given a link to your site which automatically rickrolls them, decreasing the user's trust.


How effective are reverse proxies as a web application security measure? How effective are reverse proxies as a web application security device? Which types of threats do they mitigate against and which don't they?

For example are they more effective in preventing exploits against the proxied application web servers rather than against the applications themselves?

Reverse proxies can be used as:

caching server and as a load balancer - that would help in mitigating DDoS attacks at some level;
proxy to hide the real server software from scans and fingerprints;
proxy where WAF or IDS/IPS are setup, thus preventing attacker from further intrusion steps;


What is the easiest way for a newbie to RSA to create & use a key pair on Windows? So I need to get a block of text sent to me over email from a friend, but before he sends it he wants a public RSA key from me.

Am wondering what is the simplest way for me as a newbie to generate this pair and then use it to decrypt the message that gets sent to me?

I've been messing about for a while now tonight with Gpg4win and PuTTY and I "think" I've managed to get as far as generating my own private and public keys with each one.... but is completely beyond me as to how I can now use this to decrypt any message I might get??

Am wondering if there is an easier way for me? Or a straightforward guide I can be pointed to for doing just this?

The standard solution to exchange encrypted or signed email is PGP or a compatible program such as GnuPG (which is free software). You and he both need to install PGP or GnuPG. There is a Windows front-end and plug-ins for email software including Thunderbird (Enigmail) and Outlook (I don't know the details and I've heard bad things about its ergonomy).

If your friend wants you to use some custom solution, explain to him that home-grown cryptography is never secure. Lead by example by refusing to use his custom scheme.


Add security to documents uploaded? We're locally testing anasp.net application that will let a user upload documents. The app is similar to a jobs site like monster.com, but with sensitive data.

The app works great locally, and now we have to move it to a shared host or VPS.

Once we move the app to the hosting company, my biggest concern is that there are users (ie. hosting employees) with access to the folders and the documents. These documents have sensitive payment data, so these documents cannot be opened by unauthorized users.

This security is essentially the selling point of the company, so the documents need to be extremely secure.

What security measures can I implement to make certain that the files are protected and secure? Third-party security protocols are also welcome.

Finally, is there anything I need to look for when I search for an asp.net hosting company?

The problem that you describe (confidentiality of your users' sensitive information) is not unlike the problem that many cloud-based service providers face.  This is especially true for companies in heavily regulated industries, such as healthcare, finance, etc., that must comply with compliance regulations such as HIPAA, PCI, and more broadly, GDPR.

In a case where another entity (e.g. a VPS provider, or a hosting provider) has control of the physical resources that your application runs on, it can be a challenging technical problem to prevent this entity from gaining access to your users' sensitive information.  Even if you do server-side encryption, this entity has access to the physical RAM on the server where the encryption/decryption takes place, therefore the entity can access the plaintext immediately before it is encrypted (or immediately after it is decrypted).

One solution to this problem is to encrypt all sensitive information on the client-side.  This is what ProtonMail does.  But, even this has its caveats.

So, as an alternative to a technical solution to this problem, many companies rely on a legal solution instead.  Most reputable VPS providers publish a comprehensive data privacy policy, that specifically addresses these concerns.  For example, see Amazon AWS' privacy policy at https://aws.amazon.com/compliance/.  This is often considered to be sufficient to satisfy most regulatory compliance requirements.  However, if this is not enough to satisfy your requirements (or your users' requirements), then you may want to consider hosting your own server in a highly secure datacenter.


Secure and HttpOnly flag for load balancer cookie Is it necessary or recommended to add Secure and HttpOnly flag to load balancer cookies? In my application, I have three cookies: BIGipServer~..., TS01702dcd and IDSESSION, where IDSESSION serves as a session identifiers.
Should I add this flags to all three cookies?

HttpOnly - Flag tells user-agent(browse) to use cookie only in communication and do not allow access of cookie programmatically in JavaScript.
Secure - Flag tells user-agent to send cookie in communication only if communication medium is secure (HTTPS not HTTP)
If your cookie used in any HTTP communication then you may need to disable Secure flag but its not recommended.


OpenBSD vs. NetBSD security If I search for the two words: OpenBSD and NetBSD on http://www.exploit-db.com/ then I get 17 hits regarding security bugs on OpenBSD, and 8 hits regarding security bugs on NetBSD.

So what are the differences exactly, and how do NetBSD and OpenBSD audit their code?

The first point I'd make is that the number of hits on a given vulnerability/exploit db is not a reliable indicator of overall security. This could largely be defined by other factors such as the focus of security researcher's efforts or disclosure policies.

Even a quick read over the project websites provides an indicator of the likely comparative security posture between the two. OpenBSD clearly states that one of its core aims "is to be NUMBER ONE in the industry for security". They provide a great deal of information and detail regarding their approach to accomplishing this task. I don't want to repeat @Bruno Rohée's answer but they have implemented a number of advanced security features, pioneered new (and admittedly controversial) versions of commonly used c functions (strlcpy and strlcat, which have since been adopted by NetBSD and FreeBSD), they provide a great deal of information pertaining to their rigorous source code auditing process and ship the operating system in what they call a ‘Secure by Default’ mode.

Although NetBSD is by no means lacking in security by any generalist comparison its core project goals do not make any explicit mention of security:

provides a well designed, stable, and fast BSD system,
avoids encumbering licenses,
provides a portable system, which runs on many hardware platforms,
interoperates well with other systems,
conforms to open systems standards as much as is practical.

...while OpenBSD’s do:

Pay attention to security problems and fix them before anyone else does. (Try to be the #1 most secure operating system.)


Is the following environment contained? I would like to make sure that my working environment is contained (prevent data leaks meaning I don't want temp file or traces from files I have worked on).
I am about to create a usb key with the full disk encryption provided by Ubuntu. Knowing that I will edit files stored on that key and I will not allow any other access (no network no nothing)...

Can I assume that this environment is contained ?
From what I know the data I am going to work on will be uncrypted in RAM but else pretty safe...

When you boot off a USB disk, and use only files from the USB disk, then you are safe from interference from any other operating system which may reside on the machine hard disk.

However, if the machine hardware is hostile, then you won't be protected. Hardware key loggers work regardless of the booted operating system. Malicious BIOS code may also make nasty things; BIOS code is executed before your OS is loaded from the USB drive, so there is nothing your OS may do to really defend itself against an evil BIOS.

And let's not forget the classic "thinking out of the box" methods, e.g. someone 100m away with a telescope, zooming on your screen and reading everything that you read yourself (for a trickier but funnier method, the telescope zooms on your glasses and observes the reflection of the screen). Or reconstructing what you type on the keyboard, using a mere sound recorder under the table (in any keyboard, each key makes a slightly distinctive sound, sufficiently distinct to allow for ulterior reconstruction of what you type). If you are serious about security, then environment matters.


Example of application that doesn't require "strong authentication" Does anyone have any examples of real-life applications that doesn't require "strong authentication". I am looking specifically for blog posts or even scientific papers that argue that "strong authentication" is not required for all applications ... sometimes you need to authenticate users using IP addresses only, for example, but anything more than that would be unnecessary ...

EDIT: Ok, I think I need to explain myself a bit further. I am looking for an argument from a developer or a business owner or a scientist (an official statement, e.g. scientific paper, or semi-official, e.g. blog post) that argues for a "non-strong" authentication. The business owner's insight is the most important thing (that I'm looking for). For instance, @Florin Coada's example is great, but it would be better to see Apple's insight on the matter. I tried googling for days, but keywords I'm using are bringing completely irrelevant results.

EDIT 2: The answers are awesome, and maybe I should extend the question a little bit (for the last time). Would there be any kind of application, where the risk of "security breach" is high, like privacy breach of users of your service (by "power users" like skilled programmers), yet you choose to do a "weak authentication"?

Protections are in place to combat risks. If the risks are low, then the protections can be low.

Think about a forum site. There might be no reason for the site to use "strong protection", because all you really want to do is to be able to identify who is contributing. It could be determined that the site needs very weak protections in that case.

The answer to your question is in the risk analysis. Provide the appropriate protections to combat the risks you identify.

Edit post Clarification:

The business owner's perspective is based on a risk calculation. What are the risks if someone is misidentified, what are the costs if such a risk is realized, and what is the cost to put in stronger protections to reduce that risk? If the costs to reduce are greater than the cost of a realized risk, then it is not cost-effective, from a business point of view, to introduce the stronger protections.

ISO 27005 provides this risk management framework.


256 Bit Key into AES 128 same output as 256 Bit Key into AES 256 I have two different crypto libraries I created, one is in java and uses the standard built-in java crypto libraries.

The other uses openssl and has been wrapped in java through the JNI.

I'm currently replacing the default java library code with the openssl library code, and verifying the encryptions against each other to make sure nothing breaks for my end user. I'm curious, because java is only guaranteed to support 128 bit keys using its implementation of PBKDF2, so I'm using AES CBC 128 with java. I had originally coded for AES CBC 256 in openssl, not thinking.

What I'm curious about is this: When I input a 256 bit key into java's AES CBC 128, I got the same output as I did for openssl's AES CBC 256. When I input a 128 bit key into AES CBC 128, I got a different output than when I input the same key into openssl's AES CBC 256. (I used the same 16 byte IV across all trials)

I assume the two different encryption schemes would generate completely different results, so I'm confused as to why this is happening. I thought I had a better understanding of the cipher than it appears I actually do.

Apologies if this is a painfully obvious result, I'm still somewhat new to crypto.

"AES-128" means "AES used with a 128-bit key". "AES-256" means "AES used with a 256-bit key". By definition, you should use a 128-bit key with AES-128, and a 256-bit key with AES-256.

What happens when you give a 256-bit key to AES-128, or a 128-bit key to AES-256 ? By all rights, it should blow up in your face. However, some implementations are more tolerant. Some implementations will automatically adjust to the provided key size; in that case, when you put a 256-bit key into AES-128, the AES-128 implementation morphs into an AES-256 implementation (AES-128, AES-192 and AES-256 are very similar internally; they differ only by the number of rounds; so it makes sense that they share most of their code). Some other implementations will ignore your "key length" and grab the bytes they believe they need; e.g. you give a 256-bit key to an AES-128, and only the first 128 bits get used. Since you are doing things out of specification, this is the realm of the bug, and anything goes.


How to prevent user from recovering my iPhone data? If I'm about to sell my iPhone 5, is there a way to make sure that the buyer won't be able to recover anything from my data? Both data that has been recently deleted and data that has been deleted long time ago.

Using the built-in wipe function is fine for casual use/reselling of a device.

Settings -> General -> Reset -> Erase All Content and Settings

However it is not necessarily proof against forensic data recovery. (It could be, but I don't know whether it is. Typically for most devices it wouldn't be).

On the other hand, if your life  - or anyone else's - is at stake, you should destroy the device, not resell it. Grind the device to dust. Heating the whole thing in a charcoal fire to a red heat should work too. (Be careful - the battery will probably explode.)

Typically, deletion involves rewriting bookkeeping data to mark portions of the disk as unused. It doesn't actually overwrite the data. To be secure you must overwrite the data or specialised software or hardware can read the data directly bypassing the bookkeeping functionality.

To achieve this you have to write data until the device is full. Depending on the filesystem it may even be more complicated than that. But for a poor-man's version, you could use the system erase function, then fill it up with files using the PC connection. Then wipe it again. You will have to do that several times to beat the wear-levelling algorithm.

This will be better than the standard system wipe, but still will not be perfect.

If you need a perfect wipe, complete destruction is the only way I would recommend.


Moving to a New Network: First Steps I will be moving a new location in a short time, which means all of my devices will be coming with me.

My landlord is the kind of older person who needs help connecting to WiFi. Despite this, she manages to use a number of devices which connect to the internet: TV, phone, Kindle, computer, tablet... When I recently talked to her, it became evident that she did not understand the risks of clicking links in her many questionable emails. Naturally, she's happy to put me in charge of making sure everything works (but that's another discussion...).

In the interest of my own devices, what general first steps are advisable to take to secure this unfamiliar network, which could have any number of undetected threats? I'm planning on changing passwords, installing antivirus, and probably subscribing to a VPN service, but I'd like to specifically take measures to

Determine (as best as possible) that nothing malicious is already residing on the network.
Reduce the risk that actions taken by my landlord lead to other devices the network being infected.

Sounds like you should simply assume that your local network is compromised - rather like using a public library.

You might offer to help manage her router so that you can change default passwords and add monitoring for things opening unexpected ports. You can also add some outbound firewall rules and turn off UPnP if possible.

Monitoring activity through the firewall for a while and periodically thereafter will soon give you a good idea as to whether anything nefarious is happening somewhere on the LAN.

A VPN is a good idea (assuming you can live with the overheads it brings), at least to start, you might also set up a VM with direct connection to the LAN to see if anything unexpected tries to connect to it.

UPDATE: How to monitor for open ports.

This rather depends on the router model. Most will have built-in dashboards that will show you open ports and connections so that you can view them manually. Some will have SNMP available that you can connect to an SNMP monitor tool that you would run on your VM.

Or you can run something like PortScan. Or if you want to really get technical, try nmap. You would run these on your VM. There are a great many similar tools, just search for alternatives if those don't suit.

To check the generally open ports on the WAN side of the router, you can use a tool. e.g. http://www.yougetsignal.com/tools/open-ports/ or http://www.canyouseeme.org/ though these may not spot ports that are only opened to specific remote end-points. Not to worry though because your LAN scan will find all the traffic.

As for what might constitute an unexpected connection. That is rather hard to predict. But an SMTP (email) connection to a PC on the local network might be suspect, non-standard ports being opened to remote end points, that kind of thing.


How does Memory Corruption apply to Android? I have researched several DoS attacks within Android e.g.:

CVE-2015-1474
CVE-2013-5933
CVE-2013-4710
CVE-2012-6301
etc.

And although I found DoS attacks within Android difficult to understand at first. Even though I understand what Memory Corruption is e.g:

a programatic situation wherein, contents of memory locations are unintentionally modified due to programming errors: enabling attackers to execute arbitrary code etc.

As in the case of:

  Vulnerability Name: Microsoft Internet Explorer Memory Corruption Vulnerability

  Threat Type:  CWE-119: Buffer Errors

  IntelliShield ID: 37655

  CVE:  CVE-2015-1625

I really can't understand how the vulnerability memory corruption can be caused by Android code.

If someone could let me know. I'd be very thankful.

Most of the Android applications are written in Java. As long as you don't use native code, it's not possible to cause buffer overflow or memory corruptions. In android it's possible to use native code and compile them using Android NDK. Applications like Firefox and Chrome are using native codes.

Many opensource libraries can be compiled for android e.g. libpng. So a vulnerability in libpng for linux is also applicable for libpng in Android.


What security implications should I consider in relation to mcollective? The use of PuppetLab's mcollective is being planned by my company's SysOps team.  I will be reviewing their use of the tool and implementation of the system.

At this point I don't have a lot of knowledge regarding how mcollective works and would love to get somebody else's feel regarding security considerations/implications of the software.

Has anyone used or reviewed mcollective, and what did you find?

For reference, PuppetLabs have their own security documentation for the product. I assume you've read it, but for the convenience of future data archaeologists it's here.


What security risks are posed by software vendors deploying SSL Intercepting proxies on user desktops (e.g. Superfish) There has been quite a bit of concern noted relating to the recent discovery that Lenovo are pre-installing a piece of Adware (Superfish) which has the capability of intercepting SSL traffic from machines on which it is installed.

What are the security risks of having OEMs or other companies installing this kind of software onto customers systems?

Having a proxy SSL certificate creates some privacy and security implications:

Superfish can impersonate any site

This does not mean that Superfish will do it (or is doing), but they have the power. As they have a Certification Authority Certificate, any certificate they generate will be valid and accepted.

Certificate pinning does not protect you, either:

  "There are a number of cases where HTTPS connections are intercepted
  by using local, ephemeral certificates. These certificates are signed
  by a root certificate that has to be manually installed on the client.
  Corporate MITM proxies may do this, several anti-virus/parental
  control products do this and debugging tools like Fiddler can also do
  this. Since we cannot break in these situations, user installed root
  CAs are given the authority to override pins. We don't believe that
  there will be any incompatibility issues."

If you use Windows and EMET, Certificate Trust can protect you IF you configure it beforehand. But the process is manual and somewhat complicated.
Superfish can intercept traffic

As a trusted CA, Superfish can perform a MiTM attack on any site, and the average user will not detect the attack. Savvy users can see that the certificate was signed by a strange CA, if they know where to look.
Superfish can inject code anywhere

Even if the site is protected by SSL/TLS, Superfish can inject Javascript or HTML on every page. They just proxy the requests, make the request to the intended server, read the response, inject data, and send data to the user. And unless you are looking for it, you will never notice.
Superfish can be used to install malware

Like above, Superfish can add code to Windows updates, alter executables being downloaded, infect Java applets, Flash files and so on. Any download could be silently compromised. They could even change the origin site and put changed checksums on it, so even if you calculate the hash after downloading the files, they would look legit.
Superfish can know every site you access

The software monitors your browser and send data to Superfish. Even without the software, they can inject code on every site and track you everywhere.
Anyone on the web can use its certificate

The private key of the certificate has been compromised, so anyone knowing the key can use Superfish certificate to create valid SSL certificates for anything they want.

Saying that they can does not mean or imply that they will, only that they have the power to do if they want (or are forced to).


Undelete-secure AES software and software for carrying out "full undeletion" free-partition-space zeroing/reformatting on Windows? It is fairly well known that on Windows, when you delete a file (or folder which may contain any number of files and subfolders possibly containing other files and subfolders and so on), Windows just deletes the filesystem pointer to the node corresponding to the file or folder in the corresponding filesystem tree structure.

So, I would like to know, if someone uses 256-bit AES as available as part of the implementation 7-zip, TrueCrypt, or BitLocker, or any other conforming software, and uses, say, a 20-character passord which uses uppercase, lowercase, as well as numeric digits, then the encrypted folder should would be encrypted with enough strenght that nobody could open it unless they had the password.

But my concern is that in creating the encrypted folder, the old data would remain unencrypted on disk, and could therefore be recovered with a program used to undelete files (and I'm sure there are several of these). So, which of the encrypting solutions I've mentioned actually zeroes-out the old data?

Even if so, I don't even know if this is a real solution. If the user has only moved the file across the same hard-drive throug cut-and-paste operations, then theoretically Windows would not have copied the information contained in the folder, just updated the pointer to it. But if the user has copied the information from one drive/partition to another, than the information contained in the folder would also end up being copied, and the information could still be recovered via a Windows undelete program.

Furthermore, I don't know whether there are any circumstances where the user doesn't do anything but Windows copies the data associated with the folder, leaving an old copy of the data behind (perhaps defrag, I don't know of any other situations).

So, my question is, how secure are 7-Zip, TrueCrypt, BitLocker, or any other preferable viable alternative, in fully deleting the original folder after it has been encrypted. If none do, then are there any programs available which will zero-out any unused portions of a drive/partition without reformatting it?

Thanks.

The solution to the problem could be downloading and installing the latest version of Piriform CCleaner. Once an AES-encrypted version of the folder to be encrypted is created with something such as 7-Zip, the following points must be taken into consideration:

Any program which may have been used to open the file could have created on-disk cache files containing pieces of information from the folder that was encrypted prior to its encryption, including transformed data obtained from such a file, and any of these files may also have been deleted by such programs, and, since such deletions would have been regular filesystem deletions and not full filesystem deletions, pieces of data from the original folder could be still lying hidden somewhere on the hard drive.
For each such program that was used to open data from the folder from which the encrypted folder was created, if CCleaner displays knowledge of such app in Cleaner -> Applications, then check such application to delete its cache files (be sure to leave checked defaults checked in Ccleaner -> Windows -> System). Also check Options -> Settings -> Secure Deletion to make sure such files are fully deleted. Also, if some program used to open the folder's contents is not listed, and you know where its cache files are kept, you can delete those as well by adding the folder that contains them with Options -> Include -> Add.
If some program not listed in CCleaner was used to open a file, and you cannot find where it keeps its cache files, just uninstall it, reinstall it, and then wipe your drive's free space (slow), which will also wipe any partially deleted cache files from the uninstall.
With the Settings -> Secure Deletion option enabled, delete the unencrypted version of the encrypted folder, so as to completely get rid of it, but...
In any case, since, as pointed out, you never know what a program used to open the contents of a folder deletes and what it doesn't delete, including its own cache files,
so deleted bits of information may still remain on disk. Also, as pointed out in my original question, if a file is moved from one partition to another, the information it contains will be copied, and the information could be recovered from the other partition if not securely deleted. The same can happen on the same partition under some cirumstances (e.g. programs such as defrag may copy bits of files around unsecurely, leaving partially or fully recoverable traces of files elsewhere). So, the only way to be sure everything is really gone, thus making the information in the encrypted folder truly hacker-proof (unless, of course, you happen to give away your secure password), is to run Cleaner -> Windows -> Options -> Wipe Free Space. That should do it.

Hopefully whenever you open the encrypted file you will have to make sure its contents are stored in memory, where they will be completely gone once the computer is turned off, and not on disk, (and also make sure that the computer is not attached to a network for extra security, and hope that no keyloggers have been installed on your computer to sniff your password as you type it), or you may have to rerun this process all over again.

NOTE: I am not an expert on the subject, so please let me know if I have left something out.


Are there any risks associated with importing metadata? My organization uses a plugin to import metadata associated with images on web pages. Are there any risks associated with importing metadata?

Absolutely. For example, it is a fairly well-known trick to embed XSS attacks in JPEG EXIF data. Here's some very simple example code that's exploitable with a corresponding image: https://github.com/vjex/Exif-XSS


Porbable virus in Windows 10 I have a windows 10 machine with AVG Free antivirus.
Lately everytime I boot the machine up as soon as it gets to the desktop Chrome opens up on its own with a suspicios add to download stuff I do not need and a pop up to enable notifications from that site.
I ran several full scans and today a boot scan but I am unable to get rid of this.
What do you guys recommend?

I recommend you to check your browser extensions, you may have download an malicious extension. Another thing I would do is check your Start-Up folder in your OS. This is all I can think about. Next time don't download or install any 3d software/extension that looks suspicious, same for ads.
The Start-Up folder in Windows located in:
C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup


Why do we need to remove null bytes from shell code? I'm studying the basics of making shell codes. I have a question about it.

In my textbook, the author stores his shell code in an environment variable, and injects the address of it using strcpy() in a program.
When he makes his shell code, he removes null bytes. He says that this is because strcpy() will stop at null bytes.

However, I think, because strcpy() just gets the address of the environment variable (storing his shell code), if his shell code has null bytes, it doesn't matter.  I think that his goal is to change the return address into the path of environment variable.
In the textbook, a shell code which has null bytes doesn't work in this situation, but a null-free shell code does.
I can't understand the reason why we need to remove null bytes in this situation.

You are correct in this situation; strcpy will indeed stop reading when it reaches a null byte, but this only needs to be done to shellcode that is passed directly to a string function that expects null-terminated strings. Of course, null bytes are valid machine code.

Since you are only injecting the address to your payload and not the actual payload itself, strcpy will not be reading the payload, as you have surmised.

Perhaps the author made a simple mixup; there certainly may be scenarios where it is desirable to pass the entire payload through something like strcpy, in which case you would indeed need to deal with the null bytes.

See this answer for some history.


What solution is compliant with HIPAA for for web-based electronic digital signatures? I'm interested in having physicians digitally sign pdf documents we create, in a HIPAA-compliant manner.  Ideally, there would be an open-source solution, but I'm also willing to consider a digital signing service such as EchoSign.

Update: We've decided to use EchoSign as a digital signing service.  It has a good front-end web interface and we can handle the backend via a SOAP-compliant web interface.

The last place I worked we were in the in the process of using the Topaz signature pads. They have an SDK that allows you to grab the signature image off of the pad. From that point you could just embed it in your PDF (if you are creating them using something like iText to generate your PDF).


Why don't banks sign their email using S/MIME? If email sent by my bank included S/MIME signatures that my mail client can verify, then I would have the assurance that the mail was not tampered with or sent by some malicious third-party.  Most prominent mail clients have S/MIME support (Outlook, iOS, Thunderbird, Mail.app) so why aren't S/MIME signatures more prevalant?

It's usually a costs vs. benefits decision.

Costs:

Create your own CA infrastructure or buy a public certificate for each sender
Teach employees how to use it
Teach employees how not to use it, especially how to make sure that the secret key is really kept secret
Teach the customers what this strange stuff in the mail means
Properly deal with certificate expiration, revocation and all this stuff
...

Benefits:

Usually the argumentation goes like this: nobody else is using this so there cannot be lots of benefits

Thus unless the benefits are higher than the costs or some regulations require the use of signed mails it will not be implemented.

Apart from that correctly using S/MIME is not that simple for the recipient too. While there might be indicators which show if a mail is signed or not few understand how these indicators look like, what kind of different indicators there are and that you should not trust any indicators which are included in the mail itself and try make the user believe that everything is secure: i.e. something like trust seals, "scanned by whatever antivirus" messages etc.
Thus there is also the cost of teaching all the users.


How to erase/change all unique identifiers of a computer's identity? Assuming one wants to be able to access a site from one device without the site realizing that the same device has visited multiple times, what are all the identifiers that one would have to consider/that could be used to identify?

I'm trying to make a relatively complete list of any viable methods that could/are likely to be used.

So far I have:
-IPv4
-IPv6
-Screen resolution
-Installed fonts
-User agent
-WebGL hash
-Canvas Hash
-Cookies
-Installed plugins
-Flash on/off
-Do not track on/off

I'm not sure how viable it is for a site to secretly install permanent trackers that record things like MAC address, installed software, registry configuration and other particularly damning identifiers.

And if I may ask a follow-up question, would using a virtual machine completely protect the host device from identification?

The list is far more extensive than you have already identified - there's explicit history, sound processor fingerprinting, timezone, time drift, HTTP cache content, HSTS history....even if you could assemble a comprehensive list today, it will grow tomorrow.

(That you have not included the most obvious user agents, referers and cookies in your list makes me think you need to up your game a lot to be able to use this information effectively.)

I suspect you'll find that your adversaries are not using all this data to identify you - indexing and resolving the data would be far too expensive. They will use a hash of the data as an identifier; so mapping out every possible opportunity for tracking is of limited value in designing countermeasures.


Is this a secure way of storing passwords? So a couple years ago when I was learning basic back-end web development, I found a tutorial for creating a basic log in system. I haven't done much modification to the code since, but I have the opportunity now to use a more robust system if I need to.

So here's the code I'm currently using:

$pepper    =    "String of 24 random characters";
$salt       =   dechex(mt_rand(0, 2147483647)) . dechex(mt_rand(0, 2147483647));
$loopcount  =   97674;

for($i = 0; $i < $loopcount; $i++){
    $value  =   hash("sha256", $value . $salt . $pepper);
}

return $value;

Basically, a static 24-character pepper, a salt, and the password are hashed 90,000+ times. It's probably also worth mentioning that the salt is stored in the database.

My biggest question is if hashing it that many times actually does anything. I also want to know if the salt and pepper are strong enough.

actually, hashing it MANY times is bad. here is a quote from http://yorickpeterse.com to prove that.

  "To cut a long story short, hashing a hash N times doesn't make your passwords more secure and can actually make it less secure as a hacker can quite easily reverse the process by generating hash collisions."

read the full explanation at http://yorickpeterse.com/articles/use-bcrypt-fool/


How can I block hits to Youtube using iptables? I want to prevent my daughter from accessing YouTube while she's attending school. So I was thinking to add protections in iptables. Unfortunately, when she goes to YouTube, the DNS resolves to IP addresses which reverse lookup to 1e100.net (which is owned by Google, no worries there,) so... a reverse lookup block is not possible or is it?
What other way do I have at my disposal to block such accesses?
Are the 1e100.net gateways (load balancers) to all the Google services or is each computer specific to one service? (i.e. if I block that specific IP address, would I also be blocking say Google Sheets, Google Translation, etc.?)
I've also blocked the DNS, but obviously if the computer keeps its cache, my server can't prevent connection attempts to old IPs cached on my daughter's computer.
One thing I tried without much success:
/sbin/iptables -A daughter -i eth1 -m string --string "youtube.com" --algo bm -j REJECT
/sbin/iptables -A daughter -i eth1 -m string --hex-string "|07|youtube|03|com" --algo bm -j REJECT

These rules block requests with SNI and DNS requests to get any youtube.com IP address.

Attacking this problem at the DNS layer is going to be problematic... better to attack the problem at the application layer.  Parental control software is designed specifically for this use case, and finding lists of software with reviews is easy.  A good package will also handle nuances like blocking sites during school hours but permitting access after school.


Why is JavaScript executed manually from the browser console not allowed to access everything? Why is JavaScripts executed manually from the browser console not allowed to access "everything"? Especially the "visited" status (see this question) of links? What kind of security threat would that pose?

Usually, users have full access to their environment, sometimes with a little bump in the form of entering the root password or similar. Why is this an exception?

(I am not saying that scripts downloaded from a web page should have this access. I understand why that is a threat to the user's privacy etc.)

The answer to this is more regarding usability than it is security.

It's easier for the developers to build a box that does JavaScript, with rules and restrictions in place for what it is and is not allowed to do. You feed that box JavaScript code, and out comes the result of that code (plus side effects).

By implementing a feature like you suggested, you would introduce more complexity into that machine (and more possible surfaces for bugs), as now the machine would not only have to execute JavaScript, but also remember where that JavaScript came from, and what it is allowed to do.

Furthermore, it makes life for developers harder. Imagine typing a simple JavaScript command into your console, and it works, and when you then execute it from a script file, it suddenly does not work anymore. That can be incredibly frustrating for a developer to experience.

And finally, what is the upside? There is not really one. Manual JavaScript execution in a browser is an extremely niche feature 99.99% of browser users don't use. Even developers usually don't do that.

To summarize, this "feature" does not exist because:

It would introduce even more complexity (and thus more bugs)
It would confuse many developers
It would barely have any positives worth the cost


To whom do I report this bizarre behavior (possibly hijacked website or DNS highjack)? My coworker searched for "cutadapt" at Google Scholar and the top hit was http://journal.embnet.org/index.php/embnetjournal/article/view/200. When he  clicked on it, it took him to a site that said something about having a vulnerability and that he should call a certain phone number. It also popped up a box asking for security credentials. He couldn't close the tab, so he restarted the computer to get rid of the page.

I tried the same search and got to the same site. I ended up having to close all of the tabs in my browser to get this security box to disappear.

I wanted to report this, but wanted to be sure I could report exactly how to reproduce the problem. So, I tried the same search again and clicked on the same link with the same address displayed when I hovered over the link. This time, however, I ended up at a completely different, but still obviously incorrect website that seemed malicious to me.

Then I tried a third time and after a long wait, ended up at the right site (or at least it looks like the right site). Now, it only takes me to what looks like the correct site, after a long wait each time.

So, my question is whether this is something that I should report to the web site in question, to my DNS provider, or Google? Or am I even asking the right question(s)?

The owner of the website.

Showing malicious pages only in certain cases, instead of always, is a well-known pattern of infected sites/servers to make detection harder.
Random example, if the referrer is empty then only show the "good" site => the website owner (who doesn't need to search his own site in Google) may not notice the infection at all, even if he visits the site every day for years.


How do ISPs send their own pages when a user is trying to access a blocked site? I know that some ISPs send block pages(like "This site has been blocked because ... ") over HTTP by sending a fake 301/302 redirect.

I also know that instead of sending a block page, some ISPs simple send RST  to terminate the connection or do nasty things with DNS when blocking an HTTPS site.

But can they send a block page over HTTPS? And if possible, I'd like to know some other methods of blocking sites(both HTTP and HTTPS).

ISPs cannot inject their own pages into HTTPS traffic. They can block the traffic and cause the page to fail to load, or they can attempt to hijack a HTTP->HTTPS redirect before the encrypted connection is made, but they cannot modify the contents of the page itself once the connection is established. The only way for them to do this would be if you had installed a root certificate made by them, effectively telling your browser to trust your ISP act as a Certificate Authority for arbitrary websites (a bad idea).


Does having multiple 'memorable info' answers reduce security? I use a website that on top of requiring a username and password also requires 'memorable information'.

When signing up I provided multiple pieces of memorable info as answers to multiple questions (E.g. Memorable Place, Date etc.)

When signing in I'm not asked for a specific piece of memorable info (as expected) but for any of them. I can sign in with the same piece of info every time without ever knowing what the other answers are.

Is this a poor or incorrect implementation of having memorable information?

I agree, that seems dumb.

The general consensus is that there are three types of authentication mechanisms:

Something you know (ie password).
Something you have (ie code generating app, access to an email account, ability to receive SMSs, etc).
Something you are (ie fingerprint or iris scan).

There's really no reason to ask for more than one thing from each category. Proper 2-Factor Authentication ("2FA") systems will always ask for two things from different categories. What you've described (and in fact all "memorable info" systems) are really just two passwords... I agree that this seems kinda useless.


How can I block certain IP addresses from my router? I have done some basic things protect my router like disabling wps setting strong passwords and stuff. However, I am using a virgin media superhub 2 where it does not seem to be possible to ssh into it so I can only use the web interface which has very limited settings. e.g. the firewall setting options offered are only low, medium or high and it seems like there is no way to block specific IP addresses. That is very frustrating. Especially as it is also impossible to report the problem using their dedicated online form because it does not accept the IP addresses I input as being valid, when they are.

It seems pretty likely that at best these attacks are slowing my connection and at worst I worry that they might sometimes be successful in compromising my router. Sometimes I have had warnings from google that my IP is making too many requests, which is a worry.

Ideally I would like to block the IP addresses making attacks on my router by sshing into my router but since there seems no way to do this I have been scratching my head, for a while.

It would really help to get some advice on what I might do to protect my router better than I seem to be able to do this without ssh access. One thing I have been considering is putting it into modem mode so I can use a different router and ssh into that but I am worried that this might slow my wifi connection or something. Other than that I am not sure.

Anyway, the most common types of attacks seem to be the following:

SYN Flood
ICMP Flood
TCP- or UDP-based Port Scan (some of these seem to be from my ISP but some do not seem this way)

I would suggest placing another box in front of your router and running pfSense.

Even Raspberry PI with pfSense can handle normal traffic but it'll choke with fast throughput. If you can afford to spend $169 or so, there are some more powerful hw firewall products with pfSense preinstalled at store.netgate.com.


Is .htaccess protection secure enough? For the moment we protect a directory on our site with .htaccess and .htpasswd. But I was wondering how secure this is? Are there things I should watch for or can do make it more secure?

I don't know why but it don't feel really confident about it. I have the feeling this kind of security is easy to crack. From what I have read there are ways to just download the .htpasswd file and decrypt the passwords.

If all the access is via SSL, then it's reasonably secure.

Basic authentication without SSL only sends the username/password as base64 encoded - so it's trivial to extract the tokens via MITM or sniffing.

Digest authentication without SSL is a lot better (a challenge based mechanism) but still not as secure as an encrypted connection. However there are few cues to the user that the authentication is being implemented as Digest rather than Basic. Also proxy authentication challenges look very similar.

The built-in authentication mechanisms don't provide for a good user experience. If this is for a site with a small, defined user group, then using the built-in methods are a quick solution (but you might consider client-side certificate auth instead). But for a public facing website you should think about implementing somethnig a bit more sophisticated.

You should configure your webserver appropriately to prevent direct access to the htaccess file and password database. Either by putting the config outside of the document root (obviously this isn't going to work for htaccess files - but they are just a local extension to the webserver config) or by blocking access to the files. Every Apache distribution I've ever come across blocks access to files with names starting '.ht'

While you can prevent direct access to the password db, there's not a great deal of scope for limiting brute force attacks on the server over HTTP - another reason for considering a forms based approach.


Why would a hacker bother with stealing your database password? I read recently about whether you should store your database passwords in config files, environment variables, docker secrets, etc. But if somebody can steal it from those places, then s/he can already inject code into your system, so they can easily use an existing database connection for example instead of looking for the database password. So why would a hacker bother with stealing your database password?

But if somebody can steal it from those places, then s/he can already inject code into your system

This premise is wrong. Especially for a config file, there are multiple ways the password could be stolen without the attacker having the ability to modify code. Some examples:

From old backups of the source code.
Accidental check in of the config file into a public repo (as per Matthews comment)
Any situation where the attacker can read but not write to files.

For environment variables and docker secrets, the risk of an attacker gaining read access is much lower. A more serious compromise would be needed, and that would increase the likelihood that the attacker could also modify the source code. This, inscidentally, is exactly why these methods of storing passwords are prefered over the simple config file!

Anyway, from a practical point of view it is much less of an headache for the attacker to  connect directly to the database with the password, then having to modify an existing application to do the work for you. But you are right, once the attacker have gotten that far you are already owned any way.


Fuzzing tool to find heap overflows in a Windows binary Is there a fuzzing tool that can scan some arbitrary windows binary
and identify a set of heap overflow vulnerabilities?

For example, a tool that applies a set of heuristics or maybe a list of known heap overflow vulnerabilities to find these, and then returns the locations and the type of overflow attack.

No fuzzing tool will scan a windows binary looking for vulnerabilities,  because that is not fuzzing!   There are dynamic or static analysis tools that can look at the code or a compiled binary to determine if it is vulnerable.  From experience all of these analysis tools produce tons of false posties and false negatives.

Using a fuzzing framework like Sulley or Peach you can test any interface for memory corruption vulnerabilities.  Both of these projects have great documentation and have been used to find many buffer overflows.

You will still have to define what interface you are fuzzing.  Are you fuzzing files?  Or a remote API?  The fuzzing framework comes with a testing harness to generate test cases and determine when the application crashes.


Understanding Digital Signature I have just learned Digital Signature and am trying to ensure that I have got my understanding of Digital Signature on the correct track.

Assume Alice wants to send a message (M)  to Bob where the message is confidential , non-repudiation , integrity.

Alice has the public key ( Apub)

Alice has the private key (Apri)

Bob has the public key  (Bpub)

Bob has the private key (Bpri)

The Hash Algorithm used is SHA-1

1) Alice will use Bob public key (Bpub) to encrypt Message (M) to get CipherMessage (CM)

2) Alice will sign on the Message(M) by hashing the Message(M) and encrypting it with her private key (Apri) to get Signature (s)

3) Alice will send CipherMessage (CM) & Signature (S) to Bob

4) Bob will use his private key (Bpub) to decrypt the CipherMessage (CM ) to get back Message ( M )

5) Bob will use Alice Public key (Apub) to decrypt the Signature to get the Hash Message (HM)

6) Bob will hash the Message (M) to get Hash Message (HM)

7) Bob will compare the two values of HM , if they are identical , Bob can be assured of confidentiality , message integrity and non-repudiation.

I am wondering if this is how digital signatures work in general ???

Be careful, you should not confuse keys used for encryption/decryption and keys used for signature, since there usage is different. So the key couple A-pub/A-priv is used for signature only, while the key couple B-pub/B-priv is used for encryption only. Be also careful that you should sign the ciphertext and not the plaintext, otherwise having the hash of the plaintext send along with the ciphertext is pretty bad. Likewise, having B deciphering the message before being able to check the signature is bad.

Thus:

Alice should hash the ciphertext, not the plaintext, and sign with her private key (A-priv) the hash of the ciphertext
Bob will first use Alice public key (A-pub) to verify the signature of the message by comparing it with the hash of the ciphertext. If the signature is valid, Bob will then use his own private key (B-priv) to decipher the message.

(you also have a typo at you point 4)


Is this threat in SSL for real? I was talking with a friend about how SSL can be Man-in-the-Middled with relative ease. He claimed this:

Anyone can compromise the DNS request authority chain (true).
Anyone can generate a custom priv/pub key (true).
Anyone can request (purchase) a certificate on behalf on any domain name (true?)

With this in mind, I could:

Compromise a network (country-wide, say - Assume I am a government)
intercept DNS requests with a custom DNS (country-wide, again) server
issue a certificate for any domain (e.g. a wildcard for *.google.com, and spend more money for wildcards in every ccTLD in that domain)
accept HTTPS requests, which resolve (via my compromised DNS) to my custom proxy with the intention of proxy-pass the http requests to the TRUE google server, but having a valid certificate (since it was actually issues legally, it has its valid chain), so no web browser would complain regarding an invalid certificate.

I had no words to reply back, and started to doubt, just by thinking that certificate authorities check you are the owner of the domain you want to issue a certificate to.

Is there any way to MitM like my friend said? Or what am I missing?

Anyone can compromise the DNS request authority chain (true).

Not true on a global scale but true inside a network you kind of control. This might be a network with weak security (i.e. typical free hotspots). Or it might be a network where you own the router or similar. There are countries where this kind of control is done on a state wide scale.

  Anyone can generate a custom priv/pub key (true).

Yes, this is trivial.

  Anyone can request (purchase) a certificate on behalf on any domain name (true?)

Not really true. In theory you cannot do this. In practice you might be able to do this by hacking a CA or by exploiting bugs in the CA. Such things already happened too often.

In theory there could be a log file where the CA log all the certificates they issue so that anybody could check. In practice this certificate transparency log exists mostly for the EV certificates only, i.e. the expensive ones with the green bar. And I doubt that someone will (quickly) notice if some small unknown domain gets compromised.

  Is there any way to MitM like my friend said? Or what am I missing?

Lots of important domains are protected by certificate transparency (EV certificates) and/or by public key (pre-)pinning (HPKP). For smaller domains the situation is worse.

And depending on the environment where you work and live SSL interception might even be done on a more global scale. It is very common for work environments to monitor traffic for security reasons (malware can be delivered with https too!) and such monitoring can be done also at a state wide scale if the government has a tight control. Users need to install a proxy CA to make this monitoring possible but in companies this can usually be done automatically and state wide you either use the government sponsored browser or have to install this proxy CA yourself, because you want be able to access the sites without.

In summary: MITM is possible and is done in practice. But while there are criminal MITM attacks most MITM is the (more or less) legal for of SSL interception "for your own good" (they say). And for the legal interception they don't need these attacks.


HTTP Patch on a Restful API I have just run a security scan against an API in development using Secure PRO. It has flagged a potential vulnerability on a few methods because the HTTP Patch verb is available.

I understand that PATCH seem to update resources if they don't exist. Assuming that the API implements authentication correctly and ensures you own a resource before updating any data, is there anything intrinsically insecure about the HTTP PATCH verb or should it be disallowed?

No, there is no inherent security risk that comes with handling the PATCH verb.

Your browser doesn't apply different security policies to PATCH than to PUT or DELETE. Instead, the security impact depends on the server's implementation of the method.

As a more general rule, you should keep the attack surface as small as possible and disable unneeded methods.

See also: How to exploit HTTP Methods


How does an entity on a network (e.g. sysadmin, security software) identify that a user is connecting to the internet with a proxy? For example, the security software iBoss is able to detect if you are using a proxy.

Proxy Circumvention
Proxy attempts to circumvent your Internet security solution not only violate your organization’s policies, they are potential avenues for delivering advanced threats such as viruses, botnets and malware. iboss offers a multi-layered approach to defending against proxies and proxy applications such as Ultrasurf, Hotspot shield and others:

What I am wondering is how does this detection work? Does it look for headers in your request(s)? Does it analyze traffic patterns? Does it detect communication over specific ports?

For standard HTTP proxies it is enough to look at the first bytes of each TCP connection, which means it can already be detected without doing too deep inspection. A HTTP proxy requests looks different from a normal HTTP request, i.e.

 non-proxy: GET / HTTP/1.1
 proxy:     GET http://example.com/ HTTP/1.1

You have similar differences for HTTPS, where a non-proxy connection starts with the ClientHello from the TLS handshake while a HTTP proxy connection starts with the use of a CONNECT method. SOCKS proxies similarly can be detected when looking at the first few bytes from the client.

For other kinds of special (non-standard) proxy protocols or for VPN solutions  they probably simply detect and block access to specific destination IP and port, see How to Detect and Block UltraSurf program traffic and How to Detect and Block Hotspot Shield program traffic(openvpn application).

I'm pretty sure that you will be able to circumvent these detection by using your own tunnels, i.e. tunneling through SSH or using tools like http tunnel. But, initial circumvention attempts by most users will probably be detected and if you punish policy violations hard enough most users will not try again with a different circumvention technology.

  ... they are potential avenues for delivering advanced threats such as viruses, botnets and malware

This effectively means that by allowing arbitrary connections to the internet you increase the chance of getting infected by malvertisement or hacked or otherwise malicious web sites. This is definitely true.

And once the malware is inside most products will probably not help much to detect the CnC communication of the malware because the malware uses their own protocols or built their CnC communication based on public sites. To cite from a report by FireEye 2013 "Malware Callbacks":

  To evade detection, CnC servers are leveraging social networking sites like Facebook and Twitter for communicating with infected machines. Also, to mask exfiltrated content, attackers embed information inside common files, such as JPGs, to give network scanning tools the impression of normal traffic.


Behavior Monitoring in Endpoint Protection Platform There are some EPP solutions that are considered very innovative (Crowdstrike, SentinelOne...) for the use of Behavior Monitoring. What is the difference with more standard EPP solution (ex. Symantec Endpoint Protection) that have also some behavioral monitoring capabilities?

Generically, an EDR-EPP combination such as the ones you describe will assign a threat score based on machine learning, statistical techniques, and a variety of known badness factors, such as enrichments from machine-readable threat intelligence (which can, in turn, also be informed by machine learning, reinforcement learning, and statistical techniques).
I would say the primary variables that lead to a higher threat score (and this changes over time), would be Prevalence factorization, such as through a large customerbase, but also specific to each's environment(s).
Combined with spawning numerous processes, levering LOLbins in unusual/outlier ways, and other combinatorials (not too too many packaged Portable Executables will lever kernel timing functions and also have access to the camera, microphone, and network stacks -- only implants typically display ALL of this activity at once). Those combinatorials typically are referenced through function (API) analysis, and their associated imports. Anti-detection, system querying, anomalous in-binary values, and certain memory-handling conditions are supplementary to the above.
Please ask deeper questions on the above and I can provide deeper answers.


Store password in Public Domain using files and md5sum Whenever I check integrity of a file using md5sum, I get a string of alphanumeric characters to compare and verify if it was downloaded correctly.

Couldn't the concatenation of several of those strings be used as password? This would allow to 'store' the password in the clear, as long as I remember exactly which files produce said md5 strings.

I know it's as impractical as it gets, but I'm curious about possible security hazards and advantages, if any.

Advantages I can think of:

Capability to recover your password, even if your hard drives and back ups get nuked.
Being unable to input your password directly if interrogated. Although you could always point to the files, so not really any safeguard here.

Disadvantages I can see without barely any knowledge of information security:

Extremely impractical when compared with a password manager.
If the files are chosen poorly, or are prone to edit, the password could be lost or difficult to find. e.g. One of the files is a wallpaper from a popular show and it sprawls many edits by its fans.
The password is accessible by anyone with internet connection. The only thing protecting it is the fact that it could be any combination of files with a creation date older than the password itself.

As stated, I know next to nothing about IS. Please, correct any misconception or mistake in this question.

Advantages over a password manager: Little to none.

Security problems:

Your password generation technique would be logged in command history.
Any file access mechanisms would record access to these files every time you log in.
Your password would be visible on screen every time you needed to use it.
If any files change without your knowledge, your password is lost.


Downloaded file checksums More than often next to the download button of a file there is a variety of checksums.

When I download a file what security risks am I exposed to if I don't check for its integrity?

When I download a file what security risks am I exposed to if I don't check for its integrity?

If the checksums are published on the same server which also hosts the downloads then there is not much security risks of not checking. If an attacker would be able to manipulate the downloads (s)he would probably be able to manipulate the checksums too. So the main problem is that you might not detect that the download is corrupted.

It is another case if the checksum are provided on different server than the downloads. If the checksums are served by a well protected server and are served through https, than it does not matter much if the downloaded files itself are hosted on more problematic sites and without http, at least as long as each user verified that the downloaded file matches the published checksums. Thus in this case it would be a larger security risk to not validating the checksums.


Is randomizing cookie names a good idea? What security benefits would randomizing cookie names on a website offer? What are some of the challenges it would create?

I don't think you gain a lot since they'd still be associated with the site, or some sub-domain of it.

As for the downsides, you'd have to have some lookup to figure out what the name for a particular cookie is so you can know where the data you stored previously can be found.

I think you're better off not worrying about it, and instead make sure you only store some unique identifier so you can tell who it is, provide adequate security to keep others out of their account, and store all other user-related data internally in your own back-end database.


Can we protect domain name by law? Some company have domain names worth a million dollar. But sometime they are lost to hackers. So I wonder how can we protect domains by law instead of technology?

It depends on the law in your country and the law in the country the registration company is in. In Europe domain names are subject to the trademark law. So a domain name violating a trademark is a valid reason to go to court.